mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
Use simpler DEFINE for detecting Qt5 so moc will work too.
This commit is contained in:
@@ -39,7 +39,7 @@ PeersAdditionDlg::PeersAdditionDlg(QWidget *parent)
|
||||
setupUi(this);
|
||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(validateInput()));
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifdef QBT_USES_QT5
|
||||
label_format->hide();
|
||||
peers_txt->setPlaceholderText("Format: IPv4:port / [IPv6]:port");
|
||||
#endif
|
||||
|
||||
@@ -100,7 +100,7 @@ PropertiesWidget::PropertiesWidget(QWidget *parent, MainWindow* main_window, Tra
|
||||
connect(filesList->header(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveSettings()));
|
||||
connect(filesList->header(), SIGNAL(sortIndicatorChanged(int, Qt::SortOrder)), this, SLOT(saveSettings()));
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
#ifdef QBT_USES_QT5
|
||||
// set bar height relative to screen dpi
|
||||
int barHeight = devicePixelRatio() * 18;
|
||||
#else
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <QApplication>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifndef QBT_USES_QT5
|
||||
#include <QPlastiqueStyle>
|
||||
#else
|
||||
#include <QProxyStyle>
|
||||
@@ -82,7 +82,7 @@ void PropListDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
||||
QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter);
|
||||
#else
|
||||
// XXX: To avoid having the progress text on the right of the bar
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifndef QBT_USES_QT5
|
||||
QPlastiqueStyle st;
|
||||
#else
|
||||
QProxyStyle st("fusion");
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <QDebug>
|
||||
#include <QUrl>
|
||||
#include <QMessageBox>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifdef QBT_USES_QT5
|
||||
#include <QTableView>
|
||||
#include <QHeaderView>
|
||||
#endif
|
||||
@@ -85,7 +85,7 @@ TrackerList::TrackerList(PropertiesWidget *properties): QTreeWidget(), propertie
|
||||
deleteHotkey = new QShortcut(QKeySequence(QKeySequence::Delete), this, SLOT(deleteSelectedTrackers()), 0, Qt::WidgetShortcut);
|
||||
copyHotkey = new QShortcut(QKeySequence(Qt::ControlModifier + Qt::Key_C), this, SLOT(copyTrackerUrl()), 0, Qt::WidgetShortcut);
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
|
||||
#ifdef QBT_USES_QT5
|
||||
// This hack fixes reordering of first column with Qt5.
|
||||
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
|
||||
QTableView unused;
|
||||
|
||||
Reference in New Issue
Block a user