aboutsummaryrefslogtreecommitdiffstats
path: root/share/qtcreator
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-02-21 09:02:15 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2018-02-23 08:40:33 +0000
commit34fec1cad23e2c6fe8ecf907419b231817e27564 (patch)
treea0f70a6d70d4fdc11659d2620212ec25cf27840f /share/qtcreator
parent38d15ebe2f6b398a7c3a3ca7a32335b5f4ed708d (diff)
Clang: Make Q_PROPERTY replacement simpler
The infrastructure around Q_PROPERTY extraction allows to make it static assert and still find it's parent. This way makes it easier for Clang to parse and does not provide unexisting functions for class. Change-Id: I1c40550c72d214c2448169094a46c6f793132f23 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Diffstat (limited to 'share/qtcreator')
-rw-r--r--share/qtcreator/cplusplus/wrappedQtHeaders/QtCore/qobjectdefs.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore/qobjectdefs.h b/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore/qobjectdefs.h
index 001eea3cb43..aad3de8f27d 100644
--- a/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore/qobjectdefs.h
+++ b/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore/qobjectdefs.h
@@ -60,14 +60,8 @@
# define Q_SLOT __attribute__((annotate("qt_slot")))
#endif
-template <char... chars>
-using QPropertyMagicString = std::integer_sequence<char, chars...>;
-
-template <class T, T... chars>
-constexpr QPropertyMagicString<chars...> operator""_qpropstr() { return { }; }
-
-// Create unique AST node for the property.
-#define Q_PROPERTY(arg) void QPropertyMagicFunction(decltype(#arg ## _qpropstr));
+// static_assert can be found as a class child but does not add extra AST nodes for copmpletion
+#define Q_PROPERTY(arg) static_assert("Q_PROPERTY", #arg);
#pragma clang diagnostic pop