1 | // Copyright (C) 2021 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef IMPORTREC_H |
5 | #define IMPORTREC_H |
6 | |
7 | #include <QtCore/qglobal.h> |
8 | #include <QtCore/qstring.h> |
9 | |
10 | #include <utility> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | struct ImportRec |
15 | { |
16 | QString m_moduleName {}; |
17 | QString m_majorMinorVersion {}; |
18 | QString m_importUri {}; // subdirectory of module directory |
19 | |
20 | ImportRec(QString name, QString version, QString importUri) |
21 | : m_moduleName(std::move(name)), |
22 | m_majorMinorVersion(std::move(version)), |
23 | m_importUri(std::move(importUri)) |
24 | { |
25 | } |
26 | QString &name() { return m_moduleName; } |
27 | QString &version() { return m_majorMinorVersion; } |
28 | [[nodiscard]] bool isEmpty() const { return m_moduleName.isEmpty(); } |
29 | }; |
30 | |
31 | QT_END_NAMESPACE |
32 | |
33 | #endif // IMPORTREC_H |
34 |