Flow2: Bring account setup wizard to top (raise) on auth result

Show and raise the wizard on success / error in the Login Flow v2 auth.

Signed-off-by: Michael Schuster <michael@schuster.ms>
This commit is contained in:
Michael Schuster 2019-12-20 04:01:54 +01:00 committed by Michael Schuster
parent ccd20f0172
commit 3a160a4dce
4 changed files with 16 additions and 2 deletions

View file

@ -407,7 +407,8 @@ void OwncloudSetupWizard::slotAuthError()
errorMsg = tr("There was an invalid response to an authenticated webdav request"); errorMsg = tr("There was an invalid response to an authenticated webdav request");
} }
_ocWizard->show(); // bring wizard to top
_ocWizard->bringToTop();
if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) { if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) {
_ocWizard->back(); _ocWizard->back();
} }

View file

@ -113,7 +113,11 @@ int Flow2AuthCredsPage::nextId() const
void Flow2AuthCredsPage::setConnected() void Flow2AuthCredsPage::setConnected()
{ {
wizard()->show(); OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
// bring wizard to top
ocWizard->bringToTop();
} }
AbstractCredentials *Flow2AuthCredsPage::getCredentials() const AbstractCredentials *Flow2AuthCredsPage::getCredentials() const

View file

@ -307,4 +307,11 @@ void OwncloudWizard::customizeStyle()
// HINT: Customize wizard's own style here, if necessary in the future (Dark-/Light-Mode switching) // HINT: Customize wizard's own style here, if necessary in the future (Dark-/Light-Mode switching)
} }
void OwncloudWizard::bringToTop()
{
// bring wizard to top
show();
raise();
}
} // end namespace } // end namespace

View file

@ -74,6 +74,8 @@ public:
void displayError(const QString &, bool retryHTTPonly); void displayError(const QString &, bool retryHTTPonly);
AbstractCredentials *getCredentials() const; AbstractCredentials *getCredentials() const;
void bringToTop();
// FIXME: Can those be local variables? // FIXME: Can those be local variables?
// Set from the OwncloudSetupPage, later used from OwncloudHttpCredsPage // Set from the OwncloudSetupPage, later used from OwncloudHttpCredsPage
QSslKey _clientSslKey; QSslKey _clientSslKey;