diff options
author | Jaakko Korpela <jaakko.korpela@nokia.com> | 2012-02-14 13:53:14 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-15 09:44:05 +0100 |
commit | c1225fe8be1104da53c37da675b86348f763ef12 (patch) | |
tree | f35f8e48ce09df4d702204b1683949d63aed88d0 /src | |
parent | 8bfd5741e26ec91e82184aad3845abff05a4f406 (diff) |
Register both declarative import paths in declarative plugin.
Change-Id: Ida65e63352738926ce4a35e208ab4c394dbfac37
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/feedback/plugin.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/imports/feedback/plugin.cpp b/src/imports/feedback/plugin.cpp index 07de086..abc7e37 100644 --- a/src/imports/feedback/plugin.cpp +++ b/src/imports/feedback/plugin.cpp @@ -56,16 +56,26 @@ class QDeclarativeFeedbackPlugin : public QDeclarativeExtensionPlugin public: virtual void registerTypes(const char *uri) { - Q_ASSERT(QLatin1String(uri) == QLatin1String("QtFeedback") || QLatin1String(uri) == QLatin1String("Qt.feedback")); + const char *currentUri = "QtFeedback"; + // Support for this will be removed. See: https://bugreports.qt-project.org/browse/QTBUG-24285 + const char *oldUri = "Qt.feedback"; + Q_ASSERT(QLatin1String(uri) == currentUri || QLatin1String(uri) == oldUri); + Q_UNUSED(uri); int major = 5; int minor = 0; - qmlRegisterUncreatableType<QDeclarativeFeedbackEffect>(uri, major, minor, "Feedback", "this is the feedback namespace"); - qmlRegisterUncreatableType<QDeclarativeFeedbackEffect>(uri, major, minor, "FeedbackEffect", "this is the base feedback effect class"); - qmlRegisterType<QDeclarativeFeedbackActuator>(uri, major, minor, "Actuator"); - qmlRegisterType<QDeclarativeFileEffect>(uri, major, minor, "FileEffect"); - qmlRegisterType<QDeclarativeHapticsEffect>(uri, major, minor, "HapticsEffect"); - qmlRegisterType<QDeclarativeThemeEffect>(uri, major, minor, "ThemeEffect"); + qmlRegisterUncreatableType<QDeclarativeFeedbackEffect>(currentUri, major, minor, "Feedback", "this is the feedback namespace"); + qmlRegisterUncreatableType<QDeclarativeFeedbackEffect>(currentUri, major, minor, "FeedbackEffect", "this is the base feedback effect class"); + qmlRegisterType<QDeclarativeFeedbackActuator>(currentUri, major, minor, "Actuator"); + qmlRegisterType<QDeclarativeFileEffect>(currentUri, major, minor, "FileEffect"); + qmlRegisterType<QDeclarativeHapticsEffect>(currentUri, major, minor, "HapticsEffect"); + qmlRegisterType<QDeclarativeThemeEffect>(currentUri, major, minor, "ThemeEffect"); + qmlRegisterUncreatableType<QDeclarativeFeedbackEffect>(oldUri, major, minor, "Feedback", "this is the feedback namespace"); + qmlRegisterUncreatableType<QDeclarativeFeedbackEffect>(oldUri, major, minor, "FeedbackEffect", "this is the base feedback effect class"); + qmlRegisterType<QDeclarativeFeedbackActuator>(oldUri, major, minor, "Actuator"); + qmlRegisterType<QDeclarativeFileEffect>(oldUri, major, minor, "FileEffect"); + qmlRegisterType<QDeclarativeHapticsEffect>(oldUri, major, minor, "HapticsEffect"); + qmlRegisterType<QDeclarativeThemeEffect>(oldUri, major, minor, "ThemeEffect"); } }; |