// clang-format off // SPDX-FileCopyrightText: 2022 Klarälvdalens Datakonsult AB, a KDAB Group company // clang-format on // SPDX-FileContributor: Andrew Hayzen // // SPDX-License-Identifier: MIT OR Apache-2.0 #pragma once #include #include #include #include #include #include #include #include #include #include "rust/cxx.h" // Define namespace otherwise we hit a GCC bug // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480 namespace rust { // This has static asserts in the cpp file to ensure this is valid. template struct IsRelocatable> : ::std::true_type { }; } // namespace rust namespace rust { namespace cxxqtlib1 { namespace qset { template ::rust::isize qsetLen(const QSet& s) noexcept; template const T& qsetGetUnchecked(const QSet& s, ::rust::isize pos) noexcept { Q_ASSERT(pos < qsetLen(s)); Q_ASSERT(pos >= 0); auto it = s.cbegin(); ::std::advance(it, pos); return *it; } template void qsetInsert(QSet& s, const T& value) noexcept { s.insert(value); } template ::rust::isize qsetLen(const QSet& s) noexcept { // In Qt 5 the type was int now it is qsizetype, so we need to ensure the type // is the same for CXX return static_cast<::rust::isize>(s.size()); } } } } using QSet_bool = QSet; using QSet_f32 = QSet; using QSet_f64 = QSet; using QSet_i8 = QSet<::std::int8_t>; using QSet_i16 = QSet<::std::int16_t>; using QSet_i32 = QSet<::std::int32_t>; using QSet_i64 = QSet<::std::int64_t>; using QSet_QByteArray = QSet<::QByteArray>; using QSet_QDate = QSet<::QDate>; using QSet_QDateTime = QSet<::QDateTime>; using QSet_QPersistentModelIndex = QSet<::QPersistentModelIndex>; using QSet_QString = QSet<::QString>; using QSet_QTime = QSet<::QTime>; using QSet_QUrl = QSet<::QUrl>; using QSet_u8 = QSet<::std::uint8_t>; using QSet_u16 = QSet<::std::uint16_t>; using QSet_u32 = QSet<::std::uint32_t>; using QSet_u64 = QSet<::std::uint64_t>;