mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
refactor: fix more sonarcloud warnings (#1508)
* refactor: const correctness * refactor: use getpwuid_r instead of getpwuid * chore: simplify dict walking loop logic * refactor: remove dead store assignment in announcer * refactor: use std::make_shared
This commit is contained in:
@@ -30,25 +30,6 @@ class PrefsDialog : public BaseDialog
|
||||
public:
|
||||
PrefsDialog(Session&, Prefs&, QWidget* parent = nullptr);
|
||||
|
||||
private:
|
||||
using key2widget_t = QMap<int, QWidget*>;
|
||||
|
||||
private:
|
||||
bool updateWidgetValue(QWidget* widget, int pref_key);
|
||||
void linkWidgetToPref(QWidget* widget, int pref_key);
|
||||
void updateBlocklistLabel();
|
||||
void updateDownloadingWidgetsLocality();
|
||||
|
||||
void setPref(int key, QVariant const& v);
|
||||
|
||||
void initDownloadingTab();
|
||||
void initSeedingTab();
|
||||
void initSpeedTab();
|
||||
void initPrivacyTab();
|
||||
void initNetworkTab();
|
||||
void initDesktopTab();
|
||||
void initRemoteTab();
|
||||
|
||||
private slots:
|
||||
void checkBoxToggled(bool checked);
|
||||
void spinBoxEditingFinished();
|
||||
@@ -70,6 +51,23 @@ private slots:
|
||||
void onBlocklistUpdated(int n);
|
||||
|
||||
private:
|
||||
using key2widget_t = QMap<int, QWidget*>;
|
||||
|
||||
bool updateWidgetValue(QWidget* widget, int pref_key);
|
||||
void linkWidgetToPref(QWidget* widget, int pref_key);
|
||||
void updateBlocklistLabel();
|
||||
void updateDownloadingWidgetsLocality();
|
||||
|
||||
void setPref(int key, QVariant const& v);
|
||||
|
||||
void initDownloadingTab();
|
||||
void initSeedingTab();
|
||||
void initSpeedTab();
|
||||
void initPrivacyTab();
|
||||
void initNetworkTab();
|
||||
void initDesktopTab();
|
||||
void initRemoteTab();
|
||||
|
||||
Session& session_;
|
||||
Prefs& prefs_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user