[Pkg-owncloud-commits] [owncloud-client] 16/38: Fix compile and adapt code to be similar to 1.7/master

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Sep 5 20:20:55 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 b7a91a6998b3f3099c8578536b9f96fcac2c26ca
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Aug 12 15:24:42 2014 +0200

    Fix compile and adapt code to be similar to 1.7/master
---
 src/mirall/accountsettings.cpp |  2 +-
 src/mirall/owncloudgui.cpp     | 19 +++++++++++++++++--
 src/mirall/owncloudgui.h       |  2 ++
 src/mirall/utility.cpp         | 17 -----------------
 src/mirall/utility.h           |  1 -
 5 files changed, 20 insertions(+), 21 deletions(-)

diff --git a/src/mirall/accountsettings.cpp b/src/mirall/accountsettings.cpp
index e0e60d1..3014c18 100644
--- a/src/mirall/accountsettings.cpp
+++ b/src/mirall/accountsettings.cpp
@@ -713,7 +713,7 @@ void AccountSettings::slotIgnoreFilesEditor()
         _ignoreEditor->setAttribute( Qt::WA_DeleteOnClose, true );
         _ignoreEditor->open();
     } else {
-        Utility::raiseDialog(_ignoreEditor);
+        ownCloudGui::raiseDialog(_ignoreEditor);
     }
 }
 
diff --git a/src/mirall/owncloudgui.cpp b/src/mirall/owncloudgui.cpp
index 816ca62..61c1d5d 100644
--- a/src/mirall/owncloudgui.cpp
+++ b/src/mirall/owncloudgui.cpp
@@ -21,6 +21,7 @@
 #include "mirall/owncloudsetupwizard.h"
 #if defined(Q_OS_MAC)
 #    include "mirall/settingsdialogmac.h"
+#    include "macwindow.h" // qtmacgoodies
 #else
 #    include "mirall/settingsdialog.h"
 #endif
@@ -483,7 +484,7 @@ void ownCloudGui::slotShowSettings()
         _settingsDialog->show();
     }
     _settingsDialog->setGeneralErrors( _startupFails );
-    Utility::raiseDialog(_settingsDialog.data());
+    ownCloudGui::raiseDialog(_settingsDialog.data());
 }
 
 void ownCloudGui::slotShowSyncProtocol()
@@ -511,7 +512,7 @@ void ownCloudGui::slotToggleLogBrowser()
     if (_logBrowser->isVisible() ) {
         _logBrowser->hide();
     } else {
-        Utility::raiseDialog(_logBrowser);
+        ownCloudGui::raiseDialog(_logBrowser);
     }
 }
 
@@ -527,5 +528,19 @@ void ownCloudGui::slotHelp()
     QDesktopServices::openUrl(QUrl(Theme::instance()->helpUrl()));
 }
 
+void ownCloudGui::raiseDialog( QWidget *raiseWidget )
+{
+    if( raiseWidget && raiseWidget->parentWidget() == 0) {
+        // Qt has a bug which causes parent-less dialogs to pop-under.
+        raiseWidget->showNormal();
+        raiseWidget->raise();
+        raiseWidget->activateWindow();
+    }
+#if defined(Q_OS_MAC)
+    // viel hilft viel ;-)
+    MacWindow::bringToFront(raiseWidget);
+#endif
+}
+
 
 } // end namespace
diff --git a/src/mirall/owncloudgui.h b/src/mirall/owncloudgui.h
index 06fea15..50b8a44 100644
--- a/src/mirall/owncloudgui.h
+++ b/src/mirall/owncloudgui.h
@@ -43,6 +43,8 @@ public:
 
     bool checkAccountExists(bool openSettings);
 
+    static void raiseDialog( QWidget *raiseWidget );
+
 signals:
     void setupProxy();
 
diff --git a/src/mirall/utility.cpp b/src/mirall/utility.cpp
index 6638f78..bbf5274 100644
--- a/src/mirall/utility.cpp
+++ b/src/mirall/utility.cpp
@@ -50,7 +50,6 @@
 #include "mirall/utility_win.cpp"
 #elif defined(Q_OS_MAC)
 #include "mirall/utility_mac.cpp"
-#include "macwindow.h" // qtmacgoodies
 #else
 #include "mirall/utility_unix.cpp"
 #endif
@@ -165,22 +164,6 @@ QByteArray Utility::userAgentString()
             .toLatin1();
 }
 
-void Utility::raiseDialog( QWidget *raiseWidget )
-{
-#ifndef TOKEN_AUTH_ONLY
-    if( raiseWidget && raiseWidget->parentWidget() == 0) {
-        // Qt has a bug which causes parent-less dialogs to pop-under.
-        raiseWidget->showNormal();
-        raiseWidget->raise();
-        raiseWidget->activateWindow();
-    }
-#if defined(Q_OS_MAC)
-    // viel hilft viel ;-)
-    MacWindow::bringToFront(raiseWidget);
-#endif
-#endif
-}
-
 bool Utility::hasLaunchOnStartup(const QString &appName)
 {
     return hasLaunchOnStartup_private(appName);
diff --git a/src/mirall/utility.h b/src/mirall/utility.h
index c893001..4af2447 100644
--- a/src/mirall/utility.h
+++ b/src/mirall/utility.h
@@ -36,7 +36,6 @@ namespace Utility
     OWNCLOUDSYNC_EXPORT QString octetsToString( qint64 octets );
     OWNCLOUDSYNC_EXPORT QString platform();
     OWNCLOUDSYNC_EXPORT QByteArray userAgentString();
-    OWNCLOUDSYNC_EXPORT void raiseDialog(QWidget *);
     OWNCLOUDSYNC_EXPORT bool hasLaunchOnStartup(const QString &appName);
     OWNCLOUDSYNC_EXPORT void setLaunchOnStartup(const QString &appName, const QString& guiName, bool launch);
     OWNCLOUDSYNC_EXPORT qint64 freeDiskSpace(const QString &path, bool *ok = 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