123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470 | // Copyright (C) 2021 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Marc Mutz <marc.mutz@kdab.com>// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only#define QT_CORE_BUILD_REMOVED_API#include"qglobal.h" QT_USE_NAMESPACE #if QT_CORE_REMOVED_SINCE(6, 1)#include"qmetatype.h"intQMetaType::id()const{returnregisterHelper();}#endif// QT_CORE_REMOVED_SINCE(6, 1)#if QT_CORE_REMOVED_SINCE(6, 2)#include"qbindingstorage.h"voidQBindingStorage::maybeUpdateBindingAndRegister_helper(const QUntypedPropertyData *data)const{registerDependency_helper(data);}#endif// QT_CORE_REMOVED_SINCE(6, 2)#if QT_CORE_REMOVED_SINCE(6, 3)#include"qbytearraymatcher.h"# if QT_POINTER_SIZE != 4intQStaticByteArrayMatcherBase::indexOfIn(const char*h, uint hl,const char*n,int nl,int from)const noexcept { qsizetype r =indexOfIn(h,size_t(hl), n,qsizetype(nl),qsizetype(from));Q_ASSERT(r ==int(r));return r;}# endif// QT_POINTER_SIZE != 4 qsizetype QByteArrayMatcher::indexIn(const QByteArray &ba, qsizetype from)const{returnindexIn(QByteArrayView{ba}, from);// ba.isNull() may be significant, so don't ignore it!}#include"tools/qcryptographichash.h"voidQCryptographicHash::addData(const QByteArray &data){addData(QByteArrayView{data});} QByteArray QCryptographicHash::hash(const QByteArray &data, Algorithm method){returnhash(QByteArrayView{data}, method);}#include"qdatastream.h"# ifndef QT_NO_DATASTREAM# include"qfloat16.h" QDataStream &QDataStream::operator>>(qfloat16 &f){return*this>>reinterpret_cast<qint16&>(f);} QDataStream &QDataStream::operator<<(qfloat16 f){return*this<<reinterpret_cast<qint16&>(f);}# endif#include"quuid.h"QUuid::QUuid(const QString &text): QUuid{qToAnyStringViewIgnoringNull(text)}{}QUuid::QUuid(const char*text): QUuid{QAnyStringView(text)}{}QUuid::QUuid(const QByteArray &text): QUuid{qToAnyStringViewIgnoringNull(text)}{} QUuid QUuid::fromString(QStringView string) noexcept {returnfromString(QAnyStringView{string});} QUuid QUuid::fromString(QLatin1StringView string) noexcept {returnfromString(QAnyStringView{string});} QUuid QUuid::fromRfc4122(const QByteArray &bytes){returnfromRfc4122(qToByteArrayViewIgnoringNull(bytes));}#include"qbytearraylist.h"# if QT_POINTER_SIZE != 4 QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that,const char*sep,int seplen){returnQByteArrayList_join(that, sep,qsizetype(seplen));}# endif#include"qlocale.h" QString QLocale::languageToCode(Language language){returnlanguageToCode(language,QLocale::AnyLanguageCode);}QLocale::Language QLocale::codeToLanguage(QStringView languageCode) noexcept {returncodeToLanguage(languageCode,QLocale::AnyLanguageCode);}#include"qoperatingsystemversion.h" QOperatingSystemVersion QOperatingSystemVersion::current(){returnQOperatingSystemVersionBase::current();} QString QOperatingSystemVersion::name()const{returnQOperatingSystemVersionBase::name();}intQOperatingSystemVersion::compare(const QOperatingSystemVersion &v1,const QOperatingSystemVersion &v2){returnQOperatingSystemVersionBase::compare(v1, v2);}#include"qurl.h" QString QUrl::fromAce(const QByteArray &domain){returnfromAce(domain, {});} QByteArray QUrl::toAce(const QString &domain){returntoAce(domain, {});}#endif// QT_CORE_REMOVED_SINCE(6, 3)#if QT_CORE_REMOVED_SINCE(6, 4)#include"qbytearray.h"// uses QT_CORE_INLINE_SINCE#include"qcalendar.h"QCalendar::QCalendar(QStringView name):QCalendar(QAnyStringView{name}) {}QCalendar::QCalendar(QLatin1StringView name):QCalendar(QAnyStringView{name}) {}#include"qcollator.h"// inline function compare(ptr, n, ptr, n) (for MSVC)#include"qhashfunctions.h"size_tqHash(const QByteArray &key,size_t seed) noexcept {returnqHashBits(key.constData(),size_t(key.size()), seed);}size_tqHash(const QByteArrayView &key,size_t seed) noexcept {returnqHashBits(key.constData(),size_t(key.size()), seed);}#include"qobject.h"voidQObject::setObjectName(const QString &name){ setObjectName<void>(name);}#include"qlocale.h"// uses QT_CORE_INLINE_SINCE#if QT_CONFIG(settings)#include"qsettings.h"voidQSettings::beginGroup(const QString &prefix){beginGroup(qToAnyStringViewIgnoringNull(prefix));}intQSettings::beginReadArray(const QString &prefix){returnbeginReadArray(qToAnyStringViewIgnoringNull(prefix));}voidQSettings::beginWriteArray(const QString &prefix,int size){beginWriteArray(qToAnyStringViewIgnoringNull(prefix), size);}voidQSettings::setValue(const QString &key,const QVariant &value){setValue(qToAnyStringViewIgnoringNull(key), value);}voidQSettings::remove(const QString &key){remove(qToAnyStringViewIgnoringNull(key));}boolQSettings::contains(const QString &key)const{returncontains(qToAnyStringViewIgnoringNull(key));} QVariant QSettings::value(const QString &key,const QVariant &defaultValue)const{returnvalue(qToAnyStringViewIgnoringNull(key), defaultValue);} QVariant QSettings::value(const QString &key)const{returnvalue(qToAnyStringViewIgnoringNull(key));}#endif// QT_CONFIG(settings)#include"qversionnumber.h" QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED QVersionNumber QVersionNumber::fromString(const QString &string,int*suffixIndex){returnfromString(qToAnyStringViewIgnoringNull(string), suffixIndex);} QVersionNumber QVersionNumber::fromString(QStringView string,int*suffixIndex){returnfromString(QAnyStringView{string}, suffixIndex);} QVersionNumber QVersionNumber::fromString(QLatin1StringView string,int*suffixIndex){returnfromString(QAnyStringView{string}, suffixIndex);} QT_WARNING_POP // #include <qotherheader.h>// // implement removed functions from qotherheader.h// order sections alphabetically to reduce chances of merge conflicts#endif// QT_CORE_REMOVED_SINCE(6, 4)#if QT_CORE_REMOVED_SINCE(6, 5)#include"qbasictimer.h"// inlined API#include"qbuffer.h"// inline removed API#include"qdir.h" uint QDir::count()const{returnuint(count(QT6_CALL_NEW_OVERLOAD));}#if QT_POINTER_SIZE != 4 QString QDir::operator[](int i)const{returnoperator[](qsizetype{i});}#endif#include"qtenvironmentvariables.h"boolqputenv(const char*varName,const QByteArray &value){returnqputenv(varName,qToByteArrayViewIgnoringNull(value));}#include"qmetatype.h"intQMetaType::idHelper()const{Q_ASSERT(d_ptr);returnregisterHelper(d_ptr);}#if QT_CONFIG(sharedmemory)#include"qsharedmemory.h"voidQSharedMemory::setNativeKey(const QString &key){setNativeKey(key,QNativeIpcKey::legacyDefaultTypeForOs());}#endif#include"qvariant.h"// these implementations aren't as efficient as they used to be prior to// replacement, but there's no way to call the ambiguous overloadQVariant::QVariant(const QUuid &uuid) :QVariant(QVariant::fromValue(uuid)) {}#include"qline.h"#include"qpoint.h"#include"qrect.h"#include"qsize.h"QVariant::QVariant(const QPoint &pt) :QVariant(QVariant::fromValue(pt)) {}QVariant::QVariant(const QPointF &pt) :QVariant(QVariant::fromValue(pt)) {}QVariant::QVariant(const QRect &r) :QVariant(QVariant::fromValue(r)) {}QVariant::QVariant(const QRectF &r) :QVariant(QVariant::fromValue(r)) {}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)) {}#if QT_CONFIG(xmlstreamreader)#include"qxmlstream.h"QXmlStreamReader::QXmlStreamReader(const QByteArray &data):QXmlStreamReader(data, PrivateConstructorTag{}){}QXmlStreamReader::QXmlStreamReader(const QString &data):QXmlStreamReader(qToAnyStringViewIgnoringNull(data)){}QXmlStreamReader::QXmlStreamReader(const char*data):QXmlStreamReader(QAnyStringView(data)){}voidQXmlStreamReader::addData(const QByteArray &data){ addData<>(data);}voidQXmlStreamReader::addData(const QString &data){addData(qToAnyStringViewIgnoringNull(data));}voidQXmlStreamReader::addData(const char*data){addData(QAnyStringView(data));}#endif// QT_CONFIG(xmlstreamreader)#if QT_CONFIG(xmlstreamwriter)#include"qxmlstream.h"voidQXmlStreamWriter::writeAttribute(const QString &qualifiedName,const QString &value){writeAttribute(qToAnyStringViewIgnoringNull(qualifiedName),qToAnyStringViewIgnoringNull(value));}voidQXmlStreamWriter::writeAttribute(const QString &namespaceUri,const QString &name,const QString &value){writeAttribute(qToAnyStringViewIgnoringNull(namespaceUri),qToAnyStringViewIgnoringNull(name),qToAnyStringViewIgnoringNull(value));}voidQXmlStreamWriter::writeCDATA(const QString &text){writeCDATA(qToAnyStringViewIgnoringNull(text));}voidQXmlStreamWriter::writeCharacters(const QString &text){writeCharacters(qToAnyStringViewIgnoringNull(text));}voidQXmlStreamWriter::writeComment(const QString &text){writeComment(qToAnyStringViewIgnoringNull(text));}voidQXmlStreamWriter::writeDTD(const QString &dtd){writeDTD(qToAnyStringViewIgnoringNull(dtd));}voidQXmlStreamWriter::writeEmptyElement(const QString &qualifiedName){writeEmptyElement(qToAnyStringViewIgnoringNull(qualifiedName));}voidQXmlStreamWriter::writeEmptyElement(const QString &namespaceUri,const QString &name){writeEmptyElement(qToAnyStringViewIgnoringNull(namespaceUri),qToAnyStringViewIgnoringNull(name));}voidQXmlStreamWriter::writeTextElement(const QString &qualifiedName,const QString &text){writeTextElement(qToAnyStringViewIgnoringNull(qualifiedName),qToAnyStringViewIgnoringNull(text));}voidQXmlStreamWriter::writeTextElement(const QString &namespaceUri,const QString &name,const QString &text){writeTextElement(qToAnyStringViewIgnoringNull(namespaceUri),qToAnyStringViewIgnoringNull(name),qToAnyStringViewIgnoringNull(text));}voidQXmlStreamWriter::writeEntityReference(const QString &name){writeEntityReference(qToAnyStringViewIgnoringNull(name));}voidQXmlStreamWriter::writeNamespace(const QString &namespaceUri,const QString &prefix){writeNamespace(qToAnyStringViewIgnoringNull(namespaceUri),qToAnyStringViewIgnoringNull(prefix));}voidQXmlStreamWriter::writeDefaultNamespace(const QString &namespaceUri){writeDefaultNamespace(qToAnyStringViewIgnoringNull(namespaceUri));}voidQXmlStreamWriter::writeProcessingInstruction(const QString &target,const QString &data){writeProcessingInstruction(qToAnyStringViewIgnoringNull(target),qToAnyStringViewIgnoringNull(data));}voidQXmlStreamWriter::writeStartDocument(const QString &version){writeStartDocument(qToAnyStringViewIgnoringNull(version));}voidQXmlStreamWriter::writeStartDocument(const QString &version,bool standalone){writeStartDocument(qToAnyStringViewIgnoringNull(version), standalone);}voidQXmlStreamWriter::writeStartElement(const QString &qualifiedName){writeStartElement(qToAnyStringViewIgnoringNull(qualifiedName));}voidQXmlStreamWriter::writeStartElement(const QString &namespaceUri,const QString &name){writeStartElement(qToAnyStringViewIgnoringNull(namespaceUri),qToAnyStringViewIgnoringNull(name));}#endif// QT_CONFIG(xmlstreamwriter)// inlined API#include"qfloat16.h"#include"qstring.h"// #include "qotherheader.h"// // implement removed functions from qotherheader.h// order sections alphabetically to reduce chances of merge conflicts#endif// QT_CORE_REMOVED_SINCE(6, 5)#if QT_CORE_REMOVED_SINCE(6, 6)#include"qmessageauthenticationcode.h"QMessageAuthenticationCode::QMessageAuthenticationCode(QCryptographicHash::Algorithm method,const QByteArray &key):QMessageAuthenticationCode(method,qToByteArrayViewIgnoringNull(key)) {}voidQMessageAuthenticationCode::setKey(const QByteArray &key){setKey(qToByteArrayViewIgnoringNull(key));}voidQMessageAuthenticationCode::addData(const QByteArray &data){addData(qToByteArrayViewIgnoringNull(data));} QByteArray QMessageAuthenticationCode::hash(const QByteArray &msg,const QByteArray &key,QCryptographicHash::Algorithm method){returnhash(qToByteArrayViewIgnoringNull(msg),qToByteArrayViewIgnoringNull(key), method);}#include"qobject.h"// inlined API#include"qrunnable.h" QRunnable *QRunnable::create(std::function<void()> functionToRun){returnQRunnable::create<std::function<void()>>(std::move(functionToRun));}#include"qstring.h" qsizetype QString::toUcs4_helper(const ushort *uc, qsizetype length, uint *out){returntoUcs4_helper(reinterpret_cast<const char16_t *>(uc), length,reinterpret_cast<char32_t *>(out));}#if QT_CONFIG(thread)#include"qreadwritelock.h"boolQReadWriteLock::tryLockForRead(){returntryLockForRead(0);}boolQReadWriteLock::tryLockForWrite(){returntryLockForWrite(0);}#include"qthreadpool.h"#include"private/qthreadpool_p.h"voidQThreadPool::start(std::function<void()> functionToRun,int priority){if(!functionToRun)return;start(QRunnable::create(std::move(functionToRun)), priority);}boolQThreadPool::tryStart(std::function<void()> functionToRun){if(!functionToRun)return false;Q_D(QThreadPool); QMutexLocker locker(&d->mutex);if(!d->allThreads.isEmpty() && d->areAllThreadsActive())return false; QRunnable *runnable =QRunnable::create(std::move(functionToRun));if(d->tryStart(runnable))return true;delete runnable;return false;}voidQThreadPool::startOnReservedThread(std::function<void()> functionToRun){if(!functionToRun)returnreleaseThread();startOnReservedThread(QRunnable::create(std::move(functionToRun)));}#endif// QT_CONFIG(thread)#if QT_CONFIG(xmlstream)#include"qxmlstream.h" QStringView QXmlStreamAttributes::value(const QString &namespaceUri,const QString &name)const{returnvalue(qToAnyStringViewIgnoringNull(namespaceUri),qToAnyStringViewIgnoringNull(name));} QStringView QXmlStreamAttributes::value(const QString &namespaceUri, QLatin1StringView name)const{returnvalue(qToAnyStringViewIgnoringNull(namespaceUri),QAnyStringView(name));} QStringView QXmlStreamAttributes::value(QLatin1StringView namespaceUri, QLatin1StringView name)const{returnvalue(QAnyStringView(namespaceUri),QAnyStringView(name));} QStringView QXmlStreamAttributes::value(const QString &qualifiedName)const{returnvalue(qToAnyStringViewIgnoringNull(qualifiedName));} QStringView QXmlStreamAttributes::value(QLatin1StringView qualifiedName)const{returnvalue(QAnyStringView(qualifiedName));}#endif// xmlstream// inlined API#if QT_CONFIG(thread)#include"qmutex.h"#include"qreadwritelock.h"#include"qsemaphore.h"#endif// #include "qotherheader.h"// // implement removed functions from qotherheader.h// order sections alphabetically to reduce chances of merge conflicts#endif// QT_CORE_REMOVED_SINCE(6, 6)#if QT_CORE_REMOVED_SINCE(6, 7)#include"qbitarray.h" QBitArray QBitArray::operator~()const{returnQBitArray(*this).inverted_inplace();}#include"qbytearray.h" QByteArray QByteArray::left(qsizetype len)const{if(len >=size())return*this;if(len <0) len =0;returnQByteArray(data(), len);} QByteArray QByteArray::right(qsizetype len)const{if(len >=size())return*this;if(len <0) len =0;returnQByteArray(end() - len, len);} QByteArray QByteArray::mid(qsizetype pos, qsizetype len)const{ qsizetype p = pos; qsizetype l = len;using namespace QtPrivate;switch(QContainerImplHelper::mid(size(), &p, &l)) {caseQContainerImplHelper::Null:returnQByteArray();caseQContainerImplHelper::Empty:{returnQByteArray(DataPointer::fromRawData(&_empty,0));}caseQContainerImplHelper::Full:return*this;caseQContainerImplHelper::Subset:returnQByteArray(d.data() + p, l);}Q_UNREACHABLE_RETURN(QByteArray());}#ifdef Q_CC_MSVC// previously inline methods, only needed for MSVC compat QByteArray QByteArray::first(qsizetype n)const{returnsliced(0, n); } QByteArray QByteArray::last(qsizetype n)const{returnsliced(size() - n, n); } QByteArray QByteArray::sliced(qsizetype pos)const{returnsliced(pos,size() - pos); } QByteArray QByteArray::sliced(qsizetype pos, qsizetype n)const{verify(pos, n);returnQByteArray(d.data() + pos, n); } QByteArray QByteArray::chopped(qsizetype n)const{returnsliced(0,size() - n); }#endif#include"qcborstreamreader.h" QCborError QCborStreamReader::lastError(){returnstd::as_const(*this).lastError();}#include"qdatetime.h"// also inlined APIQDateTime::QDateTime(QDate date, QTime time,const QTimeZone &timeZone):QDateTime(date, time, timeZone,TransitionResolution::LegacyBehavior) {}QDateTime::QDateTime(QDate date, QTime time):QDateTime(date, time,TransitionResolution::LegacyBehavior) {}voidQDateTime::setDate(QDate date) {setDate(date,TransitionResolution::LegacyBehavior); }voidQDateTime::setTime(QTime time) {setTime(time,TransitionResolution::LegacyBehavior); }voidQDateTime::setTimeZone(const QTimeZone &toZone){setTimeZone(toZone,TransitionResolution::LegacyBehavior);}boolQDateTime::precedes(const QDateTime &other)const{returncompareThreeWay(*this, other) <0;}#include"qdatastream.h" QDataStream &QDataStream::writeBytes(const char*s, uint len){returnwriteBytes(s,qint64(len));}intQDataStream::skipRawData(int len){returnint(skipRawData(qint64(len)));}intQDataStream::readBlock(char*data,int len){returnint(readBlock(data,qint64(len)));}intQDataStream::readRawData(char*s,int len){returnint(readRawData(s,qint64(len)));}intQDataStream::writeRawData(const char*s,int len){returnwriteRawData(s,qint64(len));}#if defined(Q_OS_ANDROID)#include"qjniobject.h" jclass QJniObject::loadClass(const QByteArray &className, JNIEnv *env,bool/*binEncoded*/){returnQJniObject::loadClass(className, env);} QByteArray QJniObject::toBinaryEncClassName(const QByteArray &className){returnQByteArray(className).replace('/','.');}voidQJniObject::callVoidMethodV(JNIEnv *env, jmethodID id,va_list args)const{ env->CallVoidMethodV(javaObject(), id, args);}#endif// Q_OS_ANDROID#include"qlocale.h" QStringList QLocale::uiLanguages()const{returnuiLanguages(TagSeparator::Dash);} QString QLocale::name()const{returnname(TagSeparator::Underscore);} QString QLocale::bcp47Name()const{returnbcp47Name(TagSeparator::Dash);}#if QT_CONFIG(datestring) QDate QLocale::toDate(const QString &string, FormatType format)const{returntoDate(string,dateFormat(format), DefaultTwoDigitBaseYear);} QDate QLocale::toDate(const QString &string, FormatType format, QCalendar cal)const{returntoDate(string,dateFormat(format), cal, DefaultTwoDigitBaseYear);} QDateTime QLocale::toDateTime(const QString &string, FormatType format)const{returntoDateTime(string,dateTimeFormat(format), DefaultTwoDigitBaseYear);} QDateTime QLocale::toDateTime(const QString &string, FormatType format, QCalendar cal)const{returntoDateTime(string,dateTimeFormat(format), cal, DefaultTwoDigitBaseYear);} QDate QLocale::toDate(const QString &string,const QString &format)const{returntoDate(string, format,QCalendar(), DefaultTwoDigitBaseYear);} QDate QLocale::toDate(const QString &string,const QString &format, QCalendar cal)const{returntoDate(string, format, cal, DefaultTwoDigitBaseYear);} QDateTime QLocale::toDateTime(const QString &string,const QString &format)const{returntoDateTime(string, format,QCalendar(), DefaultTwoDigitBaseYear);} QDateTime QLocale::toDateTime(const QString &string,const QString &format, QCalendar cal)const{returntoDateTime(string, format, cal, DefaultTwoDigitBaseYear);}#endif// datestring#include"qobject.h"voidqt_qFindChildren_helper(const QObject *parent,const QMetaObject &mo, QList<void*> *list,Qt::FindChildOptions options){qt_qFindChildren_helper(parent,QAnyStringView(), mo, list, options);}voidqt_qFindChildren_helper(const QObject *parent,const QString &name,const QMetaObject &mo, QList<void*> *list,Qt::FindChildOptions options){qt_qFindChildren_helper(parent, QAnyStringView{name}, mo, list, options);} QObject *qt_qFindChild_helper(const QObject *parent,const QString &name,const QMetaObject &mo,Qt::FindChildOptions options){returnqt_qFindChild_helper(parent, QAnyStringView{name}, mo, options);}voidQObject::moveToThread(QThread *targetThread){moveToThread(targetThread, QT6_CALL_NEW_OVERLOAD);}#include"qobjectdefs.h"boolQMetaObject::invokeMethodImpl(QObject *object,QtPrivate::QSlotObjectBase *slot,Qt::ConnectionType type,void*ret){returninvokeMethodImpl(object, slot, type,1, &ret,nullptr,nullptr);}#include"qstring.h" QString QString::left(qsizetype n)const{if(size_t(n) >=size_t(size()))return*this;returnQString((const QChar*) d.data(), n);} QString QString::right(qsizetype n)const{if(size_t(n) >=size_t(size()))return*this;returnQString(constData() +size() - n, n);} QString QString::mid(qsizetype position, qsizetype n)const{ qsizetype p = position; qsizetype l = n;using namespace QtPrivate;switch(QContainerImplHelper::mid(size(), &p, &l)) {caseQContainerImplHelper::Null:returnQString();caseQContainerImplHelper::Empty:returnQString(DataPointer::fromRawData(&_empty,0));caseQContainerImplHelper::Full:return*this;caseQContainerImplHelper::Subset:returnQString(constData() + p, l);}Q_UNREACHABLE_RETURN(QString());}#ifdef Q_CC_MSVC// previously inline methods, only needed for MSVC compat QString QString::first(qsizetype n)const{returnsliced(0, n); } QString QString::last(qsizetype n)const{returnsliced(size() - n, n); } QString QString::sliced(qsizetype pos)const{returnsliced(pos,size() - pos); } QString QString::sliced(qsizetype pos, qsizetype n)const{verify(pos, n);returnQString(begin() + pos, n); } QString QString::chopped(qsizetype n)const{returnsliced(0,size() - n); }#endif#include"qtimezone.h"boolQTimeZone::operator==(const QTimeZone &other)const{returncomparesEqual(*this, other);}boolQTimeZone::operator!=(const QTimeZone &other)const{return!comparesEqual(*this, other);}#include"qurl.h" QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode){returnQUrl::fromEncoded(QByteArrayView(input), mode);}// #include "qotherheader.h"// // implement removed functions from qotherheader.h// order sections alphabetically to reduce chances of merge conflicts#endif// QT_CORE_REMOVED_SINCE(6, 7)#if QT_CORE_REMOVED_SINCE(6, 8)#if QT_CONFIG(itemmodel)#include"qabstractitemmodel.h"boolQPersistentModelIndex::operator<(const QPersistentModelIndex &other)const noexcept {returnis_lt(compareThreeWay(*this, other));}boolQPersistentModelIndex::operator==(const QPersistentModelIndex &other)const noexcept {returncomparesEqual(*this, other);}boolQPersistentModelIndex::operator==(const QModelIndex &other)const noexcept {returncomparesEqual(*this, other);}boolQPersistentModelIndex::operator!=(const QModelIndex &other)const noexcept {return!comparesEqual(*this, other);}#endif// QT_CONFIG(itemmodel)#include"qbitarray.h"// inlined API#include"qbytearray.h"// inlined API QT_BEGIN_NAMESPACE namespace QtPrivate { Q_CORE_EXPORT qsizetype lastIndexOf(QByteArrayView haystack, qsizetype from,char needle) noexcept {returnlastIndexOf(haystack, from,uchar(needle));}} QT_END_NAMESPACE #include"qcborarray.h"// inlined API#include"qcbormap.h"// inlined API#include"qcborvalue.h"// inlined API#include"qdatastream.h"// inlined API QDataStream &QDataStream::operator<<(bool i){return(*this<<qint8(i));}#include"qdebug.h" Q_CORE_EXPORT voidqt_QMetaEnum_flagDebugOperator(QDebug &debug,size_t sizeofT,int value){qt_QMetaEnum_flagDebugOperator(debug, sizeofT,uint(value));}#include"qdir.h"// inlined APIboolQDir::operator==(const QDir &dir)const{returncomparesEqual(*this, dir);}#if QT_CONFIG(easingcurve)#include"qeasingcurve.h"boolQEasingCurve::operator==(const QEasingCurve &other)const{returncomparesEqual(*this, other);}#endif// QT_CONFIG(easingcurve)#include"qfileinfo.h"// inlined APIboolQFileInfo::operator==(const QFileInfo &fileinfo)const{returncomparesEqual(*this, fileinfo);}#if QT_CONFIG(itemmodel)#include"qitemselectionmodel.h"// inlined API#endif// itemmodel#include"qjsonarray.h"boolQJsonArray::operator==(const QJsonArray &other)const{returncomparesEqual(*this, other);}boolQJsonArray::operator!=(const QJsonArray &other)const{return!comparesEqual(*this, other);}#include"qjsondocument.h"boolQJsonDocument::operator==(const QJsonDocument &other)const{returncomparesEqual(*this, other);}#include"qjsonobject.h"boolQJsonObject::operator==(const QJsonObject &other)const{returncomparesEqual(*this, other);}boolQJsonObject::operator!=(const QJsonObject &other)const{return!comparesEqual(*this, other);}#include"qjsonvalue.h"boolQJsonValue::operator==(const QJsonValue &other)const{returncomparesEqual(*this, other);}boolQJsonValue::operator!=(const QJsonValue &other)const{return!comparesEqual(*this, other);}#include"qline.h"// inlined API#if QT_CONFIG(mimetype)#include"qmimetype.h"boolQMimeType::operator==(const QMimeType &other)const{returncomparesEqual(*this, other);}#endif// QT_CONFIG(mimetype)#include"qobject.h"#include"qnumeric.h"intQObject::startTimer(std::chrono::milliseconds time,Qt::TimerType timerType){using namespacestd::chrono;using ratio =std::ratio_divide<std::milli,std::nano>;nanoseconds::rep r;if(qMulOverflow<ratio::num>(time.count(), &r)) {qWarning("QObject::startTimer(std::chrono::milliseconds): ""'time' arg overflowed when converted to nanoseconds."); r =nanoseconds::max().count();}returnstartTimer(nanoseconds{r}, timerType);}#if QT_CONFIG(processenvironment)#include"qprocess.h"// inlined APIboolQProcessEnvironment::operator==(const QProcessEnvironment &other)const{returncomparesEqual(*this, other);}#endif// QT_CONFIG(processenvironment)#if QT_CONFIG(regularexpression)#include"qregularexpression.h"boolQRegularExpressionMatch::hasCaptured(QStringView name)const{returnhasCaptured(QAnyStringView(name));} QString QRegularExpressionMatch::captured(QStringView name)const{returncaptured(QAnyStringView(name));} QStringView QRegularExpressionMatch::capturedView(QStringView name)const{returncapturedView(QAnyStringView(name));} qsizetype QRegularExpressionMatch::capturedStart(QStringView name)const{returncapturedStart(QAnyStringView(name));} qsizetype QRegularExpressionMatch::capturedLength(QStringView name)const{returncapturedLength(QAnyStringView(name));} qsizetype QRegularExpressionMatch::capturedEnd(QStringView name)const{returncapturedEnd(QAnyStringView(name));}boolQRegularExpression::operator==(const QRegularExpression &other)const{returncomparesEqual(*this, other);}#endif// QT_CONFIG(regularexpression)#if QT_CONFIG(future)#include"qresultstore.h"boolQtPrivate::ResultIteratorBase::operator==(constQtPrivate::ResultIteratorBase &other)const{returncomparesEqual(*this, other);}boolQtPrivate::ResultIteratorBase::operator!=(constQtPrivate::ResultIteratorBase &other)const{return!comparesEqual(*this, other);}#endif// QT_CONFIG(future)#include"qstring.h"// inlined API#include"qstringconverter.h"QStringConverter::QStringConverter(const char*name, Flags f):QStringConverter(QAnyStringView{name}, f){}auto QStringConverter::encodingForName(const char*name) noexcept ->std::optional<Encoding>{returnencodingForName(QAnyStringView{name});}#if QT_CONFIG(thread)# include"qthreadpool.h"// inlined API#endif#include"qtimer.h"// inlined API// removed inline API (MSVC)voidQTimer::singleShot(std::chrono::milliseconds interval,Qt::TimerType timerType,const QObject *receiver,const char*member){singleShot(from_msecs(interval), timerType, receiver, member);}voidQTimer::singleShotImpl(std::chrono::milliseconds interval,Qt::TimerType timerType,const QObject *receiver,QtPrivate::QSlotObjectBase *slotObj){QtPrivate::SlotObjUniquePtr slot(slotObj);// don't leak if from_msecs throwsconstauto ns =from_msecs(interval);singleShotImpl(ns, timerType, receiver, slot.release());}#include"qurl.h"boolQUrl::operator<(const QUrl &url)const{returnis_lt(compareThreeWay(*this, url));}boolQUrl::operator==(const QUrl &url)const{returncomparesEqual(*this, url);}boolQUrl::operator!=(const QUrl &url)const{return!comparesEqual(*this, url);}#include"qurlquery.h"boolQUrlQuery::operator==(const QUrlQuery &other)const{returncomparesEqual(*this, other);}#include"qbasictimer.h"voidQBasicTimer::start(std::chrono::milliseconds duration, QObject *object){start(std::chrono::nanoseconds(duration), object);}voidQBasicTimer::start(std::chrono::milliseconds duration,Qt::TimerType timerType, QObject *obj){start(std::chrono::nanoseconds(duration), timerType, obj);}#include"quuid.h"boolQUuid::operator<(const QUuid &other)const noexcept {returnis_lt(compareThreeWay(*this, other));}boolQUuid::operator>(const QUuid &other)const noexcept {returnis_gt(compareThreeWay(*this, other));} QUuid QUuid::createUuidV3(const QUuid &ns,const QByteArray &baseData) noexcept {returncreateUuidV3(ns,qToByteArrayViewIgnoringNull(baseData));} QUuid QUuid::createUuidV5(const QUuid &ns,const QByteArray &baseData) noexcept {returncreateUuidV5(ns,qToByteArrayViewIgnoringNull(baseData));}#if QT_CONFIG(xmlstream)#include"qxmlstream.h"// inlined API#endif// QT_CONFIG(xmlstream)// #include "qotherheader.h"// // implement removed functions from qotherheader.h// order sections alphabetically to reduce chances of merge conflicts#endif// QT_CORE_REMOVED_SINCE(6, 8)#if QT_CORE_REMOVED_SINCE(6, 9)#include"qchar.h"// inlined API#include"qexceptionhandling.h" Q_NORETURN voidqTerminate() noexcept {std::terminate();}#include"qmetatype.h"boolQMetaType::isRegistered()const{returnisRegistered(QT6_CALL_NEW_OVERLOAD);}boolQMetaType::isValid()const{returnisValid(QT6_CALL_NEW_OVERLOAD);}#include"qmetaobject.h"const char*QMetaEnum::valueToKey(int value)const{returnvalueToKey(quint64(uint(value)));} QByteArray QMetaEnum::valueToKeys(int value)const{returnvalueToKeys(quint64(uint(value)));}#include"qmutex.h"#if QT_CONFIG(thread)voidQBasicMutex::destroyInternal(QMutexPrivate *d){destroyInternal(static_cast<void*>(d));}#endif#include"qobject.h"#ifdef Q_COMPILER_MANGLES_RETURN_TYPE QMetaObject *QObjectData::dynamicMetaObject()const{// ### keep in sync with the master version in qobject.cppreturn metaObject->toDynamicMetaObject(q_ptr);}#endif// Q_COMPILER_MANGLES_RETURN_TYPE#include"qstring.h" QString QString::arg(qlonglong a,int fieldWidth,int base, QChar fillChar)const{returnarg_impl(a, fieldWidth, base, fillChar);} QString QString::arg(qulonglong a,int fieldWidth,int base, QChar fillChar)const{returnarg_impl(a, fieldWidth, base, fillChar);} QString QString::arg(double a,int fieldWidth,char format,int precision, QChar fillChar)const{returnarg_impl(a, fieldWidth, format, precision, fillChar);} QString QString::arg(char a,int fieldWidth, QChar fillChar)const{returnarg_impl(QAnyStringView(a), fieldWidth, fillChar);} QString QString::arg(QChar a,int fieldWidth, QChar fillChar)const{returnarg_impl(QAnyStringView{a}, fieldWidth, fillChar);} QString QString::arg(const QString &a,int fieldWidth, QChar fillChar)const{returnarg_impl(qToAnyStringViewIgnoringNull(a), fieldWidth, fillChar);} QString QString::arg(QStringView a,int fieldWidth, QChar fillChar)const{returnarg_impl(QAnyStringView(a), fieldWidth, fillChar);} QString QString::arg(QLatin1StringView a,int fieldWidth, QChar fillChar)const{returnarg(QAnyStringView(a), fieldWidth, fillChar);} QString QtPrivate::argToQString(QStringView pattern,size_t n,const ArgBase **args){returnargToQString(QAnyStringView{pattern}, n, args);} QString QtPrivate::argToQString(QLatin1StringView pattern,size_t n,const ArgBase **args){returnargToQString(QAnyStringView{pattern}, n, args);}#include"quuid.h"boolQUuid::isNull()const noexcept {returnisNull(QT6_CALL_NEW_OVERLOAD);}QUuid::Variant QUuid::variant()const noexcept {returnvariant(QT6_CALL_NEW_OVERLOAD);}QUuid::Version QUuid::version()const noexcept {returnversion(QT6_CALL_NEW_OVERLOAD);}// #include "qotherheader.h"// // implement removed functions from qotherheader.h// order sections alphabetically to reduce chances of merge conflicts#endif// QT_CORE_REMOVED_SINCE(6, 9)#if QT_CORE_REMOVED_SINCE(6, 10)#include"qcborstreamwriter.h"// Q_WEAK_OVERLOAD added#include"qcoreapplication.h"#if QT_CONFIG(permissions)voidQCoreApplication::requestPermission(const QPermission &requestedPermission,QtPrivate::QSlotObjectBase *slotObjRaw,const QObject *context){returnrequestPermissionImpl(requestedPermission, slotObjRaw, context);}#endif#include"qdir.h"boolQDir::mkdir(const QString &dirName)const{returnmkdir(dirName,std::nullopt);}boolQDir::mkdir(const QString &dirName,QFile::Permissions permissions)const{returnmkdir(dirName,std::optional{permissions});}boolQDir::mkpath(const QString &dirPath)const{returnmkpath(dirPath,std::nullopt);}#if QT_CONFIG(future)#include"qfuture.h"// for ContinuationWrapper#include"qfutureinterface.h"voidQtPrivate::watchContinuationImpl(const QObject *context,QtPrivate::QSlotObjectBase *slotObj, QFutureInterfaceBase &fi){Q_ASSERT(context);Q_ASSERT(slotObj);auto slot =QtPrivate::SlotObjUniquePtr(slotObj);// That is now a double-inderection, because the setContinuation() overload// also uses QSlotObjectBase approach. But that's a solution for backwards// compatibility, so should be fine.// We pass a default-constructed QVariant() and an Unknown type, because// that's effectively the same as passing a nullptr continuationData, and// that's what the old code was doing. fi.setContinuation(context,QtPrivate::ContinuationWrapper([slot =std::move(slot)](){void*args[] = {nullptr};// for `void` return value slot->call(nullptr, args);}),QVariant(),QFutureInterfaceBase::ContinuationType::Unknown);}voidQFutureInterfaceBase::setContinuation(std::function<void(const QFutureInterfaceBase &)> func){setContinuation(std::move(func),nullptr);}voidQFutureInterfaceBase::setContinuation(std::function<void(const QFutureInterfaceBase &)> func, QFutureInterfaceBasePrivate *continuationFutureData){// Backwards compatibility - the continuation data was used for// then-continuationssetContinuation(std::move(func), continuationFutureData,ContinuationType::Then);}#endif// QT_CONFIG(future)#include"qlogging.h" QNoDebug QMessageLogger::noDebug()const noexcept {returnQNoDebug();}#include"qstring.h"// inlined API// #include "qotherheader.h"// // implement removed functions from qotherheader.h// order sections alphabetically to reduce chances of merge conflicts#endif// QT_CORE_REMOVED_SINCE(6, 10)
|