aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/include.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <friedemann.kleint@qt.io>2023-05-10 13:50:56 +0200
committerCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2025-11-24 12:06:06 +0100
commit845630ad239c4b37ff37e49ef5bb969a8946744b (patch)
tree5c65f2e270511459d346c14f0ad8d01f5e6e39a0 /sources/shiboken6/ApiExtractor/include.cpp
parent3cf2077a1b060bbea3419ccde23c5da6485a2e24 (diff)
Move the shiboken-generator source around
THIS COMMIT WAS GENERATED BY A SCRIPT Task-number: PYSIDE-962 Task-number: PYSIDE-1587 Change-Id: I58b05c3d05606efb6303193f2d7f907a0ab5741b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/include.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/include.cpp79
1 files changed, 0 insertions, 79 deletions
diff --git a/sources/shiboken6/ApiExtractor/include.cpp b/sources/shiboken6/ApiExtractor/include.cpp
deleted file mode 100644
index fec1136b8..000000000
--- a/sources/shiboken6/ApiExtractor/include.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-#include "include.h"
-#include "textstream.h"
-
-#include <QtCore/qdebug.h>
-#include <QtCore/qdir.h>
-#include <QtCore/qhash.h>
-#include <QtCore/qtextstream.h>
-
-#include "qtcompat.h"
-
-#include <algorithm>
-
-using namespace Qt::StringLiterals;
-
-QString Include::toString() const
-{
- if (m_type == IncludePath)
- return u"#include <"_s + m_name + u'>';
- if (m_type == LocalPath)
- return u"#include \""_s + m_name + u'"';
- return u"import "_s + m_name + u';';
-}
-
-Qt::strong_ordering compareThreeWay(const Include &lhs, const Include &rhs) noexcept
-{
- if (lhs.m_type < rhs.m_type)
- return Qt::strong_ordering::less;
- if (lhs.m_type > rhs.m_type)
- return Qt::strong_ordering::greater;
- if (auto c = lhs.m_name.compare(rhs.m_name))
- return c < 0 ? Qt::strong_ordering::less : Qt::strong_ordering::greater;
- return Qt::strong_ordering::equal;
-}
-
-QTextStream& operator<<(QTextStream& out, const Include& g)
-{
- if (g.isValid())
- out << g.toString() << Qt::endl;
- return out;
-}
-
-TextStream& operator<<(TextStream& out, const Include& include)
-{
- if (include.isValid())
- out << include.toString() << '\n';
- return out;
-}
-
-TextStream& operator<<(TextStream &out, const IncludeGroup& g)
-{
- if (!g.includes.isEmpty()) {
- if (!g.title.isEmpty())
- out << "\n// " << g.title << "\n";
- auto includes = g.includes;
- std::sort(includes.begin(), includes.end());
- for (const Include &inc : std::as_const(includes))
- out << inc.toString() << '\n';
- }
- return out;
-}
-
-#ifndef QT_NO_DEBUG_STREAM
-QDebug operator<<(QDebug d, const Include &i)
-{
- QDebugStateSaver saver(d);
- d.noquote();
- d.nospace();
- d << "Include(";
- if (i.isValid())
- d << "type=" << i.type() << ", file=\"" << QDir::toNativeSeparators(i.name()) << '"';
- else
- d << "invalid";
- d << ')';
- return d;
-}
-#endif // !QT_NO_DEBUG_STREAM