Browse Source

Move QLabels out of class

adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
23ebb3134b
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 20
      src/gui/advancedsettings.cpp
  2. 2
      src/gui/advancedsettings.h

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,

Loading…
Cancel
Save