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.
This commit is contained in:
Kimmo Varis 2011-05-13 10:09:17 +03:00
parent 31e85f4097
commit 010403699a
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@
#include <QApplication>
#include <QCoreApplication>
#include <QTextCodec>
#include <QTranslator>
#include <QMetaType>
@ -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