Handle GLib logs ourself.

This commit is contained in:
John Maguire 2010-07-25 01:44:46 +00:00
parent c010a66e3f
commit 95d5906995
1 changed files with 9 additions and 0 deletions

View File

@ -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>("Directory");
qRegisterMetaType<DirectoryList>("DirectoryList");
qRegisterMetaType<Subdirectory>("Subdirectory");