mirror of
https://github.com/ModOrganizer2/modorganizer.git
synced 2026-07-27 13:58:24 -07:00
removed useless flags, they were only used by settings
This commit is contained in:
@@ -618,14 +618,11 @@ void NXMAccessManager::clearCookies()
|
||||
}
|
||||
}
|
||||
|
||||
void NXMAccessManager::startValidationCheck(const QString& key, bool showProgress)
|
||||
void NXMAccessManager::startValidationCheck(const QString& key)
|
||||
{
|
||||
m_validationState = NotChecked;
|
||||
m_validator.start(key);
|
||||
|
||||
if (showProgress) {
|
||||
m_ProgressDialog->start();
|
||||
}
|
||||
m_ProgressDialog->start();
|
||||
}
|
||||
|
||||
void NXMAccessManager::onValidatorState(
|
||||
@@ -674,13 +671,13 @@ bool NXMAccessManager::validateWaiting() const
|
||||
return m_validator.isActive();
|
||||
}
|
||||
|
||||
void NXMAccessManager::apiCheck(const QString &apiKey, ApiCheckFlags flags)
|
||||
void NXMAccessManager::apiCheck(const QString &apiKey, bool force)
|
||||
{
|
||||
if (m_validator.isActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (flags & Force) {
|
||||
if (force) {
|
||||
m_validationState = NotChecked;
|
||||
}
|
||||
|
||||
@@ -689,7 +686,7 @@ void NXMAccessManager::apiCheck(const QString &apiKey, ApiCheckFlags flags)
|
||||
return;
|
||||
}
|
||||
|
||||
startValidationCheck(apiKey, (flags & HideProgress) == 0);
|
||||
startValidationCheck(apiKey);
|
||||
}
|
||||
|
||||
const QString& NXMAccessManager::MOVersion() const
|
||||
|
||||
+2
-13
@@ -165,15 +165,6 @@ class NXMAccessManager : public QNetworkAccessManager
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum ApiCheckFlagsEnum
|
||||
{
|
||||
NoFlags = 0,
|
||||
Force,
|
||||
HideProgress
|
||||
};
|
||||
|
||||
Q_DECLARE_FLAGS(ApiCheckFlags, ApiCheckFlagsEnum)
|
||||
|
||||
static const std::chrono::seconds ValidationTimeout;
|
||||
|
||||
explicit NXMAccessManager(QObject *parent, const QString &moVersion);
|
||||
@@ -186,7 +177,7 @@ public:
|
||||
bool validateAttempted() const;
|
||||
bool validateWaiting() const;
|
||||
|
||||
void apiCheck(const QString &apiKey, ApiCheckFlags flags=NoFlags);
|
||||
void apiCheck(const QString &apiKey, bool force=false);
|
||||
|
||||
void showCookies() const;
|
||||
|
||||
@@ -237,11 +228,9 @@ private:
|
||||
NexusKeyValidator m_validator;
|
||||
States m_validationState;
|
||||
|
||||
void startValidationCheck(const QString& key, bool showProgress);
|
||||
void startValidationCheck(const QString& key);
|
||||
void onValidatorState(NexusKeyValidator::States s, const QString& e);
|
||||
void onValidatorFinished(const APIUserAccount& user);
|
||||
};
|
||||
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(NXMAccessManager::ApiCheckFlags);
|
||||
|
||||
#endif // NXMACCESSMANAGER_H
|
||||
|
||||
Reference in New Issue
Block a user