Add another directory to the private INCLUDE_DIRS list.
authorStephen Kelly <stephen.kelly@kdab.com>
Thu, 19 Jul 2012 08:40:25 +0000 (10:40 +0200)
committerQt by Nokia <qt-info@nokia.com>
Thu, 19 Jul 2012 10:03:27 +0000 (12:03 +0200)
It should be possible to include both:

* <QtGui/private/qfoo.h>
* <private/qfoo.h>

Change-Id: I83ed5bba633b4a6b9bd38e315c987d78beecfb1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
mkspecs/cmake/Qt5BasicConfig.cmake.in
tests/auto/cmake/test_private_includes/main.cpp

index 6f19f5f..47416e9 100644 (file)
@@ -10,10 +10,16 @@ set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME})
 
 !!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
 set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\")
-set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/Qt$${CMAKE_MODULE_NAME}\")
+set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
+    \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\"
+    \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/Qt$${CMAKE_MODULE_NAME}\"
+)
 !!ELSE
 set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}\")
-set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/Qt$${CMAKE_MODULE_NAME}\")
+set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
+    \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}\"
+    \"$${CMAKE_INCLUDE_DIR}Qt$${CMAKE_MODULE_NAME}/${Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING}/Qt$${CMAKE_MODULE_NAME}\"
+)
 !!ENDIF
 
 set(Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE})
index 4f4457b..3319688 100644 (file)
@@ -42,6 +42,7 @@
 #include <QGuiApplication>
 #include <QScreen>
 #include <qpa/qplatformscreen.h>
+#include <QtGui/qpa/qplatformpixmap.h>
 
 int main(int argc, char **argv)
 {
@@ -50,5 +51,9 @@ int main(int argc, char **argv)
     QPlatformScreen *screenHandle = app.screens().first()->handle();
     screenHandle->geometry();
 
+    QPixmap pixmap;
+    QPlatformPixmap *pixmapHandle = pixmap.handle();
+    pixmapHandle->width();
+
     return 0;
 }