Skip to content
Snippets Groups Projects
Commit cf2c0794 authored by Anthony Léonard's avatar Anthony Léonard Committed by Olivier SOLDANO
Browse files

fix LIB_EXPORT behavior and misuse

This patch fixes DLL symbols export and especially imports from LRC.
When included in Windows client, classes were not using Q_DECL_IMPORT
which, on this platform, specify that symbols are imported from a lib.

A consequence of that is that Qt connects with the new syntax were
failing thus forcing us to rely on old-style ones. Those ones are not
checked at compile time and not compatibles with lambdas.

It may also fix other issues related to symbols availability and
uniqueness.

several incorrect LIB_EXPORT are also removed as they were used in template
declarations, or internal classes for LRC.

Change-Id: I2578deca5215a7e17327405ae6462c373b229ada
parent 3cc825e3
Branches
No related tags found
No related merge requests found
......@@ -199,4 +199,3 @@ private:
};
#include "collectionmanagerinterface.hpp"
......@@ -36,7 +36,7 @@ class CollectionMediatorPrivate;
* The later objective make it easier to later implement the decorator pattern.
*/
template<typename T>
class LIB_EXPORT CollectionMediator {
class CollectionMediator {
public:
CollectionMediator(CollectionManagerInterface<T>* parentManager, QAbstractItemModel* m);
virtual ~CollectionMediator();
......@@ -50,4 +50,3 @@ private:
};
#include <collectionmediator.hpp>
......@@ -26,7 +26,7 @@ namespace Interfaces {
/**
* This implementation of the DBusErrorHandler interface throws an exception with the given message.
*/
class LIB_EXPORT DBusErrorHandlerDefault : public DBusErrorHandlerI {
class DBusErrorHandlerDefault : public DBusErrorHandlerI {
public:
[[noreturn]] void connectionError(const QString& error) override;
[[noreturn]] void invalidInterfaceError(const QString& error) override;
......
......@@ -52,7 +52,7 @@ void LIB_EXPORT setAccountListColorizer(std::unique_ptr<Interfaces::AccountListC
LIB_EXPORT Interfaces::ContactMethodSelectorI& contactMethodSelector();
void LIB_EXPORT setContactMethodSelector(std::unique_ptr<Interfaces::ContactMethodSelectorI> instance);
LIB_EXPORT Interfaces::DBusErrorHandlerI& dBusErrorHandler();
Interfaces::DBusErrorHandlerI& dBusErrorHandler();
void setDBusErrorHandler(std::unique_ptr<Interfaces::DBusErrorHandlerI> instance);
/**
......@@ -96,7 +96,7 @@ void setInterfaceInternal(Interfaces::ActionExtenderI *);
* can be passed.
*/
template<class I, typename ...Ts>
void LIB_EXPORT setInterface(Ts... args)
void setInterface(Ts... args)
{
try {
auto i = new I(args...);
......
......@@ -58,4 +58,3 @@ private:
};
#include <itembase.hpp>
......@@ -47,8 +47,11 @@ template<typename A> constexpr int enum_class_size() {
return static_cast<int>(A::COUNT__);
}
#ifdef LRC_IMPORT
#define LIB_EXPORT Q_DECL_IMPORT
#else
#define LIB_EXPORT Q_DECL_EXPORT
#define LIB_IMPORT Q_DECL_IMPORT
#endif
//Doesn't work
#if ((__GNUC_MINOR__ > 8) || (__GNUC_MINOR__ == 8))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment