[Pkg-owncloud-commits] [owncloud-client] 08/103: Fix dataLocation on Linux/BSD

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Apr 30 18:08:53 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit d3d202de6896cf1fb71319688c0ef690efa608f7
Author: Daniel Molkentin <danimo at owncloud.com>
Date:   Wed Apr 9 14:59:08 2014 +0200

    Fix dataLocation on Linux/BSD
    
    From the Qt 5 documentation:
    
      Note: when porting QDesktopServices::DataLocation(obsolete)
            to QStandardPaths::DataLocation, a different path will
            be returned.
    
            QDesktopServices::DataLocation was GenericDataLocation
            + "/data/organization/application", while
            QStandardPaths::DataLocation is GenericDataLocation
            + "/organization/application".
    
    We'll resort to the deprecated version, since we'll need to fix
    data locations to be XDG compliant sooner than later anyway
    (currently scheduled for 1.8)
---
 src/mirall/utility.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/mirall/utility.cpp b/src/mirall/utility.cpp
index 115b9b5..3cfd638 100644
--- a/src/mirall/utility.cpp
+++ b/src/mirall/utility.cpp
@@ -259,11 +259,9 @@ QString Utility::escape(const QString &in)
 
 QString Utility::dataLocation()
 {
-#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+    //  Qt 5's QStandardPaths::writableLocation gives us wrong results (without /data/),
+    //  so we'll have to use the deprecated version for now
     return QDesktopServices::storageLocation(QDesktopServices::DataLocation);
-#else
-    return QStandardPaths::writableLocation(QStandardPaths::DataLocation);
-#endif
 }
 
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)

-- 
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