[Pkg-owncloud-commits] [owncloud-client] 27/38: Account Migrator: Switch to string comparison for URLs.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri Sep 5 20:20:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch sid
in repository owncloud-client.
commit d770f9cc1a4c61ba1831e0c53bf021e30f9dd326
Author: Daniel Molkentin <danimo at owncloud.com>
Date: Sun Aug 31 19:50:20 2014 +0200
Account Migrator: Switch to string comparison for URLs.
QUrl does not normalize trailing slashes, so there is no benefit
of using QUrl here.
---
src/mirall/account.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mirall/account.cpp b/src/mirall/account.cpp
index 80be336..fc154b9 100644
--- a/src/mirall/account.cpp
+++ b/src/mirall/account.cpp
@@ -141,13 +141,15 @@ Account* Account::restore()
// Check the theme url to see if it is the same url that the oC config was for
QString overrideUrl = Theme::instance()->overrideServerUrl();
if( !overrideUrl.isEmpty() ) {
+ if (overrideUrl.endsWith('/')) { overrideUrl.chop(1); }
QString oCUrl = oCSettings->value(QLatin1String(urlC)).toString();
+ if (oCUrl.endsWith('/')) { oCUrl.chop(1); }
// in case the urls are equal reset the settings object to read from
// the ownCloud settings object
qDebug() << "Migrate oC config if " << oCUrl << " == " << overrideUrl << ":"
- << (QUrl(oCUrl) == QUrl(overrideUrl) ? "Yes" : "No");
- if( QUrl(oCUrl) == QUrl(overrideUrl) ) {
+ << (oCUrl == overrideUrl ? "Yes" : "No");
+ if( oCUrl == overrideUrl ) {
migratedCreds = true;
settings.reset( oCSettings );
} else {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list