diff options
author | Robert Griebl <robert.griebl@qt.io> | 2023-11-20 15:19:51 +0100 |
---|---|---|
committer | Robert Griebl <robert.griebl@qt.io> | 2023-11-20 17:06:47 +0100 |
commit | b49f3cb9f30e9a3390c743d0e1b7884058e4b187 (patch) | |
tree | 08069845751f44cc0006cdf41d1b9449a0bf5306 /src/window-lib | |
parent | 72e146e771782b32f0a5e74d935d66061ef00fd5 (diff) |
Fix all outstanding namespace issues
Also replaced the old QT_PREPEND_NAMESPACE_AM macro with the real
namespace (QtAM::), as this makes the code easier to read for humans
and also for tools like qdbuscpp2xml.
The macro is still available, to support old custom appman code.
Change-Id: Ifb379f03c1aacbd12ef799beb43013bba029e514
Reviewed-by: Bernd Weimer <bernd.weimer@qt.io>
Diffstat (limited to 'src/window-lib')
-rw-r--r-- | src/window-lib/waylandcompositor.h | 2 | ||||
-rw-r--r-- | src/window-lib/window.h | 6 | ||||
-rw-r--r-- | src/window-lib/windowitem.h | 2 | ||||
-rw-r--r-- | src/window-lib/windowmanager.h | 28 |
4 files changed, 17 insertions, 21 deletions
diff --git a/src/window-lib/waylandcompositor.h b/src/window-lib/waylandcompositor.h index 1d0b39c3..68f0db80 100644 --- a/src/window-lib/waylandcompositor.h +++ b/src/window-lib/waylandcompositor.h @@ -101,7 +101,7 @@ public: void xdgPing(WindowSurface*); signals: - void surfaceMapped(QT_PREPEND_NAMESPACE_AM(WindowSurface) *surface); + void surfaceMapped(QtAM::WindowSurface *surface); protected: void doCreateSurface(QWaylandClient *client, uint id, int version); diff --git a/src/window-lib/window.h b/src/window-lib/window.h index 3b3489a0..3d9daa57 100644 --- a/src/window-lib/window.h +++ b/src/window-lib/window.h @@ -26,8 +26,8 @@ class Window : public QObject { Q_OBJECT Q_PROPERTY(QSize size READ size NOTIFY sizeChanged FINAL) - Q_PROPERTY(ContentState contentState READ contentState NOTIFY contentStateChanged FINAL) - Q_PROPERTY(Application* application READ application CONSTANT FINAL) + Q_PROPERTY(QtAM::Window::ContentState contentState READ contentState NOTIFY contentStateChanged FINAL) + Q_PROPERTY(QtAM::Application *application READ application CONSTANT FINAL) Q_PROPERTY(bool popup READ isPopup CONSTANT FINAL) Q_PROPERTY(QPoint requestedPopupPosition READ requestedPopupPosition NOTIFY requestedPopupPositionChanged FINAL) @@ -89,4 +89,4 @@ protected: QT_END_NAMESPACE_AM -Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE_AM(Window*)) +Q_DECLARE_METATYPE(QtAM::Window*) diff --git a/src/window-lib/windowitem.h b/src/window-lib/windowitem.h index 00f0fe4e..e42c1044 100644 --- a/src/window-lib/windowitem.h +++ b/src/window-lib/windowitem.h @@ -29,7 +29,7 @@ class WindowItem : public QQuickFocusScope //TODO for Qt7: rename the "window" property, as QQuickItem has a window() getter and a // windowChanged() signal. - Q_PROPERTY(Window* window READ window WRITE setWindow NOTIFY windowChanged FINAL) + Q_PROPERTY(QtAM::Window *window READ window WRITE setWindow NOTIFY windowChanged FINAL) Q_PROPERTY(bool primary READ primary NOTIFY primaryChanged FINAL) Q_PROPERTY(bool objectFollowsItemSize READ objectFollowsItemSize WRITE setObjectFollowsItemSize diff --git a/src/window-lib/windowmanager.h b/src/window-lib/windowmanager.h index dcdd87d4..6ddb722f 100644 --- a/src/window-lib/windowmanager.h +++ b/src/window-lib/windowmanager.h @@ -9,10 +9,6 @@ #include <QtCore/QAbstractListModel> #include <QtAppManCommon/global.h> -#if defined(Q_MOC_RUN) && !defined(__attribute__) && !defined(__declspec) -# define QT_PREPEND_NAMESPACE_AM(name) QtAM::name -# error "This pre-processor scope is for qdbuscpp2xml only, but it seems something else triggered it" -#endif #if defined(AM_MULTI_PROCESS) QT_FORWARD_DECLARE_CLASS(QWaylandSurface) @@ -81,9 +77,9 @@ public: int count() const; Q_INVOKABLE QVariantMap get(int index) const; - Q_INVOKABLE QT_PREPEND_NAMESPACE_AM(Window) *window(int index) const; - Q_INVOKABLE QList<QT_PREPEND_NAMESPACE_AM(Window) *> windowsOfApplication(const QString &id) const; - Q_INVOKABLE int indexOfWindow(QT_PREPEND_NAMESPACE_AM(Window) *window) const; + Q_INVOKABLE QtAM::Window *window(int index) const; + Q_INVOKABLE QList<QtAM::Window *> windowsOfApplication(const QString &id) const; + Q_INVOKABLE int indexOfWindow(QtAM::Window *window) const; Q_INVOKABLE QObject *addExtension(QQmlComponent *component) const; WindowManagerInternalSignals internalSignals; @@ -97,16 +93,16 @@ signals: void raiseApplicationWindow(const QString &applicationId, const QString &applicationAliasId); - void windowAdded(QT_PREPEND_NAMESPACE_AM(Window) *window); - void windowAboutToBeRemoved(QT_PREPEND_NAMESPACE_AM(Window) *window); - void windowContentStateChanged(QT_PREPEND_NAMESPACE_AM(Window) *window); + void windowAdded(QtAM::Window *window); + void windowAboutToBeRemoved(QtAM::Window *window); + void windowContentStateChanged(QtAM::Window *window); - void windowPropertyChanged(QT_PREPEND_NAMESPACE_AM(Window) *window, const QString &name, const QVariant &value); + void windowPropertyChanged(QtAM::Window *window, const QString &name, const QVariant &value); private slots: - void inProcessSurfaceItemCreated(QT_PREPEND_NAMESPACE_AM(AbstractRuntime) *runtime, - QSharedPointer<QT_PREPEND_NAMESPACE_AM(InProcessSurfaceItem)> surfaceItem); - void setupWindow(QT_PREPEND_NAMESPACE_AM(Window) *window); + void inProcessSurfaceItemCreated(QtAM::AbstractRuntime *runtime, + QSharedPointer<QtAM::InProcessSurfaceItem> surfaceItem); + void setupWindow(QtAM::Window *window); public: Q_SCRIPTABLE bool makeScreenshot(const QString &filename, const QString &selector); @@ -114,12 +110,12 @@ public: QList<QQuickWindow *> compositorViews() const; // evil hook to support in-process runtimes - void setupInProcessRuntime(QT_PREPEND_NAMESPACE_AM(AbstractRuntime) *runtime); + void setupInProcessRuntime(QtAM::AbstractRuntime *runtime); #if defined(AM_MULTI_PROCESS) private slots: void waylandSurfaceCreated(QWaylandSurface *surface); - void waylandSurfaceMapped(QT_PREPEND_NAMESPACE_AM(WindowSurface) *surface); + void waylandSurfaceMapped(QtAM::WindowSurface *surface); private: void handleWaylandSurfaceDestroyedOrUnmapped(QWaylandSurface *surface); |