mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-02 13:48:05 -06:00
Drop Qt 4 support
This commit is contained in:
@@ -36,9 +36,7 @@
|
||||
#include <QDropEvent>
|
||||
#include <QMimeData>
|
||||
#include <QClipboard>
|
||||
#ifdef QBT_USES_QT5
|
||||
#include <QTableView>
|
||||
#endif
|
||||
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
@@ -69,14 +67,13 @@ PluginSelectDlg::PluginSelectDlg(SearchEngine *pluginManager, QWidget *parent)
|
||||
setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
#ifdef QBT_USES_QT5
|
||||
// This hack fixes reordering of first column with Qt5.
|
||||
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
|
||||
QTableView unused;
|
||||
unused.setVerticalHeader(pluginsTree->header());
|
||||
pluginsTree->header()->setParent(pluginsTree);
|
||||
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
|
||||
#endif
|
||||
|
||||
pluginsTree->setRootIsDecorated(false);
|
||||
pluginsTree->header()->resizeSection(0, 160);
|
||||
pluginsTree->header()->resizeSection(1, 80);
|
||||
|
||||
@@ -39,9 +39,7 @@
|
||||
#include <QLabel>
|
||||
#include <QPalette>
|
||||
#include <QVBoxLayout>
|
||||
#ifdef QBT_USES_QT5
|
||||
#include <QTableView>
|
||||
#endif
|
||||
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/preferences.h"
|
||||
@@ -67,14 +65,13 @@ SearchTab::SearchTab(SearchWidget *parent)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
#ifdef QBT_USES_QT5
|
||||
// This hack fixes reordering of first column with Qt5.
|
||||
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
|
||||
QTableView unused;
|
||||
unused.setVerticalHeader(m_ui->resultsBrowser->header());
|
||||
m_ui->resultsBrowser->header()->setParent(m_ui->resultsBrowser);
|
||||
unused.setVerticalHeader(new QHeaderView(Qt::Horizontal));
|
||||
#endif
|
||||
|
||||
loadSettings();
|
||||
m_ui->resultsBrowser->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
||||
header()->setStretchLastSection(false);
|
||||
|
||||
Reference in New Issue
Block a user