New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Themes commit-by-commit part 1 #7566
Conversation
src/base/torrentfilter.h
Outdated
@@ -36,10 +36,7 @@ typedef QSet<QString> QStringSet; | |||
|
|||
namespace BitTorrent | |||
{ | |||
|
|||
class TorrentHandle; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please indent this line.
src/base/preferences.cpp
Outdated
@@ -1459,10 +1464,9 @@ void Preferences::upgrade() | |||
QStringList labels = value("TransferListFilters/customLabels").toStringList(); | |||
if (!labels.isEmpty()) { | |||
QVariantMap categories = value("BitTorrent/Session/Categories").toMap(); | |||
foreach (const QString &label, labels) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was no violation of the coding style, so this is a purely subjective change...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean we shouldn't accept such changes. Otherwise, everyone will do some unrelated changes, just formatting some code snippets in its own way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Reverted.
@@ -59,7 +59,7 @@ | |||
|
|||
Preferences *Preferences::m_instance = 0; | |||
|
|||
Preferences::Preferences() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question only for my interest... Why is the new version (with default) better than the former (with empty body)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to give more coding flexibility and less format violation options.
src/base/preferences.cpp
Outdated
@@ -264,6 +264,7 @@ void Preferences::setWinStartup(bool b) | |||
settings.remove("qBittorrent"); | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these blank lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evsh, I used plural form... there are some other similar blank lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -34,6 +34,8 @@ | |||
#include <QElapsedTimer> | |||
#include <QVariant> | |||
|
|||
#include <libtorrent/version.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need this later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/webui/btjson.cpp
Outdated
@@ -227,6 +229,52 @@ static const char KEY_LOG_PEER_REASON[] = "reason"; | |||
|
|||
namespace | |||
{ | |||
QString torrentStateToString(BitTorrent::TorrentState state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we take const BitTorrent::TorrentState state
please?
everything else is fine, just curious.
src/base/preferences.cpp
Outdated
@@ -740,6 +740,7 @@ void Preferences::useSystemIconTheme(bool enabled) | |||
{ | |||
setValue("Preferences/Advanced/useSystemIconTheme", enabled); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uncrustify did this?
src/gui/guiiconprovider.cpp
Outdated
@@ -117,6 +117,7 @@ QIcon GuiIconProvider::generateDifferentSizes(const QIcon &icon) | |||
|
|||
return newIcon; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one.
src/base/preferences.cpp
Outdated
@@ -1459,10 +1464,9 @@ void Preferences::upgrade() | |||
QStringList labels = value("TransferListFilters/customLabels").toStringList(); | |||
if (!labels.isEmpty()) { | |||
QVariantMap categories = value("BitTorrent/Session/Categories").toMap(); | |||
foreach (const QString &label, labels) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean we shouldn't accept such changes. Otherwise, everyone will do some unrelated changes, just formatting some code snippets in its own way.
--HG-- branch : magao-dev
This is needed to forward declare this type and pass it by value. Conversion from/to QVariant are hanled via Q_DECLARE_METATYPE, while TorrentState::toString() function was used in webui only and as such is moved there.
Thanks! |
As per discussion in #6698 I'm splitting that PR onto smaller ones. Here is the first part. No functional changes here, just code formatting and refactoring,