[Pkg-owncloud-commits] [owncloud-client] 67/498: Integrating feedbacks provided by jturcotte

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Aug 11 14:48:35 UTC 2015


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 f3bdfef9cfa366eb44d974ffe3db1ba522085c58
Author: Luca Lorenzetto <luca.lorenzetto at infocamere.it>
Date:   Tue May 5 16:42:34 2015 +0200

    Integrating feedbacks provided by jturcotte
---
 src/libsync/utility_win.cpp | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/libsync/utility_win.cpp b/src/libsync/utility_win.cpp
index f3971cf..7b624c1 100644
--- a/src/libsync/utility_win.cpp
+++ b/src/libsync/utility_win.cpp
@@ -38,17 +38,15 @@ static void setupFavLink_private(const QString &folder)
 {
     // Windows Explorer: Place under "Favorites" (Links)
     
-    SHGetKnownFolderPathFun SHGetKnownFolderPathPtr = NULL;
-    SHGetFolderPathFun SHGetFolderPathPtr = NULL;
+    static SHGetKnownFolderPathFun SHGetKnownFolderPathPtr = NULL;
     QString linkName; 
     QDir folderDir(QDir::fromNativeSeparators(folder));
-    if((!SHGetKnownFolderPathPtr) && (!SHGetFolderPathPtr))
+    if (!SHGetKnownFolderPathPtr)
     {
       QLibrary kernel32Lib("shell32.dll");
       if(kernel32Lib.load())
       {
         SHGetKnownFolderPathPtr = (SHGetKnownFolderPathFun) kernel32Lib.resolve("SHGetKnownFolderPath");
-        SHGetFolderPathPtr = (SHGetFolderPathFun) kernel32Lib.resolve("SHGetFolderPathW");
       }
     }
      
@@ -56,8 +54,8 @@ static void setupFavLink_private(const QString &folder)
         /* Use new WINAPI functions */
         wchar_t *path = NULL;
         if(SHGetKnownFolderPathPtr(FOLDERID_Links, 0, NULL, &path) == S_OK) {
-            QString Links= QDir::fromNativeSeparators(QString::fromWCharArray(path)); 
-            linkName = QDir(Links).filePath(folderDir.dirName() + QLatin1String(".lnk"));
+            QString links = QDir::fromNativeSeparators(QString::fromWCharArray(path)); 
+            linkName = QDir(links).filePath(folderDir.dirName() + QLatin1String(".lnk"));
         }
     } else {
         /* Use legacy functions */

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