Permalink
Browse files

Use installed private Qt headers if available rather than our own cop…

…ies.

This has the advantage of being more robust against changes to those
headers and it allows us to use feature such as QPaintBuffer that depend
on too many private headers.
  • Loading branch information...
1 parent 4a77aab commit 0c9ccf052d5835d55ced463886d7eca27a804c21 @vkrause vkrause committed Feb 4, 2012
File renamed without changes.
View
@@ -96,6 +96,15 @@ set(
ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT Devel
)
+find_path(QT_PRIVATE_INCLUDE_DIR private/qobject_p.h PATHS ${QT_INCLUDES})
+if(QT_PRIVATE_INCLUDE_DIR)
+ set(HAVE_PRIVATE_QT_HEADERS TRUE)
+else()
+ set(HAVE_PRIVATE_QT_HEADERS FALSE)
+ include_directories(BEFORE ${CMAKE_SOURCE_DIR}/3rdparty/qt)
+endif()
+macro_log_feature(HAVE_PRIVATE_QT_HEADERS "Qt internals" "Private Qt headers, necessary for painter debugging/profiling." "http://developer.qt.nokia.com/" FALSE)
+
if(WIN32 OR APPLE)
set(BUILD_TIMER_PLUGIN TRUE)
else()
View
@@ -5,3 +5,5 @@
#cmakedefine BUILD_TIMER_PLUGIN
+#cmakedefine HAVE_PRIVATE_QT_HEADERS
+
@@ -27,7 +27,7 @@
#include <QLibrary>
#include <QStyleFactory>
-#include <3rdparty/qt/qguiplatformplugin_p.h>
+#include <private/qguiplatformplugin_p.h>
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
typedef void *QFunctionPointer;
View
@@ -31,7 +31,7 @@
#include "toolfactory.h"
#include "kde/krecursivefilterproxymodel.h"
-#include <3rdparty/qt/qguiplatformplugin_p.h>
+#include <private/qguiplatformplugin_p.h>
#include <QCoreApplication>
#include <qdebug.h>
@@ -23,7 +23,7 @@
#include "timermodel.h"
#include <probe.h>
-#include <3rdparty/qt/qobject_p_copy.h>
+#include <private/qobject_p.h>
#include <QMetaMethod>
#include <QCoreApplication>

0 comments on commit 0c9ccf0

Please sign in to comment.