Drop Qt 4 support

This commit is contained in:
Eugene Shalygin
2017-01-19 13:10:09 +01:00
parent 60998a68eb
commit e64bb1de8c
67 changed files with 48 additions and 8809 deletions

View File

@@ -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);

View File

@@ -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);