From: Enar Väikene Date: Thu, 21 Jul 2011 10:38:31 +0000 (+0300) Subject: Now uses Common::iApp::name() X-Git-Url: https://vaikene.ee/gitweb/overview.html?a=commitdiff_plain;h=25832959cd3a64849d1b95278a701a0b1eb86a65;p=evaf Now uses Common::iApp::name() - for the window title; - for the stored window settings. --- diff --git a/src/plugins/SdiWindow/sdiwindow.cpp b/src/plugins/SdiWindow/sdiwindow.cpp index b63ab97..a804dfc 100644 --- a/src/plugins/SdiWindow/sdiwindow.cpp +++ b/src/plugins/SdiWindow/sdiwindow.cpp @@ -22,6 +22,7 @@ #include #include +#include #include @@ -75,6 +76,8 @@ MainWindow::~MainWindow() bool MainWindow::init() { + setWindowTitle(Common::iApp::instance()->name()); + show(); EVAF_INFO("%s initialized", qPrintable(objectName())); @@ -92,7 +95,7 @@ void MainWindow::done() void MainWindow::saveSettings() { static int ver[4] = {VER_FILE_VERSION}; - QSettings settings(VER_COMPANY_NAME_STR, VER_PRODUCT_NAME_STR); + QSettings settings(VER_COMPANY_NAME_STR, Common::iApp::instance()->name()); settings.setValue(QString("%1/version/major").arg(objectName()), ver[0]); settings.setValue(QString("%1/version/minor").arg(objectName()), ver[1]); settings.setValue(QString("%1/geometry").arg(objectName()), saveGeometry()); @@ -101,7 +104,7 @@ void MainWindow::saveSettings() void MainWindow::restoreSettings() { static int ver[4] = {VER_FILE_VERSION}; - QSettings settings(VER_COMPANY_NAME_STR, VER_PRODUCT_NAME_STR); + QSettings settings(VER_COMPANY_NAME_STR, Common::iApp::instance()->name()); // Ignore saved settings if the version number is not the same // More intelligent checks can be implemented to allow upgrading from previous versions