mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 15:04:36 +00:00
Merge pull request #6693 from glassez/drop-qt4
Drop rest of qt4 support code
This commit is contained in:
commit
74fb070e78
@ -11,9 +11,6 @@ exists($$OUT_PWD/../conf.pri) {
|
|||||||
|
|
||||||
LIBS += -framework Carbon -framework IOKit
|
LIBS += -framework Carbon -framework IOKit
|
||||||
|
|
||||||
# C++11 support
|
|
||||||
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
|
|
||||||
|
|
||||||
QT_LANG_PATH = ../dist/qt-translations
|
QT_LANG_PATH = ../dist/qt-translations
|
||||||
DIST_PATH = ../dist/mac
|
DIST_PATH = ../dist/mac
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# C++11 support
|
|
||||||
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
|
|
||||||
|
|
||||||
exists(conf.pri) {
|
exists(conf.pri) {
|
||||||
# to the conf.pri goes all system dependent stuff
|
# to the conf.pri goes all system dependent stuff
|
||||||
include(conf.pri)
|
include(conf.pri)
|
||||||
|
@ -5,9 +5,6 @@ isEmpty(QMAKE_LRELEASE) {
|
|||||||
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
|
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
|
||||||
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
|
||||||
unix {
|
unix {
|
||||||
equals(QT_MAJOR_VERSION, 4) {
|
|
||||||
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
|
|
||||||
}
|
|
||||||
equals(QT_MAJOR_VERSION, 5) {
|
equals(QT_MAJOR_VERSION, 5) {
|
||||||
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
|
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
// GUI-only includes
|
// GUI-only includes
|
||||||
@ -168,7 +169,7 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
qDebug("qBittorrent is already running for this user.");
|
qDebug("qBittorrent is already running for this user.");
|
||||||
|
|
||||||
Utils::Misc::msleep(300);
|
QThread::msleep(300);
|
||||||
app->sendParams(params.torrents);
|
app->sendParams(params.torrents);
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QThread>
|
|
||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
#include <boost/version.hpp>
|
#include <boost/version.hpp>
|
||||||
#include <libtorrent/version.hpp>
|
#include <libtorrent/version.hpp>
|
||||||
@ -641,24 +640,6 @@ QSize Utils::Misc::largeIconSize()
|
|||||||
}
|
}
|
||||||
#endif // DISABLE_GUI
|
#endif // DISABLE_GUI
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
// Trick to get a portable sleep() function
|
|
||||||
class SleeperThread: public QThread
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static void msleep(unsigned long msecs)
|
|
||||||
{
|
|
||||||
QThread::msleep(msecs);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
void Utils::Misc::msleep(unsigned long msecs)
|
|
||||||
{
|
|
||||||
SleeperThread::msleep(msecs);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString Utils::Misc::osName()
|
QString Utils::Misc::osName()
|
||||||
{
|
{
|
||||||
// static initialization for usage in signal handler
|
// static initialization for usage in signal handler
|
||||||
|
@ -98,8 +98,6 @@ namespace Utils
|
|||||||
QList<int> intListfromStringList(const QStringList &l);
|
QList<int> intListfromStringList(const QStringList &l);
|
||||||
QList<bool> boolListfromStringList(const QStringList &l);
|
QList<bool> boolListfromStringList(const QStringList &l);
|
||||||
|
|
||||||
void msleep(unsigned long msecs);
|
|
||||||
|
|
||||||
#ifndef DISABLE_GUI
|
#ifndef DISABLE_GUI
|
||||||
void openPath(const QString& absolutePath);
|
void openPath(const QString& absolutePath);
|
||||||
void openFolderSelect(const QString& absolutePath);
|
void openFolderSelect(const QString& absolutePath);
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QBitArray>
|
#include <QBitArray>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
#include "base/bittorrent/session.h"
|
#include "base/bittorrent/session.h"
|
||||||
#include "base/preferences.h"
|
#include "base/preferences.h"
|
||||||
@ -780,7 +781,7 @@ void PropertiesWidget::renameSelectedFile()
|
|||||||
int timeout = 10;
|
int timeout = 10;
|
||||||
while (!QDir().rmpath(old_folder.absolutePath()) && timeout > 0) {
|
while (!QDir().rmpath(old_folder.absolutePath()) && timeout > 0) {
|
||||||
// FIXME: We should not sleep here (freezes the UI for 1 second)
|
// FIXME: We should not sleep here (freezes the UI for 1 second)
|
||||||
Utils::Misc::msleep(100);
|
QThread::msleep(100);
|
||||||
--timeout;
|
--timeout;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QSignalMapper>
|
#include <QSignalMapper>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
#include <libtorrent/session_status.hpp>
|
#include <libtorrent/session_status.hpp>
|
||||||
|
|
||||||
@ -40,7 +41,6 @@
|
|||||||
#include "base/bittorrent/session.h"
|
#include "base/bittorrent/session.h"
|
||||||
#include "base/bittorrent/sessionstatus.h"
|
#include "base/bittorrent/sessionstatus.h"
|
||||||
#include "base/preferences.h"
|
#include "base/preferences.h"
|
||||||
#include "base/utils/misc.h"
|
|
||||||
|
|
||||||
ComboBoxMenuButton::ComboBoxMenuButton(QWidget *parent, QMenu *menu)
|
ComboBoxMenuButton::ComboBoxMenuButton(QWidget *parent, QMenu *menu)
|
||||||
: QComboBox(parent)
|
: QComboBox(parent)
|
||||||
@ -152,7 +152,7 @@ void SpeedWidget::update()
|
|||||||
m_plot->pushPoint(point);
|
m_plot->pushPoint(point);
|
||||||
|
|
||||||
QMetaObject::invokeMethod(this, "graphUpdate", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(this, "graphUpdate", Qt::QueuedConnection);
|
||||||
Utils::Misc::msleep(1000);
|
QThread::msleep(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@ CONFIG += qt thread silent
|
|||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
|
DEFINES += BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||||
|
|
||||||
lessThan(QT_MAJOR_VERSION, 5): DEFINES += QStringLiteral=QLatin1String
|
|
||||||
|
|
||||||
# Windows specific configuration
|
# Windows specific configuration
|
||||||
win32: include(../winconf.pri)
|
win32: include(../winconf.pri)
|
||||||
|
|
||||||
@ -25,8 +23,7 @@ nogui {
|
|||||||
DEFINES += DISABLE_GUI
|
DEFINES += DISABLE_GUI
|
||||||
TARGET = qbittorrent-nox
|
TARGET = qbittorrent-nox
|
||||||
} else {
|
} else {
|
||||||
QT += xml
|
QT += xml concurrent widgets
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += concurrent widgets
|
|
||||||
CONFIG(static) {
|
CONFIG(static) {
|
||||||
DEFINES += QBT_STATIC_QT
|
DEFINES += QBT_STATIC_QT
|
||||||
QTPLUGIN += qico
|
QTPLUGIN += qico
|
||||||
|
@ -9,9 +9,6 @@ exists($$OUT_PWD/../conf.pri) {
|
|||||||
include(conf.pri)
|
include(conf.pri)
|
||||||
}
|
}
|
||||||
|
|
||||||
# C++11 support
|
|
||||||
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
|
|
||||||
|
|
||||||
# COMPILATION SPECIFIC
|
# COMPILATION SPECIFIC
|
||||||
!nogui:dbus: QT += dbus
|
!nogui:dbus: QT += dbus
|
||||||
|
|
||||||
|
@ -1,6 +1,3 @@
|
|||||||
# C++11 support
|
|
||||||
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=gnu++11
|
|
||||||
|
|
||||||
strace_win{
|
strace_win{
|
||||||
contains(QMAKE_HOST.arch, x86) {
|
contains(QMAKE_HOST.arch, x86) {
|
||||||
# i686 arch requires frame pointer preservation
|
# i686 arch requires frame pointer preservation
|
||||||
|
Loading…
x
Reference in New Issue
Block a user