summaryrefslogtreecommitdiff
path: root/client/Dialog.cpp
diff options
context:
space:
mode:
authorAlex Borisov <borisov.alexandr@rambler.ru>2011-11-13 14:03:39 +0200
committerAlex Borisov <borisov.alexandr@rambler.ru>2011-11-13 14:03:39 +0200
commitb8a4ef60a8fdde02460d329c8b5caac414c38ebd (patch)
treef388d41383857e2e89162de18302f672c574000d /client/Dialog.cpp
parentd3f1d599d4a9d44f48ae91d84618e3cdc4651aa0 (diff)
style.qss exitstance check. FIX: reading config files issue
Diffstat (limited to 'client/Dialog.cpp')
-rw-r--r--client/Dialog.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/client/Dialog.cpp b/client/Dialog.cpp
index b750945..d943d58 100644
--- a/client/Dialog.cpp
+++ b/client/Dialog.cpp
@@ -92,14 +92,21 @@ ProxyDialog::ProxyDialog(QWidget *parent): QDialog(parent)
mainLayout->addLayout(bottomPanelLayout);
setLayout(mainLayout);
- QString cssPath = this_app->applicationDirPath()+ "/style.qss";
- QFile file(cssPath);
- file.open(QFile::ReadOnly);
- QString cssStr = QString::fromLocal8Bit(file.readAll());
- file.close();
-
- Logger::Debug("Going to apply css style: %s\n", cssStr.toLocal8Bit().data());
- setStyleSheet(cssStr);
+ QString cssFile = this_app->applicationDirPath()+ "/style.qss";
+ QFileInfo cssFIleInfo(cssFile);
+ if (cssFIleInfo.exists())
+ {
+ Logger::Info("CSS stylesheet found. Trying to apply.\n");
+ QFile file(cssFile);
+ file.open(QFile::ReadOnly);
+ QString cssStr = QString::fromLocal8Bit(file.readAll());
+ file.close();
+ setStyleSheet(cssStr);
+ }
+ else
+ {
+ Logger::Info("CSS stylesheet file 'style.qss' wasn't found.\n");
+ }
}
void ProxyDialog::CountryActivated(int index)