1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
5\page qtqml-modules-legacymodules.html
7\brief Description of legacy QML modules
9Legacy modules are modules whose specification \c qmldir file does not contain
10a module identifier directive. A legacy module may be either installed into
11the QML import path (as an installed legacy module) or imported by clients with
12a relative import (as a located legacy module). Clients are advised to avoid
13using legacy modules if possible. Module developers should ensure they create
14identified modules and not legacy modules.
16\section1 Installed Legacy Modules
18An installed, non-identified module is automatically given an identifier by the
19QML engine. This implicitly defined identifier is equal to the install path of
20the module (relative to the QML import path) where directory-separator
21characters are replaced with period characters.
23A non-identified module which is installed into the QML import path has the
26\li it may be imported by clients via the implicit module identifier
27\li clients must specify a version when importing the module
28\li conflicting type names are resolved arbitrarily by the QML engine, and the
29 way in which conflicts are resolved is not guaranteed to stay the same
30 between different versions of QML
31\li other legacy modules may modify or override type definitions provided by
32 the installed legacy module
35\section1 Located Legacy Modules
37A non-identified module which is imported via a relative directory path
38import statement is loaded by the engine as a located legacy module. The
39following semantics apply to located legacy modules:
41\li it may be imported by clients via a relative import path
42\li it is not mandatory for clients to specify a version when importing the
44\li if no import version is supplied by the client in the import statement,
45 no guarantees are given by the QML engine about which version of the
46 definition of a given type name will be imported
47\li conflicting type names are resolved arbitrarily by the QML engine, and the
48 way in which conflicts are resolved is not guaranteed to stay the same
49 between different versions of QML
50\li other legacy modules may modify or override type definitions provided by
51 the located legacy module
54A located legacy module may reside on the local file system or on the
55network and can be referred to by a URL that specifies the file system path or