Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
duplicate-enum-entries.qdoc
Go to the documentation of this file.
1
// Copyright (C) 2025 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
3
4
/*!
5
\ingroup qmllint-warnings-and-errors
6
7
\title Duplicate enum entries
8
\brief [duplicate-enum-entries] Enum key X has already been declared.
9
10
\qmllintwarningcategory duplicate-enum-entries
11
12
\section1 Enum key X has already been declared
13
14
\section2 What happened?
15
An enum contains two identical entries.
16
17
\section2 Why is that bad?
18
The same key is associated with multiple values. It isn't clear which one will
19
be used.
20
21
\section2 Example
22
\qml
23
import QtQuick
24
25
Item {
26
enum E { A = 0, B = 1, C = 2, A = 3 }
27
}
28
\endqml
29
To fix this warning, remove or rename duplicate enum entries:
30
\qml
31
import QtQuick
32
33
Item {
34
enum E { A = 0, B = 1, C = 2, D = 3 }
35
}
36
\endqml
37
*/
qtdeclarative
src
qml
doc
src
qmllint
duplicate-enum-entries.qdoc
Generated on
for Qt by
1.16.1