|
|
@ -35,6 +35,9 @@ |
|
|
|
#include <QMenu> |
|
|
|
#include <QMenu> |
|
|
|
#include <QClipboard> |
|
|
|
#include <QClipboard> |
|
|
|
#include <QMessageBox> |
|
|
|
#include <QMessageBox> |
|
|
|
|
|
|
|
#ifdef QBT_USES_QT5 |
|
|
|
|
|
|
|
#include <QTableView> |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#include "base/net/reverseresolution.h" |
|
|
|
#include "base/net/reverseresolution.h" |
|
|
|
#include "base/bittorrent/torrenthandle.h" |
|
|
|
#include "base/bittorrent/torrenthandle.h" |
|
|
@ -113,6 +116,15 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent) |
|
|
|
connect(header(), SIGNAL(sectionClicked(int)), SLOT(handleSortColumnChanged(int))); |
|
|
|
connect(header(), SIGNAL(sectionClicked(int)), SLOT(handleSortColumnChanged(int))); |
|
|
|
handleSortColumnChanged(header()->sortIndicatorSection()); |
|
|
|
handleSortColumnChanged(header()->sortIndicatorSection()); |
|
|
|
m_copyHotkey = new QShortcut(QKeySequence(Qt::ControlModifier + Qt::Key_C), this, SLOT(copySelectedPeers()), 0, Qt::WidgetShortcut); |
|
|
|
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() |
|
|
|
PeerListWidget::~PeerListWidget() |
|
|
|