Fix functions and macros using to support both Qt4 and Qt5.

This commit is contained in:
Vladimir Golovnev (Glassez)
2013-09-21 11:59:58 +04:00
committed by sledgehammer999
parent 763d8a392f
commit ce3aac5f9d
51 changed files with 260 additions and 181 deletions

View File

@@ -59,7 +59,7 @@ Q_IMPORT_PLUGIN(qico)
#include "preferences.h"
#include "qinisettings.h"
#if defined(Q_WS_X11) || defined(Q_WS_MAC)
#if defined(Q_OS_UNIX)
#include <signal.h>
#include <execinfo.h>
#include "stacktrace.h"
@@ -137,7 +137,7 @@ public:
#include "main.moc"
#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(STACKTRACE_WIN)
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
void sigintHandler(int) {
signal(SIGINT, 0);
qDebug("Catching SIGINT, exiting cleanly");
@@ -353,7 +353,7 @@ int main(int argc, char *argv[]) {
#ifndef DISABLE_GUI
app.setQuitOnLastWindowClosed(false);
#endif
#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(STACKTRACE_WIN)
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
signal(SIGABRT, sigabrtHandler);
signal(SIGTERM, sigtermHandler);
signal(SIGINT, sigintHandler);
@@ -374,9 +374,9 @@ int main(int argc, char *argv[]) {
QObject::connect(&app, SIGNAL(messageReceived(const QString&)),
&window, SLOT(processParams(const QString&)));
app.setActivationWindow(&window);
#ifdef Q_WS_MAC
#ifdef Q_OS_MAC
static_cast<QMacApplication*>(&app)->setReadyToProcessEvents();
#endif // Q_WS_MAC
#endif // Q_OS_MAC
#else
// Load Headless class
HeadlessLoader loader(torrents);