Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@ set(client_SRCS
creds/webflowcredentials.cpp
creds/webflowcredentialsdialog.h
creds/webflowcredentialsdialog.cpp
wizard/postfixlineedit.h
wizard/postfixlineedit.cpp
wizard/abstractcredswizardpage.h
wizard/abstractcredswizardpage.cpp
wizard/owncloudadvancedsetuppage.h
Expand Down
9 changes: 1 addition & 8 deletions src/gui/wizard/owncloudsetupnocredspage.ui
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
<number>0</number>
</property>
<item>
<widget class="OCC::PostfixLineEdit" name="leUrl">
<widget class="QLineEdit" name="leUrl">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand Down Expand Up @@ -365,13 +365,6 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>OCC::PostfixLineEdit</class>
<extends>QLineEdit</extends>
<header>wizard/postfixlineedit.h</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
20 changes: 7 additions & 13 deletions src/gui/wizard/owncloudsetuppage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <QDir>

Check failure on line 7 in src/gui/wizard/owncloudsetuppage.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/wizard/owncloudsetuppage.cpp:7:10 [clang-diagnostic-error]

'QDir' file not found
#include <QFileDialog>
#include <QUrl>
#include <QTimer>
Expand Down Expand Up @@ -44,7 +44,6 @@
const auto theme = Theme::instance();
if (theme->overrideServerUrl().isEmpty()) {
_ui.comboBox->hide();
_ui.leUrl->setPostfix(theme->wizardUrlPostfix());
_ui.leUrl->setPlaceholderText(theme->wizardUrlHint());
} else if (theme->multipleOverrideServers() && theme->forceOverrideServerUrl()) {
_ui.leUrl->hide();
Expand Down Expand Up @@ -156,11 +155,6 @@

variant = theme->customMedia(Theme::oCSetupBottom);
WizardCommon::setupCustomMedia(variant, _ui.bottomLabel);

auto leUrlPalette = _ui.leUrl->palette();
leUrlPalette.setColor(QPalette::Text, Qt::black);
leUrlPalette.setColor(QPalette::Base, Qt::white);
_ui.leUrl->setPalette(leUrlPalette);
}

// slot hit from textChanged of the url entry field.
Expand Down Expand Up @@ -195,27 +189,27 @@
if (newUrl != url) {
_ui.leUrl->setText(newUrl);
}
setProxySettingsButtonEnabled(!_ui.leUrl->fullText().isEmpty());
setProxySettingsButtonEnabled(!_ui.leUrl->text().isEmpty());
}

void OwncloudSetupPage::slotUrlEditFinished()
{
QString url = _ui.leUrl->fullText();
QString url = _ui.leUrl->text();
if (QUrl(url).isRelative() && !url.isEmpty()) {
// no scheme defined, set one
url.prepend("https://");
_ui.leUrl->setFullText(url);
_ui.leUrl->setText(url);
}
}

void OwncloudSetupPage::slotSetProxySettings()
{
if (!_proxySettingsDialog) {
_proxySettingsDialog = new WizardProxySettingsDialog{QUrl::fromUserInput(_ui.leUrl->fullText()), _proxySettings, this};
_proxySettingsDialog = new WizardProxySettingsDialog{QUrl::fromUserInput(_ui.leUrl->text()), _proxySettings, this};

Check failure on line 208 in src/gui/wizard/owncloudsetuppage.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace the use of "new" with an operation that automatically manages the memory.

See more on https://sonarcloud.io/project/issues?id=nextcloud_desktop&issues=AZ1ocnn52cMG-a9l5iZh&open=AZ1ocnn52cMG-a9l5iZh&pullRequest=9803

connect(_proxySettingsDialog, &WizardProxySettingsDialog::proxySettingsAccepted, this, [this] (const OCC::WizardProxySettingsDialog::WizardProxySettings &proxySettings) { _proxySettings = proxySettings;});
} else {
_proxySettingsDialog->setServerUrl(QUrl::fromUserInput(_ui.leUrl->fullText()));
_proxySettingsDialog->setServerUrl(QUrl::fromUserInput(_ui.leUrl->text()));
_proxySettingsDialog->setProxySettings(_proxySettings);
}

Expand Down Expand Up @@ -306,7 +300,7 @@
if (theme->multipleOverrideServers() && theme->forceOverrideServerUrl()) {
return _ui.comboBox->currentData().toString();
} else {
return _ui.leUrl->fullText().simplified();
return _ui.leUrl->text().simplified();
}
}

Expand Down Expand Up @@ -365,7 +359,7 @@
switch (retVal) {
case OwncloudConnectionMethodDialog::No_TLS: {
url.setScheme("http");
_ui.leUrl->setFullText(url.toString());
_ui.leUrl->setText(url.toString());
// skip ahead to next page, since the user would expect us to retry automatically
wizard()->next();
} break;
Expand Down
69 changes: 0 additions & 69 deletions src/gui/wizard/postfixlineedit.cpp

This file was deleted.

48 changes: 0 additions & 48 deletions src/gui/wizard/postfixlineedit.h

This file was deleted.

6 changes: 0 additions & 6 deletions src/libsync/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,12 +875,6 @@ QString Theme::userIDHint() const
return QString();
}


QString Theme::wizardUrlPostfix() const
{
return QString();
}

QString Theme::wizardUrlHint() const
{
return QString();
Expand Down
8 changes: 0 additions & 8 deletions src/libsync/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,14 +472,6 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject
*/
[[nodiscard]] QString userIDHint() const;

/**
* @brief Postfix that will be enforced in a URL. e.g.
* ".myhosting.com".
*
* @return An empty string, unless reimplemented
*/
[[nodiscard]] QString wizardUrlPostfix() const;

/**
* @brief String that will be shown as long as no text has been entered by the user.
*
Expand Down
Loading