diff options
author | Robert Griebl <robert.griebl@qt.io> | 2021-04-29 22:14:11 +0200 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2021-06-01 16:42:11 +0200 |
commit | 9f54d06d6487dc765000cfa4f3aca681cca8e233 (patch) | |
tree | 03a318aed3021e71d250f14e984e0055d6e845b9 | |
parent | ed9428330b6f43acd2817bcdb44c6f4ca7506d28 (diff) |
Move QDebug << operators into the QtAM namespace
Change-Id: Ifb953fbf164606db2bf853d12ada2ac7b0fb7f2a
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
-rw-r--r-- | src/common-lib/error.h | 8 | ||||
-rw-r--r-- | src/manager-lib/application.cpp | 7 | ||||
-rw-r--r-- | src/manager-lib/application.h | 8 |
3 files changed, 6 insertions, 17 deletions
diff --git a/src/common-lib/error.h b/src/common-lib/error.h index fe19d2e3..183f8478 100644 --- a/src/common-lib/error.h +++ b/src/common-lib/error.h @@ -74,15 +74,11 @@ enum class Error { Intents = 60 }; -QT_END_NAMESPACE_AM - -QT_BEGIN_NAMESPACE - -inline QDebug &operator<<(QDebug &debug, const QT_PREPEND_NAMESPACE_AM(Error) &error) +inline QDebug &operator<<(QDebug &debug, Error error) { return debug << int(error); } -QT_END_NAMESPACE +QT_END_NAMESPACE_AM Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE_AM(Error)) diff --git a/src/manager-lib/application.cpp b/src/manager-lib/application.cpp index fca17725..12cd444f 100644 --- a/src/manager-lib/application.cpp +++ b/src/manager-lib/application.cpp @@ -490,11 +490,8 @@ void Application::setLastExitCodeAndStatus(int exitCode, Am::ExitStatus exitStat } } -QT_END_NAMESPACE_AM - -QT_BEGIN_NAMESPACE -QDebug operator<<(QDebug debug, const QT_PREPEND_NAMESPACE_AM(Application) *app) +QDebug operator<<(QDebug debug, const Application *app) { debug << "Application Object:"; if (app) @@ -504,6 +501,6 @@ QDebug operator<<(QDebug debug, const QT_PREPEND_NAMESPACE_AM(Application) *app) return debug; } -QT_END_NAMESPACE +QT_END_NAMESPACE_AM #include "moc_application.cpp" diff --git a/src/manager-lib/application.h b/src/manager-lib/application.h index 8cf791ec..127ee484 100644 --- a/src/manager-lib/application.h +++ b/src/manager-lib/application.h @@ -180,12 +180,8 @@ private: }; -QT_END_NAMESPACE_AM - -QT_BEGIN_NAMESPACE +QDebug operator<<(QDebug debug, const Application *app); -QDebug operator<<(QDebug debug, const QT_PREPEND_NAMESPACE_AM(Application) *app); - -QT_END_NAMESPACE +QT_END_NAMESPACE_AM Q_DECLARE_METATYPE(const QT_PREPEND_NAMESPACE_AM(Application *)) |