summaryrefslogtreecommitdiffstats
path: root/src/compositor/global
diff options
context:
space:
mode:
authorAndy Nichols <andy.nichols@digia.com>2013-02-05 12:22:17 +0100
committerAndy Nichols <andy.nichols@digia.com>2013-02-08 12:34:56 +0100
commit1b39d072c2601d39354fe83dff8b1e5c05095aaf (patch)
tree4b38960a1bcef0de376dc5441ec6372e41341801 /src/compositor/global
parent2e0efd201aa75121f4dd4049598f4d120811d784 (diff)
Qt-ify the QtCompositor module
Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/compositor/global')
-rw-r--r--src/compositor/global/global.pri10
-rw-r--r--src/compositor/global/qwaylandexport.h (renamed from src/compositor/global/waylandexport.h)4
-rw-r--r--src/compositor/global/qwaylandobject.h (renamed from src/compositor/global/waylandobject.h)9
-rw-r--r--src/compositor/global/qwaylandresourcecollection.cpp (renamed from src/compositor/global/waylandresourcecollection.cpp)9
-rw-r--r--src/compositor/global/qwaylandresourcecollection.h (renamed from src/compositor/global/waylandresourcecollection.h)8
5 files changed, 29 insertions, 11 deletions
diff --git a/src/compositor/global/global.pri b/src/compositor/global/global.pri
index 4dcbe340e..f187619e5 100644
--- a/src/compositor/global/global.pri
+++ b/src/compositor/global/global.pri
@@ -1,10 +1,10 @@
-INCLUDEPATH += $$PWD
+INCLUDEPATH += global/
HEADERS += \
- $$PWD/waylandexport.h \
- $$PWD/waylandobject.h \
- $$PWD/waylandresourcecollection.h \
+ global/qwaylandexport.h \
+ global/qwaylandobject.h \
+ global/qwaylandresourcecollection.h
SOURCES += \
- $$PWD/waylandresourcecollection.cpp \
+ global/qwaylandresourcecollection.cpp
diff --git a/src/compositor/global/waylandexport.h b/src/compositor/global/qwaylandexport.h
index 7d1685b31..4998f836f 100644
--- a/src/compositor/global/waylandexport.h
+++ b/src/compositor/global/qwaylandexport.h
@@ -43,6 +43,8 @@
#include <QtCore/qglobal.h>
+QT_BEGIN_NAMESPACE
+
#if !defined(Q_COMPOSITOR_EXPORT)
# if defined(QT_SHARED)
# define Q_COMPOSITOR_EXPORT Q_DECL_EXPORT
@@ -53,4 +55,6 @@
typedef void WaylandClient;
+QT_END_NAMESPACE
+
#endif //WAYLANDEXPORT_H
diff --git a/src/compositor/global/waylandobject.h b/src/compositor/global/qwaylandobject.h
index 3f735fda2..6d93297a1 100644
--- a/src/compositor/global/waylandobject.h
+++ b/src/compositor/global/qwaylandobject.h
@@ -42,10 +42,13 @@
#define WAYLAND_OBJECT_H
#include <wayland-server.h>
-
#include <string.h>
-namespace Wayland {
+#include <QtCompositor/qwaylandexport.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWayland {
template <typename T>
class Object : public T
@@ -91,4 +94,6 @@ T *wayland_cast(typename T::Base *from)
}
+QT_END_NAMESPACE
+
#endif //WAYLAND_OBJECT_H
diff --git a/src/compositor/global/waylandresourcecollection.cpp b/src/compositor/global/qwaylandresourcecollection.cpp
index 0f57750fc..6433474a3 100644
--- a/src/compositor/global/waylandresourcecollection.cpp
+++ b/src/compositor/global/qwaylandresourcecollection.cpp
@@ -38,11 +38,13 @@
**
****************************************************************************/
-#include "waylandresourcecollection.h"
+#include "qwaylandresourcecollection.h"
#include <QtCore/qglobal.h>
-namespace Wayland {
+QT_BEGIN_NAMESPACE
+
+namespace QtWayland {
ResourceCollection::ResourceCollection()
{
@@ -86,5 +88,6 @@ void ResourceCollection::destroy_listener_notify(struct wl_listener *listener, v
delete listener;
}
-
}
+
+QT_END_NAMESPACE
diff --git a/src/compositor/global/waylandresourcecollection.h b/src/compositor/global/qwaylandresourcecollection.h
index 8bcc5bd2b..cfc1c32cb 100644
--- a/src/compositor/global/waylandresourcecollection.h
+++ b/src/compositor/global/qwaylandresourcecollection.h
@@ -43,7 +43,11 @@
#include <wayland-server.h>
-namespace Wayland {
+#include <QtCompositor/qwaylandexport.h>
+
+QT_BEGIN_NAMESPACE
+
+namespace QtWayland {
class ResourceCollection
{
@@ -62,4 +66,6 @@ private:
}
+QT_END_NAMESPACE
+
#endif //WAYLAND_RESOURCE_OBJECT_H