Skip to content

Commit 20611da

Browse files
committed
Remove wizard page that has been dead for 4 years
1 parent 196f0b9 commit 20611da

9 files changed

+12
-401
lines changed

src/gui/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ set(client_UI_SRCS
2828
wizard/owncloudhttpcredspage.ui
2929
wizard/owncloudoauthcredspage.ui
3030
wizard/owncloudsetuppage.ui
31-
wizard/owncloudwizardresultpage.ui
3231
)
3332

3433
set(client_SRCS
@@ -99,7 +98,6 @@ set(client_SRCS
9998
wizard/owncloudsetuppage.cpp
10099
wizard/owncloudwizardcommon.cpp
101100
wizard/owncloudwizard.cpp
102-
wizard/owncloudwizardresultpage.cpp
103101
)
104102

105103
set(3rdparty_SRC

src/gui/owncloudsetupwizard.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,6 @@ void OwncloudSetupWizard::slotCreateRemoteFolderFinished(QNetworkReply *reply)
378378

379379
void OwncloudSetupWizard::finalizeSetup(bool success)
380380
{
381-
// enable/disable the finish button.
382-
_ocWizard->enableFinishOnResultWidget(success);
383-
384381
const QString localFolder = _ocWizard->property("localFolder").toString();
385382
if (success) {
386383
if (!(localFolder.isEmpty() || _remoteFolder.isEmpty())) {

src/gui/wizard/owncloudadvancedsetuppage.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
5656
stopSpinner();
5757

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

6161
connect(_ui.rSyncEverything, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSyncEverythingClicked);
6262
connect(_ui.rVirtualFileSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotVirtualFileSyncClicked);
@@ -126,8 +126,8 @@ void OwncloudAdvancedSetupPage::initializePage()
126126
}
127127
}
128128
_checking = false;
129-
_ui.lSelectiveSyncSizeLabel->setText(QString());
130-
_ui.lSyncEverythingSizeLabel->setText(QString());
129+
_ui.lSelectiveSyncSizeLabel->clear();
130+
_ui.lSyncEverythingSizeLabel->clear();
131131

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

139139
// ensure "next" gets the focus, not obSelectLocalFolder
140-
QTimer::singleShot(0, wizard()->button(QWizard::NextButton), SLOT(setFocus()));
140+
QTimer::singleShot(0, wizard()->button(QWizard::FinishButton), SLOT(setFocus()));
141141

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

195195
int OwncloudAdvancedSetupPage::nextId() const
196196
{
197-
return WizardCommon::Page_Result;
197+
return -1;
198198
}
199199

200200
QString OwncloudAdvancedSetupPage::localFolder() const

src/gui/wizard/owncloudwizard.cpp

+6-18
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "wizard/owncloudhttpcredspage.h"
2727
#include "wizard/owncloudoauthcredspage.h"
2828
#include "wizard/owncloudadvancedsetuppage.h"
29-
#include "wizard/owncloudwizardresultpage.h"
3029

3130
#include "common/vfs.h"
3231

@@ -50,7 +49,6 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
5049
, _httpCredsPage(new OwncloudHttpCredsPage(this))
5150
, _oauthCredsPage(new OwncloudOAuthCredsPage)
5251
, _advancedSetupPage(new OwncloudAdvancedSetupPage)
53-
, _resultPage(new OwncloudWizardResultPage)
5452
, _credentialsPage(nullptr)
5553
{
5654
setObjectName("owncloudWizard");
@@ -62,7 +60,6 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
6260
setPage(WizardCommon::Page_HttpCreds, _httpCredsPage);
6361
setPage(WizardCommon::Page_OAuthCreds, _oauthCredsPage);
6462
setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage);
65-
setPage(WizardCommon::Page_Result, _resultPage);
6663

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

@@ -132,15 +129,9 @@ QString OwncloudWizard::ocUrl() const
132129
return url;
133130
}
134131

135-
void OwncloudWizard::enableFinishOnResultWidget(bool enable)
136-
{
137-
_resultPage->setComplete(enable);
138-
}
139-
140132
void OwncloudWizard::setRemoteFolder(const QString &remoteFolder)
141133
{
142134
_advancedSetupPage->setRemoteFolder(remoteFolder);
143-
_resultPage->setRemoteFolder(remoteFolder);
144135
}
145136

146137
void OwncloudWizard::successfulStep()
@@ -161,13 +152,17 @@ void OwncloudWizard::successfulStep()
161152
break;
162153

163154
case WizardCommon::Page_ServerSetup:
164-
case WizardCommon::Page_Result:
165155
qCWarning(lcWizard, "Should not happen at this stage.");
166156
break;
167157
}
168158

169159
ownCloudGui::raiseDialog(this);
170-
next();
160+
if (nextId() == -1) {
161+
disconnect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished);
162+
emit basicSetupFinished(QDialog::Accepted);
163+
} else {
164+
next();
165+
}
171166
}
172167

173168
DetermineAuthTypeJob::AuthType OwncloudWizard::authType() const
@@ -195,13 +190,6 @@ void OwncloudWizard::slotCurrentPageChanged(int id)
195190
if (id == WizardCommon::Page_ServerSetup) {
196191
emit clearPendingRequests();
197192
}
198-
199-
if (id == WizardCommon::Page_Result) {
200-
disconnect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished);
201-
emit basicSetupFinished(QDialog::Accepted);
202-
// Immediately close on show, we currently don't want this page anymore
203-
done(Accepted);
204-
}
205193
}
206194

207195
void OwncloudWizard::displayError(const QString &msg)

src/gui/wizard/owncloudwizard.h

-2
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ class OwncloudWizard : public QWizard
5858
bool manualFolderConfig() const;
5959
bool isConfirmBigFolderChecked() const;
6060

61-
void enableFinishOnResultWidget(bool enable);
62-
6361
void displayError(const QString &);
6462
AbstractCredentials *getCredentials() const;
6563

src/gui/wizard/owncloudwizardcommon.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ namespace WizardCommon {
3636
Page_ServerSetup,
3737
Page_HttpCreds,
3838
Page_OAuthCreds,
39-
Page_AdvancedSetup,
40-
Page_Result
39+
Page_AdvancedSetup
4140
};
4241

4342
} // ns WizardCommon

src/gui/wizard/owncloudwizardresultpage.cpp

-102
This file was deleted.

src/gui/wizard/owncloudwizardresultpage.h

-60
This file was deleted.

0 commit comments

Comments
 (0)