summaryrefslogtreecommitdiff
path: root/src/settings.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-12-28 01:25:33 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-12-28 01:25:33 -0500
commit51db1f99f0c4cddc0af224d46d6e5679d18d2a53 (patch)
treeddb11e4aef19b1d428c9f71bdc734e59b2e2d25d /src/settings.h
parent106ed49baecc60dbdf4844ed684df750e5caf3aa (diff)
custom browser command
changed some places that used QDesktopServices to use shell::Open() from uibase instead
Diffstat (limited to 'src/settings.h')
-rw-r--r--src/settings.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/settings.h b/src/settings.h
index 82c3a615..4d1258bf 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -447,7 +447,10 @@ private:
class NetworkSettings
{
public:
- NetworkSettings(QSettings& settings);
+ // globalInstance is forwarded from the Settings constructor; NetworkSettings
+ // will set the global URL custom command
+ //
+ NetworkSettings(QSettings& settings, bool globalInstance);
// whether the user has disabled online features
//
@@ -477,6 +480,16 @@ public:
//
void updateFromOldMap();
+ // whether to use a custom command to open links
+ //
+ bool useCustomBrowser() const;
+ void setUseCustomBrowser(bool b);
+
+ // custom command to open links
+ //
+ QString customBrowserCommand() const;
+ void setCustomBrowserCommand(const QString& s);
+
void dump() const;
private:
@@ -485,6 +498,10 @@ private:
// for pre 2.2.1 ini files
//
ServerList serversFromOldMap() const;
+
+ // sets the custom command in uibase, called when the settings change
+ //
+ void updateCustomBrowser();
};
@@ -693,8 +710,8 @@ public:
// any Settings object created with globalInstance==false won't set the
// singleton
//
- // only WidgetSettings need to know whether it created from a globalInstance,
- // see its constructor
+ // some sub-objects like WidgetSettings and NetworkSettings need to know
+ // whether they were created from a globalInstance, see their constructor
//
// @param path path to an ini file
// @param globalInsance whether this is the global instance; creates the