diff options
author | Pekka Vuorela <pvuorela@iki.fi> | 2024-03-03 22:04:41 +0200 |
---|---|---|
committer | Pekka Vuorela <pvuorela@iki.fi> | 2024-03-25 08:51:52 +0200 |
commit | a440eab5188398cf0c23fa8718396138d864db18 (patch) | |
tree | b5cee4a361146e450edbe8cd627f6926cfbe7eca | |
parent | bbd3150b0c8588475e67471e2b8357e710e1c350 (diff) |
Simplify qmailglobal.h
Only one place using ENFORCE and even that could be better explicitly
handling the error case -> Remove.
Removed extra wrappers for Q_DECL_EXPORT/IMPORT. QMF_VISIBILITY not used
anywhere, thus removed. Also removed SINGLE_MODULE_QTOPIAMAIL, assuming
no need these days.
Change-Id: I86796ce16ab74cfd349cb199b41f41a052116bbd
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Damien Caliste <dcaliste@free.fr>
Reviewed-by: Christopher Adams <chris.adams@qinetic.com.au>
-rw-r--r-- | src/libraries/qmfclient/qmailstoreimplementation_p.cpp | 5 | ||||
-rw-r--r-- | src/libraries/qmfclient/support/qmailglobal.h | 40 |
2 files changed, 10 insertions, 35 deletions
diff --git a/src/libraries/qmfclient/qmailstoreimplementation_p.cpp b/src/libraries/qmfclient/qmailstoreimplementation_p.cpp index 7ebabdb7..3c274119 100644 --- a/src/libraries/qmfclient/qmailstoreimplementation_p.cpp +++ b/src/libraries/qmfclient/qmailstoreimplementation_p.cpp @@ -175,7 +175,10 @@ QMailStoreImplementationBase::QMailStoreImplementationBase(QMailStore* parent) { Q_ASSERT(q); - ENFORCE (isIpcConnectionEstablished()); + if (!isIpcConnectionEstablished()) { + qCritical() << "Failed to connect D-Bus, notifications to/from other clients will not work."; + } + if (!QDBusConnection::sessionBus().registerObject(QString::fromLatin1("/mailstore/client"), this)) { qCritical() << "Failed to register to D-Bus, notifications to other clients will not work."; } diff --git a/src/libraries/qmfclient/support/qmailglobal.h b/src/libraries/qmfclient/support/qmailglobal.h index b0b9104d..3dfae88b 100644 --- a/src/libraries/qmfclient/support/qmailglobal.h +++ b/src/libraries/qmfclient/support/qmailglobal.h @@ -36,50 +36,22 @@ #include <qglobal.h> -#ifdef SINGLE_MODULE_QTOPIAMAIL -#define QMF_DECL_EXPORT -#define QMF_DECL_IMPORT -#define QMF_VISIBILITY -#else -#if defined(Q_OS_WIN) -#define QMF_DECL_EXPORT Q_DECL_EXPORT -#define QMF_DECL_IMPORT Q_DECL_IMPORT -#define QMF_VISIBILITY -#elif defined(QT_VISIBILITY_AVAILABLE) -#define QMF_DECL_EXPORT Q_DECL_EXPORT -#define QMF_DECL_IMPORT Q_DECL_IMPORT -#define QMF_VISIBILITY __attribute__((visibility("default"))) -#else -#define QMF_DECL_EXPORT -#define QMF_DECL_IMPORT -#define QMF_VISIBILITY -#endif -#endif - #ifdef QMF_INTERNAL -#define QMF_EXPORT QMF_DECL_EXPORT +#define QMF_EXPORT Q_DECL_EXPORT #else -#define QMF_EXPORT QMF_DECL_IMPORT +#define QMF_EXPORT Q_DECL_IMPORT #endif #ifdef QMFUTIL_INTERNAL -#define QMFUTIL_EXPORT QMF_DECL_EXPORT +#define QMFUTIL_EXPORT Q_DECL_EXPORT #else -#define QMFUTIL_EXPORT QMF_DECL_IMPORT +#define QMFUTIL_EXPORT Q_DECL_IMPORT #endif #ifdef MESSAGESERVER_INTERNAL -#define MESSAGESERVER_EXPORT QMF_DECL_EXPORT +#define MESSAGESERVER_EXPORT Q_DECL_EXPORT #else -#define MESSAGESERVER_EXPORT QMF_DECL_IMPORT -#endif - -#ifndef ENFORCE -#ifdef QT_NO_DEBUG -#define ENFORCE(expr) expr -#else -#define ENFORCE(expr) { bool res = (expr); Q_ASSERT(res); } -#endif +#define MESSAGESERVER_EXPORT Q_DECL_IMPORT #endif #endif |