lib fixup

This commit is contained in:
Skycoder42
2017-10-23 15:36:25 +02:00
parent b910580fce
commit 0943bb0494
4 changed files with 30 additions and 13 deletions
+12 -6
View File
@@ -1,10 +1,16 @@
TARGET = QHotkey
CONFIG += dll
VERSION = 1.0
TEMPLATE = lib TEMPLATE = lib
win32: CONFIG += dll
TARGET = QHotkey
VERSION = 1.2.1
include(../qhotkey.pri) include(../qhotkey.pri)
headers.files = $$HEADERS QHotkey
headers.path = /$(DESTDIR)$$[QT_INSTALL_HEADERS] DEFINES += QHOTKEY_LIB QHOTKEY_LIB_BUILD
target.path = /$(DESTDIR)$$[QT_INSTALL_LIBS]
# use INSTALL_ROOT to modify the install location
headers.files = $$PUBLIC_HEADERS
headers.path = $$[QT_INSTALL_HEADERS]
target.path = $$[QT_INSTALL_LIBS]
INSTALLS += target headers INSTALLS += target headers
+15 -5
View File
@@ -6,8 +6,18 @@
#include <QPair> #include <QPair>
#include <QLoggingCategory> #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
#else
#define QHOTKEY_SHARED_EXPORT
#endif
//! A class to define global, systemwide Hotkeys //! A class to define global, systemwide Hotkeys
class QHotkey : public QObject class QHOTKEY_SHARED_EXPORT QHotkey : public QObject
{ {
Q_OBJECT Q_OBJECT
friend class QHotkeyPrivate; friend class QHotkeyPrivate;
@@ -19,7 +29,7 @@ class QHotkey : public QObject
public: public:
//! Defines shortcut with native keycodes //! Defines shortcut with native keycodes
class NativeShortcut { class QHOTKEY_SHARED_EXPORT NativeShortcut {
public: public:
//! The native keycode //! The native keycode
quint32 key; quint32 key;
@@ -95,9 +105,9 @@ private:
bool _registered; bool _registered;
}; };
uint qHash(const QHotkey::NativeShortcut &key); uint QHOTKEY_SHARED_EXPORT qHash(const QHotkey::NativeShortcut &key);
uint qHash(const QHotkey::NativeShortcut &key, uint seed); uint QHOTKEY_SHARED_EXPORT qHash(const QHotkey::NativeShortcut &key, uint seed);
Q_DECLARE_LOGGING_CATEGORY(logQHotkey) QHOTKEY_SHARED_EXPORT Q_DECLARE_LOGGING_CATEGORY(logQHotkey)
#endif // QHOTKEY_H #endif // QHOTKEY_H
+1 -1
View File
@@ -7,7 +7,7 @@
#include <QMutex> #include <QMutex>
#include <QGlobalStatic> #include <QGlobalStatic>
class QHotkeyPrivate : public QObject, public QAbstractNativeEventFilter class QHOTKEY_SHARED_EXPORT QHotkeyPrivate : public QObject, public QAbstractNativeEventFilter
{ {
Q_OBJECT Q_OBJECT
+2 -1
View File
@@ -1,6 +1,7 @@
CONFIG += C++11 CONFIG += C++11
PUBLIC_HEADERS += $$PWD/QHotkey/qhotkey.h PUBLIC_HEADERS += $$PWD/QHotkey/qhotkey.h \
$$PWD/QHotkey/QHotkey
HEADERS += $$PUBLIC_HEADERS \ HEADERS += $$PUBLIC_HEADERS \
$$PWD/QHotkey/qhotkey_p.h $$PWD/QHotkey/qhotkey_p.h