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

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Molkentin <danimo@owncloud.com>2013-11-26 05:32:04 +0400
committerDaniel Molkentin <danimo@owncloud.com>2013-11-26 05:32:04 +0400
commit7eddff39e7313a9160eb4d198772a746c21ca255 (patch)
treee13175f138f3f31e8edbb599347ec0b50e401ef8
parent81e47b089622d797505ee22303e7c19bc3d9bae4 (diff)
Wizard: Allow /index.php or /remote.php/webdav in URLs.
We will strip those. Also works on paste. Fixes #349
-rw-r--r--src/wizard/owncloudsetuppage.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/wizard/owncloudsetuppage.cpp b/src/wizard/owncloudsetuppage.cpp
index eb2d9ff65..5afbf332b 100644
--- a/src/wizard/owncloudsetuppage.cpp
+++ b/src/wizard/owncloudsetuppage.cpp
@@ -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://"))) {