1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix #2194: Create QApplication before logging

This commit is contained in:
tux3 2016-01-21 02:41:13 +01:00
parent 24f5e728a1
commit ff6725fe2a
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -93,12 +93,13 @@ void logMessageHandler(QtMsgType type, const QMessageLogContext& ctxt, const QSt
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
qInstallMessageHandler(logMessageHandler); // Enable log as early as possible
QApplication a(argc, argv); QApplication a(argc, argv);
a.setApplicationName("qTox"); a.setApplicationName("qTox");
a.setOrganizationName("Tox"); a.setOrganizationName("Tox");
a.setApplicationVersion("\nGit commit: " + QString(GIT_VERSION)); a.setApplicationVersion("\nGit commit: " + QString(GIT_VERSION));
qInstallMessageHandler(logMessageHandler); // Enable log as early as possible (but not earlier!)
#if defined(Q_OS_OSX) #if defined(Q_OS_OSX)
//osx::moveToAppFolder(); TODO: Add setting to enable this feature. //osx::moveToAppFolder(); TODO: Add setting to enable this feature.
osx::migrateProfiles(); osx::migrateProfiles();