Minor refactoring

This commit is contained in:
crowning2 2015-03-10 09:09:41 +01:00
parent a49668b473
commit effd3f39b2

View File

@ -768,21 +768,21 @@ QString loadStyleSheet()
{
QString styleSheet;
QSettings settings;
QString cssName;
QString theme = settings.value("theme", "").toString();
if(!theme.isEmpty()){
QFile qFile(QString(":/css/") + theme);
if (qFile.open(QFile::ReadOnly)) {
styleSheet = QLatin1String(qFile.readAll());
}
cssName = QString(":/css/") + theme;
}
else {
QFile qFile(":/css/drkblue");
if (qFile.open(QFile::ReadOnly)) {
styleSheet = QLatin1String(qFile.readAll());
}
cssName = QString(":/css/drkblue");
}
QFile qFile(cssName);
if (qFile.open(QFile::ReadOnly)) {
styleSheet = QLatin1String(qFile.readAll());
}
return styleSheet;
}