From 9ce65963945580cf686631e87013d29c80f97978 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 12 Sep 2024 16:00:52 +0200 Subject: [PATCH] QtCore: fix private header compilation under QT_NO_KEYWORDS This is in preparation of applying headercheck to private headers, too. Task-number: QTBUG-126219 Change-Id: Iff5fd8e848d67b7edd9541b0e78740bc4b4ff7c4 Reviewed-by: Thiago Macieira Reviewed-by: Alexey Edelev (cherry picked from commit 55b5e78ac31171be61ceeb932d494d5060d1fa02) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/io/qfilesystemwatcher_fsevents_p.h | 2 +- src/corelib/io/qfilesystemwatcher_win_p.h | 2 +- src/corelib/itemmodels/qitemselectionmodel_p.h | 2 +- src/corelib/serialization/qxmlstream.g | 2 +- src/corelib/serialization/qxmlstreamparser_p.h | 2 +- src/corelib/text/qstringalgorithms_p.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/corelib/io/qfilesystemwatcher_fsevents_p.h b/src/corelib/io/qfilesystemwatcher_fsevents_p.h index 173ad1d52de..d6ce176a30f 100644 --- a/src/corelib/io/qfilesystemwatcher_fsevents_p.h +++ b/src/corelib/io/qfilesystemwatcher_fsevents_p.h @@ -47,7 +47,7 @@ Q_SIGNALS: void emitDirectoryChanged(const QString &path, bool removed); void scheduleStreamRestart(); -private slots: +private Q_SLOTS: void doEmitFileChanged(const QString &path, bool removed); void doEmitDirectoryChanged(const QString &path, bool removed); bool restartStream(); diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h index 79cec00c391..f6c6fd6c923 100644 --- a/src/corelib/io/qfilesystemwatcher_win_p.h +++ b/src/corelib/io/qfilesystemwatcher_win_p.h @@ -83,7 +83,7 @@ public: } }; -signals: +Q_SIGNALS: void driveLockForRemoval(const QString &); void driveLockForRemovalFailed(const QString &); void driveRemoved(const QString &); diff --git a/src/corelib/itemmodels/qitemselectionmodel_p.h b/src/corelib/itemmodels/qitemselectionmodel_p.h index 689cd26bd28..3d9cd801f7f 100644 --- a/src/corelib/itemmodels/qitemselectionmodel_p.h +++ b/src/corelib/itemmodels/qitemselectionmodel_p.h @@ -71,7 +71,7 @@ public: void setModel(QAbstractItemModel *mod) { q_func()->setModel(mod); } void disconnectModel(); - void modelChanged(QAbstractItemModel *mod) { emit q_func()->modelChanged(mod); } + void modelChanged(QAbstractItemModel *mod) { Q_EMIT q_func()->modelChanged(mod); } Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QItemSelectionModelPrivate, QAbstractItemModel *, model, &QItemSelectionModelPrivate::setModel, &QItemSelectionModelPrivate::modelChanged, nullptr) diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g index 860b7fd7272..994136c4b17 100644 --- a/src/corelib/serialization/qxmlstream.g +++ b/src/corelib/serialization/qxmlstream.g @@ -241,7 +241,7 @@ bool QXmlStreamReaderPrivate::parse() act = state_stack[tos]; - forever { + while (true) { if (token == -1 && - TERMINAL_COUNT != action_index[act]) { uint cu = getChar(); token = NOTOKEN; diff --git a/src/corelib/serialization/qxmlstreamparser_p.h b/src/corelib/serialization/qxmlstreamparser_p.h index 1363bf4d41f..44fa3a69b2d 100644 --- a/src/corelib/serialization/qxmlstreamparser_p.h +++ b/src/corelib/serialization/qxmlstreamparser_p.h @@ -130,7 +130,7 @@ bool QXmlStreamReaderPrivate::parse() act = state_stack[tos]; - forever { + while (true) { if (token == -1 && - TERMINAL_COUNT != action_index[act]) { uint cu = getChar(); token = NOTOKEN; diff --git a/src/corelib/text/qstringalgorithms_p.h b/src/corelib/text/qstringalgorithms_p.h index f34acb01e84..56165b4f14b 100644 --- a/src/corelib/text/qstringalgorithms_p.h +++ b/src/corelib/text/qstringalgorithms_p.h @@ -95,7 +95,7 @@ template struct QStringAlgorithms Char *dst = const_cast(result.cbegin()); Char *ptr = dst; bool unmodified = true; - forever { + while (true) { while (src != end && isSpace(*src)) ++src; while (src != end && !isSpace(*src))