mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Move QLabels out of class
This commit is contained in:
parent
cc663746eb
commit
23ebb3134b
@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QHostAddress>
|
#include <QHostAddress>
|
||||||
|
#include <QLabel>
|
||||||
#include <QNetworkInterface>
|
#include <QNetworkInterface>
|
||||||
|
|
||||||
#include "base/bittorrent/session.h"
|
#include "base/bittorrent/session.h"
|
||||||
@ -313,15 +314,20 @@ void AdvancedSettings::loadAdvancedSettings()
|
|||||||
const BitTorrent::Session *const session = BitTorrent::Session::instance();
|
const BitTorrent::Session *const session = BitTorrent::Session::instance();
|
||||||
|
|
||||||
// add section headers
|
// add section headers
|
||||||
labelQbtLink.setText(makeLink("https://github.com/qbittorrent/qBittorrent/wiki/Explanation-of-Options-in-qBittorrent#Advanced"
|
auto *labelQbtLink = new QLabel(
|
||||||
, tr("Open documentation")));
|
makeLink(QLatin1String("https://github.com/qbittorrent/qBittorrent/wiki/Explanation-of-Options-in-qBittorrent#Advanced")
|
||||||
labelQbtLink.setOpenExternalLinks(true);
|
, tr("Open documentation"))
|
||||||
addRow(QBITTORRENT_HEADER, QString("<b>%1</b>").arg(tr("qBittorrent Section")), &labelQbtLink);
|
, 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);
|
static_cast<QLabel *>(cellWidget(QBITTORRENT_HEADER, PROPERTY))->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
|
||||||
|
|
||||||
labelLibtorrentLink.setText(makeLink("https://www.libtorrent.org/reference.html", tr("Open documentation")));
|
auto *labelLibtorrentLink = new QLabel(
|
||||||
labelLibtorrentLink.setOpenExternalLinks(true);
|
makeLink(QLatin1String("https://www.libtorrent.org/reference.html")
|
||||||
addRow(LIBTORRENT_HEADER, QString("<b>%1</b>").arg(tr("libtorrent Section")), &labelLibtorrentLink);
|
, 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);
|
static_cast<QLabel *>(cellWidget(LIBTORRENT_HEADER, PROPERTY))->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
|
||||||
|
|
||||||
// Async IO threads
|
// Async IO threads
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QLabel>
|
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
#include <QTableWidget>
|
#include <QTableWidget>
|
||||||
@ -58,7 +57,6 @@ private:
|
|||||||
void loadAdvancedSettings();
|
void loadAdvancedSettings();
|
||||||
template <typename T> void addRow(int row, const QString &text, T *widget);
|
template <typename T> void addRow(int row, const QString &text, T *widget);
|
||||||
|
|
||||||
QLabel labelQbtLink, labelLibtorrentLink;
|
|
||||||
QSpinBox spinBoxAsyncIOThreads, spinBoxFilePoolSize, spinBoxCheckingMemUsage, spinBoxCache,
|
QSpinBox spinBoxAsyncIOThreads, spinBoxFilePoolSize, spinBoxCheckingMemUsage, spinBoxCache,
|
||||||
spinBoxSaveResumeDataInterval, spinBoxOutgoingPortsMin, spinBoxOutgoingPortsMax, spinBoxListRefresh,
|
spinBoxSaveResumeDataInterval, spinBoxOutgoingPortsMin, spinBoxOutgoingPortsMax, spinBoxListRefresh,
|
||||||
spinBoxTrackerPort, spinBoxCacheTTL, spinBoxSendBufferWatermark, spinBoxSendBufferLowWatermark,
|
spinBoxTrackerPort, spinBoxCacheTTL, spinBoxSendBufferWatermark, spinBoxSendBufferLowWatermark,
|
||||||
|
Loading…
Reference in New Issue
Block a user