comparison ui/main.cpp @ 672:376978e9cc61

Add debug output about style
author Andre Heinecke <andre.heinecke@intevation.de>
date Fri, 27 Jun 2014 11:35:22 +0200
parents 80d1a80b3e8d
children 1e61903f61e2
comparison
equal deleted inserted replaced
671:d4766b4922c9 672:376978e9cc61
15 #include <QtPlugin> 15 #include <QtPlugin>
16 #include <QMessageBox> 16 #include <QMessageBox>
17 #include <QSettings> 17 #include <QSettings>
18 #include <QDebug> 18 #include <QDebug>
19 #include <QTranslator> 19 #include <QTranslator>
20
21 #include <QStyleFactory>
20 22
21 #ifndef VERSION 23 #ifndef VERSION
22 #define VERSION "0.0.1" 24 #define VERSION "0.0.1"
23 #endif 25 #endif
24 26
51 QApplication::setQuitOnLastWindowClosed(false); 53 QApplication::setQuitOnLastWindowClosed(false);
52 QApplication::setOrganizationName(QString::fromLatin1(ORGANIZATION)); 54 QApplication::setOrganizationName(QString::fromLatin1(ORGANIZATION));
53 QApplication::setApplicationName(QString::fromLatin1(APPNAME)); 55 QApplication::setApplicationName(QString::fromLatin1(APPNAME));
54 QApplication::setApplicationVersion(QString::fromLatin1(VERSION)); 56 QApplication::setApplicationVersion(QString::fromLatin1(VERSION));
55 QSettings::setDefaultFormat(QSettings::IniFormat); 57 QSettings::setDefaultFormat(QSettings::IniFormat);
58
59 qDebug() << "Application style is: " << app.style()->metaObject()->className();
60 qDebug() << "Available styles: " << QStyleFactory::keys().join(", ");
56 61
57 QStringList arguments = QApplication::arguments(); 62 QStringList arguments = QApplication::arguments();
58 bool trayMode = arguments.contains("--tray"); 63 bool trayMode = arguments.contains("--tray");
59 64
60 QSettings settings; 65 QSettings settings;

http://wald.intevation.org/projects/trustbridge/