aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/qmllanguageref/modules/legacymodules.qdoc
blob: 64cd2e41cb9b2895ec4e478ab50d15895313282d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\page qtqml-modules-legacymodules.html
\title Legacy Modules
\brief Description of legacy QML modules

Legacy modules are modules whose specification \c qmldir file does not contain
a module identifier directive.  A legacy module may be either installed into
the QML import path (as an installed legacy module) or imported by clients with
a relative import (as a located legacy module).  Clients are advised to avoid
using legacy modules if possible.  Module developers should ensure they create
identified modules and not legacy modules.

\section1 Installed Legacy Modules

An installed, non-identified module is automatically given an identifier by the
QML engine.  This implicitly defined identifier is equal to the install path of
the module (relative to the QML import path) where directory-separator
characters are replaced with period characters.

A non-identified module which is installed into the QML import path has the
following semantics:
\list
\li it may be imported by clients via the implicit module identifier
\li clients must specify a version when importing the module
\li conflicting type names are resolved arbitrarily by the QML engine, and the
    way in which conflicts are resolved is not guaranteed to stay the same
    between different versions of QML
\li other legacy modules may modify or override type definitions provided by
    the installed legacy module
\endlist

\section1 Located Legacy Modules

A non-identified module which is imported via a relative directory path
import statement is loaded by the engine as a located legacy module.  The
following semantics apply to located legacy modules:
\list
\li it may be imported by clients via a relative import path
\li it is not mandatory for clients to specify a version when importing the
    module
\li if no import version is supplied by the client in the import statement,
    no guarantees are given by the QML engine about which version of the
    definition of a given type name will be imported
\li conflicting type names are resolved arbitrarily by the QML engine, and the
    way in which conflicts are resolved is not guaranteed to stay the same
    between different versions of QML
\li other legacy modules may modify or override type definitions provided by
    the located legacy module
\endlist

A located legacy module may reside on the local file system or on the
network and can be referred to by a URL that specifies the file system path or
network URL.

*/