diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-27 17:23:55 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-09-23 13:28:02 +0000 |
commit | 47e4ae86a8d87ec6388d9423aba86d1498b49012 (patch) | |
tree | 697a90c9e0d3e2213b054dd3a2ad21f9883d99e2 /examples/widgets/tools/settingseditor/main.cpp | |
parent | 2e02130e394083f8bc7fa04a8e0b6e0c0ed4e1b2 (diff) |
Polish the settings editor example.
- Set QtProject as organization.
- Remove unneeded member variables.
- Use member initialization in the constructor.
- Use new connection syntax in createActions()
to assemble the menu there, removing the createMenus()
function.
- Introduce a QSharedPointer to ensure settings are deleted.
Previously, the settings were parented on the tree widget,
which is a hack of sorts.
- Fix OS X macros.
Change-Id: Ibbc6bfb03eb5c7eda077b1a3aa3f1707667f7f13
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'examples/widgets/tools/settingseditor/main.cpp')
-rw-r--r-- | examples/widgets/tools/settingseditor/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/widgets/tools/settingseditor/main.cpp b/examples/widgets/tools/settingseditor/main.cpp index 842a474405..0947efd817 100644 --- a/examples/widgets/tools/settingseditor/main.cpp +++ b/examples/widgets/tools/settingseditor/main.cpp @@ -45,6 +45,9 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); + QCoreApplication::setApplicationName("Settings Editor"); + QCoreApplication::setApplicationVersion(QT_VERSION_STR); + MainWindow mainWin; mainWin.show(); return app.exec(); |