Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ottens <kevin.ottens@nextcloud.com>2020-05-18 21:54:23 +0300
committerMichael Schuster <michael@schuster.ms>2020-05-20 04:54:41 +0300
commit712869db9a68025362798a4ff9ccc9f3e424a417 (patch)
treed29fb71b6a914e49bf770c5c623ef36f9018b145 /src/gui/wizard
parent3d2de4fc408320d362d05fc9258449f67faccc4c (diff)
Use auto to avoiding repeating type names
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui/wizard')
-rw-r--r--src/gui/wizard/flow2authcredspage.cpp8
-rw-r--r--src/gui/wizard/owncloudadvancedsetuppage.cpp2
-rw-r--r--src/gui/wizard/owncloudhttpcredspage.cpp6
-rw-r--r--src/gui/wizard/owncloudoauthcredspage.cpp8
-rw-r--r--src/gui/wizard/owncloudsetuppage.cpp4
-rw-r--r--src/gui/wizard/owncloudshibbolethcredspage.cpp4
-rw-r--r--src/gui/wizard/webview.cpp2
-rw-r--r--src/gui/wizard/webviewpage.cpp2
8 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/wizard/flow2authcredspage.cpp b/src/gui/wizard/flow2authcredspage.cpp
index d04d9741e..f0c63f6c8 100644
--- a/src/gui/wizard/flow2authcredspage.cpp
+++ b/src/gui/wizard/flow2authcredspage.cpp
@@ -51,7 +51,7 @@ Flow2AuthCredsPage::Flow2AuthCredsPage()
void Flow2AuthCredsPage::initializePage()
{
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
ocWizard->account()->setCredentials(CredentialsFactory::create("http"));
@@ -94,7 +94,7 @@ void Flow2AuthCredsPage::slotFlow2AuthResult(Flow2Auth::Result r, const QString
case Flow2Auth::LoggedIn: {
_user = user;
_appPassword = appPassword;
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
emit connectToOCUrl(ocWizard->account()->url().toString());
@@ -110,7 +110,7 @@ int Flow2AuthCredsPage::nextId() const
void Flow2AuthCredsPage::setConnected()
{
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
// bring wizard to top
@@ -119,7 +119,7 @@ void Flow2AuthCredsPage::setConnected()
AbstractCredentials *Flow2AuthCredsPage::getCredentials() const
{
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
return new WebFlowCredentials(
_user,
diff --git a/src/gui/wizard/owncloudadvancedsetuppage.cpp b/src/gui/wizard/owncloudadvancedsetuppage.cpp
index f83e1f43f..ce15dc105 100644
--- a/src/gui/wizard/owncloudadvancedsetuppage.cpp
+++ b/src/gui/wizard/owncloudadvancedsetuppage.cpp
@@ -316,7 +316,7 @@ void OwncloudAdvancedSetupPage::slotSelectiveSyncClicked()
_ui.rSyncEverything->setChecked(_selectiveSyncBlacklist.isEmpty());
AccountPtr acc = static_cast<OwncloudWizard *>(wizard())->account();
- SelectiveSyncDialog *dlg = new SelectiveSyncDialog(acc, _remoteFolder, _selectiveSyncBlacklist, this);
+ auto *dlg = new SelectiveSyncDialog(acc, _remoteFolder, _selectiveSyncBlacklist, this);
const int result = dlg->exec();
bool updateBlacklist = false;
diff --git a/src/gui/wizard/owncloudhttpcredspage.cpp b/src/gui/wizard/owncloudhttpcredspage.cpp
index 092bf789d..02a82c459 100644
--- a/src/gui/wizard/owncloudhttpcredspage.cpp
+++ b/src/gui/wizard/owncloudhttpcredspage.cpp
@@ -84,9 +84,9 @@ void OwncloudHttpCredsPage::initializePage()
{
WizardCommon::initErrorLabel(_ui.errorLabel);
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
AbstractCredentials *cred = ocWizard->account()->credentials();
- HttpCredentials *httpCreds = qobject_cast<HttpCredentials *>(cred);
+ auto *httpCreds = qobject_cast<HttpCredentials *>(cred);
if (httpCreds) {
const QString user = httpCreds->fetchUser();
if (!user.isEmpty()) {
@@ -134,7 +134,7 @@ bool OwncloudHttpCredsPage::validatePage()
startSpinner();
// Reset cookies to ensure the username / password is actually used
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
ocWizard->account()->clearCookieJar();
emit completeChanged();
diff --git a/src/gui/wizard/owncloudoauthcredspage.cpp b/src/gui/wizard/owncloudoauthcredspage.cpp
index 0d4c40ea7..9ed5da0d3 100644
--- a/src/gui/wizard/owncloudoauthcredspage.cpp
+++ b/src/gui/wizard/owncloudoauthcredspage.cpp
@@ -51,7 +51,7 @@ OwncloudOAuthCredsPage::OwncloudOAuthCredsPage()
void OwncloudOAuthCredsPage::initializePage()
{
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
ocWizard->account()->setCredentials(CredentialsFactory::create("http"));
_asyncAuth.reset(new OAuth(ocWizard->account().data(), this));
@@ -75,7 +75,7 @@ void OwncloudOAuthCredsPage::asyncAuthResult(OAuth::Result r, const QString &use
switch (r) {
case OAuth::NotSupported: {
/* OAuth not supported (can't open browser), fallback to HTTP credentials */
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
ocWizard->back();
ocWizard->setAuthType(DetermineAuthTypeJob::Basic);
break;
@@ -89,7 +89,7 @@ void OwncloudOAuthCredsPage::asyncAuthResult(OAuth::Result r, const QString &use
_token = token;
_user = user;
_refreshToken = refreshToken;
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
emit connectToOCUrl(ocWizard->account()->url().toString());
break;
@@ -109,7 +109,7 @@ void OwncloudOAuthCredsPage::setConnected()
AbstractCredentials *OwncloudOAuthCredsPage::getCredentials() const
{
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
Q_ASSERT(ocWizard);
return new HttpCredentialsGui(_user, _token, _refreshToken,
ocWizard->_clientSslCertificate, ocWizard->_clientSslKey);
diff --git a/src/gui/wizard/owncloudsetuppage.cpp b/src/gui/wizard/owncloudsetuppage.cpp
index ac93245c6..954e3f47b 100644
--- a/src/gui/wizard/owncloudsetuppage.cpp
+++ b/src/gui/wizard/owncloudsetuppage.cpp
@@ -133,7 +133,7 @@ void OwncloudSetupPage::slotLogin()
{
_ocWizard->setRegistration(false);
_ui.login->setMaximumHeight(0);
- QPropertyAnimation *animation = new QPropertyAnimation(_ui.login, "maximumHeight");
+ auto *animation = new QPropertyAnimation(_ui.login, "maximumHeight");
animation->setDuration(0);
animation->setStartValue(500);
animation->setEndValue(500);
@@ -210,7 +210,7 @@ void OwncloudSetupPage::initializePage()
_checking = false;
QAbstractButton *nextButton = wizard()->button(QWizard::NextButton);
- QPushButton *pushButton = qobject_cast<QPushButton *>(nextButton);
+ auto *pushButton = qobject_cast<QPushButton *>(nextButton);
if (pushButton)
pushButton->setDefault(true);
diff --git a/src/gui/wizard/owncloudshibbolethcredspage.cpp b/src/gui/wizard/owncloudshibbolethcredspage.cpp
index 4e598d2c7..3469b42dc 100644
--- a/src/gui/wizard/owncloudshibbolethcredspage.cpp
+++ b/src/gui/wizard/owncloudshibbolethcredspage.cpp
@@ -37,13 +37,13 @@ void OwncloudShibbolethCredsPage::setupBrowser()
if (!_browser.isNull()) {
return;
}
- OwncloudWizard *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
+ auto *ocWizard = qobject_cast<OwncloudWizard *>(wizard());
AccountPtr account = ocWizard->account();
// we need to reset the cookie jar to drop temporary cookies (like the shib cookie)
// i.e. if someone presses "back"
QNetworkAccessManager *qnam = account->networkAccessManager();
- CookieJar *jar = new CookieJar;
+ auto *jar = new CookieJar;
jar->restore(account->cookieJarPath());
// Implicitly deletes the old cookie jar, and reparents the jar
qnam->setCookieJar(jar);
diff --git a/src/gui/wizard/webview.cpp b/src/gui/wizard/webview.cpp
index a901be103..86f3df736 100644
--- a/src/gui/wizard/webview.cpp
+++ b/src/gui/wizard/webview.cpp
@@ -184,7 +184,7 @@ WebEnginePage::WebEnginePage(QWebEngineProfile *profile, QObject* parent) : QWeb
QWebEnginePage * WebEnginePage::createWindow(QWebEnginePage::WebWindowType type) {
Q_UNUSED(type);
- ExternalWebEnginePage *view = new ExternalWebEnginePage(this->profile());
+ auto *view = new ExternalWebEnginePage(this->profile());
return view;
}
diff --git a/src/gui/wizard/webviewpage.cpp b/src/gui/wizard/webviewpage.cpp
index 8daa0f684..f9c5a269e 100644
--- a/src/gui/wizard/webviewpage.cpp
+++ b/src/gui/wizard/webviewpage.cpp
@@ -23,7 +23,7 @@ WebViewPage::WebViewPage(QWidget *parent)
qCInfo(lcWizardWebiewPage()) << "Time for a webview!";
_webView = new WebView(this);
- QVBoxLayout *layout = new QVBoxLayout(this);
+ auto *layout = new QVBoxLayout(this);
layout->addWidget(_webView);
setLayout(layout);