| 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 {}; |
| 19 | QString m_importId {}; |
| 20 | |
| 21 | ImportRec(QString name, QString version, QString importUri, QStringView importId) |
| 22 | : m_moduleName(std::move(name)), |
| 23 | m_majorMinorVersion(std::move(version)), |
| 24 | m_importUri(std::move(importUri)), |
| 25 | m_importId(importId) |
| 26 | { |
| 27 | } |
| 28 | QString &name() { return m_moduleName; } |
| 29 | QString &version() { return m_majorMinorVersion; } |
| 30 | [[nodiscard]] bool isEmpty() const { return m_moduleName.isEmpty(); } |
| 31 | }; |
| 32 | |
| 33 | QT_END_NAMESPACE |
| 34 | |
| 35 | #endif // IMPORTREC_H |
| 36 |
