diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-22 10:26:06 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-22 16:08:37 +0200 |
commit | 2919d4b31aba3806f31884518396ac07f98ec552 (patch) | |
tree | 8036ac333b7d84d3aad880b9f20bdbbac6422a64 /sources/shiboken2/ApiExtractor/abstractmetalang.cpp | |
parent | 20b96311b5bca6978f72d0bf3a4ea774e98ebb76 (diff) |
shiboken2: Move class PropertySpec into its own source file
Move the class and the parser function into its own source file.
Task-number: PYSIDE-1019
Change-Id: If403f799f6b8da769fd8b47dd958a7430d061ad8
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetalang.cpp')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetalang.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp index e93108be1..ff1bb53f2 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetalang.cpp +++ b/sources/shiboken2/ApiExtractor/abstractmetalang.cpp @@ -28,6 +28,7 @@ #include "abstractmetalang.h" #include "messages.h" +#include "propertyspec.h" #include "reporthandler.h" #include "typedatabase.h" #include "typesystem.h" @@ -2794,34 +2795,3 @@ QString AbstractMetaEnum::package() const return m_typeEntry->targetLangPackage(); } -bool QPropertySpec::isValid() const -{ - return m_type != nullptr && !m_name.isEmpty() && !m_read.isEmpty(); -} - -#ifndef QT_NO_DEBUG_STREAM -void QPropertySpec::formatDebug(QDebug &d) const -{ - d << '#' << m_index << " \"" << m_name << "\" (" << m_type->qualifiedCppName(); - for (int i = 0; i < m_indirections; ++i) - d << '*'; - d << "), read=" << m_read; - if (!m_write.isEmpty()) - d << ", write=" << m_write; - if (!m_reset.isEmpty()) - d << ", reset=" << m_reset; - if (!m_designable.isEmpty()) - d << ", designable=" << m_designable; -} - -QDebug operator<<(QDebug d, const QPropertySpec &p) -{ - QDebugStateSaver s(d); - d.noquote(); - d.nospace(); - d << "QPropertySpec("; - p.formatDebug(d); - d << ')'; - return d; -} -#endif // QT_NO_DEBUG_STREAM |