34 #include <QApplication>
35 #include <QCloseEvent>
37 #include <QDesktopServices>
38 #include <QDialogButtonBox>
40 #include <QFileDialog>
41 #include <QMessageBox>
42 #include <QSystemTrayIcon>
43 #include <QTranslator>
67 #include "ui_optionsdialog.h"
73 #define SETTINGS_KEY(name) "OptionsDialog/" name
82 const QDate date {2018, 11, 5};
84 for (
int i = 0; i < 7; ++i)
85 ret.append(locale.toString(date.addDays(i),
"dddd"));
91 switch (locale.language())
100 case QLocale::Chinese:
101 switch (locale.country())
111 case QLocale::English:
112 switch (locale.country())
141 case QLocale::Portuguese:
142 if (locale.country() == QLocale::Brazil)
158 const QString lang = QLocale::languageToString(locale.language());
159 qWarning() <<
"Unrecognized language name: " << lang;
168 using QObject::QObject;
173 return (event->type() == QEvent::Wheel);
182 , m_storeHSplitterSize {
SETTINGS_KEY(
"HorizontalSplitterSizes")}
183 , m_storeLastViewedPage {
SETTINGS_KEY(
"LastViewedPage")}
185 qDebug(
"-> Constructing Options");
187 setAttribute(Qt::WA_DeleteOnClose);
190 #if (defined(Q_OS_UNIX))
191 setWindowTitle(tr(
"Preferences"));
201 #ifndef DISABLE_WEBUI
210 for (
int i = 0; i <
m_ui->tabSelection->count(); ++i)
211 maxHeight = std::max(maxHeight,
m_ui->tabSelection->visualItemRect(
m_ui->tabSelection->item(i)).size().height());
212 for (
int i = 0; i <
m_ui->tabSelection->count(); ++i)
214 const QSize size(std::numeric_limits<int>::max(),
static_cast<int>(maxHeight * 1.2));
215 m_ui->tabSelection->item(i)->setSizeHint(size);
223 m_ui->deleteTorrentWarningIcon->setPixmap(QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical).pixmap(16, 16));
224 m_ui->deleteTorrentWarningIcon->hide();
225 m_ui->deleteTorrentWarningLabel->hide();
226 m_ui->deleteTorrentWarningLabel->setToolTip(QLatin1String(
"<html><body><p>") +
227 tr(
"By enabling these options, you can <strong>irrevocably lose</strong> your .torrent files!") +
228 QLatin1String(
"</p><p>") +
229 tr(
"When these options are enabled, qBittorrent will <strong>delete</strong> .torrent files "
230 "after they were successfully (the first option) or not (the second option) added to its "
231 "download queue. This will be applied <strong>not only</strong> to the files opened via "
232 "“Add torrent” menu action but to those opened via <strong>file type association</strong> as well") +
233 QLatin1String(
"</p><p>") +
234 tr(
"If you enable the second option (“Also when addition is cancelled”) the "
235 ".torrent file <strong>will be deleted</strong> even if you press “<strong>Cancel</strong>” in "
236 "the “Add torrent” dialog") +
237 QLatin1String(
"</p></body></html>"));
239 m_ui->hsplitter->setCollapsible(0,
false);
240 m_ui->hsplitter->setCollapsible(1,
false);
247 m_ui->scanFoldersView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
248 m_ui->scanFoldersView->setModel(watchedFoldersModel);
258 m_ui->customThemeFilePath->setDialogCaption(tr(
"Select qBittorrent UI Theme file"));
259 m_ui->customThemeFilePath->setFileNameFilter(tr(
"qBittorrent UI Theme file (*.qbtheme config.json)"));
261 #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
264 m_ui->checkUseSystemIcon->setVisible(
false);
273 m_ui->checkShowSystray->setVisible(
false);
276 if (!QSystemTrayIcon::isSystemTrayAvailable())
278 m_ui->checkShowSystray->setChecked(
false);
279 m_ui->checkShowSystray->setEnabled(
false);
280 m_ui->labelTrayIconStyle->setVisible(
false);
281 m_ui->comboTrayIcon->setVisible(
false);
286 m_ui->checkStartup->setVisible(
false);
289 #if !(defined(Q_OS_WIN) || defined(Q_OS_MACOS))
290 m_ui->groupFileAssociation->setVisible(
false);
291 m_ui->checkProgramUpdates->setVisible(
false);
295 m_ui->textWebUIRootFolder->setDialogCaption(tr(
"Choose Alternative UI files location"));
300 void (QComboBox::*qComboBoxCurrentIndexChanged)(int) = &QComboBox::currentIndexChanged;
301 void (QSpinBox::*qSpinBoxValueChanged)(int) = &QSpinBox::valueChanged;
310 #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
316 connect(
m_ui->checkHideZero, &QAbstractButton::toggled,
m_ui->comboHideZero, &QWidget::setEnabled);
331 #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && !defined(QT_DBUS_LIB)
332 m_ui->checkPreventFromSuspendWhenDownloading->setDisabled(
true);
333 m_ui->checkPreventFromSuspendWhenSeeding->setDisabled(
true);
335 #if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
343 connect(
m_ui->checkFileLogBackup, &QAbstractButton::toggled,
m_ui->spinFileLogSize, &QWidget::setEnabled);
345 connect(
m_ui->checkFileLogDelete, &QAbstractButton::toggled,
m_ui->spinFileLogAge, &QWidget::setEnabled);
346 connect(
m_ui->checkFileLogDelete, &QAbstractButton::toggled,
m_ui->comboFileLogAgeType, &QWidget::setEnabled);
368 connect(
m_ui->checkExportDir, &QAbstractButton::toggled,
m_ui->textExportDir, &QWidget::setEnabled);
370 connect(
m_ui->checkExportDirFin, &QAbstractButton::toggled,
m_ui->textExportDirFin, &QWidget::setEnabled);
376 connect(
m_ui->checkUseDownloadPath, &QAbstractButton::toggled,
m_ui->textDownloadPath, &QWidget::setEnabled);
391 const QString autoRunStr = QString(
"%1\n %2\n %3\n %4\n %5\n %6\n %7\n %8\n %9\n %10\n %11\n %12\n %13\n%14")
392 .arg(tr(
"Supported parameters (case sensitive):")
393 , tr(
"%N: Torrent name")
395 , tr(
"%G: Tags (separated by comma)")
396 , tr(
"%F: Content path (same as root path for multifile torrent)")
397 , tr(
"%R: Root path (first torrent subdirectory path)")
398 , tr(
"%D: Save path")
399 , tr(
"%C: Number of files")
400 , tr(
"%Z: Torrent size (bytes)"))
401 .arg(tr(
"%T: Current tracker")
402 , tr(
"%I: Info hash v1 (or '-' if unavailable)")
403 , tr(
"%J: Info hash v2 (or '-' if unavailable)")
404 , tr(
"%K: Torrent ID (either sha-1 info hash for v1 torrent or truncated sha-256 info hash for v2/hybrid torrent)")
405 , tr(
"Tip: Encapsulate parameter with quotation marks to avoid text being cut off at whitespace (e.g., \"%N\")"));
406 m_ui->labelAutoRunParam->setText(autoRunStr);
439 connect(
m_ui->spinMaxRatio, qOverload<double>(&QDoubleSpinBox::valueChanged),
456 connect(
m_ui->checkIPFilter, &QAbstractButton::toggled,
m_ui->textFilterPath, &QWidget::setEnabled);
457 connect(
m_ui->checkIPFilter, &QAbstractButton::toggled,
m_ui->IpFilterRefreshBtn, &QWidget::setEnabled);
471 const QString slowTorrentsExplanation = QLatin1String(
"<html><body><p>")
472 + tr(
"A torrent will be considered slow if its download and upload rates stay below these values for \"Torrent inactivity timer\" seconds")
473 + QLatin1String(
"</p></body></html>");
474 m_ui->labelDownloadRateForSlowTorrents->setToolTip(slowTorrentsExplanation);
475 m_ui->labelUploadRateForSlowTorrents->setToolTip(slowTorrentsExplanation);
476 m_ui->labelSlowTorrentInactivityTimer->setToolTip(slowTorrentsExplanation);
478 #ifndef DISABLE_WEBUI
481 m_ui->textWebUIHttpsCert->setFileNameFilter(tr(
"Certificate") + QLatin1String(
" (*.cer *.crt *.pem)"));
482 m_ui->textWebUIHttpsCert->setDialogCaption(tr(
"Select certificate"));
484 m_ui->textWebUIHttpsKey->setFileNameFilter(tr(
"Private key") + QLatin1String(
" (*.key *.pem)"));
485 m_ui->textWebUIHttpsKey->setDialogCaption(tr(
"Select private key"));
501 connect(
m_ui->checkBypassAuthSubnetWhitelist, &QAbstractButton::toggled,
m_ui->IPSubnetWhitelistButton, &QPushButton::setEnabled);
507 connect(
m_ui->checkWebUiHttps, &QGroupBox::toggled,
m_ui->checkSecureCookie, &QWidget::setEnabled);
530 connect(
m_ui->btnEditRules, &QPushButton::clicked,
this, [
this]()
532 auto *downloader = new AutomatedRssDownloader(this);
533 downloader->setAttribute(Qt::WA_DeleteOnClose);
546 m_ui->textFileLogPath->setDialogCaption(tr(
"Choose a save directory"));
549 m_ui->textExportDir->setDialogCaption(tr(
"Choose export directory"));
552 m_ui->textExportDirFin->setDialogCaption(tr(
"Choose export directory"));
555 m_ui->textFilterPath->setDialogCaption(tr(
"Choose an IP filter file"));
556 m_ui->textFilterPath->setFileNameFilter(tr(
"All supported filters")
557 + QLatin1String(
" (*.dat *.p2p *.p2b);;.dat (*.dat);;.p2p (*.p2p);;.p2b (*.p2b)"));
559 m_ui->textSavePath->setDialogCaption(tr(
"Choose a save directory"));
562 m_ui->textDownloadPath->setDialogCaption(tr(
"Choose a save directory"));
567 for (QComboBox *widget :
asConst(findChildren<QComboBox *>()))
568 widget->installEventFilter(wheelEventEater);
569 for (QSpinBox *widget :
asConst(findChildren<QSpinBox *>()))
570 widget->installEventFilter(wheelEventEater);
583 const QDir langDir(
":/lang");
584 const QStringList langFiles = langDir.entryList(QStringList(
"qbittorrent_*.qm"), QDir::Files);
585 for (
const QString &langFile : langFiles)
587 QString localeStr = langFile.mid(12);
589 QString languageName;
590 if (localeStr.startsWith(
"eo", Qt::CaseInsensitive))
595 else if (localeStr.startsWith(
"ltg", Qt::CaseInsensitive))
602 QLocale locale(localeStr);
605 m_ui->comboI18n->addItem( languageName, localeStr);
606 qDebug() <<
"Supported locale:" << localeStr;
613 qDebug(
"-> destructing Options");
618 QStringList hSplitterSizes;
619 for (
const int size :
asConst(
m_ui->hsplitter->sizes()))
620 hSplitterSizes.append(QString::number(size));
632 m_ui->tabOption->setCurrentIndex(
m_ui->tabSelection->row(current));
639 , (
m_ui->tabSelection->item(
TAB_UI)->sizeHint().height() * 2));
640 const QStringList defaultSizes = {QString::number(width), QString::number(
m_ui->hsplitter->width() - width)};
642 QList<int> splitterSizes;
644 splitterSizes.append(
string.toInt());
646 m_ui->hsplitter->setSizes(splitterSizes);
657 auto *translator =
new QTranslator;
658 if (translator->load(QLatin1String(
":/lang/qbittorrent_") + locale))
659 qDebug(
"%s locale recognized, using translation.", qUtf8Printable(locale));
661 qDebug(
"%s locale unrecognized, using default (en).", qUtf8Printable(locale));
662 qApp->installTranslator(translator);
671 #if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
672 pref->useSystemIconTheme(
m_ui->checkUseSystemIcon->isChecked());
692 pref->setWinStartup(WinStartup());
694 Preferences::setTorrentFileAssoc(
m_ui->checkAssociateTorrents->isChecked());
695 Preferences::setMagnetLinkAssoc(
m_ui->checkAssociateMagnetLinks->isChecked());
698 if (
m_ui->checkAssociateTorrents->isChecked())
700 Preferences::setTorrentFileAssoc();
701 m_ui->checkAssociateTorrents->setChecked(Preferences::isTorrentFileAssocSet());
702 m_ui->checkAssociateTorrents->setEnabled(!
m_ui->checkAssociateTorrents->isChecked());
704 if (
m_ui->checkAssociateMagnetLinks->isChecked())
706 Preferences::setMagnetLinkAssoc();
707 m_ui->checkAssociateMagnetLinks->setChecked(Preferences::isMagnetLinkAssocSet());
708 m_ui->checkAssociateMagnetLinks->setEnabled(!
m_ui->checkAssociateMagnetLinks->isChecked());
711 #if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
712 pref->setUpdateCheckEnabled(
m_ui->checkProgramUpdates->isChecked());
714 auto *
const app =
static_cast<Application *
>(QCoreApplication::instance());
716 app->setFileLoggerBackup(
m_ui->checkFileLogBackup->isChecked());
717 app->setFileLoggerMaxSize(
m_ui->spinFileLogSize->value() * 1024);
718 app->setFileLoggerAge(
m_ui->spinFileLogAge->value());
719 app->setFileLoggerAgeType(
m_ui->comboFileLogAgeType->currentIndex());
720 app->setFileLoggerDeleteOld(
m_ui->checkFileLogDelete->isChecked());
721 app->setFileLoggerEnabled(
m_ui->checkFileLog->isChecked());
735 session->setSubcategoriesEnabled(
m_ui->checkUseSubcategories->isChecked());
736 session->setAutoTMMDisabledByDefault(
m_ui->comboSavingMode->currentIndex() == 0);
737 session->setDisableAutoTMMWhenCategoryChanged(
m_ui->comboTorrentCategoryChanged->currentIndex() == 1);
738 session->setDisableAutoTMMWhenCategorySavePathChanged(
m_ui->comboCategoryChanged->currentIndex() == 1);
739 session->setDisableAutoTMMWhenDefaultSavePathChanged(
m_ui->comboCategoryDefaultPathChanged->currentIndex() == 1);
740 session->setDownloadPathEnabled(
m_ui->checkUseDownloadPath->isChecked());
742 session->setAppendExtensionEnabled(
m_ui->checkAppendqB->isChecked());
750 watchedFoldersModel->
apply();
763 #if defined(Q_OS_WIN)
764 pref->setAutoRunConsoleEnabled(
m_ui->autoRunConsole->isChecked());
777 session->setGlobalDownloadSpeedLimit(
m_ui->spinDownloadLimit->value() * 1024);
778 session->setGlobalUploadSpeedLimit(
m_ui->spinUploadLimit->value() * 1024);
779 session->setAltGlobalDownloadSpeedLimit(
m_ui->spinDownloadLimitAlt->value() * 1024);
780 session->setAltGlobalUploadSpeedLimit(
m_ui->spinUploadLimitAlt->value() * 1024);
781 session->setUTPRateLimited(
m_ui->checkLimituTPConnections->isChecked());
782 session->setIncludeOverheadInLimits(
m_ui->checkLimitTransportOverhead->isChecked());
783 session->setIgnoreLimitsOnLAN(!
m_ui->checkLimitLocalPeerRate->isChecked());
787 session->setBandwidthSchedulerEnabled(
m_ui->groupBoxSchedule->isChecked());
796 proxyConfigManager->setProxyOnlyForTorrents(
m_ui->isProxyOnlyForTorrents->isChecked());
797 proxyConfigManager->setProxyConfiguration(proxyConf);
799 session->setProxyPeerConnectionsEnabled(
m_ui->checkProxyPeerConnections->isChecked());
808 session->setPeXEnabled(
m_ui->checkPeX->isChecked());
811 session->setAnonymousModeEnabled(
m_ui->checkAnonymousMode->isChecked());
812 session->setAddTrackersEnabled(
m_ui->checkEnableAddTrackers->isChecked());
813 session->setAdditionalTrackers(
m_ui->textTrackers->toPlainText());
817 const QVector<MaxRatioAction> actIndex =
824 session->setMaxRatioAction(actIndex.value(
m_ui->comboRatioLimitAct->currentIndex()));
830 session->setTrackerFilteringEnabled(
m_ui->checkIpFilterTrackers->isChecked());
831 session->setIPFilterFile(
m_ui->textFilterPath->selectedPath());
835 session->setMaxActiveDownloads(
m_ui->spinMaxActiveDownloads->value());
836 session->setMaxActiveUploads(
m_ui->spinMaxActiveUploads->value());
837 session->setMaxActiveTorrents(
m_ui->spinMaxActiveTorrents->value());
838 session->setIgnoreSlowTorrentsForQueueing(
m_ui->checkIgnoreSlowTorrentsForQueueing->isChecked());
839 session->setDownloadRateForSlowTorrents(
m_ui->spinDownloadRateForSlowTorrents->value());
840 session->setUploadRateForSlowTorrents(
m_ui->spinUploadRateForSlowTorrents->value());
841 session->setSlowTorrentsInactivityTimer(
m_ui->spinSlowTorrentsInactivityTimer->value());
895 return m_ui->checkIPFilter->isChecked();
900 switch (
m_ui->comboProxyType->currentIndex())
921 bool fileLogBackup =
true;
922 bool fileLogDelete =
true;
930 m_ui->comboHideZero->setEnabled(
m_ui->checkHideZero->isChecked());
940 if (
m_ui->checkShowSystray->isChecked())
952 m_ui->checkStartup->setChecked(pref->WinStartup());
953 m_ui->checkAssociateTorrents->setChecked(Preferences::isTorrentFileAssocSet());
954 m_ui->checkAssociateMagnetLinks->setChecked(Preferences::isMagnetLinkAssocSet());
957 m_ui->checkAssociateTorrents->setChecked(Preferences::isTorrentFileAssocSet());
958 m_ui->checkAssociateTorrents->setEnabled(!
m_ui->checkAssociateTorrents->isChecked());
959 m_ui->checkAssociateMagnetLinks->setChecked(Preferences::isMagnetLinkAssocSet());
960 m_ui->checkAssociateMagnetLinks->setEnabled(!
m_ui->checkAssociateMagnetLinks->isChecked());
962 #if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
963 m_ui->checkProgramUpdates->setChecked(pref->isUpdateCheckEnabled());
970 m_ui->checkFileLogBackup->setChecked(fileLogBackup);
971 m_ui->spinFileLogSize->setEnabled(fileLogBackup);
973 m_ui->checkFileLogDelete->setChecked(fileLogDelete);
974 m_ui->spinFileLogAge->setEnabled(fileLogDelete);
975 m_ui->comboFileLogAgeType->setEnabled(fileLogDelete);
994 m_ui->checkStartPaused->setChecked(session->isAddTorrentPaused());
995 m_ui->contentLayoutComboBox->setCurrentIndex(
static_cast<int>(session->torrentContentLayout()));
1000 m_ui->textSavePath->setSelectedPath(session->savePath());
1001 m_ui->checkUseSubcategories->setChecked(session->isSubcategoriesEnabled());
1002 m_ui->comboSavingMode->setCurrentIndex(!session->isAutoTMMDisabledByDefault());
1003 m_ui->comboTorrentCategoryChanged->setCurrentIndex(session->isDisableAutoTMMWhenCategoryChanged());
1004 m_ui->comboCategoryChanged->setCurrentIndex(session->isDisableAutoTMMWhenCategorySavePathChanged());
1005 m_ui->comboCategoryDefaultPathChanged->setCurrentIndex(session->isDisableAutoTMMWhenDefaultSavePathChanged());
1006 m_ui->checkUseDownloadPath->setChecked(session->isDownloadPathEnabled());
1007 m_ui->textDownloadPath->setEnabled(
m_ui->checkUseDownloadPath->isChecked());
1008 m_ui->textDownloadPath->setEnabled(
m_ui->checkUseDownloadPath->isChecked());
1010 m_ui->checkAppendqB->setChecked(session->isAppendExtensionEnabled());
1011 m_ui->checkPreallocateAll->setChecked(session->isPreallocationEnabled());
1014 strValue = session->torrentExportDirectory();
1015 if (strValue.isEmpty())
1018 m_ui->checkExportDir->setChecked(
false);
1019 m_ui->textExportDir->setEnabled(
false);
1024 m_ui->checkExportDir->setChecked(
true);
1025 m_ui->textExportDir->setEnabled(
true);
1026 m_ui->textExportDir->setSelectedPath(strValue);
1029 strValue = session->finishedTorrentExportDirectory();
1030 if (strValue.isEmpty())
1033 m_ui->checkExportDirFin->setChecked(
false);
1034 m_ui->textExportDirFin->setEnabled(
false);
1039 m_ui->checkExportDirFin->setChecked(
true);
1040 m_ui->textExportDirFin->setEnabled(
true);
1041 m_ui->textExportDirFin->setSelectedPath(strValue);
1055 #if defined(Q_OS_WIN)
1056 m_ui->autoRunConsole->setChecked(pref->isAutoRunConsoleEnabled());
1058 m_ui->autoRunConsole->hide();
1067 if ((actionDownloading < 0) || (actionDownloading >=
m_ui->actionTorrentDlOnDblClBox->count()))
1069 m_ui->actionTorrentDlOnDblClBox->setCurrentIndex(
m_ui->actionTorrentDlOnDblClBox->findData(actionDownloading));
1077 if ((actionSeeding < 0) || (actionSeeding >=
m_ui->actionTorrentFnOnDblClBox->count()))
1079 m_ui->actionTorrentFnOnDblClBox->setCurrentIndex(
m_ui->actionTorrentFnOnDblClBox->findData(actionSeeding));
1083 m_ui->comboProtocol->setCurrentIndex(
static_cast<int>(session->btProtocol()));
1084 m_ui->spinPort->setValue(session->port());
1087 intValue = session->maxConnections();
1091 m_ui->checkMaxConnections->setChecked(
true);
1092 m_ui->spinMaxConnec->setEnabled(
true);
1093 m_ui->spinMaxConnec->setValue(intValue);
1098 m_ui->checkMaxConnections->setChecked(
false);
1099 m_ui->spinMaxConnec->setEnabled(
false);
1101 intValue = session->maxConnectionsPerTorrent();
1105 m_ui->checkMaxConnectionsPerTorrent->setChecked(
true);
1106 m_ui->spinMaxConnecPerTorrent->setEnabled(
true);
1107 m_ui->spinMaxConnecPerTorrent->setValue(intValue);
1112 m_ui->checkMaxConnectionsPerTorrent->setChecked(
false);
1113 m_ui->spinMaxConnecPerTorrent->setEnabled(
false);
1115 intValue = session->maxUploads();
1119 m_ui->checkMaxUploads->setChecked(
true);
1120 m_ui->spinMaxUploads->setEnabled(
true);
1121 m_ui->spinMaxUploads->setValue(intValue);
1126 m_ui->checkMaxUploads->setChecked(
false);
1127 m_ui->spinMaxUploads->setEnabled(
false);
1129 intValue = session->maxUploadsPerTorrent();
1133 m_ui->checkMaxUploadsPerTorrent->setChecked(
true);
1134 m_ui->spinMaxUploadsPerTorrent->setEnabled(
true);
1135 m_ui->spinMaxUploadsPerTorrent->setValue(intValue);
1140 m_ui->checkMaxUploadsPerTorrent->setChecked(
false);
1141 m_ui->spinMaxUploadsPerTorrent->setEnabled(
false);
1147 bool useProxyAuth =
false;
1148 switch (proxyConf.
type)
1150 case ProxyType::SOCKS4:
1151 m_ui->comboProxyType->setCurrentIndex(1);
1154 case ProxyType::SOCKS5_PW:
1155 useProxyAuth =
true;
1157 case ProxyType::SOCKS5:
1158 m_ui->comboProxyType->setCurrentIndex(2);
1161 case ProxyType::HTTP_PW:
1162 useProxyAuth =
true;
1164 case ProxyType::HTTP:
1165 m_ui->comboProxyType->setCurrentIndex(3);
1169 m_ui->comboProxyType->setCurrentIndex(0);
1171 m_ui->textProxyIP->setText(proxyConf.
ip);
1172 m_ui->spinProxyPort->setValue(proxyConf.
port);
1173 m_ui->checkProxyAuth->setChecked(useProxyAuth);
1177 m_ui->checkProxyPeerConnections->setChecked(session->isProxyPeerConnectionsEnabled());
1178 m_ui->isProxyOnlyForTorrents->setChecked(proxyConfigManager->isProxyOnlyForTorrents());
1181 m_ui->checkIPFilter->setChecked(session->isIPFilteringEnabled());
1182 m_ui->textFilterPath->setEnabled(
m_ui->checkIPFilter->isChecked());
1183 m_ui->textFilterPath->setSelectedPath(session->IPFilterFile());
1184 m_ui->IpFilterRefreshBtn->setEnabled(
m_ui->checkIPFilter->isChecked());
1185 m_ui->checkIpFilterTrackers->setChecked(session->isTrackerFilteringEnabled());
1189 m_ui->spinDownloadLimit->setValue(session->globalDownloadSpeedLimit() / 1024);
1190 m_ui->spinUploadLimit->setValue(session->globalUploadSpeedLimit() / 1024);
1191 m_ui->spinDownloadLimitAlt->setValue(session->altGlobalDownloadSpeedLimit() / 1024);
1192 m_ui->spinUploadLimitAlt->setValue(session->altGlobalUploadSpeedLimit() / 1024);
1194 m_ui->checkLimituTPConnections->setChecked(session->isUTPRateLimited());
1195 m_ui->checkLimitTransportOverhead->setChecked(session->includeOverheadInLimits());
1196 m_ui->checkLimitLocalPeerRate->setChecked(!session->ignoreLimitsOnLAN());
1198 m_ui->groupBoxSchedule->setChecked(session->isBandwidthSchedulerEnabled());
1205 m_ui->checkDHT->setChecked(session->isDHTEnabled());
1206 m_ui->checkPeX->setChecked(session->isPeXEnabled());
1207 m_ui->checkLSD->setChecked(session->isLSDEnabled());
1208 m_ui->comboEncryption->setCurrentIndex(session->encryption());
1209 m_ui->checkAnonymousMode->setChecked(session->isAnonymousModeEnabled());
1210 m_ui->checkEnableAddTrackers->setChecked(session->isAddTrackersEnabled());
1211 m_ui->textTrackers->setPlainText(session->additionalTrackers());
1213 m_ui->checkEnableQueueing->setChecked(session->isQueueingSystemEnabled());
1214 m_ui->spinMaxActiveDownloads->setValue(session->maxActiveDownloads());
1215 m_ui->spinMaxActiveUploads->setValue(session->maxActiveUploads());
1216 m_ui->spinMaxActiveTorrents->setValue(session->maxActiveTorrents());
1217 m_ui->checkIgnoreSlowTorrentsForQueueing->setChecked(session->ignoreSlowTorrentsForQueueing());
1218 m_ui->spinDownloadRateForSlowTorrents->setValue(session->downloadRateForSlowTorrents());
1219 m_ui->spinUploadRateForSlowTorrents->setValue(session->uploadRateForSlowTorrents());
1220 m_ui->spinSlowTorrentsInactivityTimer->setValue(session->slowTorrentsInactivityTimer());
1222 if (session->globalMaxRatio() >= 0.)
1225 m_ui->checkMaxRatio->setChecked(
true);
1226 m_ui->spinMaxRatio->setEnabled(
true);
1227 m_ui->comboRatioLimitAct->setEnabled(
true);
1228 m_ui->spinMaxRatio->setValue(session->globalMaxRatio());
1233 m_ui->checkMaxRatio->setChecked(
false);
1234 m_ui->spinMaxRatio->setEnabled(
false);
1236 if (session->globalMaxSeedingMinutes() >= 0)
1239 m_ui->checkMaxSeedingMinutes->setChecked(
true);
1240 m_ui->spinMaxSeedingMinutes->setEnabled(
true);
1241 m_ui->spinMaxSeedingMinutes->setValue(session->globalMaxSeedingMinutes());
1246 m_ui->checkMaxSeedingMinutes->setChecked(
false);
1247 m_ui->spinMaxSeedingMinutes->setEnabled(
false);
1249 m_ui->comboRatioLimitAct->setEnabled((session->globalMaxSeedingMinutes() >= 0) || (session->globalMaxRatio() >= 0.));
1251 const QHash<MaxRatioAction, int> actIndex =
1258 m_ui->comboRatioLimitAct->setCurrentIndex(actIndex.value(session->maxRatioAction()));
1273 m_ui->IPSubnetWhitelistButton->setEnabled(
m_ui->checkBypassAuthSubnetWhitelist->isChecked());
1306 return m_ui->spinPort->value();
1317 return m_ui->comboEncryption->currentIndex();
1322 return m_ui->spinMaxActiveDownloads->value();
1327 return m_ui->spinMaxActiveUploads->value();
1332 return m_ui->spinMaxActiveTorrents->value();
1337 return m_ui->checkEnableQueueing->isChecked();
1342 return m_ui->checkDHT->isChecked();
1347 return m_ui->checkLSD->isChecked();
1352 return m_ui->checkUPnP->isChecked();
1357 return m_ui->checkStartMinimized->isChecked();
1363 return QSystemTrayIcon::isSystemTrayAvailable()
1364 ?
m_ui->checkShowSystray->isChecked()
1370 if (!
m_ui->checkShowSystray->isChecked())
return false;
1371 return m_ui->checkMinimizeToSysTray->isChecked();
1376 if (!
m_ui->checkShowSystray->isChecked())
return false;
1377 return m_ui->checkCloseToSystray->isChecked();
1384 if (
m_ui->checkMaxRatio->isChecked())
1385 return m_ui->spinMaxRatio->value();
1392 if (
m_ui->checkMaxSeedingMinutes->isChecked())
1393 return m_ui->spinMaxSeedingMinutes->value();
1400 if (!
m_ui->checkMaxConnections->isChecked())
1403 return m_ui->spinMaxConnec->value();
1408 if (!
m_ui->checkMaxConnectionsPerTorrent->isChecked())
1411 return m_ui->spinMaxConnecPerTorrent->value();
1416 if (!
m_ui->checkMaxUploads->isChecked())
1419 return m_ui->spinMaxUploads->value();
1424 if (!
m_ui->checkMaxUploadsPerTorrent->isChecked())
1427 return m_ui->spinMaxUploadsPerTorrent->value();
1479 setAttribute(Qt::WA_DeleteOnClose);
1485 setAttribute(Qt::WA_DeleteOnClose);
1491 return m_ui->checkAdditionDialog->isChecked();
1502 m_ui->comboRatioLimitAct->setEnabled(
m_ui->checkMaxRatio->isChecked() ||
m_ui->checkMaxSeedingMinutes->isChecked());
1510 m_ui->lblProxyIP->setEnabled(
true);
1511 m_ui->textProxyIP->setEnabled(
true);
1512 m_ui->lblProxyPort->setEnabled(
true);
1513 m_ui->spinProxyPort->setEnabled(
true);
1514 m_ui->checkProxyPeerConnections->setEnabled(
true);
1517 m_ui->checkProxyAuth->setEnabled(
true);
1518 m_ui->isProxyOnlyForTorrents->setEnabled(
true);
1522 m_ui->checkProxyAuth->setEnabled(
false);
1523 m_ui->isProxyOnlyForTorrents->setEnabled(
false);
1524 m_ui->isProxyOnlyForTorrents->setChecked(
true);
1530 m_ui->lblProxyIP->setEnabled(
false);
1531 m_ui->textProxyIP->setEnabled(
false);
1532 m_ui->lblProxyPort->setEnabled(
false);
1533 m_ui->spinProxyPort->setEnabled(
false);
1534 m_ui->checkProxyPeerConnections->setEnabled(
false);
1535 m_ui->isProxyOnlyForTorrents->setEnabled(
false);
1536 m_ui->checkProxyAuth->setEnabled(
false);
1542 return !
m_ui->checkShowSplash->isChecked();
1546 bool OptionsDialog::WinStartup()
const
1548 return m_ui->checkStartup->isChecked();
1554 return m_ui->checkPreallocateAll->isChecked();
1559 return m_ui->checkStartPaused->isChecked();
1565 return m_ui->comboProxyType->currentIndex();
1570 return m_ui->checkProxyAuth->isChecked();
1575 return m_ui->textProxyIP->text().trimmed();
1580 return m_ui->spinProxyPort->value();
1585 QString username =
m_ui->textProxyUsername->text().trimmed();
1591 QString password =
m_ui->textProxyPassword->text();
1592 password = password.trimmed();
1599 return m_ui->comboI18n->itemData(
m_ui->comboI18n->currentIndex(), Qt::UserRole).toString();
1605 if (localeStr.startsWith(
"eo", Qt::CaseInsensitive))
1609 else if (localeStr.startsWith(
"ltg", Qt::CaseInsensitive))
1615 QLocale locale(localeStr);
1616 if (locale.language() == QLocale::Uzbek)
1618 else if (locale.language() == QLocale::Azerbaijani)
1621 name = locale.name();
1624 int index =
m_ui->comboI18n->findData(name, Qt::UserRole);
1628 int pos = name.indexOf(
'_');
1631 QString lang = name.left(pos);
1632 index =
m_ui->comboI18n->findData(lang, Qt::UserRole);
1638 index =
m_ui->comboI18n->findData(
"en", Qt::UserRole);
1639 Q_ASSERT(index >= 0);
1641 m_ui->comboI18n->setCurrentIndex(index);
1646 if (
m_ui->checkExportDir->isChecked())
1653 if (
m_ui->checkExportDirFin->isChecked())
1661 const QString dir = QFileDialog::getExistingDirectory(
this, tr(
"Select folder to monitor"),
1667 dialog->setModal(
true);
1668 dialog->setAttribute(Qt::WA_DeleteOnClose);
1669 connect(dialog, &QDialog::accepted,
this, [
this, dialog, dir, pref]()
1674 watchedFoldersModel->
addFolder(dir, dialog->watchedFolderOptions());
1678 for (
int i = 0; i < watchedFoldersModel->columnCount(); ++i)
1679 m_ui->scanFoldersView->resizeColumnToContents(i);
1685 QMessageBox::critical(
this, tr(
"Adding entry failed"), err.
message());
1694 const QModelIndex selected
1695 =
m_ui->scanFoldersView->selectionModel()->selectedIndexes().at(0);
1702 const QModelIndexList selected
1703 =
m_ui->scanFoldersView->selectionModel()->selectedIndexes();
1705 for (
const QModelIndex &index : selected)
1706 m_ui->scanFoldersView->model()->removeRow(index.row());
1711 const QModelIndexList selectedIndexes =
m_ui->scanFoldersView->selectionModel()->selectedIndexes();
1712 m_ui->removeWatchedFolderButton->setEnabled(!selectedIndexes.isEmpty());
1713 m_ui->editWatchedFolderButton->setEnabled(selectedIndexes.count() == 1);
1718 if (!index.isValid())
1723 dialog->setModal(
true);
1724 dialog->setAttribute(Qt::WA_DeleteOnClose);
1725 connect(dialog, &QDialog::accepted,
this, [
this, dialog, index, watchedFoldersModel]()
1727 if (index.isValid())
1731 watchedFoldersModel->setFolderOptions(index.row(), dialog->watchedFolderOptions());
1732 enableApplyButton();
1743 if (!currentExportPath.isEmpty() && currentExportDir.exists())
1744 dir = QFileDialog::getExistingDirectory(
this, tr(
"Choose export directory"), currentExportDir.absolutePath());
1746 dir = QFileDialog::getExistingDirectory(
this, tr(
"Choose export directory"), QDir::homePath());
1753 return m_ui->textFilterPath->selectedPath();
1760 return m_ui->checkWebUi->isChecked();
1765 return m_ui->textWebUiUsername->text();
1770 return m_ui->textWebUiPassword->text();
1775 m_ui->textWebUIHttpsCert->setSelectedPath(path);
1782 if (!
file.open(QIODevice::ReadOnly))
1785 QMessageBox::warning(
this, tr(
"Invalid path"),
file.errorString());
1792 QMessageBox::warning(
this, tr(
"Invalid certificate"), tr(
"This is not a valid SSL certificate."));
1801 m_ui->textWebUIHttpsKey->setSelectedPath(path);
1808 if (!
file.open(QIODevice::ReadOnly))
1811 QMessageBox::warning(
this, tr(
"Invalid path"),
file.errorString());
1818 QMessageBox::warning(
this, tr(
"Invalid key"), tr(
"This is not a valid SSL key."));
1832 const auto service =
static_cast<DNS::Service>(
m_ui->comboDNSService->currentIndex());
1846 setCursor(QCursor(Qt::WaitCursor));
1851 setCursor(QCursor(Qt::ArrowCursor));
1853 QMessageBox::warning(
this, tr(
"Parsing error"), tr(
"Failed to parse the provided IP filter"));
1855 QMessageBox::information(
this, tr(
"Successfully refreshed"), tr(
"Successfully parsed the provided IP filter: %1 rules were applied.",
"%1 is a number").arg(ruleCount));
1862 if (
m_ui->timeEditScheduleFrom->time() ==
m_ui->timeEditScheduleTo->time())
1864 QMessageBox::warning(
this, tr(
"Time Error"), tr(
"The start time and the end time can't be the same."));
1874 QMessageBox::warning(
this, tr(
"Length Error"), tr(
"The Web UI username must be at least 3 characters long."));
1879 QMessageBox::warning(
this, tr(
"Length Error"), tr(
"The Web UI password must be at least 6 characters long."));
1887 if (
m_ui->groupAltWebUI->isChecked() &&
m_ui->textWebUIRootFolder->selectedPath().trimmed().isEmpty())
1889 QMessageBox::warning(
this, tr(
"Location Error"), tr(
"The alternative Web UI files location cannot be blank."));
1898 dialog->setAttribute(Qt::WA_DeleteOnClose);
1906 dialog->setAttribute(Qt::WA_DeleteOnClose);
static void setEnabled(bool value)
static void setTopLevel(bool value)
void saveAdvancedSettings()
int fileLoggerAge() const
int fileLoggerAgeType() const
bool isFileLoggerEnabled() const
bool isFileLoggerDeleteOld() const
bool isFileLoggerBackup() const
QString fileLoggerPath() const
int fileLoggerMaxSize() const
void setFileLoggerPath(const QString &path)
void setIPFilterFile(QString path)
static Session * instance()
void setIPFilteringEnabled(bool enabled)
void IPFilterParsed(bool error, int ruleCount)
QString message() const noexcept
@ DirectoryOpen
selecting existing directories
@ FileOpen
opening files, shows open file dialog
@ DirectorySave
selecting directories for saving
void selectedPathChanged(const QString &path)
static QUrl getRegistrationUrl(DNS::Service service)
static PortForwarder * instance()
virtual void setEnabled(bool enabled)=0
static ProxyConfigurationManager * instance()
bool isAlternativeWebUIPathValid()
bool addTorrentsInPause() const
QString getTorrentExportDir() const
void on_IpFilterRefreshBtn_clicked()
void initializeLanguageCombo()
bool isWebUiEnabled() const
void handleWatchedFolderViewSelectionChanged()
void on_banListButton_clicked()
bool isProxyEnabled() const
void setLocale(const QString &localeStr)
QString getLocale() const
void on_removeWatchedFolderButton_clicked()
int getMaxConnectionsPerTorrent() const
int getMaxUploadsPerTorrent() const
void changePage(QListWidgetItem *, QListWidgetItem *)
QString getProxyUsername() const
int getMaxConnections() const
bool isSplashScreenDisabled() const
QString getFinishedTorrentExportDir() const
bool systemTrayEnabled() const
bool isQueueingSystemEnabled() const
void on_randomButton_clicked()
int getMaxSeedingMinutes() const
QString getFilter() const
bool isDHTEnabled() const
void webUIHttpsKeyChanged(const QString &path, ShowError showError)
bool isLSDEnabled() const
~OptionsDialog() override
OptionsDialog(QWidget *parent=nullptr)
QString askForExportDir(const QString ¤tExportPath)
void toggleComboRatioLimitAct()
bool isIPFilteringEnabled() const
void on_buttonBox_rejected()
AdvancedSettings * m_advancedSettings
int getMaxUploads() const
bool preAllocateAllFiles() const
void handleIPFilterParsed(bool error, int ruleCount)
void on_buttonBox_accepted()
bool useAdditionDialog() const
void on_IPSubnetWhitelistButton_clicked()
unsigned short getProxyPort() const
QString webUiUsername() const
void webUIHttpsCertChanged(const QString &path, ShowError showError)
bool startMinimized() const
void on_addWatchedFolderButton_clicked()
int getMaxActiveTorrents() const
void on_registerDNSBtn_clicked()
qreal getMaxRatio() const
bool m_refreshingIpFilter
SettingValue< int > m_storeLastViewedPage
bool minimizeToTray() const
void on_editWatchedFolderButton_clicked()
void editWatchedFolderOptions(const QModelIndex &index)
SettingValue< QStringList > m_storeHSplitterSize
void closeEvent(QCloseEvent *e) override
bool isUPnPEnabled() const
QPushButton * m_applyButton
void enableProxy(int index)
QString webUiPassword() const
int getEncryptionSetting() const
SettingValue< QSize > m_storeDialogSize
int getMaxActiveUploads() const
QString getProxyPassword() const
int getMaxActiveDownloads() const
Net::ProxyType getProxyType() const
bool webUIAuthenticationOk()
bool isProxyAuthEnabled() const
QString getProxyIp() const
void setWebUIHttpsCertificatePath(const QString &path)
void disableRecursiveDownload(bool disable=true)
QString getMailNotificationSMTPUsername() const
void setWebUiRootFolder(const QString &path)
bool recursiveDownloadDisabled() const
void setActionOnDblClOnTorrentDl(int act)
QString getWebUICustomHTTPHeaders() const
QString getMailNotificationSMTPPassword() const
QString getAutoRunProgram() const
void setAltWebUiEnabled(bool enabled)
static Preferences * instance()
void setDynDNSEnabled(bool enabled)
int getWebUIMaxAuthFailCount() const
QString getWebUiRootFolder() const
QString getWebUIHttpsCertificatePath() const
void setMailNotificationSMTPUsername(const QString &username)
void setCloseToTray(bool b)
void setMinimizeToTray(bool b)
void setUPnPForWebUIPort(bool enabled)
void setHideZeroValues(bool b)
void setWebUiCSRFProtectionEnabled(bool enabled)
void setWebUiSecureCookieEnabled(bool enabled)
bool isSplashScreenDisabled() const
void setWebUIReverseProxySupportEnabled(bool enabled)
void setConfirmOnExit(bool confirm)
std::chrono::seconds getWebUIBanDuration() const
QString getMailNotificationEmail() const
bool preventFromSuspendWhenSeeding() const
bool isWebUiLocalAuthEnabled() const
void setStartMinimized(bool b)
QString getWebUiAddress() const
void setAlternatingRowColors(bool b)
void setWebUIBanDuration(std::chrono::seconds duration)
bool useAlternatingRowColors() const
bool getMailNotificationSMTPAuth() const
void setPreventFromSuspendWhenDownloading(bool b)
bool isWebUiSecureCookieEnabled() const
void setCustomUIThemePath(const QString &path)
QString getDynDNSUsername() const
void setServerDomains(const QString &str)
void setDynDNSUsername(const QString &username)
QString getMailNotificationSender() const
void setSchedulerEndTime(const QTime &time)
bool getMailNotificationSMTPSSL() const
bool confirmOnExit() const
void setConfirmTorrentDeletion(bool enabled)
void setWebUIHostHeaderValidationEnabled(bool enabled)
void setDontConfirmAutoExit(bool dontConfirmAutoExit)
bool systemTrayEnabled() const
void setWebUiAddress(const QString &addr)
void setSchedulerDays(Scheduler::Days days)
void setMailNotificationEnabled(bool enabled)
void setScanDirsLastPath(const QString &path)
QString getDynDNSPassword() const
bool isWebUIHostHeaderValidationEnabled() const
void setSystemTrayEnabled(bool enabled)
void setWebUIPassword(const QByteArray &password)
QTime getSchedulerStartTime() const
void setAutoRunEnabled(bool enabled)
bool useUPnPForWebUIPort() const
void setWebUiClickjackingProtectionEnabled(bool enabled)
int getActionOnDblClOnTorrentFn() const
void setTrayIconStyle(TrayIcon::Style style)
bool isAltWebUiEnabled() const
void setWebUiUsername(const QString &username)
bool isWebUiAuthSubnetWhitelistEnabled() const
QString getWebUITrustedReverseProxiesList() const
bool dontConfirmAutoExit() const
QTime getSchedulerEndTime() const
void setDynDomainName(const QString &name)
void setWebUISessionTimeout(int timeout)
bool isWebUICustomHTTPHeadersEnabled() const
bool isWebUiClickjackingProtectionEnabled() const
DNS::Service getDynDNSService() const
TrayIcon::Style trayIconStyle() const
void setActionOnDblClOnTorrentFn(int act)
void setWebUICustomHTTPHeaders(const QString &headers)
void setDynDNSPassword(const QString &password)
void setMailNotificationSMTPPassword(const QString &password)
void setUseCustomUITheme(bool use)
bool isDynDNSEnabled() const
void setWebUiLocalAuthEnabled(bool enabled)
void setHideZeroComboValues(int n)
bool confirmTorrentDeletion() const
void setWebUICustomHTTPHeadersEnabled(bool enabled)
void setLocale(const QString &locale)
void setWebUITrustedReverseProxiesList(const QString &addr)
QString getScanDirsLastPath() const
void setWebUIMaxAuthFailCount(int count)
int getHideZeroComboValues() const
QString getLocale() const
void setDynDNSService(DNS::Service service)
void setMailNotificationSender(const QString &mail)
void setSchedulerStartTime(const QTime &time)
void setWebUiPort(quint16 port)
void setAutoRunProgram(const QString &program)
quint16 getWebUiPort() const
bool isWebUiCSRFProtectionEnabled() const
bool getHideZeroValues() const
bool isWebUIReverseProxySupportEnabled() const
QString getWebUiUsername() const
bool minimizeToTray() const
Scheduler::Days getSchedulerDays() const
void setWebUIHttpsKeyPath(const QString &path)
void setMailNotificationSMTPSSL(bool use)
void setWebUiEnabled(bool enabled)
void setSplashScreenDisabled(bool b)
QString getServerDomains() const
QString getMailNotificationSMTP() const
int getWebUISessionTimeout() const
bool preventFromSuspendWhenDownloading() const
int getActionOnDblClOnTorrentDl() const
bool isWebUiEnabled() const
bool isMailNotificationEnabled() const
bool isWebUiHttpsEnabled() const
void setWebUiAuthSubnetWhitelistEnabled(bool enabled)
bool isAutoRunEnabled() const
void setPreventFromSuspendWhenSeeding(bool b)
void setWebUiHttpsEnabled(bool enabled)
void setMailNotificationEmail(const QString &mail)
QString getDynDomainName() const
void setMailNotificationSMTP(const QString &smtp_server)
void setMailNotificationSMTPAuth(bool use)
bool startMinimized() const
QString getWebUIHttpsKeyPath() const
void setDownloadRepacks(bool enabled)
bool isProcessingEnabled() const
bool downloadRepacks() const
void setSmartEpisodeFilters(const QStringList &filters)
static AutoDownloader * instance()
QStringList smartEpisodeFilters() const
void setProcessingEnabled(bool enabled)
int refreshInterval() const
bool isProcessingEnabled() const
static Session * instance()
int maxArticlesPerFeed() const
void setRefreshInterval(int refreshInterval)
void setMaxArticlesPerFeed(int n)
void setProcessingEnabled(bool enabled)
T get(const T &defaultValue={}) const
static AutoDeleteMode autoDeleteMode()
static void setAutoDeleteMode(AutoDeleteMode mode)
static TorrentFilesWatcher * instance()
static UIThemeManager * instance()
void addFolder(const QString &path, const TorrentFilesWatcher::WatchedFolderOptions &options)
bool eventFilter(QObject *, QEvent *event) override
constexpr std::add_const_t< T > & asConst(T &t) noexcept
QString folderName(const QString &filePath)
QString expandPathAbs(const QString &path)
QString toNativePath(const QString &path)
T scaledSize(const QWidget *widget, const T &size)
QPixmap scaledPixmap(const QIcon &icon, const QWidget *widget, int height)
void resize(QWidget *widget, const QSize &newSize={})
QPixmap scaledPixmapSvg(const QString &path, const QWidget *widget, int baseHeight)
bool isSSLKeyValid(const QByteArray &data)
const int MAX_SSL_FILE_SIZE
bool isSSLCertificatesValid(const QByteArray &data)
QByteArray generate(const QString &password)
uint32_t rand(uint32_t min=0, uint32_t max=std::numeric_limits< uint32_t >::max())
QStringList translatedWeekdayNames()
QString languageToLocalizedString(const QLocale &locale)
#define SETTINGS_KEY(name)
file(GLOB QBT_TS_FILES "${qBittorrent_SOURCE_DIR}/src/lang/*.ts") set_source_files_properties($
const char C_LOCALE_SLOVAK[]
const char C_LOCALE_GEORGIAN[]
const char C_LOCALE_ENGLISH_AUSTRALIA[]
const char C_LOCALE_INDONESIAN[]
const char C_LOCALE_ESTONIAN[]
const char C_LOCALE_AZERBAIJANI[]
const char C_LOCALE_SLOVENIAN[]
const char C_LOCALE_BYELORUSSIAN[]
const char C_LOCALE_SWEDISH[]
const char C_LOCALE_SPANISH[]
const char C_LOCALE_PORTUGUESE_BRAZIL[]
const char C_LOCALE_LATVIAN[]
const char C_LOCALE_SERBIAN[]
const char C_LOCALE_MALAY[]
const char C_LOCALE_MONGOLIAN[]
const char C_LOCALE_NORWEGIAN[]
const char C_LOCALE_ENGLISH_UNITEDKINGDOM[]
const char C_LOCALE_THAI[]
const char C_LOCALE_ROMANIAN[]
const char C_LOCALE_ENGLISH[]
const char C_LOCALE_ARMENIAN[]
const char C_LOCALE_CROATIAN[]
const char C_LOCALE_HEBREW[]
const char C_LOCALE_HUNGARIAN[]
const char C_LOCALE_UKRAINIAN[]
const char C_LOCALE_CHINESE_TRADITIONAL_TW[]
const char C_LOCALE_KOREAN[]
const char C_LOCALE_ICELANDIC[]
const char C_LOCALE_LITHUANIAN[]
const char C_LOCALE_FRENCH[]
const char C_LOCALE_GALICIAN[]
const char C_LOCALE_POLISH[]
const char C_LOCALE_JAPANESE[]
const char C_LOCALE_DANISH[]
const char C_LOCALE_ITALIAN[]
const char C_LOCALE_BULGARIAN[]
const char C_LOCALE_DUTCH[]
const char C_LOCALE_CZECH[]
const char C_LOCALE_ARABIC[]
const char C_LOCALE_LATGALIAN[]
const char C_LOCALE_CATALAN[]
const char C_LOCALE_BASQUE[]
const char C_LOCALE_GREEK[]
const char C_LOCALE_TURKISH[]
const char C_LOCALE_PORTUGUESE[]
const char C_LOCALE_ESPERANTO[]
const char C_LOCALE_PERSIAN[]
const char C_LOCALE_UZBEK[]
const char C_LOCALE_CHINESE_SIMPLIFIED[]
const char C_LOCALE_RUSSIAN[]
const char C_LOCALE_VIETNAMESE[]
const char C_LOCALE_HINDI[]
const char C_LOCALE_FINNISH[]
const char C_LOCALE_GERMAN[]
const char C_LOCALE_CHINESE_TRADITIONAL_HK[]
const char C_LOCALE_OCCITAN[]