From a17fc84fd0e79c6a3154ff83cad5c005fbe2810a Mon Sep 17 00:00:00 2001 From: thalieht Date: Sun, 31 Jan 2016 16:54:16 +0200 Subject: [PATCH] Unlock first column in peerlist too I just copy pasted from trackerlist (tested ofc). No idea if it can be done differently. --- src/gui/properties/peerlistwidget.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/properties/peerlistwidget.cpp b/src/gui/properties/peerlistwidget.cpp index 96fefa3b4..705f513c5 100644 --- a/src/gui/properties/peerlistwidget.cpp +++ b/src/gui/properties/peerlistwidget.cpp @@ -35,6 +35,9 @@ #include #include #include +#ifdef QBT_USES_QT5 +#include +#endif #include "base/net/reverseresolution.h" #include "base/bittorrent/torrenthandle.h" @@ -113,6 +116,15 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent) connect(header(), SIGNAL(sectionClicked(int)), SLOT(handleSortColumnChanged(int))); handleSortColumnChanged(header()->sortIndicatorSection()); m_copyHotkey = new QShortcut(QKeySequence(Qt::ControlModifier + Qt::Key_C), this, SLOT(copySelectedPeers()), 0, Qt::WidgetShortcut); + +#ifdef QBT_USES_QT5 + // This hack fixes reordering of first column with Qt5. + // https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777 + QTableView unused; + unused.setVerticalHeader(this->header()); + this->header()->setParent(this); + unused.setVerticalHeader(new QHeaderView(Qt::Horizontal)); +#endif } PeerListWidget::~PeerListWidget()