[Pkg-owncloud-commits] [owncloud-client] 91/103: Add export macro to all classes that need to be exported

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Apr 30 18:09:03 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 3ee729bc4a061b860782933c6c01c2d653bd038a
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Tue Apr 29 15:30:19 2014 +0200

    Add export macro to all classes that need to be exported
---
 src/creds/abstractcredentials.h                    |  2 +-
 src/creds/credentialsfactory.h                     |  4 +-
 src/creds/shibboleth/shibbolethwebview.h           |  3 +-
 src/creds/shibbolethcredentials.h                  |  2 +-
 src/mirall/connectionvalidator.h                   |  3 +-
 src/mirall/folder.h                                |  2 +-
 src/mirall/folderman.h                             |  2 +-
 src/mirall/mirallaccessmanager.h                   |  3 +-
 src/mirall/mirallconfigfile.h                      |  3 +-
 src/mirall/networkjobs.h                           | 11 +++--
 .../credentialsfactory.h => mirall/owncloudlib.h}  | 24 +++-------
 src/mirall/progressdispatcher.h                    |  9 ++--
 src/mirall/syncresult.h                            |  3 +-
 src/mirall/theme.h                                 |  2 +-
 src/mirall/utility.h                               | 53 ++++++++++------------
 15 files changed, 59 insertions(+), 67 deletions(-)

diff --git a/src/creds/abstractcredentials.h b/src/creds/abstractcredentials.h
index 79df5d6..2c144b0 100644
--- a/src/creds/abstractcredentials.h
+++ b/src/creds/abstractcredentials.h
@@ -17,7 +17,7 @@
 #include <QObject>
 
 #include <csync.h>
-#include "utility.h"
+#include "owncloudlib.h"
 
 
 class QNetworkAccessManager;
diff --git a/src/creds/credentialsfactory.h b/src/creds/credentialsfactory.h
index a34f94b..248d7ef 100644
--- a/src/creds/credentialsfactory.h
+++ b/src/creds/credentialsfactory.h
@@ -14,6 +14,8 @@
 #ifndef MIRALL_CREDS_CREDENTIALS_FACTORY_H
 #define MIRALL_CREDS_CREDENTIALS_FACTORY_H
 
+#include "owncloudlib.h"
+
 class AbstractCredentials;
 class QString;
 
@@ -23,7 +25,7 @@ namespace Mirall
 namespace CredentialsFactory
 {
 
-AbstractCredentials* create(const QString& type);
+OWNCLOUDSYNC_EXPORT AbstractCredentials* create(const QString& type);
 
 } // ns CredentialsFactory
 
diff --git a/src/creds/shibboleth/shibbolethwebview.h b/src/creds/shibboleth/shibbolethwebview.h
index 9624fed..5a988fe 100644
--- a/src/creds/shibboleth/shibbolethwebview.h
+++ b/src/creds/shibboleth/shibbolethwebview.h
@@ -14,6 +14,7 @@
 #ifndef MIRALL_WIZARD_SHIBBOLETH_WEB_VIEW_H
 #define MIRALL_WIZARD_SHIBBOLETH_WEB_VIEW_H
 
+#include "owncloudlib.h"
 #include <QList>
 #include <QPointer>
 #include <QWebView>
@@ -27,7 +28,7 @@ namespace Mirall
 class ShibbolethCookieJar;
 class Account;
 
