Skip to content

Commit d425a47

Browse files
committed
Fixing Qt6 build
1 parent 777e95b commit d425a47

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

qtservice/src/qtservice.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ QtServiceBase::QtServiceBase(int argc, char **argv, const QString &name)
626626
d_ptr = new QtServiceBasePrivate(nm);
627627
d_ptr->q_ptr = this;
628628

629-
d_ptr->serviceFlags = 0;
629+
d_ptr->serviceFlags = {};
630630
d_ptr->sysd = 0;
631631
for (int i = 0; i < argc; ++i)
632632
d_ptr->args.append(QString::fromLocal8Bit(argv[i]));

qtservice/src/qtservice.h

+4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
# define QT_QTSERVICE_EXPORT
2323
#endif
2424

25+
#if QT_VERSION >= 0x060000
26+
#include <QtCore/qcontainerfwd.h>
27+
#else
2528
class QStringList;
29+
#endif
2630
class QtServiceControllerPrivate;
2731

2832
class QT_QTSERVICE_EXPORT QtServiceController

qtservice/src/qtservice_win.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,9 @@ class QtServiceAppEventFilter : public QAbstractNativeEventFilter
703703
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result);
704704
};
705705

706+
#if QT_VERSION >= 0x060000
707+
bool QtServiceAppEventFilter::nativeEventFilter(const QByteArray &, void *message, qintptr *result)
708+
#else
706709
bool QtServiceAppEventFilter::nativeEventFilter(const QByteArray &, void *message, long *result)
707710
{
708711
MSG *winMessage = (MSG*)message;

0 commit comments

Comments
 (0)