mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-05-06 18:17:17 +02:00
Update windows build
This commit is contained in:
@@ -181,7 +181,7 @@ unix: {
|
||||
}
|
||||
win32: {
|
||||
SOURCES += \
|
||||
nativeeventfilter-win.cpp
|
||||
nativeeventfilter-win.cpp \
|
||||
windowctrl-win.cpp
|
||||
}
|
||||
|
||||
|
||||
@@ -90,7 +90,11 @@ const QMap< Qt::Key, int > NativeEventFilterWin::m_virtual_key_map {
|
||||
/*
|
||||
* Catch the key press
|
||||
*/
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
bool NativeEventFilterWin::nativeEventFilter( const QByteArray& eventType, void* message, long* result )
|
||||
#else
|
||||
bool NativeEventFilterWin::nativeEventFilter( const QByteArray& eventType, void* message, qintptr* result )
|
||||
#endif
|
||||
{
|
||||
Q_UNUSED( eventType )
|
||||
Q_UNUSED( result )
|
||||
@@ -114,9 +118,13 @@ bool NativeEventFilterWin::nativeEventFilter( const QByteArray& eventType, void*
|
||||
*/
|
||||
bool NativeEventFilterWin::connectShortcut( QKeySequence key_seq )
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
Qt::Key key_code = Qt::Key( key_seq[ 0 ] & static_cast< int >( ~Qt::KeyboardModifierMask ) );
|
||||
Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ] & static_cast<int>( Qt::KeyboardModifierMask ) );
|
||||
|
||||
#else
|
||||
Qt::Key key_code = Qt::Key( key_seq[ 0 ].toCombined() & static_cast< int >( ~Qt::KeyboardModifierMask ) );
|
||||
Qt::KeyboardModifiers key_modifiers = Qt::KeyboardModifiers( key_seq[ 0 ].toCombined() & static_cast<int>( Qt::KeyboardModifierMask ) );
|
||||
#endif
|
||||
return connectShortcut( key_code, key_modifiers );
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,11 @@ class NativeEventFilterWin : public NativeEventFilterBase
|
||||
*
|
||||
* @return Result
|
||||
*/
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
bool nativeEventFilter( const QByteArray& eventType, void* message, long* result ) override;
|
||||
#else
|
||||
bool nativeEventFilter( const QByteArray& eventType, void* message, qintptr* result ) override;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ const int NativeEventFilterX11::m_valid_mods_mask = ShiftMask | ControlMask | Mo
|
||||
/*
|
||||
* Catch the key press
|
||||
*/
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
bool NativeEventFilterX11::nativeEventFilter( const QByteArray& eventType, void* message, long* result )
|
||||
#else
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
* Qt includes
|
||||
*/
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
|
||||
/*
|
||||
* Local includes
|
||||
@@ -23,7 +24,7 @@
|
||||
* Predefines
|
||||
*/
|
||||
class QWindow;
|
||||
class Preferences;
|
||||
//class Preferences;
|
||||
|
||||
/**
|
||||
* @brief The WindowCtrl class.
|
||||
|
||||
Reference in New Issue
Block a user