-class ShibbolethWebView : public QWebView
+class OWNCLOUDSYNC_EXPORT ShibbolethWebView : public QWebView
 {
   Q_OBJECT
 
diff --git a/src/creds/shibbolethcredentials.h b/src/creds/shibbolethcredentials.h
index 6d9b40b..217f852 100644
--- a/src/creds/shibbolethcredentials.h
+++ b/src/creds/shibbolethcredentials.h
@@ -30,7 +30,7 @@ namespace Mirall
 
 class ShibbolethWebView;
 
-class ShibbolethCredentials : public AbstractCredentials
+class OWNCLOUDSYNC_EXPORT ShibbolethCredentials : public AbstractCredentials
 {
 Q_OBJECT
 
diff --git a/src/mirall/connectionvalidator.h b/src/mirall/connectionvalidator.h
index 355ec9c..e930ccd 100644
--- a/src/mirall/connectionvalidator.h
+++ b/src/mirall/connectionvalidator.h
@@ -14,6 +14,7 @@
 #ifndef CONNECTIONVALIDATOR_H
 #define CONNECTIONVALIDATOR_H
 
+#include "owncloudlib.h"
 #include <QObject>
 #include <QStringList>
 #include <QVariantMap>
@@ -23,7 +24,7 @@ namespace Mirall {
 
 class Account;
 
-class ConnectionValidator : public QObject
+class OWNCLOUDSYNC_EXPORT ConnectionValidator : public QObject
 {
     Q_OBJECT
 public:
diff --git a/src/mirall/folder.h b/src/mirall/folder.h
index 67a1ca1..f648182 100644
--- a/src/mirall/folder.h
+++ b/src/mirall/folder.h
@@ -60,7 +60,7 @@ typedef enum SyncFileStatus_s {
 } SyncFileStatus;
 
 
-class Folder : public QObject
+class OWNCLOUDSYNC_EXPORT Folder : public QObject
 {
     Q_OBJECT
 
diff --git a/src/mirall/folderman.h b/src/mirall/folderman.h
index a911b25..109b068 100644
--- a/src/mirall/folderman.h
+++ b/src/mirall/folderman.h
@@ -30,7 +30,7 @@ class SyncResult;
 
 namespace Mirall {
 
-class FolderMan : public QObject
+class OWNCLOUDSYNC_EXPORT FolderMan : public QObject
 {
     Q_OBJECT
 public:
diff --git a/src/mirall/mirallaccessmanager.h b/src/mirall/mirallaccessmanager.h
index a054280..149dd5a 100644
--- a/src/mirall/mirallaccessmanager.h
+++ b/src/mirall/mirallaccessmanager.h
@@ -14,12 +14,13 @@
 #ifndef MIRALL_ACCESS_MANAGER_H
 #define MIRALL_ACCESS_MANAGER_H
 
+#include "owncloudlib.h"
 #include <QNetworkAccessManager>
 
 namespace Mirall
 {
 
-class MirallAccessManager : public QNetworkAccessManager
+class OWNCLOUDSYNC_EXPORT MirallAccessManager : public QNetworkAccessManager
 {
     Q_OBJECT
 
diff --git a/src/mirall/mirallconfigfile.h b/src/mirall/mirallconfigfile.h
index 1d7455d..c3769a9 100644
--- a/src/mirall/mirallconfigfile.h
+++ b/src/mirall/mirallconfigfile.h
@@ -15,6 +15,7 @@
 #ifndef MIRALLCONFIGFILE_H
 #define MIRALLCONFIGFILE_H
 
+#include "owncloudlib.h"
 #include <QSharedPointer>
 #include <QString>
 #include <QVariant>
@@ -26,7 +27,7 @@ namespace Mirall {
 
 class AbstractCredentials;
 
-class MirallConfigFile
+class OWNCLOUDSYNC_EXPORT MirallConfigFile
 {
 public:
     MirallConfigFile();
diff --git a/src/mirall/networkjobs.h b/src/mirall/networkjobs.h
index 9785a86..b605a03 100644
--- a/src/mirall/networkjobs.h
+++ b/src/mirall/networkjobs.h
@@ -16,6 +16,7 @@
 #ifndef NETWORKJOBS_H
 #define NETWORKJOBS_H
 
+#include "owncloudlib.h"
 #include <QObject>
 #include <QNetworkRequest>
 #include <QNetworkReply>
@@ -46,7 +47,7 @@ private:
 /**
  * @brief The AbstractNetworkJob class
  */
-class AbstractNetworkJob : public QObject {
+class OWNCLOUDSYNC_EXPORT AbstractNetworkJob : public QObject {
     Q_OBJECT
 public:
     explicit AbstractNetworkJob(Account *account, const QString &path, QObject* parent = 0);
@@ -108,7 +109,7 @@ private:
 /**
  * @brief The EntityExistsJob class
  */
-class EntityExistsJob : public AbstractNetworkJob {
+class OWNCLOUDSYNC_EXPORT EntityExistsJob : public AbstractNetworkJob {
     Q_OBJECT
 public:
     explicit EntityExistsJob(Account *account, const QString &path, QObject* parent = 0);
@@ -124,7 +125,7 @@ private slots:
 /**
  * @brief The LsColJob class
  */
-class LsColJob : public AbstractNetworkJob {
+class OWNCLOUDSYNC_EXPORT LsColJob : public AbstractNetworkJob {
     Q_OBJECT
 public:
     explicit LsColJob(Account *account, const QString &path, QObject *parent = 0);
@@ -161,7 +162,7 @@ private:
 /**
  * @brief The MkColJob class
  */
-class MkColJob : public AbstractNetworkJob {
+class OWNCLOUDSYNC_EXPORT MkColJob : public AbstractNetworkJob {
     Q_OBJECT
 public:
     explicit MkColJob(Account *account, const QString &path, QObject *parent = 0);
@@ -177,7 +178,7 @@ private slots:
 /**
  * @brief The CheckServerJob class
  */
-class CheckServerJob : public AbstractNetworkJob {
+class OWNCLOUDSYNC_EXPORT CheckServerJob : public AbstractNetworkJob {
     Q_OBJECT
 public:
     explicit CheckServerJob(Account *account, bool followRedirect = false, QObject *parent = 0);
diff --git a/src/creds/credentialsfactory.h b/src/mirall/owncloudlib.h
similarity index 58%
copy from src/creds/credentialsfactory.h
copy to src/mirall/owncloudlib.h
index a34f94b..10fede3 100644
--- a/src/creds/credentialsfactory.h
+++ b/src/mirall/owncloudlib.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) by Krzesimir Nowak <krzesimir at endocode.com>
+ * Copyright (C) by Olivier Goffart <ogoffart at owncloud.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -11,22 +11,10 @@
  * for more details.
  */
 
-#ifndef MIRALL_CREDS_CREDENTIALS_FACTORY_H
-#define MIRALL_CREDS_CREDENTIALS_FACTORY_H
-
-class AbstractCredentials;
-class QString;
-
-namespace Mirall
-{
-
-namespace CredentialsFactory
-{
-
-AbstractCredentials* create(const QString& type);
-
-} // ns CredentialsFactory
-
-} // ns Mirall
+#pragma once
 
+#ifdef owncloudsync_EXPORTS
+#define OWNCLOUDSYNC_EXPORT Q_DECL_EXPORT
+#else
+#define OWNCLOUDSYNC_EXPORT Q_DECL_IMPORT
 #endif
diff --git a/src/mirall/progressdispatcher.h b/src/mirall/progressdispatcher.h
index 6b52d98..0846a44 100644
--- a/src/mirall/progressdispatcher.h
+++ b/src/mirall/progressdispatcher.h
@@ -14,6 +14,7 @@
 #ifndef PROGRESSDISPATCHER_H
 #define PROGRESSDISPATCHER_H
 
+#include "owncloudlib.h"
 #include <QObject>
 #include <QHash>
 #include <QTime>
@@ -74,10 +75,10 @@ namespace Progress
         }
     };
 
-    QString asActionString( const SyncFileItem& item );
-    QString asResultString(  const SyncFileItem& item );
+    OWNCLOUDSYNC_EXPORT QString asActionString( const SyncFileItem& item );
+    OWNCLOUDSYNC_EXPORT QString asResultString(  const SyncFileItem& item );
 
-    bool isWarningKind( SyncFileItem::Status );
+    OWNCLOUDSYNC_EXPORT bool isWarningKind( SyncFileItem::Status );
 
 }
 
@@ -90,7 +91,7 @@ namespace Progress
  * or the overall sync progress.
  *
  */
-class ProgressDispatcher : public QObject
+class OWNCLOUDSYNC_EXPORT ProgressDispatcher : public QObject
 {
     Q_OBJECT
 
diff --git a/src/mirall/syncresult.h b/src/mirall/syncresult.h
index 47979b2..3350eda 100644
--- a/src/mirall/syncresult.h
+++ b/src/mirall/syncresult.h
@@ -19,12 +19,13 @@
 #include <QHash>
 #include <QDateTime>
 
+#include "owncloudlib.h"
 #include "mirall/syncfileitem.h"
 
 namespace Mirall
 {
 
-class SyncResult
+class OWNCLOUDSYNC_EXPORT SyncResult
 {
 public:
     enum Status
diff --git a/src/mirall/theme.h b/src/mirall/theme.h
index 36e4b0e..6e40b9f 100644
--- a/src/mirall/theme.h
+++ b/src/mirall/theme.h
@@ -28,7 +28,7 @@ namespace Mirall {
 
 class SyncResult;
 
-class Theme : public QObject
+class OWNCLOUDSYNC_EXPORT Theme : public QObject
 {
     Q_OBJECT
 public:
diff --git a/src/mirall/utility.h b/src/mirall/utility.h
index 004db4b..ca72f36 100644
--- a/src/mirall/utility.h
+++ b/src/mirall/utility.h
@@ -15,38 +15,33 @@
 #ifndef UTILITY_H
 #define UTILITY_H
 
+#include "owncloudlib.h"
 #include <QString>
 #include <QByteArray>
 #include <QDateTime>
 #include <QElapsedTimer>
 #include <QHash>
 
-#ifdef owncloudsync_EXPORTS
-#define OWNCLOUDSYNC_EXPORT Q_DECL_EXPORT
-#else
-#define OWNCLOUDSYNC_EXPORT Q_DECL_IMPORT
-#endif
-
 class QWidget;
 
 namespace Mirall {
 
 namespace Utility
 {
-    void sleep(int sec);
-    void usleep(int usec);
-    QString formatFingerprint( const QByteArray&, bool colonSeparated = true );
-    void setupFavLink( const QString &folder );
-    bool writeRandomFile( const QString& fname, int size = -1);
-    QString octetsToString( qint64 octets );
-    QString platform();
-    QByteArray userAgentString();
-    void raiseDialog(QWidget *);
-    bool hasLaunchOnStartup(const QString &appName);
-    void setLaunchOnStartup(const QString &appName, const QString& guiName, bool launch);
-    qint64 freeDiskSpace(const QString &path, bool *ok = 0);
-    QString toCSyncScheme(const QString &urlStr);
-    void showInFileManager(const QString &localPath);
+    OWNCLOUDSYNC_EXPORT void sleep(int sec);
+    OWNCLOUDSYNC_EXPORT void usleep(int usec);
+    OWNCLOUDSYNC_EXPORT QString formatFingerprint( const QByteArray&, bool colonSeparated = true );
+    OWNCLOUDSYNC_EXPORT void setupFavLink( const QString &folder );
+    OWNCLOUDSYNC_EXPORT bool writeRandomFile( const QString& fname, int size = -1);
+    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);
+    OWNCLOUDSYNC_EXPORT QString toCSyncScheme(const QString &urlStr);
+    OWNCLOUDSYNC_EXPORT void showInFileManager(const QString &localPath);
     /** Like QLocale::toString(double, 'f', prec), but drops trailing zeros after the decimal point */
 
     /**
@@ -57,22 +52,22 @@ namespace Utility
      * @param unit an optional unit that is appended if present.
      * @return the formatted string.
      */
-    QString compactFormatDouble(double value, int prec, const QString& unit = QString::null);
+    OWNCLOUDSYNC_EXPORT QString compactFormatDouble(double value, int prec, const QString& unit = QString::null);
 
     // porting methods
-    QString escape(const QString&);
-    QString dataLocation();
+    OWNCLOUDSYNC_EXPORT QString escape(const QString&);
+    OWNCLOUDSYNC_EXPORT QString dataLocation();
 
     // conversion function QDateTime <-> time_t   (because the ones builtin work on only unsigned 32bit)
-    QDateTime qDateTimeFromTime_t(qint64 t);
-    qint64 qDateTimeToTime_t(const QDateTime &t);
+    OWNCLOUDSYNC_EXPORT QDateTime qDateTimeFromTime_t(qint64 t);
+    OWNCLOUDSYNC_EXPORT qint64 qDateTimeToTime_t(const QDateTime &t);
 
 
     // convinience OS detection methods
-    bool isWindows();
-    bool isMac();
-    bool isUnix();
-    bool isLinux(); // use with care
+    OWNCLOUDSYNC_EXPORT bool isWindows();
+    OWNCLOUDSYNC_EXPORT bool isMac();
+    OWNCLOUDSYNC_EXPORT bool isUnix();
+    OWNCLOUDSYNC_EXPORT bool isLinux(); // use with care
 
     class StopWatch {
     private:

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