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:
Daniel Molkentin 2013-11-26 02:32:04 +01:00
parent 81e47b0896
commit 7eddff39e7

View file

@ -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://"))) {