From effd3f39b2e2ef28a54ee8410d4d10f33e60e016 Mon Sep 17 00:00:00 2001 From: crowning2 Date: Tue, 10 Mar 2015 09:09:41 +0100 Subject: [PATCH] Minor refactoring --- src/qt/guiutil.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 5983789cd..42e5998a9 100755 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -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; }