From 107b8337031e213cdc1135e7fc2335339d755dbd Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 20 Jul 2010 17:13:28 +0000 Subject: [PATCH] Imported recent patches from stable branch --- configure | 13 ++++++++++++- qcm/libnotify.qcm | 13 ++++++++++++- src/main.cpp | 8 ++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0948228b7..8f8a4010a 100755 --- a/configure +++ b/configure @@ -529,10 +529,21 @@ public: } else { return false; } + QStringList incs3; + QString req_ver3 = "2.0"; + QString version3, libs3, other3; + if(conf->findPkgConfig("gtk+-2.0", mode, req_ver3, &version3, &incs3, &libs3, &other3)) { + for(int n = 0; n < incs3.count(); ++n) + conf->addIncludePath(incs3[n]); + if(!libs3.isEmpty()) + conf->addLib(libs3); + } else { + return false; + } } else { return false; } - + return true; } }; diff --git a/qcm/libnotify.qcm b/qcm/libnotify.qcm index 84801326b..6bdba595d 100644 --- a/qcm/libnotify.qcm +++ b/qcm/libnotify.qcm @@ -40,10 +40,21 @@ public: } else { return false; } + QStringList incs3; + QString req_ver3 = "2.0"; + QString version3, libs3, other3; + if(conf->findPkgConfig("gtk+-2.0", mode, req_ver3, &version3, &incs3, &libs3, &other3)) { + for(int n = 0; n < incs3.count(); ++n) + conf->addIncludePath(incs3[n]); + if(!libs3.isEmpty()) + conf->addLib(libs3); + } else { + return false; + } } else { return false; } - + return true; } }; diff --git a/src/main.cpp b/src/main.cpp index e561c69dc..b0c4f01eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -181,6 +181,14 @@ int main(int argc, char *argv[]){ #endif #endif + // XXX: Workaround to avoid the following Qt bug: + // http://bugreports.qt.nokia.com/browse/QTBUG-7105 +#ifndef DISABLE_GUI + // Force the creation of an input context to avoid + // a crash in QApplication destructor + app->inputContext(); +#endif + // Check if qBittorrent is already running for this user if(app->isRunning()) { qDebug("qBittorrent is already running for this user.");