summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index b286510d..593d66bf 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1812,37 +1812,6 @@ NexusSettings::NexusSettings(Settings& parent, QSettings& settings)
{
}
-bool NexusSettings::apiKey(QString& apiKey) const
-{
- QString tempKey = getWindowsCredential("APIKEY");
- if (tempKey.isEmpty())
- return false;
-
- apiKey = tempKey;
- return true;
-}
-
-bool NexusSettings::setApiKey(const QString& apiKey)
-{
- if (!setWindowsCredential("APIKEY", apiKey)) {
- const auto e = GetLastError();
- log::error("Storing API key failed: {}", formatSystemMessage(e));
- return false;
- }
-
- return true;
-}
-
-bool NexusSettings::clearApiKey()
-{
- return setApiKey("");
-}
-
-bool NexusSettings::hasApiKey() const
-{
- return !getWindowsCredential("APIKEY").isEmpty();
-}
-
bool NexusSettings::endorsementIntegration() const
{
return get<bool>(m_Settings, "Settings", "endorsement_integration", true);
@@ -2224,6 +2193,37 @@ void GlobalSettings::setHideTutorialQuestion(bool b)
settings().setValue("HideTutorialQuestion", b);
}
+bool GlobalSettings::nexusApiKey(QString& apiKey)
+{
+ QString tempKey = getWindowsCredential("APIKEY");
+ if (tempKey.isEmpty())
+ return false;
+
+ apiKey = tempKey;
+ return true;
+}
+
+bool GlobalSettings::setNexusApiKey(const QString& apiKey)
+{
+ if (!setWindowsCredential("APIKEY", apiKey)) {
+ const auto e = GetLastError();
+ log::error("Storing API key failed: {}", formatSystemMessage(e));
+ return false;
+ }
+
+ return true;
+}
+
+bool GlobalSettings::clearNexusApiKey()
+{
+ return setNexusApiKey("");
+}
+
+bool GlobalSettings::hasNexusApiKey()
+{
+ return !getWindowsCredential("APIKEY").isEmpty();
+}
+
void GlobalSettings::resetDialogs()
{
setHideCreateInstanceIntro(false);