Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
removed_api.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#define QT_CORE_BUILD_REMOVED_API
5
6#include "qglobal.h"
7
9
10#if QT_CORE_REMOVED_SINCE(6, 1)
11
12#include "qmetatype.h"
13
14// keep in sync with version in header
15int QMetaType::id() const
16{
17 if (d_ptr) {
18 if (int id = d_ptr->typeId.loadRelaxed())
19 return id;
20 return idHelper();
21 }
22 return 0;
23}
24
25#endif // QT_CORE_REMOVED_SINCE(6, 1)
26
27#if QT_CORE_REMOVED_SINCE(6, 2)
28
29#include "qbindingstorage.h"
30
31void QBindingStorage::maybeUpdateBindingAndRegister_helper(const QUntypedPropertyData *data) const
32{
33 registerDependency_helper(data);
34}
35
36#endif // QT_CORE_REMOVED_SINCE(6, 2)
37
38#if QT_CORE_REMOVED_SINCE(6, 3)
39
40#include "qbytearraymatcher.h"
41
42# if QT_POINTER_SIZE != 4
43
44int QStaticByteArrayMatcherBase::indexOfIn(const char *h, uint hl, const char *n, int nl, int from) const noexcept
45{
46 qsizetype r = indexOfIn(h, size_t(hl), n, qsizetype(nl), qsizetype(from));
47 Q_ASSERT(r == int(r));
48 return r;
49}
50
51# endif // QT_POINTER_SIZE != 4
52
54{
55 return indexIn(QByteArrayView{ba}, from); // ba.isNull() may be significant, so don't ignore it!
56}
57
59
61{
63}
64
66{
68}
69
70#include "qdatastream.h"
71
72# ifndef QT_NO_DATASTREAM
73# include "qfloat16.h"
74
76{
77 return *this >> reinterpret_cast<qint16&>(f);
78}
79
81{
82 return *this << reinterpret_cast<qint16&>(f);
83}
84
85# endif
86
87#include "quuid.h"
88
91{
92}
93
94QUuid::QUuid(const char *text)
96{
97}
98
101{
102}
103
104QUuid QUuid::fromString(QStringView string) noexcept
105{
106 return fromString(QAnyStringView{string});
107}
108
110{
111 return fromString(QAnyStringView{string});
112}
113
115{
117}
118
119#include "qbytearraylist.h"
120
121# if QT_POINTER_SIZE != 4
122QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char *sep, int seplen)
123{
124 return QByteArrayList_join(that, sep, qsizetype(seplen));
125}
126# endif
127
128#include "qlocale.h"
129
131{
133}
134
136{
137 return codeToLanguage(languageCode, QLocale::AnyLanguageCode);
138}
139
141
143{
145}
146
148{
150}
151
154{
156}
157
158#include "qurl.h"
159
160QString QUrl::fromAce(const QByteArray &domain)
161{
162 return fromAce(domain, {});
163}
164
165QByteArray QUrl::toAce(const QString &domain)
166{
167 return toAce(domain, {});
168}
169
170#endif // QT_CORE_REMOVED_SINCE(6, 3)
171
172#if QT_CORE_REMOVED_SINCE(6, 4)
173
174#include "qbytearray.h" // uses QT_CORE_INLINE_SINCE
175
176#include "qcalendar.h"
177
180
183
184#include "qcollator.h" // inline function compare(ptr, n, ptr, n) (for MSVC)
185
186#include "qhashfunctions.h"
187
188size_t qHash(const QByteArray &key, size_t seed) noexcept
189{
190 return qHashBits(key.constData(), size_t(key.size()), seed);
191}
192
193size_t qHash(const QByteArrayView &key, size_t seed) noexcept
194{
195 return qHashBits(key.constData(), size_t(key.size()), seed);
196}
197
198#include "qobject.h"
199
201{
202 setObjectName<void>(name);
203}
204
205#include "qlocale.h" // uses QT_CORE_INLINE_SINCE
206
207#if QT_CONFIG(settings)
208
209#include "qsettings.h"
210
211void QSettings::beginGroup(const QString &prefix)
212{
214}
215
216int QSettings::beginReadArray(const QString &prefix)
217{
219}
220
221void QSettings::beginWriteArray(const QString &prefix, int size)
222{
224}
225
226void QSettings::setValue(const QString &key, const QVariant &value)
227{
229}
230
231void QSettings::remove(const QString &key)
232{
234}
235
236bool QSettings::contains(const QString &key) const
237{
239}
240
241QVariant QSettings::value(const QString &key, const QVariant &defaultValue) const
242{
243 return value(qToAnyStringViewIgnoringNull(key), defaultValue);
244}
245
247{
249}
250
251#endif // QT_CONFIG(settings)
252
253#include "qversionnumber.h"
254
257
258QVersionNumber QVersionNumber::fromString(const QString &string, int *suffixIndex)
259{
260 return fromString(qToAnyStringViewIgnoringNull(string), suffixIndex);
261}
262
264{
265 return fromString(QAnyStringView{string}, suffixIndex);
266}
267
269{
270 return fromString(QAnyStringView{string}, suffixIndex);
271}
272
274
275// #include <qotherheader.h>
276// // implement removed functions from qotherheader.h
277// order sections alphabetically to reduce chances of merge conflicts
278
279#endif // QT_CORE_REMOVED_SINCE(6, 4)
280
281#if QT_CORE_REMOVED_SINCE(6, 5)
282
283#include "qbasictimer.h" // inlined API
284
285#include "qbuffer.h" // inline removed API
286
287#include "qdir.h"
288
289uint QDir::count() const
290{
292}
293
294#if QT_POINTER_SIZE != 4
295QString QDir::operator[](int i) const
296{
297 return operator[](qsizetype{i});
298}
299#endif
300
302
303bool qputenv(const char *varName, const QByteArray &value)
304{
306}
307
308#include "qmetatype.h"
309
310int QMetaType::idHelper() const
311{
312 Q_ASSERT(d_ptr);
313 return registerHelper(d_ptr);
314}
315
316#if QT_CONFIG(sharedmemory)
317#include "qsharedmemory.h"
318
319void QSharedMemory::setNativeKey(const QString &key)
320{
321 setNativeKey(key, QNativeIpcKey::legacyDefaultTypeForOs());
322}
323#endif
324
325#include "qvariant.h"
326
327// these implementations aren't as efficient as they used to be prior to
328// replacement, but there's no way to call the ambiguous overload
329QVariant::QVariant(const QUuid &uuid) : QVariant(QVariant::fromValue(uuid)) {}
330#ifndef QT_NO_GEOM_VARIANT
331#include "qline.h"
332#include "qpoint.h"
333#include "qrect.h"
334#include "qsize.h"
335QVariant::QVariant(const QPoint &pt) : QVariant(QVariant::fromValue(pt)) {}
336QVariant::QVariant(const QPointF &pt) : QVariant(QVariant::fromValue(pt)) {}
337QVariant::QVariant(const QRect &r) : QVariant(QVariant::fromValue(r)) {}
338QVariant::QVariant(const QRectF &r) : QVariant(QVariant::fromValue(r)) {}
339QVariant::QVariant(const QLine &l) : QVariant(QVariant::fromValue(l)) {}
340QVariant::QVariant(const QLineF &l) : QVariant(QVariant::fromValue(l)) {}
341QVariant::QVariant(const QSize &s) : QVariant(QVariant::fromValue(s)) {}
342QVariant::QVariant(const QSizeF &s) : QVariant(QVariant::fromValue(s)) {}
343#endif
344
345#if QT_CONFIG(xmlstreamreader)
346
347#include "qxmlstream.h"
348
349QXmlStreamReader::QXmlStreamReader(const QByteArray &data)
350 : QXmlStreamReader(data, PrivateConstructorTag{})
351{
352}
353
354QXmlStreamReader::QXmlStreamReader(const QString &data)
355 : QXmlStreamReader(qToAnyStringViewIgnoringNull(data))
356{
357}
358
359QXmlStreamReader::QXmlStreamReader(const char *data)
360 : QXmlStreamReader(QAnyStringView(data))
361{
362}
363
364void QXmlStreamReader::addData(const QByteArray &data)
365{
366 addData<>(data);
367}
368void QXmlStreamReader::addData(const QString &data)
369{
371}
372
373void QXmlStreamReader::addData(const char *data)
374{
375 addData(QAnyStringView(data));
376}
377
378#endif // QT_CONFIG(xmlstreamreader)
379
380#if QT_CONFIG(xmlstreamwriter)
381
382#include "qxmlstream.h"
383
384void QXmlStreamWriter::writeAttribute(const QString &qualifiedName, const QString &value)
385{
388}
389
390void QXmlStreamWriter::writeAttribute(const QString &namespaceUri, const QString &name, const QString &value)
391{
395}
396
397void QXmlStreamWriter::writeCDATA(const QString &text)
398{
400}
401
402void QXmlStreamWriter::writeCharacters(const QString &text)
403{
405}
406
407void QXmlStreamWriter::writeComment(const QString &text)
408{
409 writeComment(qToAnyStringViewIgnoringNull(text));
410}
411
412void QXmlStreamWriter::writeDTD(const QString &dtd)
413{
414 writeDTD(qToAnyStringViewIgnoringNull(dtd));
415}
416
417void QXmlStreamWriter::writeEmptyElement(const QString &qualifiedName)
418{
419 writeEmptyElement(qToAnyStringViewIgnoringNull(qualifiedName));
420}
421
422void QXmlStreamWriter::writeEmptyElement(const QString &namespaceUri, const QString &name)
423{
424 writeEmptyElement(qToAnyStringViewIgnoringNull(namespaceUri),
426}
427
428void QXmlStreamWriter::writeTextElement(const QString &qualifiedName, const QString &text)
429{
430 writeTextElement(qToAnyStringViewIgnoringNull(qualifiedName),
432}
433
434void QXmlStreamWriter::writeTextElement(const QString &namespaceUri, const QString &name, const QString &text)
435{
436 writeTextElement(qToAnyStringViewIgnoringNull(namespaceUri),
439}
440
441void QXmlStreamWriter::writeEntityReference(const QString &name)
442{
443 writeEntityReference(qToAnyStringViewIgnoringNull(name));
444}
445
446void QXmlStreamWriter::writeNamespace(const QString &namespaceUri, const QString &prefix)
447{
448 writeNamespace(qToAnyStringViewIgnoringNull(namespaceUri),
450}
451
452void QXmlStreamWriter::writeDefaultNamespace(const QString &namespaceUri)
453{
454 writeDefaultNamespace(qToAnyStringViewIgnoringNull(namespaceUri));
455}
456
457void QXmlStreamWriter::writeProcessingInstruction(const QString &target, const QString &data)
458{
459 writeProcessingInstruction(qToAnyStringViewIgnoringNull(target),
461}
462
463void QXmlStreamWriter::writeStartDocument(const QString &version)
464{
465 writeStartDocument(qToAnyStringViewIgnoringNull(version));
466}
467
468void QXmlStreamWriter::writeStartDocument(const QString &version, bool standalone)
469{
470 writeStartDocument(qToAnyStringViewIgnoringNull(version),
471 standalone);
472}
473
474void QXmlStreamWriter::writeStartElement(const QString &qualifiedName)
475{
477}
478
479void QXmlStreamWriter::writeStartElement(const QString &namespaceUri, const QString &name)
480{
483}
484
485#endif // QT_CONFIG(xmlstreamwriter)
486
487// inlined API
488#include "qfloat16.h"
489#include "qstring.h"
490
491// #include "qotherheader.h"
492// // implement removed functions from qotherheader.h
493// order sections alphabetically to reduce chances of merge conflicts
494
495#endif // QT_CORE_REMOVED_SINCE(6, 5)
496
497#if QT_CORE_REMOVED_SINCE(6, 6)
498
500
502 const QByteArray &key)
504
506{
508}
509
511{
513}
514
517{
520}
521
522#include "qobject.h" // inlined API
523
524#include "qrunnable.h"
525
526QRunnable *QRunnable::create(std::function<void()> functionToRun)
527{
528 return QRunnable::create<std::function<void()>>(std::move(functionToRun));
529}
530
531#include "qstring.h"
532
533qsizetype QString::toUcs4_helper(const ushort *uc, qsizetype length, uint *out)
534{
535 return toUcs4_helper(reinterpret_cast<const char16_t *>(uc), length,
536 reinterpret_cast<char32_t *>(out));
537}
538
539#if QT_CONFIG(thread)
540#include "qreadwritelock.h"
541
542bool QReadWriteLock::tryLockForRead()
543{
544 return tryLockForRead(0);
545}
546
547bool QReadWriteLock::tryLockForWrite()
548{
549 return tryLockForWrite(0);
550}
551
552#include "qthreadpool.h"
553#include "private/qthreadpool_p.h"
554
555void QThreadPool::start(std::function<void()> functionToRun, int priority)
556{
557 if (!functionToRun)
558 return;
559 start(QRunnable::create(std::move(functionToRun)), priority);
560}
561
562bool QThreadPool::tryStart(std::function<void()> functionToRun)
563{
564 if (!functionToRun)
565 return false;
566
567 Q_D(QThreadPool);
568 QMutexLocker locker(&d->mutex);
569 if (!d->allThreads.isEmpty() && d->areAllThreadsActive())
570 return false;
571
572 QRunnable *runnable = QRunnable::create(std::move(functionToRun));
573 if (d->tryStart(runnable))
574 return true;
575 delete runnable;
576 return false;
577}
578
579void QThreadPool::startOnReservedThread(std::function<void()> functionToRun)
580{
581 if (!functionToRun)
582 return releaseThread();
583
584 startOnReservedThread(QRunnable::create(std::move(functionToRun)));
585}
586
587#endif // QT_CONFIG(thread)
588
589#include "qxmlstream.h"
590
591QStringView QXmlStreamAttributes::value(const QString &namespaceUri, const QString &name) const
592{
594}
595
596QStringView QXmlStreamAttributes::value(const QString &namespaceUri, QLatin1StringView name) const
597{
599}
600
601QStringView QXmlStreamAttributes::value(QLatin1StringView namespaceUri, QLatin1StringView name) const
602{
603 return value(QAnyStringView(namespaceUri), QAnyStringView(name));
604}
605
606QStringView QXmlStreamAttributes::value(const QString &qualifiedName) const
607{
608 return value(qToAnyStringViewIgnoringNull(qualifiedName));
609}
610
611QStringView QXmlStreamAttributes::value(QLatin1StringView qualifiedName) const
612{
613 return value(QAnyStringView(qualifiedName));
614}
615
616// inlined API
617#if QT_CONFIG(thread)
618#include "qmutex.h"
619#include "qreadwritelock.h"
620#include "qsemaphore.h"
621#endif
622
623// #include "qotherheader.h"
624// // implement removed functions from qotherheader.h
625// order sections alphabetically to reduce chances of merge conflicts
626
627#endif // QT_CORE_REMOVED_SINCE(6, 6)
628
629#if QT_CORE_REMOVED_SINCE(6, 7)
630
631#include "qbitarray.h"
632
634{
635 return QBitArray(*this).inverted_inplace();
636}
637
638#include "qbytearray.h" // also includes inlined API
639
641{
642 if (len >= size())
643 return *this;
644 if (len < 0)
645 len = 0;
646 return QByteArray(data(), len);
647}
648
650{
651 if (len >= size())
652 return *this;
653 if (len < 0)
654 len = 0;
655 return QByteArray(end() - len, len);
656}
657
659{
660 qsizetype p = pos;
661 qsizetype l = len;
662 using namespace QtPrivate;
663 switch (QContainerImplHelper::mid(size(), &p, &l)) {
664 case QContainerImplHelper::Null:
665 return QByteArray();
666 case QContainerImplHelper::Empty:
667 {
668 return QByteArray(DataPointer::fromRawData(&_empty, 0));
669 }
670 case QContainerImplHelper::Full:
671 return *this;
672 case QContainerImplHelper::Subset:
673 return QByteArray(d.data() + p, l);
674 }
675 Q_UNREACHABLE_RETURN(QByteArray());
676}
677
678#ifdef Q_CC_MSVC
679// previously inline methods, only needed for MSVC compat
681{ return sliced(0, n); }
683{ return sliced(size() - n, n); }
685{ return sliced(pos, size() - pos); }
687{ verify(pos, n); return QByteArray(d.data() + pos, n); }
689{ return sliced(0, size() - n); }
690#endif
691
692#include "qcborstreamreader.h"
693
695{
696 return std::as_const(*this).lastError();
697}
698
699#include "qdatetime.h"
700
702 : QDateTime(date, time, timeZone, TransitionResolution::LegacyBehavior) {}
704 : QDateTime(date, time, TransitionResolution::LegacyBehavior) {}
707void QDateTime::setTimeZone(const QTimeZone &toZone)
708{
710}
711
712bool QDateTime::precedes(const QDateTime &other) const
713{
714 return compareThreeWay(*this, other) < 0;
715}
716
717#include "qdatastream.h"
718
720{
721 return writeBytes(s, qint64(len));
722}
723
725{
726 return int(skipRawData(qint64(len)));
727}
728
729int QDataStream::readBlock(char *data, int len)
730{
731 return int(readBlock(data, qint64(len)));
732}
733
734int QDataStream::readRawData(char *s, int len)
735{
736 return int(readRawData(s, qint64(len)));
737}
738
739int QDataStream::writeRawData(const char *s, int len)
740{
741 return writeRawData(s, qint64(len));
742}
743
744#if defined(Q_OS_ANDROID)
745
746#include "qjniobject.h"
747
748jclass QJniObject::loadClass(const QByteArray &className, JNIEnv *env, bool /*binEncoded*/)
749{
750 return QJniObject::loadClass(className, env);
751}
752
753QByteArray QJniObject::toBinaryEncClassName(const QByteArray &className)
754{
755 return QByteArray(className).replace('/', '.');
756}
757
758void QJniObject::callVoidMethodV(JNIEnv *env, jmethodID id, va_list args) const
759{
760 env->CallVoidMethodV(javaObject(), id, args);
761}
762
763#endif // Q_OS_ANDROID
764
765#include "qlocale.h"
766
768{
770}
771
773{
775}
776
778{
780}
781
782QDate QLocale::toDate(const QString &string, FormatType format) const
783{
785}
786
787QDate QLocale::toDate(const QString &string, FormatType format, QCalendar cal) const
788{
789 return toDate(string, dateFormat(format), cal, DefaultTwoDigitBaseYear);
790}
791
792QDateTime QLocale::toDateTime(const QString &string, FormatType format) const
793{
794 return toDateTime(string, dateTimeFormat(format), DefaultTwoDigitBaseYear);
795}
796
797QDateTime QLocale::toDateTime(const QString &string, FormatType format, QCalendar cal) const
798{
799 return toDateTime(string, dateTimeFormat(format), cal, DefaultTwoDigitBaseYear);
800}
801
802QDate QLocale::toDate(const QString &string, const QString &format) const
803{
805}
806
807QDate QLocale::toDate(const QString &string, const QString &format, QCalendar cal) const
808{
809 return toDate(string, format, cal, DefaultTwoDigitBaseYear);
810}
811
812QDateTime QLocale::toDateTime(const QString &string, const QString &format) const
813{
814 return toDateTime(string, format, QCalendar(), DefaultTwoDigitBaseYear);
815}
816
817QDateTime QLocale::toDateTime(const QString &string, const QString &format, QCalendar cal) const
818{
819 return toDateTime(string, format, cal, DefaultTwoDigitBaseYear);
820}
821
822#include "qobject.h"
823
824void qt_qFindChildren_helper(const QObject *parent, const QMetaObject &mo,
825 QList<void*> *list, Qt::FindChildOptions options)
826{
827 qt_qFindChildren_helper(parent, QAnyStringView(), mo, list, options);
828}
829
830void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QMetaObject &mo,
831 QList<void*> *list, Qt::FindChildOptions options)
832{
834}
835
836QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo,
837 Qt::FindChildOptions options)
838{
839 return qt_qFindChild_helper(parent, QAnyStringView{name}, mo, options);
840}
841
842void QObject::moveToThread(QThread *targetThread)
843{
844 moveToThread(targetThread, QT6_CALL_NEW_OVERLOAD);
845}
846
847#include "qobjectdefs.h"
848
849bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase *slot, Qt::ConnectionType type, void *ret)
850{
851 return invokeMethodImpl(object, slot, type, 1, &ret, nullptr, nullptr);
852}
853
854#include "qstring.h"
855
857{
858 if (size_t(n) >= size_t(size()))
859 return *this;
860 return QString((const QChar*) d.data(), n);
861}
862
864{
865 if (size_t(n) >= size_t(size()))
866 return *this;
867 return QString(constData() + size() - n, n);
868}
869
871{
873 qsizetype l = n;
874 using namespace QtPrivate;
875 switch (QContainerImplHelper::mid(size(), &p, &l)) {
876 case QContainerImplHelper::Null:
877 return QString();
878 case QContainerImplHelper::Empty:
879 return QString(DataPointer::fromRawData(&_empty, 0));
880 case QContainerImplHelper::Full:
881 return *this;
882 case QContainerImplHelper::Subset:
883 return QString(constData() + p, l);
884 }
885 Q_UNREACHABLE_RETURN(QString());
886}
887
888#ifdef Q_CC_MSVC
889// previously inline methods, only needed for MSVC compat
891{ return sliced(0, n); }
893{ return sliced(size() - n, n); }
895{ return sliced(pos, size() - pos); }
897{ verify(pos, n); return QString(begin() + pos, n); }
899{ return sliced(0, size() - n); }
900#endif
901
902#include "qtimezone.h"
903
904bool QTimeZone::operator==(const QTimeZone &other) const
905{
906 return comparesEqual(*this, other);
907}
908
909bool QTimeZone::operator!=(const QTimeZone &other) const
910{
911 return !comparesEqual(*this, other);
912}
913
914#include "qurl.h"
915
916QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode)
917{
919}
920
921#include "qtimer.h" // inlined API
922
923
924// #include "qotherheader.h"
925// // implement removed functions from qotherheader.h
926// order sections alphabetically to reduce chances of merge conflicts
927
928#endif // QT_CORE_REMOVED_SINCE(6, 7)
929
930#if QT_CORE_REMOVED_SINCE(6, 8)
931#include "qbitarray.h" // inlined API
932
933#include "qbytearray.h" // inlined API
934
935#include "qcborarray.h" // inlined API
936
937#include "qcbormap.h" // inlined API
938
939#include "qcborvalue.h" // inlined API
940
941#include "qdatastream.h" // inlined API
942
944{
945 return (*this << qint8(i));
946}
947
948#include "qdir.h" // inlined API
949
950bool QDir::operator==(const QDir &dir) const
951{
952 return comparesEqual(*this, dir);
953}
954
955#include "qeasingcurve.h"
956
957bool QEasingCurve::operator==(const QEasingCurve &other) const
958{
959 return comparesEqual(*this, other);
960}
961
962#include "qfileinfo.h" // inlined API
963
964bool QFileInfo::operator==(const QFileInfo &fileinfo) const
965{
966 return comparesEqual(*this, fileinfo);
967}
968
969#include "qitemselectionmodel.h" // inlined API
970
971#include "qjsonarray.h"
972
973bool QJsonArray::operator==(const QJsonArray &other) const
974{
975 return comparesEqual(*this, other);
976}
977
978bool QJsonArray::operator!=(const QJsonArray &other) const
979{
980 return !comparesEqual(*this, other);
981}
982
983#include "qjsondocument.h"
984
985bool QJsonDocument::operator==(const QJsonDocument &other) const
986{
987 return comparesEqual(*this, other);
988}
989
990#include "qjsonobject.h"
991
992bool QJsonObject::operator==(const QJsonObject &other) const
993{
994 return comparesEqual(*this, other);
995}
996
997
998bool QJsonObject::operator!=(const QJsonObject &other) const
999{
1000 return !comparesEqual(*this, other);
1001}
1002
1003#include "qjsonvalue.h"
1004
1005bool QJsonValue::operator==(const QJsonValue &other) const
1006{
1007 return comparesEqual(*this, other);
1008}
1009
1010bool QJsonValue::operator!=(const QJsonValue &other) const
1011{
1012 return !comparesEqual(*this, other);
1013}
1014
1015#include "qline.h" // inlined API
1016
1017#include "qmimetype.h"
1018
1019bool QMimeType::operator==(const QMimeType &other) const
1020{
1021 return comparesEqual(*this, other);
1022}
1023
1024#include "qobject.h"
1025#include "qnumeric.h"
1026
1027int QObject::startTimer(std::chrono::milliseconds time, Qt::TimerType timerType)
1028{
1029 using namespace std::chrono;
1030 using ratio = std::ratio_divide<std::milli, std::nano>;
1031 nanoseconds::rep r;
1032 if (qMulOverflow<ratio::num>(time.count(), &r)) {
1033 qWarning("QObject::startTimer(std::chrono::milliseconds): "
1034 "'time' arg overflowed when converted to nanoseconds.");
1035 r = nanoseconds::max().count();
1036 }
1037 return startTimer(nanoseconds{r}, timerType);
1038}
1039
1040#if QT_CONFIG(processenvironment)
1041#include "qprocess.h" // inlined API
1042
1043bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
1044{
1045 return comparesEqual(*this, other);
1046}
1047#endif // QT_CONFIG(processenvironment)
1048
1049#if QT_CONFIG(regularexpression)
1050#include "qregularexpression.h"
1051
1053{
1055}
1056
1058{
1059 return captured(QAnyStringView(name));
1060}
1061
1063{
1065}
1066
1068{
1070}
1071
1073{
1075}
1076
1078{
1080}
1081
1082bool QRegularExpression::operator==(const QRegularExpression &other) const
1083{
1084 return comparesEqual(*this, other);
1085}
1086#endif // QT_CONFIG(regularexpression)
1087
1088#if QT_CONFIG(future)
1089#include "qresultstore.h"
1090
1091bool QtPrivate::ResultIteratorBase::operator==(const QtPrivate::ResultIteratorBase &other) const
1092{
1093 return comparesEqual(*this, other);
1094}
1095
1096bool QtPrivate::ResultIteratorBase::operator!=(const QtPrivate::ResultIteratorBase &other) const
1097{
1098 return !comparesEqual(*this, other);
1099}
1100#endif // QT_CONFIG(future)
1101
1102#include "qstring.h" // inlined API
1103
1104#if QT_CONFIG(thread)
1105# include "qthreadpool.h" // inlined API
1106#endif
1107
1108#include "qurl.h"
1109
1110bool QUrl::operator<(const QUrl &url) const
1111{
1112 return is_lt(compareThreeWay(*this, url));
1113}
1114
1115bool QUrl::operator==(const QUrl &url) const
1116{
1117 return comparesEqual(*this, url);
1118}
1119
1120bool QUrl::operator!=(const QUrl &url) const
1121{
1122 return !comparesEqual(*this, url);
1123}
1124
1125#include "qurlquery.h"
1126
1127bool QUrlQuery::operator==(const QUrlQuery &other) const
1128{
1129 return comparesEqual(*this, other);
1130}
1131
1132#include "qxmlstream.h" // inlined API
1133
1134// #include "qotherheader.h"
1135// // implement removed functions from qotherheader.h
1136// order sections alphabetically to reduce chances of merge conflicts
1137
1138#endif // QT_CORE_REMOVED_SINCE(6, 8)
\inmodule QtCore
T loadRelaxed() const noexcept
\inmodule QtCore
Definition qbitarray.h:13
friend QBitArray operator~(QBitArray a)
Returns a bit array that contains the inverted bits of the bit array a.
Definition qbitarray.h:43
\inmodule QtCore
Q_WEAK_OVERLOAD qsizetype indexIn(const QByteArray &ba, qsizetype from=0) const
\inmodule QtCore
Definition qbytearray.h:57
QByteArray left(qsizetype n) const &
Definition qbytearray.h:169
QByteArray right(qsizetype n) const &
Definition qbytearray.h:181
QByteArray sliced(qsizetype pos) const &
Definition qbytearray.h:200
QByteArray chopped(qsizetype len) const &
Definition qbytearray.h:204
QByteArray last(qsizetype n) const &
Definition qbytearray.h:198
QByteArray first(qsizetype n) const &
Definition qbytearray.h:196
QByteArray mid(qsizetype index, qsizetype len=-1) const &
The QCalendar class describes calendar systems.
Definition qcalendar.h:53
QCborError lastError() const
Returns the last error in decoding the stream, if any.
\inmodule QtCore
static QByteArray hash(QByteArrayView data, Algorithm method)
Returns the hash of data using method.
void addData(QByteArrayView data) noexcept
Adds the characters in bytes to the cryptographic hash.
\inmodule QtCore\reentrant
Definition qdatastream.h:46
qint64 readRawData(char *, qint64 len)
Reads at most len bytes from the stream into s and returns the number of bytes read.
Q_CORE_EXPORT friend QDataStream & operator>>(QDataStream &in, QString &str)
Definition qstring.cpp:9589
qint64 skipRawData(qint64 len)
qint64 writeRawData(const char *, qint64 len)
Writes len bytes from s to the stream.
QDataStream & writeBytes(const char *, qint64 len)
Writes the length specifier len and the buffer s to the stream and returns a reference to the stream.
Q_CORE_EXPORT friend QDataStream & operator<<(QDataStream &out, const QString &str)
Definition qstring.cpp:9558
\inmodule QtCore\reentrant
Definition qdatetime.h:283
void setDate(QDate date, TransitionResolution resolve=TransitionResolution::LegacyBehavior)
Sets the date part of this datetime to date.
void setTimeZone(const QTimeZone &toZone, TransitionResolution resolve=TransitionResolution::LegacyBehavior)
QTime time() const
Returns the time part of the datetime.
QDateTime() noexcept
Constructs a null datetime, nominally using local time.
friend Q_CORE_EXPORT Qt::weak_ordering compareThreeWay(const QDateTime &lhs, const QDateTime &rhs)
void setTime(QTime time, TransitionResolution resolve=TransitionResolution::LegacyBehavior)
Sets the time part of this datetime to time.
QDate date() const
Returns the date part of the datetime.
\inmodule QtCore \reentrant
Definition qdatetime.h:29
\inmodule QtCore
Definition qdir.h:20
QString operator[](qsizetype) const
Returns the file name at position pos in the list of file names.
Definition qdir.cpp:1339
qsizetype count(QT6_DECL_NEW_OVERLOAD) const
Returns the total number of directories and files in the directory.
Definition qdir.cpp:1323
friend Q_CORE_EXPORT bool comparesEqual(const QDir &lhs, const QDir &rhs)
Definition qdir.cpp:1819
\inmodule QtCore
friend Q_CORE_EXPORT bool comparesEqual(const QEasingCurve &lhs, const QEasingCurve &rhs) noexcept
friend Q_CORE_EXPORT bool comparesEqual(const QFileInfo &lhs, const QFileInfo &rhs)
\inmodule QtCore\reentrant
Definition qjsonarray.h:18
friend Q_CORE_EXPORT bool comparesEqual(const QJsonArray &lhs, const QJsonArray &rhs) noexcept
\inmodule QtCore\reentrant
friend Q_CORE_EXPORT bool comparesEqual(const QJsonDocument &lhs, const QJsonDocument &rhs) noexcept
\inmodule QtCore\reentrant
Definition qjsonobject.h:20
friend Q_CORE_EXPORT bool comparesEqual(const QJsonObject &lhs, const QJsonObject &rhs) noexcept
\inmodule QtCore\reentrant
Definition qjsonvalue.h:25
friend Q_CORE_EXPORT bool comparesEqual(const QJsonValue &lhs, const QJsonValue &rhs) noexcept
\inmodule QtCore\compares equality \compareswith equality QLine \endcompareswith
Definition qline.h:192
\inmodule QtCore\compares equality \compareswith equality QLineF \endcompareswith
Definition qline.h:18
static QString languageToCode(Language language, LanguageCodeTypes codeTypes=AnyLanguageCode)
Returns the two- or three-letter language code for language, as defined in the ISO 639 standards.
Definition qlocale.cpp:1510
QString dateTimeFormat(FormatType format=LongFormat) const
Definition qlocale.cpp:2396
QString dateFormat(FormatType format=LongFormat) const
Definition qlocale.cpp:2334
static constexpr int DefaultTwoDigitBaseYear
Definition qlocale.h:39
@ AnyLanguageCode
Definition qlocale.h:1114
QString bcp47Name(TagSeparator separator=TagSeparator::Dash) const
Returns the BCP47 field names joined with dashes.
Definition qlocale.cpp:1482
QStringList uiLanguages(TagSeparator separator=TagSeparator::Dash) const
List of locale names for use in selecting translations.
Definition qlocale.cpp:4748
QString name(TagSeparator separator=TagSeparator::Underscore) const
The short name of this locale.
Definition qlocale.cpp:1412
static Language codeToLanguage(QStringView languageCode, LanguageCodeTypes codeTypes=AnyLanguageCode) noexcept
Returns the QLocale::Language enum corresponding to the two- or three-letter languageCode,...
Definition qlocale.cpp:1530
void setKey(QByteArrayView key) noexcept
Sets secret key.
void addData(const char *data, qsizetype length)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QByteArray hash(QByteArrayView message, QByteArrayView key, QCryptographicHash::Algorithm method)
Returns the authentication code for the message message using the key key and the method method.
QMessageAuthenticationCode(QCryptographicHash::Algorithm method, QByteArrayView key={})
int id(int=0) const
Definition qmetatype.h:475
\inmodule QtCore
Definition qmimetype.h:25
friend Q_CORE_EXPORT bool comparesEqual(const QMimeType &lhs, const QMimeType &rhs) noexcept
\inmodule QtCore
Definition qmutex.h:313
\inmodule QtCore
Definition qobject.h:103
int startTimer(int interval, Qt::TimerType timerType=Qt::CoarseTimer)
This is an overloaded function that will start a timer of type timerType and a timeout of interval mi...
Definition qobject.cpp:1817
bool moveToThread(QThread *thread QT6_DECL_NEW_OVERLOAD_TAIL)
Changes the thread affinity for this object and its children and returns true on success.
Definition qobject.cpp:1643
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
Definition qobject.h:127
static Q_CORE_EXPORT QOperatingSystemVersionBase current()
static Q_CORE_EXPORT int compare(QOperatingSystemVersionBase v1, QOperatingSystemVersionBase v2) noexcept
\inmodule QtCore\reentrant
Definition qpoint.h:217
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore
Definition qprocess.h:32
friend Q_CORE_EXPORT bool comparesEqual(const QProcessEnvironment &lhs, const QProcessEnvironment &rhs)
Definition qprocess.cpp:207
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore\reentrant
Definition qrect.h:30
QStringView capturedView(int nth=0) const
qsizetype capturedEnd(int nth=0) const
Returns the offset inside the subject string immediately after the ending position of the substring c...
bool hasCaptured(QAnyStringView name) const
qsizetype capturedStart(int nth=0) const
Returns the offset inside the subject string corresponding to the starting position of the substring ...
qsizetype capturedLength(int nth=0) const
Returns the length of the substring captured by the nth capturing group.
QString captured(int nth=0) const
Returns the substring captured by the nth capturing group.
\inmodule QtCore \reentrant
friend Q_CORE_EXPORT bool comparesEqual(const QRegularExpression &lhs, const QRegularExpression &rhs) noexcept
\inmodule QtCore
Definition qrunnable.h:18
static QRunnable * create(Callable &&functionToRun)
Definition qrunnable.h:114
void beginWriteArray(QAnyStringView prefix, int size=-1)
Adds prefix to the current group and starts writing an array of size size.
bool contains(QAnyStringView key) const
Returns true if there exists a setting called key; returns false otherwise.
void setValue(QAnyStringView key, const QVariant &value)
Sets the value of setting key to value.
void remove(QAnyStringView key)
Removes the setting key and any sub-settings of key.
QVariant value(QAnyStringView key, const QVariant &defaultValue) const
Returns the value for setting key.
int beginReadArray(QAnyStringView prefix)
Adds prefix to the current group and starts reading from an array.
void beginGroup(QAnyStringView prefix)
Appends prefix to the current group.
\inmodule QtCore
Definition qsize.h:208
\inmodule QtCore
Definition qsize.h:25
Q_CORE_EXPORT qsizetype indexOfIn(const char *needle, size_t nlen, const char *haystack, qsizetype hlen, qsizetype from) const noexcept
\inmodule QtCore
\inmodule QtCore
Definition qstringview.h:78
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QString left(qsizetype n) const &
Definition qstring.h:363
iterator begin()
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the first character in the string.
Definition qstring.h:1349
QString sliced(qsizetype pos) const &
Definition qstring.h:394
QString chopped(qsizetype n) const &
Definition qstring.h:398
QString mid(qsizetype position, qsizetype n=-1) const &
Definition qstring.cpp:5300
const QChar * constData() const
Returns a pointer to the data stored in the QString.
Definition qstring.h:1246
qsizetype size() const noexcept
Returns the number of characters in this string.
Definition qstring.h:186
constexpr QString() noexcept
Constructs a null string.
Definition qstring.h:1322
QString first(qsizetype n) const &
Definition qstring.h:390
QString right(qsizetype n) const &
Definition qstring.h:375
QString last(qsizetype n) const &
Definition qstring.h:392
\inmodule QtCore
Definition qthreadpool.h:22
void start(QRunnable *runnable, int priority=0)
Reserves a thread and uses it to run runnable, unless this thread will make the current thread count ...
void startOnReservedThread(QRunnable *runnable)
Releases a thread previously reserved with reserveThread() and uses it to run runnable.
bool tryStart(QRunnable *runnable)
Attempts to reserve a thread to run runnable.
void releaseThread()
Releases a thread previously reserved by a call to reserveThread().
\inmodule QtCore
Definition qtimezone.h:26
friend Q_CORE_EXPORT bool comparesEqual(const QTimeZone &lhs, const QTimeZone &rhs) noexcept
\inmodule QtCore \reentrant
Definition qdatetime.h:215
\inmodule QtCore
Definition qurlquery.h:20
\inmodule QtCore
Definition qurl.h:94
static QByteArray toAce(const QString &domain, AceProcessingOptions options={})
Definition qurl.cpp:3064
static QString fromAce(const QByteArray &domain, AceProcessingOptions options={})
Definition qurl.cpp:3041
static QUrl fromEncoded(QByteArrayView input, ParsingMode mode=TolerantMode)
Parses input and returns the corresponding QUrl.
Definition qurl.cpp:2988
\inmodule QtCore
Definition quuid.h:31
static QUuid fromRfc4122(QByteArrayView) noexcept
Creates a QUuid object from the binary representation of the UUID, as specified by RFC 4122 section 4...
Definition quuid.cpp:595
static QUuid fromString(QAnyStringView string) noexcept
Definition quuid.cpp:523
constexpr QUuid() noexcept
Creates the null UUID.
Definition quuid.h:90
\inmodule QtCore
Definition qvariant.h:65
QVariant() noexcept
Constructs an invalid variant.
Definition qvariant.h:218
\inmodule QtCore
static Q_CORE_EXPORT QVersionNumber fromString(QAnyStringView string, qsizetype *suffixIndex=nullptr)
QMTI_MUTABLE QBasicAtomicInt typeId
Definition qmetatype.h:281
friend bool comparesEqual(const ResultIteratorBase &lhs, const ResultIteratorBase &rhs) noexcept
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Definition qfloat16.h:47
QHash< int, QWidget * > hash
[35multi]
QString text
QDate date
[1]
auto mo
[7]
Language
Definition language.h:13
\macro QT_NO_KEYWORDS >
QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *sep, qsizetype len)
TimerType
ConnectionType
QAnyStringView qToAnyStringViewIgnoringNull(const QStringLike &s) noexcept
static void writeAttribute(QXmlStreamWriter *stream, const QVariant &attribute)
QByteArrayView qToByteArrayViewIgnoringNull(const QByteArrayLike &b) noexcept
#define QT_WARNING_POP
#define QT_WARNING_DISABLE_DEPRECATED
#define QT_WARNING_PUSH
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
bool comparesEqual(const QDir &lhs, const QDir &rhs)
Definition qdir.cpp:1819
typedef QByteArray(EGLAPIENTRYP PFNQGSGETDISPLAYSPROC)()
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
size_t qHashBits(const void *p, size_t size, size_t seed) noexcept
Definition qhash.cpp:1089
static QLocale::Language codeToLanguage(QStringView s)
#define qWarning
Definition qlogging.h:166
return ret
void qt_qFindChildren_helper(const QObject *parent, QAnyStringView name, const QMetaObject &mo, QList< void * > *list, Qt::FindChildOptions options)
Definition qobject.cpp:2137
QObject * qt_qFindChild_helper(const QObject *parent, QAnyStringView name, const QMetaObject &mo, Qt::FindChildOptions options)
Definition qobject.cpp:2174
GLint GLfloat GLfloat GLfloat v2
GLenum mode
GLuint64 key
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLboolean r
[2]
GLuint GLuint end
GLenum GLuint GLenum GLsizei length
GLenum GLuint id
[7]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat GLfloat f
GLenum type
GLenum target
GLint GLfloat GLfloat v1
GLuint start
GLuint name
GLfloat n
GLint GLsizei GLsizei GLenum format
GLfloat GLfloat GLfloat GLfloat h
GLdouble s
[6]
Definition qopenglext.h:235
GLfloat GLfloat p
[1]
GLenum GLsizei len
GLenum GLenum GLenum input
static bool fromString(const QMetaObject *mo, QString s, Allocate &&allocate)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
static constexpr QChar sep
static ISC_DATE toDate(QDate t)
bool qputenv(const char *varName, QByteArrayView raw)
#define QT6_CALL_NEW_OVERLOAD
short qint16
Definition qtypes.h:47
ptrdiff_t qsizetype
Definition qtypes.h:165
unsigned int uint
Definition qtypes.h:34
long long qint64
Definition qtypes.h:60
unsigned short ushort
Definition qtypes.h:33
QT_BEGIN_NAMESPACE typedef signed char qint8
Definition qtypes.h:45
Qt::weak_ordering compareThreeWay(const QUrl &lhs, const QUrl &rhs)
Definition qurl.cpp:3079
const char className[16]
[1]
Definition qwizard.cpp:100
QList< int > list
[14]
QByteArray ba
[0]
QTextStream out(stdout)
[7]
QUrl url("example.com")
[constructor-url-reference]
QBitArray().isNull()
[3]
QSharedPointer< T > other(t)
[5]
writeCharacters(text)
writeStartElement(qualifiedName)
[0]
QString dir
[11]
QJSValueList args
static Q_NODISCARD_CTOR QArrayDataPointer fromRawData(const T *rawData, qsizetype length) noexcept
\inmodule QtCore \inheaderfile QtCborCommon \reentrant
Definition qcborcommon.h:63
\inmodule QtCore