Skip to content

Commit

Permalink
Remove wizard page that has been dead for 4 years
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Aug 12, 2021
1 parent b09d136 commit 2bae6f6
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 401 deletions.
2 changes: 0 additions & 2 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ set(client_UI_SRCS
wizard/owncloudhttpcredspage.ui
wizard/owncloudoauthcredspage.ui
wizard/owncloudsetuppage.ui
wizard/owncloudwizardresultpage.ui
)

set(client_SRCS
Expand Down Expand Up @@ -99,7 +98,6 @@ set(client_SRCS
wizard/owncloudsetuppage.cpp
wizard/owncloudwizardcommon.cpp
wizard/owncloudwizard.cpp
wizard/owncloudwizardresultpage.cpp
)

set(3rdparty_SRC
Expand Down
3 changes: 0 additions & 3 deletions src/gui/owncloudsetupwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@ void OwncloudSetupWizard::slotCreateRemoteFolderFinished(QNetworkReply *reply)

void OwncloudSetupWizard::finalizeSetup(bool success)
{
// enable/disable the finish button.
_ocWizard->enableFinishOnResultWidget(success);

const QString localFolder = _ocWizard->property("localFolder").toString();
if (success) {
if (!(localFolder.isEmpty() || _remoteFolder.isEmpty())) {
Expand Down
11 changes: 6 additions & 5 deletions src/gui/wizard/owncloudadvancedsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
stopSpinner();

connect(_ui.pbSelectLocalFolder, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectFolder);
setButtonText(QWizard::NextButton, tr("Connect..."));
setButtonText(QWizard::FinishButton, tr("Connect..."));

connect(_ui.rSyncEverything, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSyncEverythingClicked);
connect(_ui.rVirtualFileSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotVirtualFileSyncClicked);
Expand Down Expand Up @@ -126,8 +126,8 @@ void OwncloudAdvancedSetupPage::initializePage()
}
}
_checking = false;
_ui.lSelectiveSyncSizeLabel->setText(QString());
_ui.lSyncEverythingSizeLabel->setText(QString());
_ui.lSelectiveSyncSizeLabel->clear();
_ui.lSyncEverythingSizeLabel->clear();

// Update the local folder - this is not guaranteed to find a good one
QString goodLocalFolder = FolderMan::instance()->findGoodPathForNewSyncFolder(localFolder());
Expand All @@ -137,7 +137,7 @@ void OwncloudAdvancedSetupPage::initializePage()
updateStatus();

// ensure "next" gets the focus, not obSelectLocalFolder
QTimer::singleShot(0, wizard()->button(QWizard::NextButton), qOverload<>(&QWidget::setFocus));
QTimer::singleShot(0, wizard()->button(QWizard::FinishButton), qOverload<>(&QWidget::setFocus));

auto acc = static_cast<OwncloudWizard *>(wizard())->account();
auto quotaJob = new PropfindJob(acc, _remoteFolder, this);
Expand Down Expand Up @@ -194,7 +194,8 @@ void OwncloudAdvancedSetupPage::stopSpinner()

int OwncloudAdvancedSetupPage::nextId() const
{
return WizardCommon::Page_Result;
// tells the caller that this is the last dialog page
return -1;
}

QString OwncloudAdvancedSetupPage::localFolder() const
Expand Down
24 changes: 6 additions & 18 deletions src/gui/wizard/owncloudwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "wizard/owncloudhttpcredspage.h"
#include "wizard/owncloudoauthcredspage.h"
#include "wizard/owncloudadvancedsetuppage.h"
#include "wizard/owncloudwizardresultpage.h"

#include "common/vfs.h"

Expand All @@ -50,7 +49,6 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
, _httpCredsPage(new OwncloudHttpCredsPage(this))
, _oauthCredsPage(new OwncloudOAuthCredsPage)
, _advancedSetupPage(new OwncloudAdvancedSetupPage)
, _resultPage(new OwncloudWizardResultPage)
, _credentialsPage(nullptr)
{
setObjectName("owncloudWizard");
Expand All @@ -62,7 +60,6 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
setPage(WizardCommon::Page_HttpCreds, _httpCredsPage);
setPage(WizardCommon::Page_OAuthCreds, _oauthCredsPage);
setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage);
setPage(WizardCommon::Page_Result, _resultPage);

connect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished);

Expand Down Expand Up @@ -132,15 +129,9 @@ QString OwncloudWizard::ocUrl() const
return url;
}

void OwncloudWizard::enableFinishOnResultWidget(bool enable)
{
_resultPage->setComplete(enable);
}

void OwncloudWizard::setRemoteFolder(const QString &remoteFolder)
{
_advancedSetupPage->setRemoteFolder(remoteFolder);
_resultPage->setRemoteFolder(remoteFolder);
}

void OwncloudWizard::successfulStep()
Expand All @@ -161,13 +152,17 @@ void OwncloudWizard::successfulStep()
break;

case WizardCommon::Page_ServerSetup:
case WizardCommon::Page_Result:
qCWarning(lcWizard, "Should not happen at this stage.");
break;
}

ownCloudGui::raiseDialog(this);
next();
if (nextId() == -1) {
disconnect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished);
emit basicSetupFinished(QDialog::Accepted);
} else {
next();
}
}

DetermineAuthTypeJob::AuthType OwncloudWizard::authType() const
Expand Down Expand Up @@ -195,13 +190,6 @@ void OwncloudWizard::slotCurrentPageChanged(int id)
if (id == WizardCommon::Page_ServerSetup) {
emit clearPendingRequests();
}

if (id == WizardCommon::Page_Result) {
disconnect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished);
emit basicSetupFinished(QDialog::Accepted);
// Immediately close on show, we currently don't want this page anymore
done(Accepted);
}
}

void OwncloudWizard::displayError(const QString &msg)
Expand Down
2 changes: 0 additions & 2 deletions src/gui/wizard/owncloudwizard.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ class OwncloudWizard : public QWizard
bool manualFolderConfig() const;
bool isConfirmBigFolderChecked() const;

void enableFinishOnResultWidget(bool enable);

void displayError(const QString &);
AbstractCredentials *getCredentials() const;

Expand Down
3 changes: 1 addition & 2 deletions src/gui/wizard/owncloudwizardcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ namespace WizardCommon {
Page_ServerSetup,
Page_HttpCreds,
Page_OAuthCreds,
Page_AdvancedSetup,
Page_Result
Page_AdvancedSetup
};

} // ns WizardCommon
Expand Down
102 changes: 0 additions & 102 deletions src/gui/wizard/owncloudwizardresultpage.cpp

This file was deleted.

60 changes: 0 additions & 60 deletions src/gui/wizard/owncloudwizardresultpage.h

This file was deleted.

Loading

0 comments on commit 2bae6f6

Please sign in to comment.