Browse Source

Don't update settings when it hasn't changed

So when a setting is the same as the default, it won't write an entry to config file on disk.
adaptive-webui-19844
Chocobo1 1 year ago
parent
commit
ffc3d8d345
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 459
      src/base/preferences.cpp
  2. 6
      src/base/preferences.h

459
src/base/preferences.cpp

File diff suppressed because it is too large Load Diff

6
src/base/preferences.h

@ -142,7 +142,7 @@ public:
QString getMailNotificationEmail() const; QString getMailNotificationEmail() const;
void setMailNotificationEmail(const QString &mail); void setMailNotificationEmail(const QString &mail);
QString getMailNotificationSMTP() const; QString getMailNotificationSMTP() const;
void setMailNotificationSMTP(const QString &smtp_server); void setMailNotificationSMTP(const QString &smtpServer);
bool getMailNotificationSMTPSSL() const; bool getMailNotificationSMTPSSL() const;
void setMailNotificationSMTPSSL(bool use); void setMailNotificationSMTPSSL(bool use);
bool getMailNotificationSMTPAuth() const; bool getMailNotificationSMTPAuth() const;
@ -291,14 +291,14 @@ public:
bool neverCheckFileAssoc() const; bool neverCheckFileAssoc() const;
void setNeverCheckFileAssoc(bool check = true); void setNeverCheckFileAssoc(bool check = true);
static bool isTorrentFileAssocSet(); static bool isTorrentFileAssocSet();
static bool isMagnetLinkAssocSet();
static void setTorrentFileAssoc(bool set); static void setTorrentFileAssoc(bool set);
static bool isMagnetLinkAssocSet();
static void setMagnetLinkAssoc(bool set); static void setMagnetLinkAssoc(bool set);
#endif #endif
#ifdef Q_OS_MACOS #ifdef Q_OS_MACOS
static bool isTorrentFileAssocSet(); static bool isTorrentFileAssocSet();
static bool isMagnetLinkAssocSet();
static void setTorrentFileAssoc(); static void setTorrentFileAssoc();
static bool isMagnetLinkAssocSet();
static void setMagnetLinkAssoc(); static void setMagnetLinkAssoc();
#endif #endif
int getTrackerPort() const; int getTrackerPort() const;

Loading…
Cancel
Save