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:
parent
31e85f4097
commit
010403699a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue