diff --git a/CMakeLists.txt b/CMakeLists.txt index 727218e..32cda4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,8 @@ add_library(qhotkey QHotkey/qhotkey.cpp) add_library(QHotkey::QHotkey ALIAS qhotkey) target_link_libraries(qhotkey PUBLIC Qt${QT_DEFAULT_MAJOR_VERSION}::Core Qt${QT_DEFAULT_MAJOR_VERSION}::Gui) +target_compile_definitions(qhotkey PRIVATE QT_NO_SIGNALS_SLOTS_KEYWORDS) + if(BUILD_SHARED_LIBS) target_compile_definitions(qhotkey PRIVATE QHOTKEY_LIBRARY) target_compile_definitions(qhotkey PUBLIC QHOTKEY_SHARED) diff --git a/QHotkey/qhotkey.h b/QHotkey/qhotkey.h index 3697c8e..12f5fec 100644 --- a/QHotkey/qhotkey.h +++ b/QHotkey/qhotkey.h @@ -88,7 +88,7 @@ public: //! Get the current native shortcut NativeShortcut currentNativeShortcut() const; -public slots: +public Q_SLOTS: //! @writeAcFn{QHotkey::registered} bool setRegistered(bool registered); @@ -102,7 +102,7 @@ public slots: //! Set this hotkey to a native shortcut bool setNativeShortcut(QHotkey::NativeShortcut nativeShortcut, bool autoRegister = false); -signals: +Q_SIGNALS: //! Will be emitted if the shortcut is pressed void activated(QPrivateSignal);