Remove QT_NO_GEOM_VARIANT
It was used by the bootstrap library, but it no longer uses QVariant at all since cdbc76360ae4c12b25923a7cb392355a6485fc70. Drive-by: - remove unused qdebug.h include from qsettings.cpp - put the GEOM includes with the other includes and sort them Change-Id: Iabd451c0b462a39a60a0fffdd020e8d45cd8afc4 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
This commit is contained in:
parent
744fda9cb4
commit
343dab0dc3
@ -321,7 +321,6 @@ void QSharedMemory::setNativeKey(const QString &key)
|
||||
// these implementations aren't as efficient as they used to be prior to
|
||||
// replacement, but there's no way to call the ambiguous overload
|
||||
QVariant::QVariant(const QUuid &uuid) : QVariant(QVariant::fromValue(uuid)) {}
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
#include "qline.h"
|
||||
#include "qpoint.h"
|
||||
#include "qrect.h"
|
||||
@ -334,7 +333,6 @@ QVariant::QVariant(const QLine &l) : QVariant(QVariant::fromValue(l)) {}
|
||||
QVariant::QVariant(const QLineF &l) : QVariant(QVariant::fromValue(l)) {}
|
||||
QVariant::QVariant(const QSize &s) : QVariant(QVariant::fromValue(s)) {}
|
||||
QVariant::QVariant(const QSizeF &s) : QVariant(QVariant::fromValue(s)) {}
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(xmlstreamreader)
|
||||
|
||||
|
@ -54,7 +54,6 @@
|
||||
#define QT_FEATURE_datetimeparser -1
|
||||
#define QT_FEATURE_easingcurve -1
|
||||
#define QT_FEATURE_etw -1
|
||||
#define QT_NO_GEOM_VARIANT
|
||||
#define QT_FEATURE_futimens -1
|
||||
#undef QT_FEATURE_future
|
||||
#define QT_FEATURE_future -1
|
||||
|
@ -1,31 +1,25 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include <qdebug.h>
|
||||
#include "qplatformdefs.h"
|
||||
#include "qsettings.h"
|
||||
|
||||
#include "qsettings_p.h"
|
||||
#include "qcache.h"
|
||||
#include "qfile.h"
|
||||
#include "qdir.h"
|
||||
#include "qfileinfo.h"
|
||||
#include "qmutex.h"
|
||||
#include "private/qlocking_p.h"
|
||||
#include "private/qtools_p.h"
|
||||
#include "qlibraryinfo.h"
|
||||
#include "qtemporaryfile.h"
|
||||
#include "qstandardpaths.h"
|
||||
#include <qdatastream.h>
|
||||
#include "private/qstringconverter_p.h"
|
||||
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
#include "qsize.h"
|
||||
#include "qcache.h"
|
||||
#include "qcoreapplication.h"
|
||||
#include "qdatastream.h"
|
||||
#include "qdir.h"
|
||||
#include "qfile.h"
|
||||
#include "qfileinfo.h"
|
||||
#include "qlibraryinfo.h"
|
||||
#include "private/qlocking_p.h"
|
||||
#include "qmutex.h"
|
||||
#include "qpoint.h"
|
||||
#include "qrect.h"
|
||||
#endif // !QT_NO_GEOM_VARIANT
|
||||
|
||||
#include "qcoreapplication.h"
|
||||
#include "qsize.h"
|
||||
#include "qstandardpaths.h"
|
||||
#include "private/qstringconverter_p.h"
|
||||
#include "qtemporaryfile.h"
|
||||
#include "private/qtools_p.h"
|
||||
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
#include "qsavefile.h"
|
||||
@ -401,7 +395,6 @@ QString QSettingsPrivate::variantToString(const QVariant &v)
|
||||
result.prepend(u'@');
|
||||
break;
|
||||
}
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
case QMetaType::QRect: {
|
||||
QRect r = qvariant_cast<QRect>(v);
|
||||
result = QString::asprintf("@Rect(%d %d %d %d)", r.x(), r.y(), r.width(), r.height());
|
||||
@ -417,7 +410,6 @@ QString QSettingsPrivate::variantToString(const QVariant &v)
|
||||
result = QString::asprintf("@Point(%d %d)", p.x(), p.y());
|
||||
break;
|
||||
}
|
||||
#endif // !QT_NO_GEOM_VARIANT
|
||||
|
||||
default: {
|
||||
#ifndef QT_NO_DATASTREAM
|
||||
@ -480,7 +472,6 @@ QVariant QSettingsPrivate::stringToVariant(const QString &s)
|
||||
#else
|
||||
Q_ASSERT(!"QSettings: Cannot load custom types without QDataStream support");
|
||||
#endif
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
} else if (s.startsWith("@Rect("_L1)) {
|
||||
QStringList args = QSettingsPrivate::splitArgs(s, 5);
|
||||
if (args.size() == 4)
|
||||
@ -493,7 +484,6 @@ QVariant QSettingsPrivate::stringToVariant(const QString &s)
|
||||
QStringList args = QSettingsPrivate::splitArgs(s, 6);
|
||||
if (args.size() == 2)
|
||||
return QVariant(QPoint(args[0].toInt(), args[1].toInt()));
|
||||
#endif
|
||||
} else if (s == "@Invalid()"_L1) {
|
||||
return QVariant();
|
||||
}
|
||||
|
@ -27,35 +27,32 @@
|
||||
#ifndef QT_BOOTSTRAPPED
|
||||
# include "qdatastream.h"
|
||||
|
||||
# include "qassociativeiterable.h"
|
||||
# include "qbitarray.h"
|
||||
# include "qbytearraylist.h"
|
||||
# include "qcborarray.h"
|
||||
# include "qcbormap.h"
|
||||
# include "qcborvalue.h"
|
||||
# include "qjsonarray.h"
|
||||
# include "qjsondocument.h"
|
||||
# include "qjsonobject.h"
|
||||
# include "qjsonvalue.h"
|
||||
# include "qline.h"
|
||||
# include "qmetaobject.h"
|
||||
# include "qobject.h"
|
||||
# include "qpoint.h"
|
||||
# include "qrect.h"
|
||||
# include "qsequentialiterable.h"
|
||||
# include "qsize.h"
|
||||
# include "qurl.h"
|
||||
# include "quuid.h"
|
||||
# include "qvariant.h"
|
||||
# include "qjsonvalue.h"
|
||||
# include "qjsonobject.h"
|
||||
# include "qjsonarray.h"
|
||||
# include "qjsondocument.h"
|
||||
# include "qcborvalue.h"
|
||||
# include "qcborarray.h"
|
||||
# include "qcbormap.h"
|
||||
# include "qbytearraylist.h"
|
||||
# include "qmetaobject.h"
|
||||
# include "qsequentialiterable.h"
|
||||
# include "qassociativeiterable.h"
|
||||
# include "qobject.h"
|
||||
#endif
|
||||
|
||||
#if QT_CONFIG(itemmodel)
|
||||
# include "qabstractitemmodel.h"
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
# include "qsize.h"
|
||||
# include "qpoint.h"
|
||||
# include "qrect.h"
|
||||
# include "qline.h"
|
||||
#endif
|
||||
|
||||
#include <new>
|
||||
#include <cstring>
|
||||
|
||||
@ -1258,7 +1255,6 @@ static constexpr struct : QMetaTypeModuleHelper
|
||||
QMETATYPE_CONVERTER(QByteArray, QUuid, result = source.toByteArray(); return true;);
|
||||
QMETATYPE_CONVERTER(QUuid, QByteArray, result = QUuid(source); return true;);
|
||||
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
QMETATYPE_CONVERTER(QSize, QSizeF, result = source.toSize(); return true;);
|
||||
QMETATYPE_CONVERTER_ASSIGN(QSizeF, QSize);
|
||||
QMETATYPE_CONVERTER(QLine, QLineF, result = source.toLine(); return true;);
|
||||
@ -1267,7 +1263,6 @@ static constexpr struct : QMetaTypeModuleHelper
|
||||
QMETATYPE_CONVERTER_ASSIGN(QRectF, QRect);
|
||||
QMETATYPE_CONVERTER(QPoint, QPointF, result = source.toPoint(); return true;);
|
||||
QMETATYPE_CONVERTER_ASSIGN(QPointF, QPoint);
|
||||
#endif
|
||||
|
||||
QMETATYPE_CONVERTER(QStringList, QString, result = QStringList() << source; return true;);
|
||||
|
||||
|
@ -83,8 +83,6 @@ template<> struct TypeDefinition<QJsonObject> { static const bool IsAvailable =
|
||||
template<> struct TypeDefinition<QJsonValue> { static const bool IsAvailable = false; };
|
||||
template<> struct TypeDefinition<QUrl> { static const bool IsAvailable = false; };
|
||||
template<> struct TypeDefinition<QUuid> { static const bool IsAvailable = false; };
|
||||
#endif
|
||||
#ifdef QT_NO_GEOM_VARIANT
|
||||
template<> struct TypeDefinition<QRect> { static const bool IsAvailable = false; };
|
||||
template<> struct TypeDefinition<QRectF> { static const bool IsAvailable = false; };
|
||||
template<> struct TypeDefinition<QSize> { static const bool IsAvailable = false; };
|
||||
|
@ -28,24 +28,21 @@
|
||||
#include "qjsondocument.h"
|
||||
#include "qjsonobject.h"
|
||||
#include "qjsonvalue.h"
|
||||
#include "qline.h"
|
||||
#include "qlist.h"
|
||||
#include "qlocale.h"
|
||||
#include "qmap.h"
|
||||
#include "qpoint.h"
|
||||
#include "qrect.h"
|
||||
#if QT_CONFIG(regularexpression)
|
||||
#include "qregularexpression.h"
|
||||
#endif
|
||||
#include "qsize.h"
|
||||
#include "qstring.h"
|
||||
#include "qstringlist.h"
|
||||
#include "qurl.h"
|
||||
#include "quuid.h"
|
||||
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
#include "qsize.h"
|
||||
#include "qpoint.h"
|
||||
#include "qrect.h"
|
||||
#include "qline.h"
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
@ -952,7 +949,6 @@ QVariant::QVariant(QLatin1StringView val) : QVariant(QString(val)) {}
|
||||
#if QT_CONFIG(easingcurve)
|
||||
QVariant::QVariant(const QEasingCurve &val) : d(std::piecewise_construct_t{}, val) {}
|
||||
#endif
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
QVariant::QVariant(QPoint pt) noexcept
|
||||
: d(std::piecewise_construct_t{}, pt) {}
|
||||
QVariant::QVariant(QPointF pt) noexcept(Private::FitsInInternalSize<sizeof(qreal) * 2>)
|
||||
@ -969,7 +965,6 @@ QVariant::QVariant(QSize s) noexcept
|
||||
: d(std::piecewise_construct_t{}, s) {}
|
||||
QVariant::QVariant(QSizeF s) noexcept(Private::FitsInInternalSize<sizeof(qreal) * 2>)
|
||||
: d(std::piecewise_construct_t{}, s) {}
|
||||
#endif
|
||||
QVariant::QVariant(const QUrl &u) noexcept : d(std::piecewise_construct_t{}, u) {}
|
||||
QVariant::QVariant(const QLocale &l) noexcept : d(std::piecewise_construct_t{}, l) {}
|
||||
#if QT_CONFIG(regularexpression)
|
||||
@ -1565,7 +1560,6 @@ QByteArray QVariant::toByteArray() const
|
||||
return qvariant_cast<QByteArray>(*this);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
/*!
|
||||
\fn QPoint QVariant::toPoint() const
|
||||
|
||||
@ -1673,8 +1667,6 @@ QPointF QVariant::toPointF() const
|
||||
return qvariant_cast<QPointF>(*this);
|
||||
}
|
||||
|
||||
#endif // QT_NO_GEOM_VARIANT
|
||||
|
||||
/*!
|
||||
\fn QUrl QVariant::toUrl() const
|
||||
|
||||
|
@ -283,7 +283,6 @@ public:
|
||||
QVariant(const QJsonValue &jsonValue) noexcept(Private::FitsInInternalSize<sizeof(CborValueStandIn)>);
|
||||
QVariant(const QModelIndex &modelIndex) noexcept(Private::FitsInInternalSize<8 + 2 * sizeof(quintptr)>);
|
||||
QVariant(QUuid uuid) noexcept(Private::FitsInInternalSize<16>);
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
QVariant(QSize size) noexcept;
|
||||
QVariant(QSizeF size) noexcept(Private::FitsInInternalSize<sizeof(qreal) * 2>);
|
||||
QVariant(QPoint pt) noexcept;
|
||||
@ -292,7 +291,6 @@ public:
|
||||
QVariant(QLineF line) noexcept(Private::FitsInInternalSize<sizeof(qreal) * 4>);
|
||||
QVariant(QRect rect) noexcept(Private::FitsInInternalSize<sizeof(int) * 4>);
|
||||
QVariant(QRectF rect) noexcept(Private::FitsInInternalSize<sizeof(qreal) * 4>);
|
||||
#endif
|
||||
|
||||
// not noexcept
|
||||
QVariant(const QEasingCurve &easing) noexcept(false);
|
||||
@ -384,7 +382,6 @@ public:
|
||||
QMap<QString, QVariant> toMap() const;
|
||||
QHash<QString, QVariant> toHash() const;
|
||||
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
QPoint toPoint() const;
|
||||
QPointF toPointF() const;
|
||||
QRect toRect() const;
|
||||
@ -393,7 +390,6 @@ public:
|
||||
QLine toLine() const;
|
||||
QLineF toLineF() const;
|
||||
QRectF toRectF() const;
|
||||
#endif
|
||||
QLocale toLocale() const;
|
||||
#if QT_CONFIG(regularexpression)
|
||||
QRegularExpression toRegularExpression() const;
|
||||
|
@ -27,26 +27,23 @@
|
||||
#include "qicon.h"
|
||||
|
||||
// Core types
|
||||
#include "qvariant.h"
|
||||
#include "qbitarray.h"
|
||||
#include "qbytearray.h"
|
||||
#include "qdatastream.h"
|
||||
#include "qdebug.h"
|
||||
#include "qmap.h"
|
||||
#include "qdatetime.h"
|
||||
#include "qdebug.h"
|
||||
#include "qline.h"
|
||||
#include "qlist.h"
|
||||
#include "qlocale.h"
|
||||
#include "qmap.h"
|
||||
#include "qpoint.h"
|
||||
#include "qrect.h"
|
||||
#include "qsize.h"
|
||||
#include "qstring.h"
|
||||
#include "qstringlist.h"
|
||||
#include "qurl.h"
|
||||
#include "qlocale.h"
|
||||
#include "quuid.h"
|
||||
|
||||
#ifndef QT_NO_GEOM_VARIANT
|
||||
#include "qsize.h"
|
||||
#include "qpoint.h"
|
||||
#include "qrect.h"
|
||||
#include "qline.h"
|
||||
#endif
|
||||
#include "qvariant.h"
|
||||
|
||||
#include <float.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user