diff options
Diffstat (limited to 'client/Dialog.cpp')
-rw-r--r-- | client/Dialog.cpp | 23 |
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) |