examples: set application name and organization for QSettings
authorShawn Rutledge <shawn.rutledge@digia.com>
Tue, 6 Aug 2013 13:04:35 +0000 (15:04 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 15 Aug 2013 12:12:42 +0000 (14:12 +0200)
With the Qt.labs.settings module available, it makes sense for each
example to have its own settings file.

Change-Id: I8257f04ec13c7caf9995e03626e5453c653cfb92
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
examples/quick/shared/shared.h

index c59e858..648b294 100644 (file)
@@ -44,6 +44,9 @@
 #define DECLARATIVE_EXAMPLE_MAIN(NAME) int main(int argc, char* argv[]) \
 {\
     QGuiApplication app(argc,argv);\
+    app.setOrganizationName("Qt Project");\
+    app.setOrganizationDomain("qt-project.org");\
+    app.setApplicationName(QFileInfo(app.applicationFilePath()).baseName());\
     QQuickView view;\
     view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit()));\
     view.setSource(QUrl("qrc:///" #NAME ".qml")); \