return !_appPassword.isEmpty() && !_userId.isEmpty() && _serverUrl.isValid();
}
+bool AccountSetupCommandLineManager::isVfsEnabled() const
+{
+ return _isVfsEnabled;
+}
+
void AccountSetupCommandLineManager::setupAccountFromCommandLine()
{
if (isCommandLineParsed()) {
[[nodiscard]] bool isCommandLineParsed() const;
+ [[nodiscard]] bool isVfsEnabled() const;
+
public slots:
void setupAccountFromCommandLine();
if (!cfg.overrideServerUrl().isEmpty()) {
Theme::instance()->setOverrideServerUrl(cfg.overrideServerUrl());
Theme::instance()->setForceOverrideServerUrl(true);
+ Theme::instance()->setVfsEnabled(cfg.isVfsEnabled());
+
Theme::instance()->setStartLoginFlowAutomatically(true);
}
if (!wiz.isNull()) {
static constexpr char updateChannelC[] = "updateChannel";
static constexpr char overrideServerUrlC[] = "overrideServerUrl";
static constexpr char overrideLocalDirC[] = "overrideLocalDir";
+static constexpr char isVfsEnabledC[] = "isVfsEnabled";
static constexpr char geometryC[] = "geometry";
static constexpr char timeoutC[] = "timeout";
static constexpr char chunkSizeC[] = "chunkSize";
settings.setValue(QLatin1String(overrideLocalDirC), localDir);
}
+bool ConfigFile::isVfsEnabled() const
+{
+ QSettings settings(configFile(), QSettings::IniFormat);
+ return settings.value({isVfsEnabledC}, {}).toBool();
+}
+
+void ConfigFile::setVfsEnabled(bool enabled)
+{
+ QSettings settings(configFile(), QSettings::IniFormat);
+ settings.setValue({isVfsEnabledC}, enabled);
+}
+
void ConfigFile::setProxyType(int proxyType,
const QString &host,
int port, bool needsAuth,
[[nodiscard]] QString overrideLocalDir() const;
void setOverrideLocalDir(const QString &localDir);
+ [[nodiscard]] bool isVfsEnabled() const;
+ void setVfsEnabled(bool enabled);
+
void saveGeometryHeader(QHeaderView *header);
void restoreGeometryHeader(QHeaderView *header);
return _forceOverrideServerUrl;
}
+bool Theme::isVfsEnabled() const
+{
+ return _isVfsEnabled;
+}
+
bool Theme::startLoginFlowAutomatically() const
{
return _startLoginFlowAutomatically;
}
}
+void Theme::setVfsEnabled(bool enabled)
+{
+ if (_isVfsEnabled != enabled) {
+ _isVfsEnabled = enabled;
+ emit vfsEnabledChanged();
+ }
+}
+
void Theme::setStartLoginFlowAutomatically(bool startLoginFlowAuto)
{
if (_startLoginFlowAutomatically != startLoginFlowAuto) {
Q_PROPERTY(QString conflictHelpUrl READ conflictHelpUrl CONSTANT)
Q_PROPERTY(QString overrideServerUrl READ overrideServerUrl WRITE setOverrideServerUrl NOTIFY overrideServerUrlChanged)
Q_PROPERTY(bool forceOverrideServerUrl READ forceOverrideServerUrl WRITE setForceOverrideServerUrl NOTIFY forceOverrideServerUrlChanged)
+ Q_PROPERTY(bool isVfsEnabled READ isVfsEnabled WRITE setVfsEnabled NOTIFY vfsEnabledChanged)
Q_PROPERTY(bool startLoginFlowAutomatically READ startLoginFlowAutomatically WRITE setStartLoginFlowAutomatically NOTIFY startLoginFlowAutomaticallyChanged)
#ifndef TOKEN_AUTH_ONLY
Q_PROPERTY(QColor wizardHeaderTitleColor READ wizardHeaderTitleColor CONSTANT)
*/
virtual bool forceOverrideServerUrl() const;
+ virtual bool isVfsEnabled() const;
+
/**
* Automatically start login flow
*
public slots:
virtual void setOverrideServerUrl(const QString &overrideServerUrl);
virtual void setForceOverrideServerUrl(bool forceOverride);
+ virtual void setVfsEnabled(bool enabled);
virtual void setStartLoginFlowAutomatically(bool startLoginFlowAuto);
protected:
void darkModeChanged();
void overrideServerUrlChanged();
void forceOverrideServerUrlChanged();
+ void vfsEnabledChanged();
void startLoginFlowAutomaticallyChanged();
private:
QString _overrideServerUrl;
bool _forceOverrideServerUrl = false;
+ bool _isVfsEnabled = false;
bool _startLoginFlowAutomatically = false;
#ifndef TOKEN_AUTH_ONLY