Use qintptr instead of long when building against Qt6
This commit is contained in:
parent
ce3ef333b7
commit
ef344506b7
2 changed files with 8 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ SuspendResumeListener::~SuspendResumeListener()
|
|||
QCoreApplication::instance()->removeNativeEventFilter(this);
|
||||
}
|
||||
|
||||
bool SuspendResumeListener::nativeEventFilter(const QByteArray &event_type, void *message, long *result)
|
||||
bool SuspendResumeListener::nativeEventFilter(const QByteArray &event_type, void *message, NEFResultType *result)
|
||||
{
|
||||
(void)result;
|
||||
if(event_type == "windows_generic_MSG")
|
||||
|
|
|
|||
|
|
@ -15,6 +15,12 @@
|
|||
#include <QByteArray>
|
||||
#include "SuspendResume.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
#define NEFResultType long
|
||||
#else
|
||||
#define NEFResultType qintptr
|
||||
#endif
|
||||
|
||||
class SuspendResumeListener : public SuspendResumeListenerBase, private QAbstractNativeEventFilter
|
||||
{
|
||||
protected:
|
||||
|
|
@ -22,5 +28,5 @@ protected:
|
|||
virtual ~SuspendResumeListener();
|
||||
|
||||
private:
|
||||
bool nativeEventFilter(const QByteArray &event_type, void *message, long *result);
|
||||
bool nativeEventFilter(const QByteArray &event_type, void *message, NEFResultType *result);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue