Browse Source

Merge pull request #10918 from Chocobo1/trackers

Various code clean up
adaptive-webui-19844
Mike Tzou 5 years ago committed by GitHub
parent
commit
94e2c44840
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/app/CMakeLists.txt
  2. 5
      src/gui/CMakeLists.txt
  3. 20
      src/gui/advancedsettings.cpp
  4. 2
      src/gui/advancedsettings.h
  5. 4
      src/gui/cookiesdialog.h
  6. 3
      src/gui/executionlogwidget.h
  7. 3
      src/gui/gui.pri
  8. 0
      src/gui/lineedit.cpp
  9. 0
      src/gui/lineedit.h
  10. 13
      src/gui/lineedit/CMakeLists.txt
  11. 3
      src/gui/lineedit/lineedit.pri
  12. 3
      src/gui/powermanagement/CMakeLists.txt
  13. 2
      src/gui/properties/CMakeLists.txt
  14. 5
      src/gui/properties/peerlistwidget.cpp
  15. 12
      src/gui/properties/peerlistwidget.h
  16. 22
      src/gui/properties/propertieswidget.cpp
  17. 12
      src/gui/properties/propertieswidget.h
  18. 1
      src/gui/properties/proplistdelegate.cpp
  19. 1
      src/gui/properties/speedwidget.cpp
  20. 3
      src/gui/properties/speedwidget.h
  21. 121
      src/gui/properties/trackerlistwidget.cpp
  22. 19
      src/gui/properties/trackerlistwidget.h
  23. 5
      src/gui/qtnotify/CMakeLists.txt
  24. 12
      src/gui/rss/automatedrssdownloader.cpp
  25. 13
      src/gui/rss/automatedrssdownloader.h
  26. 10
      src/gui/rss/rsswidget.cpp
  27. 3
      src/gui/rss/rsswidget.h
  28. 2
      src/gui/search/CMakeLists.txt
  29. 4
      src/gui/search/searchjobwidget.h
  30. 4
      src/gui/search/searchwidget.cpp
  31. 2
      src/gui/search/searchwidget.h
  32. 2
      src/gui/torrentcontentmodelfolder.cpp
  33. 2
      src/gui/torrentcontentmodelitem.cpp
  34. 8
      src/gui/torrentcreatordialog.h
  35. 1
      src/gui/transferlistdelegate.h
  36. 20
      src/gui/transferlistwidget.cpp
  37. 17
      src/gui/transferlistwidget.h
  38. 2
      src/webui/CMakeLists.txt

3
src/app/CMakeLists.txt

