1
/****************************************************************************
3
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
6
** This file is part of the documentation of the Qt Toolkit.
8
** $QT_BEGIN_LICENSE:FDL$
9
** Commercial License Usage
10
** Licensees holding valid commercial Qt licenses may use this file in
11
** accordance with the commercial license agreement provided with the
12
** Software or, alternatively, in accordance with the terms contained in
13
** a written agreement between you and Digia. For licensing terms and
14
** conditions see http://qt.digia.com/licensing. For further information
15
** use the contact form at http://qt.digia.com/contact-us.
17
** GNU Free Documentation License Usage
18
** Alternatively, this file may be used under the terms of the GNU Free
19
** Documentation License version 1.3 as published by the Free Software
20
** Foundation and appearing in the file included in the packaging of
21
** this file. Please review the following information to ensure
22
** the GNU Free Documentation License version 1.3 requirements
23
** will be met: http://www.gnu.org/copyleft/fdl.html.
26
****************************************************************************/
29
\page qtqml-modules-legacymodules.html
31
\brief Description of legacy QML modules
33
Legacy modules are modules whose specification \c qmldir file does not contain
34
a module identifier directive. A legacy module may be either installed into
35
the QML import path (as an installed legacy module) or imported by clients with
36
a relative import (as a located legacy module). Clients are advised to avoid
37
using legacy modules if possible. Module developers should ensure they create
38
identified modules and not legacy modules.
40
\section1 Installed Legacy Modules
42
An installed, non-identified module is automatically given an identifier by the
43
QML engine. This implicitly defined identifier is equal to the install path of
44
the module (relative to the QML import path) where directory-separator
45
characters are replaced with period characters.
47
A non-identified module which is installed into the QML import path has the
50
\li it may be imported by clients via the implicit module identifier
51
\li clients must specify a version when importing the module
52
\li conflicting type names are resolved arbitrarily by the QML engine, and the
53
way in which conflicts are resolved is not guaranteed to stay the same
54
between different versions of QML
55
\li other legacy modules may modify or override type definitions provided by
56
the installed legacy module
59
\section1 Located Legacy Modules
61
A non-identified module which is imported via a relative directory path
62
import statement is loaded by the engine as a located legacy module. The
63
following semantics apply to located legacy modules:
65
\li it may be imported by clients via a relative import path
66
\li it is not mandatory for clients to specify a version when importing the
68
\li if no import version is supplied by the client in the import statement,
69
no guarantees are given by the QML engine about which version of the
70
definition of a given type name will be imported
71
\li conflicting type names are resolved arbitrarily by the QML engine, and the
72
way in which conflicts are resolved is not guaranteed to stay the same
73
between different versions of QML
74
\li other legacy modules may modify or override type definitions provided by
75
the located legacy module
78
A located legacy module may reside on the the local file system or on the
79
network and can be referred to by a URL that specifies the file system path or