mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
remove Q_WS_QWS macro
This commit is contained in:
parent
2b9d17251b
commit
9db7b04dd0
|
@ -107,7 +107,7 @@ HotkeyStruct::HotkeyStruct( quint32 key_, quint32 key2_, quint32 modifier_, int
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined( Q_OS_MAC ) && !defined( Q_WS_QWS )
|
||||
#if !defined( Q_OS_MAC )
|
||||
HotkeyWrapper::HotkeyWrapper( QObject * parent ):
|
||||
QThread( parent ),
|
||||
state2( false )
|
||||
|
|
|
@ -53,7 +53,6 @@ struct HotkeyStruct
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined( Q_WS_QWS )
|
||||
class HotkeyWrapper: public QThread // Thread is actually only used on X11
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -168,40 +167,6 @@ signals:
|
|||
|
||||
#endif
|
||||
};
|
||||
#else
|
||||
|
||||
class HotkeyWrapper: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
friend class QHotkeyApplication;
|
||||
|
||||
public:
|
||||
|
||||
DEF_EX( exInit, "Hotkey wrapper failed to init", std::exception )
|
||||
|
||||
HotkeyWrapper( QObject * parent ):
|
||||
QObject( parent )
|
||||
{
|
||||
}
|
||||
|
||||
bool setGlobalKey( int key, int key2, Qt::KeyboardModifiers modifier, int handle )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool setGlobalKey( QKeySequence const &, int )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void unregister() {}
|
||||
|
||||
signals:
|
||||
|
||||
void hotkeyActivated( int );
|
||||
};
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
|
||||
bool KeyboardState::checkModifiersPressed( int mask )
|
||||
{
|
||||
#if defined( Q_WS_QWS )
|
||||
return false;
|
||||
#elif defined( Q_OS_WIN32 )
|
||||
#if defined( Q_OS_WIN32 )
|
||||
|
||||
return !( ( mask & Alt && !( GetAsyncKeyState( VK_MENU ) & 0x8000 ) )
|
||||
|| ( mask & Ctrl && !( GetAsyncKeyState( VK_CONTROL ) & 0x8000 ) )
|
||||
|
|
Loading…
Reference in a new issue