From 95d5906995339988e4885727c8c0724792a3315f Mon Sep 17 00:00:00 2001 From: John Maguire Date: Sun, 25 Jul 2010 01:44:46 +0000 Subject: [PATCH] Handle GLib logs ourself. --- src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 49b0b1360..b73178c77 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -81,6 +81,13 @@ void LoadTranslation(const QString& prefix, const QString& path) { delete t; } +void GLog(const gchar* domain, + GLogLevelFlags level, + const gchar* message, + gpointer user_data) { + qDebug() << "GLOG" << message; +} + int main(int argc, char *argv[]) { #ifdef Q_OS_DARWIN // Do Mac specific startup to get media keys working. @@ -97,6 +104,8 @@ int main(int argc, char *argv[]) { g_type_init(); g_set_application_name(QCoreApplication::applicationName().toLocal8Bit()); + g_log_set_default_handler(&GLog, NULL); + qRegisterMetaType("Directory"); qRegisterMetaType("DirectoryList"); qRegisterMetaType("Subdirectory");