aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/qquickevents_p_p.h2
-rw-r--r--src/quick/scenegraph/coreapi/qsgnode.cpp7
-rw-r--r--src/quick/util/qquickutilmodule.cpp9
-rw-r--r--src/quick/util/util.pri9
4 files changed, 17 insertions, 10 deletions
diff --git a/src/quick/items/qquickevents_p_p.h b/src/quick/items/qquickevents_p_p.h
index 7b281623fe..cf6f83e5b1 100644
--- a/src/quick/items/qquickevents_p_p.h
+++ b/src/quick/items/qquickevents_p_p.h
@@ -108,7 +108,9 @@ public:
bool isAccepted() { return event.isAccepted(); }
void setAccepted(bool accepted) { event.setAccepted(accepted); }
+#if QT_CONFIG(shortcut)
Q_REVISION(2) Q_INVOKABLE bool matches(QKeySequence::StandardKey key) const { return event.matches(key); }
+#endif
private:
QKeyEvent event;
diff --git a/src/quick/scenegraph/coreapi/qsgnode.cpp b/src/quick/scenegraph/coreapi/qsgnode.cpp
index a1e1ef8c27..7ef75d4b4c 100644
--- a/src/quick/scenegraph/coreapi/qsgnode.cpp
+++ b/src/quick/scenegraph/coreapi/qsgnode.cpp
@@ -337,13 +337,6 @@ QSGNode::~QSGNode()
to the scene graph and will cause the preprocess() function to be called
for every frame the node is rendered.
- The preprocess function is called before the update pass that propagates
- opacity and transformations through the scene graph. That means that
- functions like QSGOpacityNode::combinedOpacity() and
- QSGTransformNode::combinedMatrix() will not contain up-to-date values.
- If such values are changed during the preprocess, these changes will be
- propagated through the scene graph before it is rendered.
-
\warning Beware of deleting nodes while they are being preprocessed. It is
possible, with a small performance hit, to delete a single node during its
own preprocess call. Deleting a subtree which has nodes that also use
diff --git a/src/quick/util/qquickutilmodule.cpp b/src/quick/util/qquickutilmodule.cpp
index 77dae0d001..b2e5b84cf4 100644
--- a/src/quick/util/qquickutilmodule.cpp
+++ b/src/quick/util/qquickutilmodule.cpp
@@ -54,7 +54,9 @@
#include "qquicktextmetrics_p.h"
#include "qquicktransition_p.h"
#include "qquickanimator_p.h"
+#if QT_CONFIG(shortcut)
#include "qquickshortcut_p.h"
+#endif
#include "qquickvalidator_p.h"
#include <qqmlinfo.h>
#include <private/qqmltypenotavailable_p.h>
@@ -63,7 +65,9 @@
#include <QtGui/QInputMethod>
#include <QtGui/QKeySequence>
+#if QT_CONFIG(shortcut)
Q_DECLARE_METATYPE(QKeySequence::StandardKey)
+#endif
void QQuickUtilModule::defineModule()
{
@@ -114,15 +118,18 @@ void QQuickUtilModule::defineModule()
qmlRegisterCustomType<QQuickPropertyChanges>("QtQuick",2,0,"PropertyChanges", new QQuickPropertyChangesParser);
+#if QT_CONFIG(shortcut)
qRegisterMetaType<QKeySequence::StandardKey>();
qmlRegisterUncreatableType<QKeySequence, 2>("QtQuick", 2, 2, "StandardKey", QStringLiteral("Cannot create an instance of StandardKey."));
+#endif
qmlRegisterType<QQuickFontMetrics>("QtQuick", 2, 4, "FontMetrics");
qmlRegisterType<QQuickTextMetrics>("QtQuick", 2, 4, "TextMetrics");
+#if QT_CONFIG(shortcut)
qmlRegisterType<QQuickShortcut>("QtQuick", 2, 5, "Shortcut");
-
qmlRegisterType<QQuickShortcut,1>("QtQuick", 2, 6, "Shortcut");
qmlRegisterType<QQuickShortcut,9>("QtQuick", 2, 9, "Shortcut");
+#endif
}
diff --git a/src/quick/util/util.pri b/src/quick/util/util.pri
index 1ef1018a31..b53b132cce 100644
--- a/src/quick/util/util.pri
+++ b/src/quick/util/util.pri
@@ -26,7 +26,6 @@ SOURCES += \
$$PWD/qquickanimatorcontroller.cpp \
$$PWD/qquickfontmetrics.cpp \
$$PWD/qquicktextmetrics.cpp \
- $$PWD/qquickshortcut.cpp \
$$PWD/qquickvalidator.cpp
!contains(QT_CONFIG, no-qml-debug): SOURCES += $$PWD/qquickprofiler.cpp
@@ -63,9 +62,15 @@ HEADERS += \
$$PWD/qquickprofiler_p.h \
$$PWD/qquickfontmetrics_p.h \
$$PWD/qquicktextmetrics_p.h \
- $$PWD/qquickshortcut_p.h \
$$PWD/qquickvalidator_p.h
+qtConfig(shortcut) {
+ SOURCES += \
+ $$PWD/qquickshortcut.cpp
+ HEADERS += \
+ $$PWD/qquickshortcut_p.h
+}
+
qtConfig(quick-path) {
SOURCES += \
$$PWD/qquickpath.cpp \