Skip to content

Commit

Permalink
Fixing Qt6 build
Browse files Browse the repository at this point in the history
  • Loading branch information
thierryba committed Jul 10, 2024
1 parent 777e95b commit d425a47
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion qtservice/src/qtservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ QtServiceBase::QtServiceBase(int argc, char **argv, const QString &name)
d_ptr = new QtServiceBasePrivate(nm);
d_ptr->q_ptr = this;

d_ptr->serviceFlags = 0;
d_ptr->serviceFlags = {};
d_ptr->sysd = 0;
for (int i = 0; i < argc; ++i)
d_ptr->args.append(QString::fromLocal8Bit(argv[i]));
Expand Down
4 changes: 4 additions & 0 deletions qtservice/src/qtservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
# define QT_QTSERVICE_EXPORT
#endif

#if QT_VERSION >= 0x060000
#include <QtCore/qcontainerfwd.h>
#else
class QStringList;
#endif
class QtServiceControllerPrivate;

class QT_QTSERVICE_EXPORT QtServiceController
Expand Down
3 changes: 3 additions & 0 deletions qtservice/src/qtservice_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,9 @@ class QtServiceAppEventFilter : public QAbstractNativeEventFilter
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result);
};

#if QT_VERSION >= 0x060000
bool QtServiceAppEventFilter::nativeEventFilter(const QByteArray &, void *message, qintptr *result)
#else
bool QtServiceAppEventFilter::nativeEventFilter(const QByteArray &, void *message, long *result)
{
MSG *winMessage = (MSG*)message;
Expand Down

0 comments on commit d425a47

Please sign in to comment.