Skip to content

Commit 2d108bc

Browse files
committed
Fixing Qt6 build
1 parent 777e95b commit 2d108bc

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

qtservice/src/qtservice.cpp

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,11 @@ 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)
710+
#endif
707711
{
708712
MSG *winMessage = (MSG*)message;
709713
if (winMessage->message == WM_ENDSESSION && (winMessage->lParam & ENDSESSION_LOGOFF)) {

0 commit comments

Comments
 (0)