Use qintptr in QWidget::nativeEvent on Qt 6 (#4376)

This commit is contained in:
nerix
2023-02-13 21:45:58 +01:00
committed by GitHub
parent df9836f59e
commit bb0b563a87
5 changed files with 39 additions and 3 deletions
+13 -3
View File
@@ -67,8 +67,13 @@ public:
static bool supportsCustomWindowFrame();
protected:
virtual bool nativeEvent(const QByteArray &eventType, void *message,
long *result) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool nativeEvent(const QByteArray &eventType, void *message,
qintptr *result) override;
#else
bool nativeEvent(const QByteArray &eventType, void *message,
long *result) override;
#endif
virtual void scaleChangedEvent(float) override;
virtual void paintEvent(QPaintEvent *) override;
@@ -103,10 +108,15 @@ private:
bool handleDPICHANGED(MSG *msg);
bool handleSHOWWINDOW(MSG *msg);
bool handleNCCALCSIZE(MSG *msg, long *result);
bool handleSIZE(MSG *msg);
bool handleMOVE(MSG *msg);
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
bool handleNCCALCSIZE(MSG *msg, qintptr *result);
bool handleNCHITTEST(MSG *msg, qintptr *result);
#else
bool handleNCCALCSIZE(MSG *msg, long *result);
bool handleNCHITTEST(MSG *msg, long *result);
#endif
bool enableCustomFrame_;
ActionOnFocusLoss actionOnFocusLoss_ = Nothing;