]> vaikene.ee Git - evaf/commitdiff
Now uses Common::iApp::name()
authorEnar Väikene <enar@vaikene.net>
Thu, 21 Jul 2011 10:38:31 +0000 (13:38 +0300)
committerEnar Väikene <enar@vaikene.net>
Thu, 21 Jul 2011 10:38:31 +0000 (13:38 +0300)
- for the window title;
- for the stored window settings.

src/plugins/SdiWindow/sdiwindow.cpp

index b63ab978606f0b27329b7302f1f33673992eaf21..a804dfc14cc64dc70a8739612dc8decf3a0636a7 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <Common/iLogger>
 #include <Common/iRegistry>
+#include <Common/iApp>
 
 #include <QtGui>
 
@@ -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