mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
Wizard: Allow /index.php or /remote.php/webdav in URLs.
We will strip those. Also works on paste. Fixes #349
This commit is contained in:
parent
81e47b0896
commit
7eddff39e7
1 changed files with 15 additions and 2 deletions
|
@ -89,10 +89,23 @@ void OwncloudSetupPage::setupCustomization()
|
|||
}
|
||||
|
||||
// slot hit from textChanged of the url entry field.
|
||||
void OwncloudSetupPage::slotUrlChanged(const QString& /*ocUrl*/)
|
||||
void OwncloudSetupPage::slotUrlChanged(const QString& url)
|
||||
{
|
||||
|
||||
QString newUrl = url;
|
||||
if (url.endsWith("index.php")) {
|
||||
newUrl.chop(9);
|
||||
}
|
||||
if (url.endsWith("remote.php/webdav")) {
|
||||
newUrl.chop(17);
|
||||
}
|
||||
if (url.endsWith("remote.php/webdav/")) {
|
||||
newUrl.chop(18);
|
||||
}
|
||||
if (newUrl != url) {
|
||||
_ui.leUrl->setText(newUrl);
|
||||
}
|
||||
#if 0
|
||||
QString url = ocUrl;
|
||||
bool visible = false;
|
||||
|
||||
if (url.startsWith(QLatin1String("https://"))) {
|
||||
|
|
Loading…
Reference in a new issue