From 5b2c734fe50c272ca56dfb10b2cd53d73d6b62af Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Thu, 12 Dec 2013 16:20:01 +0100 Subject: [PATCH] Respect the override URL properly --- src/mirall/account.cpp | 1 + src/wizard/owncloudsetuppage.cpp | 15 ++++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/mirall/account.cpp b/src/mirall/account.cpp index b452403740..3563731880 100644 --- a/src/mirall/account.cpp +++ b/src/mirall/account.cpp @@ -59,6 +59,7 @@ void AccountManager::setAccount(Account *account) Account::Account(AbstractSslErrorHandler *sslErrorHandler, QObject *parent) : QObject(parent) + , _url(Theme::instance()->overrideServerUrl()) , _sslErrorHandler(sslErrorHandler) , _am(0) , _credentials(0) diff --git a/src/wizard/owncloudsetuppage.cpp b/src/wizard/owncloudsetuppage.cpp index 5afbf332bc..ea9850e08a 100644 --- a/src/wizard/owncloudsetuppage.cpp +++ b/src/wizard/owncloudsetuppage.cpp @@ -78,14 +78,6 @@ void OwncloudSetupPage::setupCustomization() variant = theme->customMedia( Theme::oCSetupBottom ); WizardCommon::setupCustomMedia( variant, _ui.bottomLabel ); - - QString fixUrl = theme->overrideServerUrl(); - if( !fixUrl.isEmpty() ) { - _ui.label_2->hide(); - setServerUrl( fixUrl ); - _ui.leUrl->setEnabled( false ); - _ui.leUrl->hide(); - } } // slot hit from textChanged of the url entry field. @@ -138,12 +130,13 @@ void OwncloudSetupPage::initializePage() if (pushButton) pushButton->setDefault(true); - // URL entry is disabled when url is overriden by theme. In that - // case we just check the server type and switch to second page + // If url is overriden by theme, it's already set and + // we just check the server type and switch to second page // immediately. - if (_ui.leUrl->isEnabled()) { + if (Theme::instance()->overrideServerUrl().isEmpty()) { _ui.leUrl->setFocus(); } else { + setEnabled(false); validatePage(); } }