Fix shared library build

This commit is contained in:
Hennadii Chernyshchyk
2021-10-05 19:07:12 +03:00
parent 1d49a63827
commit e0bc2a9b9f
5 changed files with 32 additions and 16 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ VERSION = 1.2.1
include(../qhotkey.pri)
DEFINES += QHOTKEY_LIB QHOTKEY_LIB_BUILD
DEFINES += QHOTKEY_SHARED QHOTKEY_LIBRARY
# use INSTALL_ROOT to modify the install location
headers.files = $$PUBLIC_HEADERS
+12 -12
View File
@@ -6,14 +6,14 @@
#include <QPair>
#include <QLoggingCategory>
#ifdef QHOTKEY_LIB
#ifdef QHOTKEY_LIB_BUILD
#define QHOTKEY_SHARED_EXPORT Q_DECL_EXPORT
#else
#define QHOTKEY_SHARED_EXPORT Q_DECL_IMPORT
#endif
#ifdef QHOTKEY_SHARED
# ifdef QHOTKEY_LIBRARY
# define QHOTKEY_EXPORT Q_DECL_EXPORT
# else
# define QHOTKEY_EXPORT Q_DECL_IMPORT
# endif
#else
#define QHOTKEY_SHARED_EXPORT
# define QHOTKEY_EXPORT
#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
@@ -23,7 +23,7 @@
#endif
//! A class to define global, systemwide Hotkeys
class QHOTKEY_SHARED_EXPORT QHotkey : public QObject
class QHOTKEY_EXPORT QHotkey : public QObject
{
Q_OBJECT
//! @private
@@ -36,7 +36,7 @@ class QHOTKEY_SHARED_EXPORT QHotkey : public QObject
public:
//! Defines shortcut with native keycodes
class QHOTKEY_SHARED_EXPORT NativeShortcut {
class QHOTKEY_EXPORT NativeShortcut {
public:
//! The native keycode
quint32 key;
@@ -120,10 +120,10 @@ private:
bool _registered;
};
QHOTKEY_HASH_SEED QHOTKEY_SHARED_EXPORT qHash(QHotkey::NativeShortcut key);
QHOTKEY_HASH_SEED QHOTKEY_SHARED_EXPORT qHash(QHotkey::NativeShortcut key, QHOTKEY_HASH_SEED seed);
QHOTKEY_HASH_SEED QHOTKEY_EXPORT qHash(QHotkey::NativeShortcut key);
QHOTKEY_HASH_SEED QHOTKEY_EXPORT qHash(QHotkey::NativeShortcut key, QHOTKEY_HASH_SEED seed);
QHOTKEY_SHARED_EXPORT Q_DECLARE_LOGGING_CATEGORY(logQHotkey)
QHOTKEY_EXPORT Q_DECLARE_LOGGING_CATEGORY(logQHotkey)
Q_DECLARE_METATYPE(QHotkey::NativeShortcut)
+1 -1
View File
@@ -13,7 +13,7 @@
#define _NATIVE_EVENT_RESULT long
#endif
class QHOTKEY_SHARED_EXPORT QHotkeyPrivate : public QObject, public QAbstractNativeEventFilter
class QHOTKEY_EXPORT QHotkeyPrivate : public QObject, public QAbstractNativeEventFilter
{
Q_OBJECT