mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Fix functions and macros using to support both Qt4 and Qt5.
This commit is contained in:
committed by
sledgehammer999
parent
763d8a392f
commit
ce3aac5f9d
10
src/main.cpp
10
src/main.cpp
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user