diff options
Diffstat (limited to 'src/qml/qml/qqmlapplicationengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlapplicationengine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp index 85aeaf5786..3f13f8a140 100644 --- a/src/qml/qml/qqmlapplicationengine.cpp +++ b/src/qml/qml/qqmlapplicationengine.cpp @@ -44,6 +44,7 @@ #include <QQmlComponent> #include "qqmlapplicationengine.h" #include "qqmlapplicationengine_p.h" +#include "qqmlfileselector.h" QT_BEGIN_NAMESPACE @@ -76,6 +77,7 @@ void QQmlApplicationEnginePrivate::init() QCoreApplication::installTranslator(qtTranslator); translators << qtTranslator; #endif + q->setUrlInterceptor(new QQmlFileSelector(q)); QCoreApplication::instance()->setProperty("__qml_using_qqmlapplicationengine", QVariant(true)); } @@ -172,13 +174,12 @@ void QQmlApplicationEnginePrivate::_q_finishLoad(QObject *o) \li Connecting Qt.quit() to QCoreApplication::quit() \li Automatically loads translation files from an i18n directory adjacent to the main QML file. \li Automatically sets an incubuation controller if the scene contains a QQuickWindow. + \li Automatically sets a \c QQmlFileSelector as the url interceptor, applying file selectors to all + QML files and assets. \endlist The engine behavior can be further tweaked by using the inherited methods from QQmlEngine. - \note In the future QQmlApplicationEngine may automatically apply file selectors. - To ensure forwards compatibility, do not use folder names containing a '+' character in your QML file - structure. */ /*! |