From b29a52dfa82c262a84054daedc481cba23e841b1 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 9 Aug 2021 12:42:32 +0800 Subject: [PATCH 1/4] Use the same icon for selecting folders/files As stated in Qt doc, the `QStyle::SP_DialogOpenButton` is only for a button within QDialogButtonBox which means it isn't suitable elsewhere. --- src/gui/fspathedit.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gui/fspathedit.cpp b/src/gui/fspathedit.cpp index 146ad965c..be8e15c16 100644 --- a/src/gui/fspathedit.cpp +++ b/src/gui/fspathedit.cpp @@ -155,26 +155,21 @@ QString FileSystemPathEdit::FileSystemPathEditPrivate::dialogCaptionOrDefault() void FileSystemPathEdit::FileSystemPathEditPrivate::modeChanged() { - QStyle::StandardPixmap pixmap = QStyle::SP_DialogOpenButton; bool showDirsOnly = false; switch (m_mode) { case FileSystemPathEdit::Mode::FileOpen: case FileSystemPathEdit::Mode::FileSave: -#ifdef Q_OS_WIN - pixmap = QStyle::SP_DirOpenIcon; -#endif showDirsOnly = false; break; case FileSystemPathEdit::Mode::DirectoryOpen: case FileSystemPathEdit::Mode::DirectorySave: - pixmap = QStyle::SP_DirOpenIcon; showDirsOnly = true; break; default: throw std::logic_error("Unknown FileSystemPathEdit mode"); } - m_browseAction->setIcon(QApplication::style()->standardIcon(pixmap)); + m_browseAction->setIcon(QApplication::style()->standardIcon(QStyle::SP_DirOpenIcon)); m_editor->completeDirectoriesOnly(showDirsOnly); m_validator->setExistingOnly(m_mode != FileSystemPathEdit::Mode::FileSave); From e93a67e6446f56a78470fd3f2bc6d44b6f6411ae Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 9 Aug 2021 12:57:39 +0800 Subject: [PATCH 2/4] Use default upper limits for ddns entries The default is 32767 which is larger than the previous artificial limit. --- src/gui/optionsdialog.ui | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui index 4481efa11..716835b08 100644 --- a/src/gui/optionsdialog.ui +++ b/src/gui/optionsdialog.ui @@ -3367,11 +3367,7 @@ Use ';' to split multiple entries. Can use wildcard '*'. - - - 50 - - + @@ -3382,9 +3378,6 @@ Use ';' to split multiple entries. Can use wildcard '*'. - - 50 - QLineEdit::Password From a93cf04aca0af808233bb7c53b0ee15971c77a6e Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 9 Aug 2021 13:01:27 +0800 Subject: [PATCH 3/4] Use default values for inconsequential fields Or when the default value is actually what we want. --- src/gui/optionsdialog.ui | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui index 716835b08..e9a986d85 100644 --- a/src/gui/optionsdialog.ui +++ b/src/gui/optionsdialog.ui @@ -1570,9 +1570,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually Maximum number of upload slots per torrent: - - false - @@ -1580,9 +1577,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually Global maximum number of upload slots: - - false - @@ -1668,9 +1662,6 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually false - - - From 526ee9c9db99d49dbe7c4f84fc35438b92a48283 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 9 Aug 2021 13:05:57 +0800 Subject: [PATCH 4/4] Add tooltip to listening port spinbox --- src/gui/optionsdialog.ui | 3 +++ src/webui/www/private/views/preferences.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/optionsdialog.ui b/src/gui/optionsdialog.ui index e9a986d85..3beb182bb 100644 --- a/src/gui/optionsdialog.ui +++ b/src/gui/optionsdialog.ui @@ -1457,6 +1457,9 @@ Manual: Various torrent properties (e.g. save path) must be assigned manually + + Set to 0 to let your system pick an unused port + Any diff --git a/src/webui/www/private/views/preferences.html b/src/webui/www/private/views/preferences.html index ec7349193..f6c35c6ef 100644 --- a/src/webui/www/private/views/preferences.html +++ b/src/webui/www/private/views/preferences.html @@ -231,7 +231,7 @@ QBT_TR(Listening Port)QBT_TR[CONTEXT=OptionsDialog]
- +