@ -1,10 +1,13 @@ @@ -1,10 +1,13 @@
add_executable(qBittorrent
# headers
application.h
applicationinstancemanager.h
cmdoptions.h
filelogger.h
qtlocalpeer/qtlocalpeer.h
upgrade.h
# sources
application.cpp
applicationinstancemanager.cpp
cmdoptions.cpp

5
src/gui/CMakeLists.txt

@ -4,7 +4,6 @@ set(CMAKE_AUTOUIC True) @@ -4,7 +4,6 @@ set(CMAKE_AUTOUIC True)
add_library(qbt_gui_headers INTERFACE)
target_include_directories(qbt_gui_headers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(lineedit)
add_subdirectory(properties)
add_subdirectory(powermanagement)
add_subdirectory(rss)
@ -30,6 +29,7 @@ fspathedit_p.h @@ -30,6 +29,7 @@ fspathedit_p.h
guiiconprovider.h
hidabletabwidget.h
ipsubnetwhitelistoptionsdialog.h
lineedit.h
loglistwidget.h
mainwindow.h
optionsdialog.h
@ -80,6 +80,7 @@ fspathedit.cpp @@ -80,6 +80,7 @@ fspathedit.cpp
fspathedit_p.cpp
guiiconprovider.cpp
ipsubnetwhitelistoptionsdialog.cpp
lineedit.cpp
loglistwidget.cpp
mainwindow.cpp
optionsdialog.cpp
@ -137,7 +138,7 @@ updownratiodialog.ui @@ -137,7 +138,7 @@ updownratiodialog.ui
target_link_libraries(qbt_gui
PRIVATE
qbt_lineedit qbt_powermanagement qbt_rss qbt_properties qbt_searchengine
qbt_powermanagement qbt_rss qbt_properties qbt_searchengine
qbt_base
)

20
src/gui/advancedsettings.cpp

@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
#include <QHeaderView>
#include <QHostAddress>
#include <QLabel>
#include <QNetworkInterface>
#include "base/bittorrent/session.h"
@ -313,15 +314,20 @@ void AdvancedSettings::loadAdvancedSettings() @@ -313,15 +314,20 @@ void AdvancedSettings::loadAdvancedSettings()
const BitTorrent::Session *const session = BitTorrent::Session::instance();
// add section headers
labelQbtLink.setText(makeLink("https://github.com/qbittorrent/qBittorrent/wiki/Explanation-of-Options-in-qBittorrent#Advanced"
, tr("Open documentation")));
labelQbtLink.setOpenExternalLinks(true);
addRow(QBITTORRENT_HEADER, QString("<b>%1</b>").arg(tr("qBittorrent Section")), &labelQbtLink);
auto *labelQbtLink = new QLabel(
makeLink(QLatin1String("https://github.com/qbittorrent/qBittorrent/wiki/Explanation-of-Options-in-qBittorrent#Advanced")
, tr("Open documentation"))
, this);
labelQbtLink->setOpenExternalLinks(true);
addRow(QBITTORRENT_HEADER, QString("<b>%1</b>").arg(tr("qBittorrent Section")), labelQbtLink);
static_cast<QLabel *>(cellWidget(QBITTORRENT_HEADER, PROPERTY))->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
labelLibtorrentLink.setText(makeLink("https://www.libtorrent.org/reference.html", tr("Open documentation")));
labelLibtorrentLink.setOpenExternalLinks(true);
addRow(LIBTORRENT_HEADER, QString("<b>%1</b>").arg(tr("libtorrent Section")), &labelLibtorrentLink);
auto *labelLibtorrentLink = new QLabel(
makeLink(QLatin1String("https://www.libtorrent.org/reference.html")
, tr("Open documentation"))
, this);
labelLibtorrentLink->setOpenExternalLinks(true);
addRow(LIBTORRENT_HEADER, QString("<b>%1</b>").arg(tr("libtorrent Section")), labelLibtorrentLink);
static_cast<QLabel *>(cellWidget(LIBTORRENT_HEADER, PROPERTY))->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
// Async IO threads

2
src/gui/advancedsettings.h

@ -31,7 +31,6 @@ @@ -31,7 +31,6 @@
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include <QLineEdit>
#include <QSpinBox>
#include <QTableWidget>
@ -58,7 +57,6 @@ private: @@ -58,7 +57,6 @@ private:
void loadAdvancedSettings();
template <typename T> void addRow(int row, const QString &text, T *widget);
QLabel labelQbtLink, labelLibtorrentLink;
QSpinBox spinBoxAsyncIOThreads, spinBoxFilePoolSize, spinBoxCheckingMemUsage, spinBoxCache,
spinBoxSaveResumeDataInterval, spinBoxOutgoingPortsMin, spinBoxOutgoingPortsMax, spinBoxListRefresh,
spinBoxTrackerPort, spinBoxCacheTTL, spinBoxSendBufferWatermark, spinBoxSendBufferLowWatermark,

4
src/gui/cookiesdialog.h

@ -31,13 +31,13 @@ @@ -31,13 +31,13 @@
#include <QDialog>
class CookiesModel;
namespace Ui
{
class CookiesDialog;
}
class CookiesModel;
class CookiesDialog : public QDialog
{
Q_OBJECT

3
src/gui/executionlogwidget.h

@ -32,11 +32,12 @@ @@ -32,11 +32,12 @@
#include <QWidget>
#include "base/logger.h"
class LogListWidget;
namespace Ui
{
class ExecutionLogWidget;
}
class LogListWidget;
class ExecutionLogWidget : public QWidget
{

3
src/gui/gui.pri

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
INCLUDEPATH += $$PWD
include(lineedit/lineedit.pri)
include(powermanagement/powermanagement.pri)
include(properties/properties.pri)
unix:!macx:dbus: include(qtnotify/qtnotify.pri)
@ -24,6 +23,7 @@ HEADERS += \ @@ -24,6 +23,7 @@ HEADERS += \
$$PWD/guiiconprovider.h \
$$PWD/hidabletabwidget.h \
$$PWD/ipsubnetwhitelistoptionsdialog.h \
$$PWD/lineedit.h \
$$PWD/loglistwidget.h \
$$PWD/mainwindow.h \
$$PWD/optionsdialog.h \
@ -85,6 +85,7 @@ SOURCES += \ @@ -85,6 +85,7 @@ SOURCES += \
$$PWD/fspathedit_p.cpp \
$$PWD/guiiconprovider.cpp \
$$PWD/ipsubnetwhitelistoptionsdialog.cpp \
$$PWD/lineedit.cpp \
$$PWD/loglistwidget.cpp \
$$PWD/mainwindow.cpp \
$$PWD/optionsdialog.cpp \

0
src/gui/lineedit/src/lineedit.cpp → src/gui/lineedit.cpp

0
src/gui/lineedit/src/lineedit.h → src/gui/lineedit.h

13
src/gui/lineedit/CMakeLists.txt

@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
add_library(qbt_lineedit STATIC
src/lineedit.cpp
src/lineedit.h
)
target_link_libraries(qbt_lineedit
PRIVATE
qbt_gui_headers
PUBLIC
Qt5::Widgets
)
target_include_directories(qbt_lineedit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)

3
src/gui/lineedit/lineedit.pri

@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
INCLUDEPATH += $$PWD/src
HEADERS += $$PWD/src/lineedit.h
SOURCES += $$PWD/src/lineedit.cpp

3
src/gui/powermanagement/CMakeLists.txt

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
add_library(qbt_powermanagement STATIC
# headers
powermanagement.h
# sources
powermanagement.cpp
)

2
src/gui/properties/CMakeLists.txt

@ -39,7 +39,7 @@ target_link_libraries(qbt_properties @@ -39,7 +39,7 @@ target_link_libraries(qbt_properties
PRIVATE
qbt_gui_headers
PUBLIC
qbt_base qbt_lineedit Qt5::Widgets
qbt_base Qt5::Widgets
)
target_include_directories(qbt_properties

5
src/gui/properties/peerlistwidget.cpp

@ -34,6 +34,7 @@ @@ -34,6 +34,7 @@
#include <QMenu>
#include <QMessageBox>
#include <QSet>
#include <QShortcut>
#include <QSortFilterProxyModel>
#include <QStandardItemModel>
#include <QTableView>
@ -133,8 +134,8 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent) @@ -133,8 +134,8 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent)
connect(header(), &QHeaderView::sectionResized, this, &PeerListWidget::saveSettings);
connect(header(), &QHeaderView::sortIndicatorChanged, this, &PeerListWidget::saveSettings);
handleSortColumnChanged(header()->sortIndicatorSection());
m_copyHotkey = new QShortcut(QKeySequence::Copy, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_copyHotkey, &QShortcut::activated, this, &PeerListWidget::copySelectedPeers);
const auto *copyHotkey = new QShortcut(QKeySequence::Copy, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(copyHotkey, &QShortcut::activated, this, &PeerListWidget::copySelectedPeers);
// This hack fixes reordering of first column with Qt5.
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777

12
src/gui/properties/peerlistwidget.h

@ -32,7 +32,6 @@ @@ -32,7 +32,6 @@
#include <QHash>
#include <QPointer>
#include <QSet>
#include <QShortcut>
#include <QTreeView>
class QSortFilterProxyModel;
@ -43,11 +42,6 @@ class PeerListDelegate; @@ -43,11 +42,6 @@ class PeerListDelegate;
class PeerListSortModel;
class PropertiesWidget;
namespace Net
{
class ReverseResolution;
}
namespace BitTorrent
{
class TorrentHandle;
@ -55,6 +49,11 @@ namespace BitTorrent @@ -55,6 +49,11 @@ namespace BitTorrent
struct PeerAddress;
}
namespace Net
{
class ReverseResolution;
}
class PeerListWidget : public QTreeView
{
Q_OBJECT
@ -92,7 +91,6 @@ private: @@ -92,7 +91,6 @@ private:
QPointer<Net::ReverseResolution> m_resolver;
PropertiesWidget *m_properties;
bool m_resolveCountries;
QShortcut *m_copyHotkey;
};
#endif // PEERLISTWIDGET_H

22
src/gui/properties/propertieswidget.cpp

@ -44,6 +44,7 @@ @@ -44,6 +44,7 @@
#include "base/bittorrent/downloadpriority.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/preferences.h"
#include "base/unicodestrings.h"
#include "base/utils/fs.h"
@ -149,16 +150,17 @@ PropertiesWidget::PropertiesWidget(QWidget *parent) @@ -149,16 +150,17 @@ PropertiesWidget::PropertiesWidget(QWidget *parent)
connect(m_tabBar, &PropTabBar::visibilityToggled, this, &PropertiesWidget::setVisibility);
connect(m_tabBar, &PropTabBar::visibilityToggled, this, &PropertiesWidget::saveSettings);
m_editHotkeyFile = new QShortcut(Qt::Key_F2, m_ui->filesList, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_editHotkeyFile, &QShortcut::activated
const auto *editHotkeyFile = new QShortcut(Qt::Key_F2, m_ui->filesList, nullptr, nullptr, Qt::WidgetShortcut);
connect(editHotkeyFile, &QShortcut::activated
, this, [this]() { m_ui->filesList->renameSelectedFile(m_torrent); });
m_editHotkeyWeb = new QShortcut(Qt::Key_F2, m_ui->listWebSeeds, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_editHotkeyWeb, &QShortcut::activated, this, &PropertiesWidget::editWebSeed);
const auto *editHotkeyWeb = new QShortcut(Qt::Key_F2, m_ui->listWebSeeds, nullptr, nullptr, Qt::WidgetShortcut);
connect(editHotkeyWeb, &QShortcut::activated, this, &PropertiesWidget::editWebSeed);
const auto *deleteHotkeyWeb = new QShortcut(QKeySequence::Delete, m_ui->listWebSeeds, nullptr, nullptr, Qt::WidgetShortcut);
connect(deleteHotkeyWeb, &QShortcut::activated, this, &PropertiesWidget::deleteSelectedUrlSeeds);
const auto *openHotkeyFile = new QShortcut(Qt::Key_Return, m_ui->filesList, nullptr, nullptr, Qt::WidgetShortcut);
connect(openHotkeyFile, &QShortcut::activated, this, &PropertiesWidget::openSelectedFile);
connect(m_ui->listWebSeeds, &QListWidget::doubleClicked, this, &PropertiesWidget::editWebSeed);
m_deleteHotkeyWeb = new QShortcut(QKeySequence::Delete, m_ui->listWebSeeds, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_deleteHotkeyWeb, &QShortcut::activated, this, &PropertiesWidget::deleteSelectedUrlSeeds);
m_openHotkeyFile = new QShortcut(Qt::Key_Return, m_ui->filesList, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_openHotkeyFile, &QShortcut::activated, this, &PropertiesWidget::openSelectedFile);
configure();
connect(Preferences::instance(), &Preferences::changed, this, &PropertiesWidget::configure);
@ -175,10 +177,6 @@ PropertiesWidget::~PropertiesWidget() @@ -175,10 +177,6 @@ PropertiesWidget::~PropertiesWidget()
delete m_propListModel;
delete m_propListDelegate;
delete m_tabBar;
delete m_editHotkeyFile;
delete m_editHotkeyWeb;
delete m_deleteHotkeyWeb;
delete m_openHotkeyFile;
delete m_ui;
qDebug() << Q_FUNC_INFO << "EXIT";
}

12
src/gui/properties/propertieswidget.h

@ -32,10 +32,7 @@ @@ -32,10 +32,7 @@
#include <QList>
#include <QWidget>
#include "base/bittorrent/torrenthandle.h"
class QPushButton;
class QShortcut;
class QTreeView;
class DownloadedPiecesBar;
@ -47,6 +44,11 @@ class PropTabBar; @@ -47,6 +44,11 @@ class PropTabBar;
class TorrentContentFilterModel;
class TrackerListWidget;
namespace BitTorrent
{
class TorrentHandle;
}
namespace Ui
{
class PropertiesWidget;
@ -121,10 +123,6 @@ private: @@ -121,10 +123,6 @@ private:
PieceAvailabilityBar *m_piecesAvailability;
PropTabBar *m_tabBar;
LineEdit *m_contentFilterLine;
QShortcut *m_editHotkeyFile;
QShortcut *m_editHotkeyWeb;
QShortcut *m_deleteHotkeyWeb;
QShortcut *m_openHotkeyFile;
};
#endif // PROPERTIESWIDGET_H

1
src/gui/properties/proplistdelegate.cpp

@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
#endif
#include "base/bittorrent/downloadpriority.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/unicodestrings.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"

1
src/gui/properties/speedwidget.cpp

@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
#include "base/bittorrent/sessionstatus.h"
#include "base/preferences.h"
#include "propertieswidget.h"
#include "speedplotview.h"
ComboBoxMenuButton::ComboBoxMenuButton(QWidget *parent, QMenu *menu)
: QComboBox(parent)

3
src/gui/properties/speedwidget.h

@ -32,14 +32,13 @@ @@ -32,14 +32,13 @@
#include <QComboBox>
#include <QWidget>
#include "speedplotview.h"
class QHBoxLayout;
class QLabel;
class QMenu;
class QVBoxLayout;
class PropertiesWidget;
class SpeedPlotView;
class ComboBoxMenuButton : public QComboBox
{

121
src/gui/properties/trackerlistwidget.cpp

@ -54,6 +54,8 @@ @@ -54,6 +54,8 @@
#include "propertieswidget.h"
#include "trackersadditiondialog.h"
#define NB_STICKY_ITEM 3
TrackerListWidget::TrackerListWidget(PropertiesWidget *properties)
: QTreeWidget()
, m_properties(properties)
@ -87,6 +89,7 @@ TrackerListWidget::TrackerListWidget(PropertiesWidget *properties) @@ -87,6 +89,7 @@ TrackerListWidget::TrackerListWidget(PropertiesWidget *properties)
connect(header(), &QHeaderView::sectionMoved, this, &TrackerListWidget::saveSettings);
connect(header(), &QHeaderView::sectionResized, this, &TrackerListWidget::saveSettings);
connect(header(), &QHeaderView::sortIndicatorChanged, this, &TrackerListWidget::saveSettings);
// Set DHT, PeX, LSD items
m_DHTItem = new QTreeWidgetItem({ "", "** [DHT] **", "", "0", "", "", "0" });
insertTopLevelItem(0, m_DHTItem);
@ -97,33 +100,38 @@ TrackerListWidget::TrackerListWidget(PropertiesWidget *properties) @@ -97,33 +100,38 @@ TrackerListWidget::TrackerListWidget(PropertiesWidget *properties)
m_LSDItem = new QTreeWidgetItem({ "", "** [LSD] **", "", "0", "", "", "0" });
insertTopLevelItem(2, m_LSDItem);
setRowColor(2, QColor("grey"));
// Set static items alignment
m_DHTItem->setTextAlignment(COL_PEERS, (Qt::AlignRight | Qt::AlignVCenter));
m_PEXItem->setTextAlignment(COL_PEERS, (Qt::AlignRight | Qt::AlignVCenter));
m_LSDItem->setTextAlignment(COL_PEERS, (Qt::AlignRight | Qt::AlignVCenter));
m_DHTItem->setTextAlignment(COL_SEEDS, (Qt::AlignRight | Qt::AlignVCenter));
m_PEXItem->setTextAlignment(COL_SEEDS, (Qt::AlignRight | Qt::AlignVCenter));
m_LSDItem->setTextAlignment(COL_SEEDS, (Qt::AlignRight | Qt::AlignVCenter));
m_DHTItem->setTextAlignment(COL_LEECHES, (Qt::AlignRight | Qt::AlignVCenter));
m_PEXItem->setTextAlignment(COL_LEECHES, (Qt::AlignRight | Qt::AlignVCenter));
m_LSDItem->setTextAlignment(COL_LEECHES, (Qt::AlignRight | Qt::AlignVCenter));
m_DHTItem->setTextAlignment(COL_DOWNLOADED, (Qt::AlignRight | Qt::AlignVCenter));
m_PEXItem->setTextAlignment(COL_DOWNLOADED, (Qt::AlignRight | Qt::AlignVCenter));
m_LSDItem->setTextAlignment(COL_DOWNLOADED, (Qt::AlignRight | Qt::AlignVCenter));
const Qt::Alignment alignment = (Qt::AlignRight | Qt::AlignVCenter);
m_DHTItem->setTextAlignment(COL_PEERS, alignment);
m_PEXItem->setTextAlignment(COL_PEERS, alignment);
m_LSDItem->setTextAlignment(COL_PEERS, alignment);
m_DHTItem->setTextAlignment(COL_SEEDS, alignment);
m_PEXItem->setTextAlignment(COL_SEEDS, alignment);
m_LSDItem->setTextAlignment(COL_SEEDS, alignment);
m_DHTItem->setTextAlignment(COL_LEECHES, alignment);
m_PEXItem->setTextAlignment(COL_LEECHES, alignment);
m_LSDItem->setTextAlignment(COL_LEECHES, alignment);
m_DHTItem->setTextAlignment(COL_DOWNLOADED, alignment);
m_PEXItem->setTextAlignment(COL_DOWNLOADED, alignment);
m_LSDItem->setTextAlignment(COL_DOWNLOADED, alignment);
// Set header alignment
headerItem()->setTextAlignment(COL_TIER, (Qt::AlignRight | Qt::AlignVCenter));
headerItem()->setTextAlignment(COL_PEERS, (Qt::AlignRight | Qt::AlignVCenter));
headerItem()->setTextAlignment(COL_SEEDS, (Qt::AlignRight | Qt::AlignVCenter));
headerItem()->setTextAlignment(COL_LEECHES, (Qt::AlignRight | Qt::AlignVCenter));
headerItem()->setTextAlignment(COL_DOWNLOADED, (Qt::AlignRight | Qt::AlignVCenter));
headerItem()->setTextAlignment(COL_TIER, alignment);
headerItem()->setTextAlignment(COL_PEERS, alignment);
headerItem()->setTextAlignment(COL_SEEDS, alignment);
headerItem()->setTextAlignment(COL_LEECHES, alignment);
headerItem()->setTextAlignment(COL_DOWNLOADED, alignment);
// Set hotkeys
m_editHotkey = new QShortcut(Qt::Key_F2, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_editHotkey, &QShortcut::activated, this, &TrackerListWidget::editSelectedTracker);
const auto *editHotkey = new QShortcut(Qt::Key_F2, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(editHotkey, &QShortcut::activated, this, &TrackerListWidget::editSelectedTracker);
const auto *deleteHotkey = new QShortcut(QKeySequence::Delete, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(deleteHotkey, &QShortcut::activated, this, &TrackerListWidget::deleteSelectedTrackers);
const auto *copyHotkey = new QShortcut(QKeySequence::Copy, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(copyHotkey, &QShortcut::activated, this, &TrackerListWidget::copyTrackerUrl);
connect(this, &QAbstractItemView::doubleClicked, this, &TrackerListWidget::editSelectedTracker);
m_deleteHotkey = new QShortcut(QKeySequence::Delete, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_deleteHotkey, &QShortcut::activated, this, &TrackerListWidget::deleteSelectedTrackers);
m_copyHotkey = new QShortcut(QKeySequence::Copy, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_copyHotkey, &QShortcut::activated, this, &TrackerListWidget::copyTrackerUrl);
// This hack fixes reordering of first column with Qt5.
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777
@ -138,10 +146,12 @@ TrackerListWidget::~TrackerListWidget() @@ -138,10 +146,12 @@ TrackerListWidget::~TrackerListWidget()
saveSettings();
}
QList<QTreeWidgetItem*> TrackerListWidget::getSelectedTrackerItems() const
QVector<QTreeWidgetItem *> TrackerListWidget::getSelectedTrackerItems() const
{
const QList<QTreeWidgetItem *> selectedTrackerItems = selectedItems();
QList<QTreeWidgetItem *> selectedTrackers;
QVector<QTreeWidgetItem *> selectedTrackers;
selectedTrackers.reserve(selectedTrackerItems.size());
for (QTreeWidgetItem *item : selectedTrackerItems) {
if (indexOfTopLevelItem(item) >= NB_STICKY_ITEM) // Ignore STICKY ITEMS
selectedTrackers << item;
@ -165,7 +175,7 @@ void TrackerListWidget::moveSelectionUp() @@ -165,7 +175,7 @@ void TrackerListWidget::moveSelectionUp()
clear();
return;
}
const QList<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
const QVector<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
if (selectedTrackerItems.isEmpty()) return;
bool change = false;
@ -207,7 +217,7 @@ void TrackerListWidget::moveSelectionDown() @@ -207,7 +217,7 @@ void TrackerListWidget::moveSelectionDown()
clear();
return;
}
const QList<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
const QVector<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
if (selectedTrackerItems.isEmpty()) return;
bool change = false;
@ -246,6 +256,7 @@ void TrackerListWidget::clear() @@ -246,6 +256,7 @@ void TrackerListWidget::clear()
{
qDeleteAll(m_trackerItems);
m_trackerItems.clear();
m_DHTItem->setText(COL_STATUS, "");
m_DHTItem->setText(COL_SEEDS, "");
m_DHTItem->setText(COL_LEECHES, "");
@ -260,7 +271,7 @@ void TrackerListWidget::clear() @@ -260,7 +271,7 @@ void TrackerListWidget::clear()
m_LSDItem->setText(COL_MSG, "");
}
void TrackerListWidget::loadStickyItems(BitTorrent::TorrentHandle *const torrent)
void TrackerListWidget::loadStickyItems(const BitTorrent::TorrentHandle *torrent)
{
QString working = tr("Working");
QString disabled = tr("Disabled");
@ -327,16 +338,18 @@ void TrackerListWidget::loadStickyItems(BitTorrent::TorrentHandle *const torrent @@ -327,16 +338,18 @@ void TrackerListWidget::loadStickyItems(BitTorrent::TorrentHandle *const torrent
void TrackerListWidget::loadTrackers()
{
// Load trackers from torrent handle
BitTorrent::TorrentHandle *const torrent = m_properties->getCurrentTorrent();
const BitTorrent::TorrentHandle *torrent = m_properties->getCurrentTorrent();
if (!torrent) return;
loadStickyItems(torrent);
// Load actual trackers information
QHash<QString, BitTorrent::TrackerInfo> trackerData = torrent->trackerInfos();
const QHash<QString, BitTorrent::TrackerInfo> trackerData = torrent->trackerInfos();
QStringList oldTrackerURLs = m_trackerItems.keys();
for (const BitTorrent::TrackerEntry &entry : asConst(torrent->trackers())) {
QString trackerURL = entry.url();
const QString trackerURL = entry.url();
QTreeWidgetItem *item = m_trackerItems.value(trackerURL, nullptr);
if (!item) {
item = new QTreeWidgetItem();
@ -347,9 +360,11 @@ void TrackerListWidget::loadTrackers() @@ -347,9 +360,11 @@ void TrackerListWidget::loadTrackers()
else {
oldTrackerURLs.removeOne(trackerURL);
}
item->setText(COL_TIER, QString::number(entry.tier()));
BitTorrent::TrackerInfo data = trackerData.value(trackerURL);
QString errorMessage = data.lastMessage.trimmed();
const BitTorrent::TrackerInfo data = trackerData.value(trackerURL);
switch (entry.status()) {
case BitTorrent::TrackerEntry::Working:
item->setText(COL_STATUS, tr("Working"));
@ -361,7 +376,7 @@ void TrackerListWidget::loadTrackers() @@ -361,7 +376,7 @@ void TrackerListWidget::loadTrackers()
break;
case BitTorrent::TrackerEntry::NotWorking:
item->setText(COL_STATUS, tr("Not working"));
item->setText(COL_MSG, errorMessage);
item->setText(COL_MSG, data.lastMessage.trimmed());
break;
case BitTorrent::TrackerEntry::NotContacted:
item->setText(COL_STATUS, tr("Not contacted yet"));
@ -370,16 +385,24 @@ void TrackerListWidget::loadTrackers() @@ -370,16 +385,24 @@ void TrackerListWidget::loadTrackers()
}
item->setText(COL_PEERS, QString::number(data.numPeers));
item->setText(COL_SEEDS, (entry.numSeeds() > -1) ? QString::number(entry.numSeeds()) : tr("N/A"));
item->setText(COL_LEECHES, (entry.numLeeches() > -1) ? QString::number(entry.numLeeches()) : tr("N/A"));
item->setText(COL_DOWNLOADED, (entry.numDownloaded() > -1) ? QString::number(entry.numDownloaded()) : tr("N/A"));
item->setTextAlignment(COL_TIER, (Qt::AlignRight | Qt::AlignVCenter));
item->setTextAlignment(COL_PEERS, (Qt::AlignRight | Qt::AlignVCenter));
item->setTextAlignment(COL_SEEDS, (Qt::AlignRight | Qt::AlignVCenter));
item->setTextAlignment(COL_LEECHES, (Qt::AlignRight | Qt::AlignVCenter));
item->setTextAlignment(COL_DOWNLOADED, (Qt::AlignRight | Qt::AlignVCenter));
item->setText(COL_SEEDS, ((entry.numSeeds() > -1)
? QString::number(entry.numSeeds())
: tr("N/A")));
item->setText(COL_LEECHES, ((entry.numLeeches() > -1)
? QString::number(entry.numLeeches())
: tr("N/A")));
item->setText(COL_DOWNLOADED, ((entry.numDownloaded() > -1)
? QString::number(entry.numDownloaded())
: tr("N/A")));
const Qt::Alignment alignment = (Qt::AlignRight | Qt::AlignVCenter);
item->setTextAlignment(COL_TIER, alignment);
item->setTextAlignment(COL_PEERS, alignment);
item->setTextAlignment(COL_SEEDS, alignment);
item->setTextAlignment(COL_LEECHES, alignment);
item->setTextAlignment(COL_DOWNLOADED, alignment);
}
// Remove old trackers
for (const QString &tracker : asConst(oldTrackerURLs))
delete m_trackerItems.take(tracker);
@ -400,7 +423,7 @@ void TrackerListWidget::askForTrackers() @@ -400,7 +423,7 @@ void TrackerListWidget::askForTrackers()
void TrackerListWidget::copyTrackerUrl()
{
const QList<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
const QVector<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
if (selectedTrackerItems.isEmpty()) return;
QStringList urlsToCopy;
@ -421,7 +444,7 @@ void TrackerListWidget::deleteSelectedTrackers() @@ -421,7 +444,7 @@ void TrackerListWidget::deleteSelectedTrackers()
return;
}
const QList<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
const QVector<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
if (selectedTrackerItems.isEmpty()) return;
QStringList urlsToRemove;
@ -453,7 +476,7 @@ void TrackerListWidget::editSelectedTracker() @@ -453,7 +476,7 @@ void TrackerListWidget::editSelectedTracker()
BitTorrent::TorrentHandle *const torrent = m_properties->getCurrentTorrent();
if (!torrent) return;
QList<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
const QVector<QTreeWidgetItem *> selectedTrackerItems = getSelectedTrackerItems();
if (selectedTrackerItems.isEmpty()) return;
// During multi-select only process item selected last
@ -574,8 +597,8 @@ void TrackerListWidget::saveSettings() const @@ -574,8 +597,8 @@ void TrackerListWidget::saveSettings() const
QStringList TrackerListWidget::headerLabels()
{
static const QStringList header {
tr("Tier")
return {
tr("Tier")
, tr("URL")
, tr("Status")
, tr("Peers")
@ -584,8 +607,6 @@ QStringList TrackerListWidget::headerLabels() @@ -584,8 +607,6 @@ QStringList TrackerListWidget::headerLabels()
, tr("Downloaded")
, tr("Message")
};
return header;
}
int TrackerListWidget::visibleColumnsCount() const

19
src/gui/properties/trackerlistwidget.h

@ -29,14 +29,10 @@ @@ -29,14 +29,10 @@
#ifndef TRACKERLIST_H
#define TRACKERLIST_H
#include <QList>
#include <QTreeWidget>
#include <QVector>
#include "propertieswidget.h"
class QShortcut;
#define NB_STICKY_ITEM 3
class PropertiesWidget;
namespace BitTorrent
{
@ -75,7 +71,7 @@ public slots: @@ -75,7 +71,7 @@ public slots:
void moveSelectionDown();
void clear();
void loadStickyItems(BitTorrent::TorrentHandle *const torrent);
void loadStickyItems(const BitTorrent::TorrentHandle *torrent);
void loadTrackers();
void askForTrackers();
void copyTrackerUrl();
@ -88,19 +84,16 @@ public slots: @@ -88,19 +84,16 @@ public slots:
void saveSettings() const;
protected:
QList<QTreeWidgetItem *> getSelectedTrackerItems() const;
QVector<QTreeWidgetItem *> getSelectedTrackerItems() const;
private:
static QStringList headerLabels();
PropertiesWidget *m_properties;
QHash<QString, QTreeWidgetItem *> m_trackerItems;
QTreeWidgetItem *m_DHTItem;
QTreeWidgetItem *m_PEXItem;
QTreeWidgetItem *m_LSDItem;
QShortcut *m_editHotkey;
QShortcut *m_deleteHotkey;
QShortcut *m_copyHotkey;
static QStringList headerLabels();
};
#endif // TRACKERLIST_H

5
src/gui/qtnotify/CMakeLists.txt

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
add_library(qbt_qtnotify STATIC
notifications.cpp
# headers
notifications.h
# sources
notifications.cpp
)
set_target_properties(qbt_qtnotify PROPERTIES AUTOUIC False AUTORCC False)

12
src/gui/rss/automatedrssdownloader.cpp

@ -121,12 +121,12 @@ AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent) @@ -121,12 +121,12 @@ AutomatedRssDownloader::AutomatedRssDownloader(QWidget *parent)
connect(m_ui->listRules, &QListWidget::itemSelectionChanged, this, &AutomatedRssDownloader::updateRuleDefinitionBox);
connect(m_ui->listRules, &QListWidget::itemChanged, this, &AutomatedRssDownloader::handleRuleCheckStateChange);
m_editHotkey = new QShortcut(Qt::Key_F2, m_ui->listRules, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_editHotkey, &QShortcut::activated, this, &AutomatedRssDownloader::renameSelectedRule);
connect(m_ui->listRules, &QAbstractItemView::doubleClicked, this, &AutomatedRssDownloader::renameSelectedRule);
const auto *editHotkey = new QShortcut(Qt::Key_F2, m_ui->listRules, nullptr, nullptr, Qt::WidgetShortcut);
connect(editHotkey, &QShortcut::activated, this, &AutomatedRssDownloader::renameSelectedRule);
const auto *deleteHotkey = new QShortcut(QKeySequence::Delete, m_ui->listRules, nullptr, nullptr, Qt::WidgetShortcut);
connect(deleteHotkey, &QShortcut::activated, this, &AutomatedRssDownloader::on_removeRuleBtn_clicked);
m_deleteHotkey = new QShortcut(QKeySequence::Delete, m_ui->listRules, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_deleteHotkey, &QShortcut::activated, this, &AutomatedRssDownloader::on_removeRuleBtn_clicked);
connect(m_ui->listRules, &QAbstractItemView::doubleClicked, this, &AutomatedRssDownloader::renameSelectedRule);
loadFeedList();
@ -149,8 +149,6 @@ AutomatedRssDownloader::~AutomatedRssDownloader() @@ -149,8 +149,6 @@ AutomatedRssDownloader::~AutomatedRssDownloader()
saveEditedRule();
saveSettings();
delete m_editHotkey;
delete m_deleteHotkey;
delete m_ui;
delete m_episodeRegex;
}

13
src/gui/rss/automatedrssdownloader.h

@ -37,20 +37,19 @@ @@ -37,20 +37,19 @@
#include "base/rss/rss_autodownloadrule.h"
namespace Ui
{
class AutomatedRssDownloader;
}
class QListWidgetItem;
class QRegularExpression;
class QShortcut;
namespace RSS
{
class Feed;
}
namespace Ui
{
class AutomatedRssDownloader;
}
class AutomatedRssDownloader : public QDialog
{
Q_OBJECT
@ -102,8 +101,6 @@ private: @@ -102,8 +101,6 @@ private:
Ui::AutomatedRssDownloader *m_ui;
QListWidgetItem *m_currentRuleItem;
QShortcut *m_editHotkey;
QShortcut *m_deleteHotkey;
QSet<QPair<QString, QString>> m_treeListEntries;
RSS::AutoDownloadRule m_currentRule;
QHash<QString, QListWidgetItem *> m_itemsByRuleName;

10
src/gui/rss/rsswidget.cpp

@ -93,10 +93,10 @@ RSSWidget::RSSWidget(QWidget *parent) @@ -93,10 +93,10 @@ RSSWidget::RSSWidget(QWidget *parent)
loadFoldersOpenState();
m_feedListWidget->setCurrentItem(m_feedListWidget->stickyUnreadItem());
m_editHotkey = new QShortcut(Qt::Key_F2, m_feedListWidget, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_editHotkey, &QShortcut::activated, this, &RSSWidget::renameSelectedRSSItem);
m_deleteHotkey = new QShortcut(QKeySequence::Delete, m_feedListWidget, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_deleteHotkey, &QShortcut::activated, this, &RSSWidget::deleteSelectedItems);
const auto *editHotkey = new QShortcut(Qt::Key_F2, m_feedListWidget, nullptr, nullptr, Qt::WidgetShortcut);
connect(editHotkey, &QShortcut::activated, this, &RSSWidget::renameSelectedRSSItem);
const auto *deleteHotkey = new QShortcut(QKeySequence::Delete, m_feedListWidget, nullptr, nullptr, Qt::WidgetShortcut);
connect(deleteHotkey, &QShortcut::activated, this, &RSSWidget::deleteSelectedItems);
// Feeds list actions
connect(m_ui->actionDelete, &QAction::triggered, this, &RSSWidget::deleteSelectedItems);
@ -135,8 +135,6 @@ RSSWidget::~RSSWidget() @@ -135,8 +135,6 @@ RSSWidget::~RSSWidget()
saveFoldersOpenState();
delete m_editHotkey;
delete m_deleteHotkey;
delete m_feedListWidget;
delete m_ui;
}

3
src/gui/rss/rsswidget.h

@ -34,7 +34,6 @@ @@ -34,7 +34,6 @@
#include <QWidget>
class QListWidgetItem;
class QShortcut;
class QTreeWidgetItem;
class ArticleListWidget;
@ -86,8 +85,6 @@ private: @@ -86,8 +85,6 @@ private:
Ui::RSSWidget *m_ui;
ArticleListWidget *m_articleListWidget;
FeedListWidget *m_feedListWidget;
QShortcut *m_editHotkey;
QShortcut *m_deleteHotkey;
};
#endif // RSSWIDGET_H

2
src/gui/search/CMakeLists.txt

@ -29,5 +29,5 @@ target_link_libraries(qbt_searchengine @@ -29,5 +29,5 @@ target_link_libraries(qbt_searchengine
PUBLIC
qbt_base
PRIVATE
qbt_lineedit qbt_gui_headers
qbt_gui_headers
)

4
src/gui/search/searchjobwidget.h

@ -38,14 +38,14 @@ class QHeaderView; @@ -38,14 +38,14 @@ class QHeaderView;
class QModelIndex;
class QStandardItemModel;
template <typename T> class CachedSettingValue;
class LineEdit;
class SearchHandler;
class SearchListDelegate;
class SearchSortModel;
struct SearchResult;
template <typename T> class CachedSettingValue;
namespace Ui
{
class SearchJobWidget;

4
src/gui/search/searchwidget.cpp

@ -137,8 +137,8 @@ SearchWidget::SearchWidget(MainWindow *mainWindow) @@ -137,8 +137,8 @@ SearchWidget::SearchWidget(MainWindow *mainWindow)
connect(m_ui->selectPlugin, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged)
, this, &SearchWidget::fillCatCombobox);
m_focusSearchHotkey = new QShortcut(QKeySequence::Find, this);
connect(m_focusSearchHotkey, &QShortcut::activated, this, &SearchWidget::toggleFocusBetweenLineEdits);
const auto focusSearchHotkey = new QShortcut(QKeySequence::Find, this);
connect(focusSearchHotkey, &QShortcut::activated, this, &SearchWidget::toggleFocusBetweenLineEdits);
}
void SearchWidget::fillCatCombobox()

2
src/gui/search/searchwidget.h

@ -33,7 +33,6 @@ @@ -33,7 +33,6 @@
#include <QPointer>
#include <QWidget>
class QShortcut;
class QTabWidget;
class MainWindow;
@ -80,5 +79,4 @@ private: @@ -80,5 +79,4 @@ private:
QList<SearchJobWidget *> m_allTabs; // To store all tabs
MainWindow *m_mainWindow;
bool m_isNewQueryString;
QShortcut *m_focusSearchHotkey;
};

2
src/gui/torrentcontentmodelfolder.cpp

@ -28,6 +28,8 @@ @@ -28,6 +28,8 @@
#include "torrentcontentmodelfolder.h"
#include <QVariant>
#include "base/bittorrent/torrenthandle.h"
#include "base/global.h"

2
src/gui/torrentcontentmodelitem.cpp

@ -28,6 +28,8 @@ @@ -28,6 +28,8 @@
#include "torrentcontentmodelitem.h"
#include <QVariant>
#include "torrentcontentmodelfolder.h"
TorrentContentModelItem::TorrentContentModelItem(TorrentContentModelFolder *parent)

8
src/gui/torrentcreatordialog.h

@ -34,14 +34,14 @@ @@ -34,14 +34,14 @@
#include "base/settingvalue.h"
namespace Ui
namespace BitTorrent
{
class TorrentCreatorDialog;
class TorrentCreatorThread;
}
namespace BitTorrent
namespace Ui
{
class TorrentCreatorThread;
class TorrentCreatorDialog;
}
class TorrentCreatorDialog : public QDialog

1
src/gui/transferlistdelegate.h

@ -39,7 +39,6 @@ namespace BitTorrent @@ -39,7 +39,6 @@ namespace BitTorrent
{
enum class TorrentState;
}
// Defines for download list list columns
class TransferListDelegate : public QItemDelegate
{

20
src/gui/transferlistwidget.cpp

@ -186,16 +186,16 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *mainWindow) @@ -186,16 +186,16 @@ TransferListWidget::TransferListWidget(QWidget *parent, MainWindow *mainWindow)
connect(header(), &QHeaderView::sectionResized, this, &TransferListWidget::saveSettings);
connect(header(), &QHeaderView::sortIndicatorChanged, this, &TransferListWidget::saveSettings);
m_editHotkey = new QShortcut(Qt::Key_F2, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_editHotkey, &QShortcut::activated, this, &TransferListWidget::renameSelectedTorrent);
m_deleteHotkey = new QShortcut(QKeySequence::Delete, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_deleteHotkey, &QShortcut::activated, this, &TransferListWidget::softDeleteSelectedTorrents);
m_permDeleteHotkey = new QShortcut(Qt::SHIFT + Qt::Key_Delete, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_permDeleteHotkey, &QShortcut::activated, this, &TransferListWidget::permDeleteSelectedTorrents);
m_doubleClickHotkey = new QShortcut(Qt::Key_Return, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_doubleClickHotkey, &QShortcut::activated, this, &TransferListWidget::torrentDoubleClicked);
m_recheckHotkey = new QShortcut(Qt::CTRL + Qt::Key_R, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(m_recheckHotkey, &QShortcut::activated, this, &TransferListWidget::recheckSelectedTorrents);
const auto *editHotkey = new QShortcut(Qt::Key_F2, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(editHotkey, &QShortcut::activated, this, &TransferListWidget::renameSelectedTorrent);
const auto *deleteHotkey = new QShortcut(QKeySequence::Delete, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(deleteHotkey, &QShortcut::activated, this, &TransferListWidget::softDeleteSelectedTorrents);
const auto *permDeleteHotkey = new QShortcut(Qt::SHIFT + Qt::Key_Delete, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(permDeleteHotkey, &QShortcut::activated, this, &TransferListWidget::permDeleteSelectedTorrents);
const auto *doubleClickHotkey = new QShortcut(Qt::Key_Return, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(doubleClickHotkey, &QShortcut::activated, this, &TransferListWidget::torrentDoubleClicked);
const auto *recheckHotkey = new QShortcut(Qt::CTRL + Qt::Key_R, this, nullptr, nullptr, Qt::WidgetShortcut);
connect(recheckHotkey, &QShortcut::activated, this, &TransferListWidget::recheckSelectedTorrents);
// This hack fixes reordering of first column with Qt5.
// https://github.com/qtproject/qtbase/commit/e0fc088c0c8bc61dbcaf5928b24986cd61a22777

17
src/gui/transferlistwidget.h

@ -33,18 +33,16 @@ @@ -33,18 +33,16 @@
#include <QTreeView>
#include <QVector>
namespace BitTorrent
{
class TorrentHandle;
}
class QShortcut;
class MainWindow;
class TransferListDelegate;
class TransferListModel;
class TransferListSortModel;
namespace BitTorrent
{
class TorrentHandle;
}
class TransferListWidget : public QTreeView
{
Q_OBJECT
@ -128,11 +126,6 @@ private: @@ -128,11 +126,6 @@ private:
TransferListModel *m_listModel;
TransferListSortModel *m_sortFilterModel;
MainWindow *m_mainWindow;
QShortcut *m_editHotkey;
QShortcut *m_deleteHotkey;
QShortcut *m_permDeleteHotkey;
QShortcut *m_doubleClickHotkey;
QShortcut *m_recheckHotkey;
};
#endif // TRANSFERLISTWIDGET_H

2
src/webui/CMakeLists.txt

@ -3,9 +3,9 @@ add_library(qbt_webui STATIC @@ -3,9 +3,9 @@ add_library(qbt_webui STATIC
api/apicontroller.h
api/apierror.h
api/appcontroller.h
api/isessionmanager.h
api/authcontroller.h
api/freediskspacechecker.h
api/isessionmanager.h
api/logcontroller.h
api/rsscontroller.h
api/searchcontroller.h

Loading…
Cancel
Save