Cleanup the code and update libqt*pas version

This commit is contained in:
Matteo Salvi 2022-12-21 21:37:08 +01:00
parent 5d47e14a50
commit 2461afd1b1
7 changed files with 14 additions and 32 deletions

View File

@ -10,13 +10,13 @@
# Binding Release Version 1.2.11 against Qt5 5.6 LTS release.
# Binding Release Version 1.2.12 against Qt5 5.6 LTS release.
# WebKit widgets are disabled until webenginewidgets are implemented.
VERSION = 1.2.11
VERSION = 1.2.12
VER_MAJ = 1
VER_MIN = 2
VER_PAT = 11
VER_PAT = 12
win32:VERSION_PE_HEADER = 1.2
QT += gui network printsupport

View File

@ -15,24 +15,15 @@
#include <qabstractnativeeventfilter.h>
#include "pascalbind.h"
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
#define _NATIVE_EVENT_RESULT qintptr
#else
#define _NATIVE_EVENT_RESULT long
#endif
class Q_NativeEventFilter_hook : public QAbstractNativeEventFilter {
//Q_OBJECT
public:
bool nativeEventFilter(const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result) override;
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
Q_NativeEventFilter_hook(QCoreApplication *handle) : QAbstractNativeEventFilter() {
this->handle = handle;
this->events.func = NULL;
this->destroyed_event.func = NULL;
//connect(handle, SIGNAL(destroyed()), this, SLOT(destroyed_hook()));
}
virtual ~Q_NativeEventFilter_hook() {
@ -84,7 +75,7 @@ class Q_NativeEventFilter_hook : public QAbstractNativeEventFilter {
};
bool Q_NativeEventFilter_hook::nativeEventFilter(const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result) {
bool Q_NativeEventFilter_hook::nativeEventFilter(const QByteArray &eventType, void *message, long *result) {
if (events.func) {
Q_NativeEventFilter_hook* sender = this;
typedef bool (*func_type)(void *data, Q_NativeEventFilter_hook* sender, const QByteArray &eventType, void *message);

View File

@ -15674,7 +15674,7 @@ procedure QNetworkReply_hook_hook_downloadProgress(handle: QNetworkReply_hookH;
type
QNativeEventFilter_hookH = class(TObject) end;
QNativeEventFilterEvent = function (handle: QNativeEventFilter_hookH; eventType: QByteArrayH; message: Pointer):boolean of object cdecl;
QNativeEventFilterEvent = function (handle: QNativeEventFilter_hookH; eventType: QByteArrayH; message: long):boolean of object cdecl;
function QNativeEventFilter_hook_Create(handle : QCoreApplicationH) : QNativeEventFilter_hookH; cdecl; external Qt5PasLib name 'Q_NativeEventFilter_hook_Create';
procedure QNativeEventFilter_Destroy(handle : QNativeEventFilter_hookH ); cdecl; external Qt5PasLib name 'Q_NativeEventFilter_hook_Destroy';

View File

@ -10,13 +10,13 @@
# Binding Release Version 6.2.4 against Qt6 6.2 LTS release.
# Binding Release Version 6.2.5 against Qt6 6.2 LTS release.
win32:VERSION = 6.2.4.0
else:VERSION = 6.2.4
win32:VERSION = 6.2.5.0
else:VERSION = 6.2.5
VER_MAJ = 6
VER_MIN = 2
VER_PAT = 4
VER_PAT = 5
win32:VERSION_PE_HEADER = 6.2
QT += gui printsupport

View File

@ -300,6 +300,6 @@ inline void copyQRealArrayToQVectorQReal(PQRealArray parr,QVector<qreal> &qvecto
C_EXPORT void initializeQRealArray(GetQRealArrayAddr gaa, GetQRealArrayLength gal, SetQRealArrayLength sal);
typedef bool (*NativeEventFilter)(const QByteArray &eventType, void *message, long *result);
typedef bool (*NativeEventFilter)(const QByteArray &eventType, void *message, qintptr *result);
#endif

View File

@ -15,24 +15,15 @@
#include <qabstractnativeeventfilter.h>
#include "pascalbind.h"
#if QT_VERSION >= QT_VERSION_CHECK(6, 2, 0)
#define _NATIVE_EVENT_RESULT qintptr
#else
#define _NATIVE_EVENT_RESULT long
#endif
class Q_NativeEventFilter_hook : public QAbstractNativeEventFilter {
//Q_OBJECT
public:
bool nativeEventFilter(const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result) override;
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
Q_NativeEventFilter_hook(QCoreApplication *handle) : QAbstractNativeEventFilter() {
this->handle = handle;
this->events.func = NULL;
this->destroyed_event.func = NULL;
//connect(handle, SIGNAL(destroyed()), this, SLOT(destroyed_hook()));
}
virtual ~Q_NativeEventFilter_hook() {
@ -84,7 +75,7 @@ class Q_NativeEventFilter_hook : public QAbstractNativeEventFilter {
};
bool Q_NativeEventFilter_hook::nativeEventFilter(const QByteArray &eventType, void *message, _NATIVE_EVENT_RESULT *result) {
bool Q_NativeEventFilter_hook::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) {
if (events.func) {
Q_NativeEventFilter_hook* sender = this;
typedef bool (*func_type)(void *data, Q_NativeEventFilter_hook* sender, const QByteArray &eventType, void *message);

View File

@ -15394,7 +15394,7 @@ procedure QGraphicsScene_hook_hook_focusItemChanged(handle: QGraphicsScene_hookH
type
QNativeEventFilter_hookH = class(TObject) end;
QNativeEventFilterEvent = function (handle: QNativeEventFilter_hookH; eventType: QByteArrayH; message: Pointer):boolean of object cdecl;
QNativeEventFilterEvent = function (handle: QNativeEventFilter_hookH; eventType: QByteArrayH; message: PtrInt):boolean of object cdecl;
function QNativeEventFilter_hook_Create(handle : QCoreApplicationH) : QNativeEventFilter_hookH; cdecl; external Qt6PasLib name 'Q_NativeEventFilter_hook_Create';
procedure QNativeEventFilter_Destroy(handle : QNativeEventFilter_hookH ); cdecl; external Qt6PasLib name 'Q_NativeEventFilter_hook_Destroy';