From 010403699a370cbebcba0b570cdfa35489074e88 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Fri, 13 May 2011 10:09:17 +0300 Subject: [PATCH] GUI: Initialize Settings in main. Setting organization and program name in main() allows us to cleanup Settings class usage. As we don't need to keep using the one instance of Settings but can create new Settings class whenever we need to access settings. According to the Qt documentation creating Settings class is fast. --- gui/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/main.cpp b/gui/main.cpp index 30dcc246b..47c59b027 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -18,6 +18,7 @@ #include +#include #include #include #include @@ -36,6 +37,9 @@ int main(int argc, char *argv[]) if (!CheckArgs(app.arguments())) return 0; + QCoreApplication::setOrganizationName("Cppcheck"); + QCoreApplication::setApplicationName("Cppcheck-GUI"); + app.setWindowIcon(QIcon(":icon.png")); // Register this metatype that is used to transfer error info