Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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// Qt-Security score:significant reason:default
4
5#define QT_CORE_BUILD_REMOVED_API
6
7#include "qglobal.h"
8
9QT_USE_NAMESPACE
10
11#if QT_CORE_REMOVED_SINCE(6, 1)
12
13#include "qmetatype.h"
14
15int QMetaType::id() const
16{
17 return registerHelper();
18}
19
20#endif // QT_CORE_REMOVED_SINCE(6, 1)
21
22#if QT_CORE_REMOVED_SINCE(6, 2)
23
24#include "qbindingstorage.h"
25
26void QBindingStorage::maybeUpdateBindingAndRegister_helper(const QUntypedPropertyData *data) const
27{
28 registerDependency_helper(data);
29}
30
31#endif // QT_CORE_REMOVED_SINCE(6, 2)
32
33#if QT_CORE_REMOVED_SINCE(6, 3)
34
35#include "qbytearraymatcher.h"
36
37# if QT_POINTER_SIZE != 4
38
39int QStaticByteArrayMatcherBase::indexOfIn(const char *h, uint hl, const char *n, int nl, int from) const noexcept
40{
41 qsizetype r = indexOfIn(h, size_t(hl), n, qsizetype(nl), qsizetype(from));
42 Q_ASSERT(r == int(r));
43 return r;
44}
45
46# endif // QT_POINTER_SIZE != 4
47
48qsizetype QByteArrayMatcher::indexIn(const QByteArray &ba, qsizetype from) const
49{
50 return indexIn(QByteArrayView{ba}, from); // ba.isNull() may be significant, so don't ignore it!
51}
52
53#include "tools/qcryptographichash.h"
54
55void QCryptographicHash::addData(const QByteArray &data)
56{
57 addData(QByteArrayView{data});
58}
59
60QByteArray QCryptographicHash::hash(const QByteArray &data, Algorithm method)
61{
62 return hash(QByteArrayView{data}, method);
63}
64
65#include "qdatastream.h"
66
67# ifndef QT_NO_DATASTREAM
68# include "qfloat16.h"
69
70QDataStream &QDataStream::operator>>(qfloat16 &f)
71{
72 return *this >> reinterpret_cast<qint16&>(f);
73}
74
75QDataStream &QDataStream::operator<<(qfloat16 f)
76{
77 return *this << reinterpret_cast<qint16&>(f);
78}
79
80# endif
81
82#include "quuid.h"
83
84QUuid::QUuid(const QString &text)
85 : QUuid{qToAnyStringViewIgnoringNull(text)}
86{
87}
88
89QUuid::QUuid(const char *text)
90 : QUuid{QAnyStringView(text)}
91{
92}
93
94QUuid::QUuid(const QByteArray &text)
95 : QUuid{qToAnyStringViewIgnoringNull(text)}
96{
97}
98
99QUuid QUuid::fromString(QStringView string) noexcept
100{
101 return fromString(QAnyStringView{string});
102}
103
104QUuid QUuid::fromString(QLatin1StringView string) noexcept
105{
106 return fromString(QAnyStringView{string});
107}
108
109QUuid QUuid::fromRfc4122(const QByteArray &bytes)
110{
111 return fromRfc4122(qToByteArrayViewIgnoringNull(bytes));
112}
113
114#include "qbytearraylist.h"
115
116# if QT_POINTER_SIZE != 4
117QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char *sep, int seplen)
118{
119 return QByteArrayList_join(that, sep, qsizetype(seplen));
120}
121# endif
122
123#include "qlocale.h"
124
125QString QLocale::languageToCode(Language language)
126{
127 return languageToCode(language, QLocale::AnyLanguageCode);
128}
129
130QLocale::Language QLocale::codeToLanguage(QStringView languageCode) noexcept
131{
132 return codeToLanguage(languageCode, QLocale::AnyLanguageCode);
133}
134
135#include "qoperatingsystemversion.h"
136
137QString QOperatingSystemVersion::name() const
138{
139 return QOperatingSystemVersionBase::name();
140}
141
142int QOperatingSystemVersion::compare(const QOperatingSystemVersion &v1,
143 const QOperatingSystemVersion &v2)
144{
145 return QOperatingSystemVersionBase::compare(v1, v2);
146}
147
148#include "qurl.h"
149
150QString QUrl::fromAce(const QByteArray &domain)
151{
152 return fromAce(domain, {});
153}
154
155QByteArray QUrl::toAce(const QString &domain)
156{
157 return toAce(domain, {});
158}
159
160#endif // QT_CORE_REMOVED_SINCE(6, 3)
161
162#if QT_CORE_REMOVED_SINCE(6, 4)
163
164#include "qbytearray.h" // uses QT_CORE_INLINE_SINCE
165
166#include "qcalendar.h"
167
168QCalendar::QCalendar(QStringView name)
169 : QCalendar(QAnyStringView{name}) {}
170
171QCalendar::QCalendar(QLatin1StringView name)
172 : QCalendar(QAnyStringView{name}) {}
173
174#include "qcollator.h" // inline function compare(ptr, n, ptr, n) (for MSVC)
175
176#include "qhashfunctions.h"
177
178size_t qHash(const QByteArray &key, size_t seed) noexcept
179{
180 return qHashBits(key.constData(), size_t(key.size()), seed);
181}
182
183size_t qHash(const QByteArrayView &key, size_t seed) noexcept
184{
185 return qHashBits(key.constData(), size_t(key.size()), seed);
186}
187
188#include "qobject.h"
189
190void QObject::setObjectName(const QString &name)
191{
192 setObjectName<void>(name);
193}
194
195#include "qlocale.h" // uses QT_CORE_INLINE_SINCE
196
197#if QT_CONFIG(settings)
198
199#include "qsettings.h"
200
201void QSettings::beginGroup(const QString &prefix)
202{
203 beginGroup(qToAnyStringViewIgnoringNull(prefix));
204}
205
206int QSettings::beginReadArray(const QString &prefix)
207{
208 return beginReadArray(qToAnyStringViewIgnoringNull(prefix));
209}
210
211void QSettings::beginWriteArray(const QString &prefix, int size)
212{
213 beginWriteArray(qToAnyStringViewIgnoringNull(prefix), size);
214}
215
216void QSettings::setValue(const QString &key, const QVariant &value)
217{
218 setValue(qToAnyStringViewIgnoringNull(key), value);
219}
220
221void QSettings::remove(const QString &key)
222{
223 remove(qToAnyStringViewIgnoringNull(key));
224}
225
226bool QSettings::contains(const QString &key) const
227{
228 return contains(qToAnyStringViewIgnoringNull(key));
229}
230
231QVariant QSettings::value(const QString &key, const QVariant &defaultValue) const
232{
233 return value(qToAnyStringViewIgnoringNull(key), defaultValue);
234}
235
236QVariant QSettings::value(const QString &key) const
237{
238 return value(qToAnyStringViewIgnoringNull(key));
239}
240
241#endif // QT_CONFIG(settings)
242
243#include "qversionnumber.h"
244
245QT_WARNING_PUSH
246QT_WARNING_DISABLE_DEPRECATED
247
248QVersionNumber QVersionNumber::fromString(const QString &string, int *suffixIndex)
249{
250 return fromString(qToAnyStringViewIgnoringNull(string), suffixIndex);
251}
252
253QVersionNumber QVersionNumber::fromString(QStringView string, int *suffixIndex)
254{
255 return fromString(QAnyStringView{string}, suffixIndex);
256}
257
258QVersionNumber QVersionNumber::fromString(QLatin1StringView string, int *suffixIndex)
259{
260 return fromString(QAnyStringView{string}, suffixIndex);
261}
262
263QT_WARNING_POP
264
265// #include <qotherheader.h>
266// // implement removed functions from qotherheader.h
267// order sections alphabetically to reduce chances of merge conflicts
268
269#endif // QT_CORE_REMOVED_SINCE(6, 4)
270
271#if QT_CORE_REMOVED_SINCE(6, 5)
272
273#include "qbasictimer.h" // inlined API
274
275#include "qbuffer.h" // inline removed API
276
277#include "qdir.h"
278
279uint QDir::count() const
280{
281 return uint(count(QT6_CALL_NEW_OVERLOAD));
282}
283
284#if QT_POINTER_SIZE != 4
285QString QDir::operator[](int i) const
286{
287 return operator[](qsizetype{i});
288}
289#endif
290
291#include "qtenvironmentvariables.h"
292
293bool qputenv(const char *varName, const QByteArray &value)
294{
295 return qputenv(varName, qToByteArrayViewIgnoringNull(value));
296}
297
298#include "qmetatype.h"
299
300int QMetaType::idHelper() const
301{
302 Q_ASSERT(d_ptr);
303 return registerHelper(d_ptr);
304}
305
306#if QT_CONFIG(sharedmemory)
307#include "qsharedmemory.h"
308
309void QSharedMemory::setNativeKey(const QString &key)
310{
311 setNativeKey(key, QNativeIpcKey::legacyDefaultTypeForOs());
312}
313#endif
314
315#include "qvariant.h"
316
317// these implementations aren't as efficient as they used to be prior to
318// replacement, but there's no way to call the ambiguous overload
319QVariant::QVariant(const QUuid &uuid) : QVariant(QVariant::fromValue(uuid)) {}
320#include "qline.h"
321#include "qpoint.h"
322#include "qrect.h"
323#include "qsize.h"
324QVariant::QVariant(const QPoint &pt) : QVariant(QVariant::fromValue(pt)) {}
325QVariant::QVariant(const QPointF &pt) : QVariant(QVariant::fromValue(pt)) {}
326QVariant::QVariant(const QRect &r) : QVariant(QVariant::fromValue(r)) {}
327QVariant::QVariant(const QRectF &r) : QVariant(QVariant::fromValue(r)) {}
328QVariant::QVariant(const QLine &l) : QVariant(QVariant::fromValue(l)) {}
329QVariant::QVariant(const QLineF &l) : QVariant(QVariant::fromValue(l)) {}
330QVariant::QVariant(const QSize &s) : QVariant(QVariant::fromValue(s)) {}
331QVariant::QVariant(const QSizeF &s) : QVariant(QVariant::fromValue(s)) {}
332
333#if QT_CONFIG(xmlstreamreader)
334
335#include "qxmlstream.h"
336
337QXmlStreamReader::QXmlStreamReader(const QByteArray &data)
338 : QXmlStreamReader(data, PrivateConstructorTag{})
339{
340}
341
342QXmlStreamReader::QXmlStreamReader(const QString &data)
343 : QXmlStreamReader(qToAnyStringViewIgnoringNull(data))
344{
345}
346
347QXmlStreamReader::QXmlStreamReader(const char *data)
348 : QXmlStreamReader(QAnyStringView(data))
349{
350}
351
352void QXmlStreamReader::addData(const QByteArray &data)
353{
354 addData<>(data);
355}
356void QXmlStreamReader::addData(const QString &data)
357{
358 addData(qToAnyStringViewIgnoringNull(data));
359}
360
361void QXmlStreamReader::addData(const char *data)
362{
363 addData(QAnyStringView(data));
364}
365
366#endif // QT_CONFIG(xmlstreamreader)
367
368#if QT_CONFIG(xmlstreamwriter)
369
370#include "qxmlstream.h"
371
372void QXmlStreamWriter::writeAttribute(const QString &qualifiedName, const QString &value)
373{
374 writeAttribute(qToAnyStringViewIgnoringNull(qualifiedName),
375 qToAnyStringViewIgnoringNull(value));
376}
377
378void QXmlStreamWriter::writeAttribute(const QString &namespaceUri, const QString &name, const QString &value)
379{
380 writeAttribute(qToAnyStringViewIgnoringNull(namespaceUri),
381 qToAnyStringViewIgnoringNull(name),
382 qToAnyStringViewIgnoringNull(value));
383}
384
385void QXmlStreamWriter::writeCDATA(const QString &text)
386{
387 writeCDATA(qToAnyStringViewIgnoringNull(text));
388}
389
390void QXmlStreamWriter::writeCharacters(const QString &text)
391{
392 writeCharacters(qToAnyStringViewIgnoringNull(text));
393}
394
395void QXmlStreamWriter::writeComment(const QString &text)
396{
397 writeComment(qToAnyStringViewIgnoringNull(text));
398}
399
400void QXmlStreamWriter::writeDTD(const QString &dtd)
401{
402 writeDTD(qToAnyStringViewIgnoringNull(dtd));
403}
404
405void QXmlStreamWriter::writeEmptyElement(const QString &qualifiedName)
406{
407 writeEmptyElement(qToAnyStringViewIgnoringNull(qualifiedName));
408}
409
410void QXmlStreamWriter::writeEmptyElement(const QString &namespaceUri, const QString &name)
411{
412 writeEmptyElement(qToAnyStringViewIgnoringNull(namespaceUri),
413 qToAnyStringViewIgnoringNull(name));
414}
415
416void QXmlStreamWriter::writeTextElement(const QString &qualifiedName, const QString &text)
417{
418 writeTextElement(qToAnyStringViewIgnoringNull(qualifiedName),
419 qToAnyStringViewIgnoringNull(text));
420}
421
422void QXmlStreamWriter::writeTextElement(const QString &namespaceUri, const QString &name, const QString &text)
423{
424 writeTextElement(qToAnyStringViewIgnoringNull(namespaceUri),
425 qToAnyStringViewIgnoringNull(name),
426 qToAnyStringViewIgnoringNull(text));
427}
428
429void QXmlStreamWriter::writeEntityReference(const QString &name)
430{
431 writeEntityReference(qToAnyStringViewIgnoringNull(name));
432}
433
434void QXmlStreamWriter::writeNamespace(const QString &namespaceUri, const QString &prefix)
435{
436 writeNamespace(qToAnyStringViewIgnoringNull(namespaceUri),
437 qToAnyStringViewIgnoringNull(prefix));
438}
439
440void QXmlStreamWriter::writeDefaultNamespace(const QString &namespaceUri)
441{
442 writeDefaultNamespace(qToAnyStringViewIgnoringNull(namespaceUri));
443}
444
445void QXmlStreamWriter::writeProcessingInstruction(const QString &target, const QString &data)
446{
447 writeProcessingInstruction(qToAnyStringViewIgnoringNull(target),
448 qToAnyStringViewIgnoringNull(data));
449}
450
451void QXmlStreamWriter::writeStartDocument(const QString &version)
452{
453 writeStartDocument(qToAnyStringViewIgnoringNull(version));
454}
455
456void QXmlStreamWriter::writeStartDocument(const QString &version, bool standalone)
457{
458 writeStartDocument(qToAnyStringViewIgnoringNull(version),
459 standalone);
460}
461
462void QXmlStreamWriter::writeStartElement(const QString &qualifiedName)
463{
464 writeStartElement(qToAnyStringViewIgnoringNull(qualifiedName));
465}
466
467void QXmlStreamWriter::writeStartElement(const QString &namespaceUri, const QString &name)
468{
469 writeStartElement(qToAnyStringViewIgnoringNull(namespaceUri),
470 qToAnyStringViewIgnoringNull(name));
471}
472
473#endif // QT_CONFIG(xmlstreamwriter)
474
475// inlined API
476#include "qfloat16.h"
477#include "qstring.h"
478
479// #include "qotherheader.h"
480// // implement removed functions from qotherheader.h
481// order sections alphabetically to reduce chances of merge conflicts
482
483#endif // QT_CORE_REMOVED_SINCE(6, 5)
484
485#if QT_CORE_REMOVED_SINCE(6, 6)
486
487#include "qmessageauthenticationcode.h"
488
489QMessageAuthenticationCode::QMessageAuthenticationCode(QCryptographicHash::Algorithm method,
490 const QByteArray &key)
491 : QMessageAuthenticationCode(method, qToByteArrayViewIgnoringNull(key)) {}
492
493void QMessageAuthenticationCode::setKey(const QByteArray &key)
494{
495 setKey(qToByteArrayViewIgnoringNull(key));
496}
497
498void QMessageAuthenticationCode::addData(const QByteArray &data)
499{
500 addData(qToByteArrayViewIgnoringNull(data));
501}
502
503QByteArray QMessageAuthenticationCode::hash(const QByteArray &msg, const QByteArray &key,
504 QCryptographicHash::Algorithm method)
505{
506 return hash(qToByteArrayViewIgnoringNull(msg),
507 qToByteArrayViewIgnoringNull(key), method);
508}
509
510#include "qobject.h" // inlined API
511
512#include "qrunnable.h"
513
514QRunnable *QRunnable::create(std::function<void()> functionToRun)
515{
516 return QRunnable::create<std::function<void()>>(std::move(functionToRun));
517}
518
519#include "qstring.h"
520
521qsizetype QString::toUcs4_helper(const ushort *uc, qsizetype length, uint *out)
522{
523 return toUcs4_helper(reinterpret_cast<const char16_t *>(uc), length,
524 reinterpret_cast<char32_t *>(out));
525}
526
527#if QT_CONFIG(thread)
528#include "qreadwritelock.h"
529
530bool QReadWriteLock::tryLockForRead()
531{
532 return tryLockForRead(0);
533}
534
535bool QReadWriteLock::tryLockForWrite()
536{
537 return tryLockForWrite(0);
538}
539
540#include "qthreadpool.h"
541#include "private/qthreadpool_p.h"
542
543void QThreadPool::start(std::function<void()> functionToRun, int priority)
544{
545 if (!functionToRun)
546 return;
547 start(QRunnable::create(std::move(functionToRun)), priority);
548}
549
550bool QThreadPool::tryStart(std::function<void()> functionToRun)
551{
552 if (!functionToRun)
553 return false;
554
555 Q_D(QThreadPool);
556 QMutexLocker locker(&d->mutex);
557 if (!d->allThreads.isEmpty() && d->areAllThreadsActive())
558 return false;
559
560 QRunnable *runnable = QRunnable::create(std::move(functionToRun));
561 if (d->tryStart(runnable))
562 return true;
563 delete runnable;
564 return false;
565}
566
567void QThreadPool::startOnReservedThread(std::function<void()> functionToRun)
568{
569 if (!functionToRun)
570 return releaseThread();
571
572 startOnReservedThread(QRunnable::create(std::move(functionToRun)));
573}
574
575#endif // QT_CONFIG(thread)
576
577#if QT_CONFIG(xmlstream)
578
579#include "qxmlstream.h"
580
581QStringView QXmlStreamAttributes::value(const QString &namespaceUri, const QString &name) const
582{
583 return value(qToAnyStringViewIgnoringNull(namespaceUri), qToAnyStringViewIgnoringNull(name));
584}
585
586QStringView QXmlStreamAttributes::value(const QString &namespaceUri, QLatin1StringView name) const
587{
588 return value(qToAnyStringViewIgnoringNull(namespaceUri), QAnyStringView(name));
589}
590
591QStringView QXmlStreamAttributes::value(QLatin1StringView namespaceUri, QLatin1StringView name) const
592{
593 return value(QAnyStringView(namespaceUri), QAnyStringView(name));
594}
595
596QStringView QXmlStreamAttributes::value(const QString &qualifiedName) const
597{
598 return value(qToAnyStringViewIgnoringNull(qualifiedName));
599}
600
601QStringView QXmlStreamAttributes::value(QLatin1StringView qualifiedName) const
602{
603 return value(QAnyStringView(qualifiedName));
604}
605
606#endif // xmlstream
607
608// inlined API
609#if QT_CONFIG(thread)
610#include "qmutex.h"
611#include "qreadwritelock.h"
612#include "qsemaphore.h"
613#endif
614
615// #include "qotherheader.h"
616// // implement removed functions from qotherheader.h
617// order sections alphabetically to reduce chances of merge conflicts
618
619#endif // QT_CORE_REMOVED_SINCE(6, 6)
620
621#if QT_CORE_REMOVED_SINCE(6, 7)
622
623#include "qbitarray.h"
624
625QBitArray QBitArray::operator~() const
626{
627 return QBitArray(*this).inverted_inplace();
628}
629
630#include "qbytearray.h"
631
632QByteArray QByteArray::left(qsizetype len) const
633{
634 if (len >= size())
635 return *this;
636 if (len < 0)
637 len = 0;
638 return QByteArray(data(), len);
639}
640
641QByteArray QByteArray::right(qsizetype len) const
642{
643 if (len >= size())
644 return *this;
645 if (len < 0)
646 len = 0;
647 return QByteArray(end() - len, len);
648}
649
650QByteArray QByteArray::mid(qsizetype pos, qsizetype len) const
651{
652 qsizetype p = pos;
653 qsizetype l = len;
654 using namespace QtPrivate;
655 switch (QContainerImplHelper::mid(size(), &p, &l)) {
656 case QContainerImplHelper::Null:
657 return QByteArray();
658 case QContainerImplHelper::Empty:
659 {
660 return QByteArray(DataPointer::fromRawData(&_empty, 0));
661 }
662 case QContainerImplHelper::Full:
663 return *this;
664 case QContainerImplHelper::Subset:
665 return QByteArray(d.data() + p, l);
666 }
667 Q_UNREACHABLE_RETURN(QByteArray());
668}
669
670#ifdef Q_CC_MSVC
671// previously inline methods, only needed for MSVC compat
672QByteArray QByteArray::first(qsizetype n) const
673{ return sliced(0, n); }
674QByteArray QByteArray::last(qsizetype n) const
675{ return sliced(size() - n, n); }
676QByteArray QByteArray::sliced(qsizetype pos) const
677{ return sliced(pos, size() - pos); }
678QByteArray QByteArray::sliced(qsizetype pos, qsizetype n) const
679{ verify(pos, n); return QByteArray(d.data() + pos, n); }
680QByteArray QByteArray::chopped(qsizetype n) const
681{ return sliced(0, size() - n); }
682#endif
683
684#include "qcborstreamreader.h"
685
686QCborError QCborStreamReader::lastError()
687{
688 return std::as_const(*this).lastError();
689}
690
691#include "qdatetime.h" // also inlined API
692
693QDateTime::QDateTime(QDate date, QTime time, const QTimeZone &timeZone)
694 : QDateTime(date, time, timeZone, TransitionResolution::LegacyBehavior) {}
695QDateTime::QDateTime(QDate date, QTime time)
696 : QDateTime(date, time, TransitionResolution::LegacyBehavior) {}
697void QDateTime::setDate(QDate date) { setDate(date, TransitionResolution::LegacyBehavior); }
698void QDateTime::setTime(QTime time) { setTime(time, TransitionResolution::LegacyBehavior); }
699void QDateTime::setTimeZone(const QTimeZone &toZone)
700{
701 setTimeZone(toZone, TransitionResolution::LegacyBehavior);
702}
703
704bool QDateTime::precedes(const QDateTime &other) const
705{
706 return compareThreeWay(*this, other) < 0;
707}
708
709#include "qdatastream.h"
710
711QDataStream &QDataStream::writeBytes(const char *s, uint len)
712{
713 return writeBytes(s, qint64(len));
714}
715
716int QDataStream::skipRawData(int len)
717{
718 return int(skipRawData(qint64(len)));
719}
720
721int QDataStream::readBlock(char *data, int len)
722{
723 return int(readBlock(data, qint64(len)));
724}
725
726int QDataStream::readRawData(char *s, int len)
727{
728 return int(readRawData(s, qint64(len)));
729}
730
731int QDataStream::writeRawData(const char *s, int len)
732{
733 return writeRawData(s, qint64(len));
734}
735
736#if defined(Q_OS_ANDROID)
737
738#include "qjniobject.h"
739
740jclass QJniObject::loadClass(const QByteArray &className, JNIEnv *env, bool /*binEncoded*/)
741{
742 return QJniObject::loadClass(className, env);
743}
744
745QByteArray QJniObject::toBinaryEncClassName(const QByteArray &className)
746{
747 return QByteArray(className).replace('/', '.');
748}
749
750void QJniObject::callVoidMethodV(JNIEnv *env, jmethodID id, va_list args) const
751{
752 env->CallVoidMethodV(javaObject(), id, args);
753}
754
755#endif // Q_OS_ANDROID
756
757#include "qlocale.h"
758#include "qlist.h"
759
760QStringList QLocale::uiLanguages() const
761{
762 return uiLanguages(TagSeparator::Dash);
763}
764
765QString QLocale::name() const
766{
767 return name(TagSeparator::Underscore);
768}
769
770QString QLocale::bcp47Name() const
771{
772 return bcp47Name(TagSeparator::Dash);
773}
774
775#if QT_CONFIG(datestring)
776
777QDate QLocale::toDate(const QString &string, FormatType format) const
778{
779 return toDate(string, dateFormat(format), DefaultTwoDigitBaseYear);
780}
781
782QDate QLocale::toDate(const QString &string, FormatType format, QCalendar cal) const
783{
784 return toDate(string, dateFormat(format), cal, DefaultTwoDigitBaseYear);
785}
786
787QDateTime QLocale::toDateTime(const QString &string, FormatType format) const
788{
789 return toDateTime(string, dateTimeFormat(format), DefaultTwoDigitBaseYear);
790}
791
792QDateTime QLocale::toDateTime(const QString &string, FormatType format, QCalendar cal) const
793{
794 return toDateTime(string, dateTimeFormat(format), cal, DefaultTwoDigitBaseYear);
795}
796
797QDate QLocale::toDate(const QString &string, const QString &format) const
798{
799 return toDate(string, format, QCalendar(), DefaultTwoDigitBaseYear);
800}
801
802QDate QLocale::toDate(const QString &string, const QString &format, QCalendar cal) const
803{
804 return toDate(string, format, cal, DefaultTwoDigitBaseYear);
805}
806
807QDateTime QLocale::toDateTime(const QString &string, const QString &format) const
808{
809 return toDateTime(string, format, QCalendar(), DefaultTwoDigitBaseYear);
810}
811
812QDateTime QLocale::toDateTime(const QString &string, const QString &format, QCalendar cal) const
813{
814 return toDateTime(string, format, cal, DefaultTwoDigitBaseYear);
815}
816
817#endif // datestring
818
819#include "qobject.h"
820
821void qt_qFindChildren_helper(const QObject *parent, const QMetaObject &mo,
822 QList<void*> *list, Qt::FindChildOptions options)
823{
824 qt_qFindChildren_helper(parent, QAnyStringView(), mo, list, options);
825}
826
827void qt_qFindChildren_helper(const QObject *parent, const QString &name, const QMetaObject &mo,
828 QList<void*> *list, Qt::FindChildOptions options)
829{
830 qt_qFindChildren_helper(parent, QAnyStringView{name}, mo, list, options);
831}
832
833QObject *qt_qFindChild_helper(const QObject *parent, const QString &name, const QMetaObject &mo,
834 Qt::FindChildOptions options)
835{
836 return qt_qFindChild_helper(parent, QAnyStringView{name}, mo, options);
837}
838
839void QObject::moveToThread(QThread *targetThread)
840{
841 moveToThread(targetThread, QT6_CALL_NEW_OVERLOAD);
842}
843
844#include "qobjectdefs.h"
845
846bool QMetaObject::invokeMethodImpl(QObject *object, QtPrivate::QSlotObjectBase *slot, Qt::ConnectionType type, void *ret)
847{
848 return invokeMethodImpl(object, slot, type, 1, &ret, nullptr, nullptr);
849}
850
851#include "qstring.h"
852
853QString QString::left(qsizetype n) const
854{
855 if (size_t(n) >= size_t(size()))
856 return *this;
857 return QString((const QChar*) d.data(), n);
858}
859
860QString QString::right(qsizetype n) const
861{
862 if (size_t(n) >= size_t(size()))
863 return *this;
864 return QString(constData() + size() - n, n);
865}
866
867QString QString::mid(qsizetype position, qsizetype n) const
868{
869 qsizetype p = position;
870 qsizetype l = n;
871 using namespace QtPrivate;
872 switch (QContainerImplHelper::mid(size(), &p, &l)) {
873 case QContainerImplHelper::Null:
874 return QString();
875 case QContainerImplHelper::Empty:
876 return QString(DataPointer::fromRawData(&_empty, 0));
877 case QContainerImplHelper::Full:
878 return *this;
879 case QContainerImplHelper::Subset:
880 return QString(constData() + p, l);
881 }
882 Q_UNREACHABLE_RETURN(QString());
883}
884
885#ifdef Q_CC_MSVC
886// previously inline methods, only needed for MSVC compat
887QString QString::first(qsizetype n) const
888{ return sliced(0, n); }
889QString QString::last(qsizetype n) const
890{ return sliced(size() - n, n); }
891QString QString::sliced(qsizetype pos) const
892{ return sliced(pos, size() - pos); }
893QString QString::sliced(qsizetype pos, qsizetype n) const
894{ verify(pos, n); return QString(begin() + pos, n); }
895QString QString::chopped(qsizetype n) const
896{ return sliced(0, size() - n); }
897#endif
898
899#include "qtimezone.h"
900
901bool QTimeZone::operator==(const QTimeZone &other) const
902{
903 return comparesEqual(*this, other);
904}
905
906bool QTimeZone::operator!=(const QTimeZone &other) const
907{
908 return !comparesEqual(*this, other);
909}
910
911#include "qurl.h"
912
913QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode)
914{
915 return QUrl::fromEncoded(QByteArrayView(input), mode);
916}
917
918
919// #include "qotherheader.h"
920// // implement removed functions from qotherheader.h
921// order sections alphabetically to reduce chances of merge conflicts
922
923#endif // QT_CORE_REMOVED_SINCE(6, 7)
924
925#if QT_CORE_REMOVED_SINCE(6, 8)
926
927#if QT_CONFIG(itemmodel)
928#include "qabstractitemmodel.h"
929
930bool QPersistentModelIndex::operator<(const QPersistentModelIndex &other) const noexcept
931{
932 return is_lt(compareThreeWay(*this, other));
933}
934
935bool QPersistentModelIndex::operator==(const QPersistentModelIndex &other) const noexcept
936{
937 return comparesEqual(*this, other);
938}
939
940bool QPersistentModelIndex::operator==(const QModelIndex &other) const noexcept
941{
942 return comparesEqual(*this, other);
943}
944
945bool QPersistentModelIndex::operator!=(const QModelIndex &other) const noexcept
946{
947 return !comparesEqual(*this, other);
948}
949
950#endif // QT_CONFIG(itemmodel)
951
952#include "qbitarray.h" // inlined API
953
954#include "qbytearray.h" // inlined API
955
956QT_BEGIN_NAMESPACE
957namespace QtPrivate {
958Q_CORE_EXPORT qsizetype lastIndexOf(QByteArrayView haystack, qsizetype from, char needle) noexcept
959{
960 return lastIndexOf(haystack, from, uchar(needle));
961}
962}
963QT_END_NAMESPACE
964
965#include "qcborarray.h" // inlined API
966
967#include "qcbormap.h" // inlined API
968
969#include "qcborvalue.h" // inlined API
970
971#include "qdatastream.h" // inlined API
972
973QDataStream &QDataStream::operator<<(bool i)
974{
975 return (*this << qint8(i));
976}
977
978#include "qdebug.h"
979
980Q_CORE_EXPORT void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, int value)
981{
982 qt_QMetaEnum_flagDebugOperator(debug, sizeofT, uint(value));
983}
984
985#include "qdir.h" // inlined API
986
987bool QDir::operator==(const QDir &dir) const
988{
989 return comparesEqual(*this, dir);
990}
991
992#if QT_CONFIG(easingcurve)
993#include "qeasingcurve.h"
994
995bool QEasingCurve::operator==(const QEasingCurve &other) const
996{
997 return comparesEqual(*this, other);
998}
999#endif // QT_CONFIG(easingcurve)
1000
1001#include "qfileinfo.h" // inlined API
1002
1003bool QFileInfo::operator==(const QFileInfo &fileinfo) const
1004{
1005 return comparesEqual(*this, fileinfo);
1006}
1007
1008#if QT_CONFIG(itemmodel)
1009#include "qitemselectionmodel.h" // inlined API
1010#endif // itemmodel
1011
1012#include "qjsonarray.h"
1013
1014bool QJsonArray::operator==(const QJsonArray &other) const
1015{
1016 return comparesEqual(*this, other);
1017}
1018
1019bool QJsonArray::operator!=(const QJsonArray &other) const
1020{
1021 return !comparesEqual(*this, other);
1022}
1023
1024#include "qjsondocument.h"
1025
1026bool QJsonDocument::operator==(const QJsonDocument &other) const
1027{
1028 return comparesEqual(*this, other);
1029}
1030
1031#include "qjsonobject.h"
1032
1033bool QJsonObject::operator==(const QJsonObject &other) const
1034{
1035 return comparesEqual(*this, other);
1036}
1037
1038
1039bool QJsonObject::operator!=(const QJsonObject &other) const
1040{
1041 return !comparesEqual(*this, other);
1042}
1043
1044#include "qjsonvalue.h"
1045
1046bool QJsonValue::operator==(const QJsonValue &other) const
1047{
1048 return comparesEqual(*this, other);
1049}
1050
1051bool QJsonValue::operator!=(const QJsonValue &other) const
1052{
1053 return !comparesEqual(*this, other);
1054}
1055
1056#include "qline.h" // inlined API
1057
1058#if QT_CONFIG(mimetype)
1059#include "qmimetype.h"
1060
1061bool QMimeType::operator==(const QMimeType &other) const
1062{
1063 return comparesEqual(*this, other);
1064}
1065#endif // QT_CONFIG(mimetype)
1066
1067#include "qobject.h"
1068#include "qnumeric.h"
1069
1070int QObject::startTimer(std::chrono::milliseconds time, Qt::TimerType timerType)
1071{
1072 using namespace std::chrono;
1073 using ratio = std::ratio_divide<std::milli, std::nano>;
1074 nanoseconds::rep r;
1075 if (qMulOverflow<ratio::num>(time.count(), &r)) {
1076 qWarning("QObject::startTimer(std::chrono::milliseconds): "
1077 "'time' arg overflowed when converted to nanoseconds.");
1078 r = nanoseconds::max().count();
1079 }
1080 return startTimer(nanoseconds{r}, timerType);
1081}
1082
1083#if QT_CONFIG(processenvironment)
1084#include "qprocess.h" // inlined API
1085
1086bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const
1087{
1088 return comparesEqual(*this, other);
1089}
1090#endif // QT_CONFIG(processenvironment)
1091
1092#if QT_CONFIG(regularexpression)
1093#include "qregularexpression.h"
1094
1095bool QRegularExpressionMatch::hasCaptured(QStringView name) const
1096{
1097 return hasCaptured(QAnyStringView(name));
1098}
1099
1100QString QRegularExpressionMatch::captured(QStringView name) const
1101{
1102 return captured(QAnyStringView(name));
1103}
1104
1105QStringView QRegularExpressionMatch::capturedView(QStringView name) const
1106{
1107 return capturedView(QAnyStringView(name));
1108}
1109
1110qsizetype QRegularExpressionMatch::capturedStart(QStringView name) const
1111{
1112 return capturedStart(QAnyStringView(name));
1113}
1114
1115qsizetype QRegularExpressionMatch::capturedLength(QStringView name) const
1116{
1117 return capturedLength(QAnyStringView(name));
1118}
1119
1120qsizetype QRegularExpressionMatch::capturedEnd(QStringView name) const
1121{
1122 return capturedEnd(QAnyStringView(name));
1123}
1124
1125bool QRegularExpression::operator==(const QRegularExpression &other) const
1126{
1127 return comparesEqual(*this, other);
1128}
1129#endif // QT_CONFIG(regularexpression)
1130
1131#if QT_CONFIG(future)
1132#include "qresultstore.h"
1133
1134bool QtPrivate::ResultIteratorBase::operator==(const QtPrivate::ResultIteratorBase &other) const
1135{
1136 return comparesEqual(*this, other);
1137}
1138
1139bool QtPrivate::ResultIteratorBase::operator!=(const QtPrivate::ResultIteratorBase &other) const
1140{
1141 return !comparesEqual(*this, other);
1142}
1143#endif // QT_CONFIG(future)
1144
1145#include "qstring.h" // inlined API
1146
1147#include "qstringconverter.h"
1148
1149QStringConverter::QStringConverter(const char *name, Flags f)
1150 : QStringConverter(QAnyStringView{name}, f)
1151{}
1152
1153auto QStringConverter::encodingForName(const char *name) noexcept -> std::optional<Encoding>
1154{
1155 return encodingForName(QAnyStringView{name});
1156}
1157
1158#if QT_CONFIG(thread)
1159# include "qthreadpool.h" // inlined API
1160#endif
1161
1162#include "qtimer.h" // inlined API
1163 // removed inline API (MSVC)
1164
1165void QTimer::singleShot(std::chrono::milliseconds interval, Qt::TimerType timerType,
1166 const QObject *receiver, const char *member)
1167{
1168 singleShot(from_msecs(interval), timerType, receiver, member);
1169}
1170
1171void QTimer::singleShotImpl(std::chrono::milliseconds interval, Qt::TimerType timerType,
1172 const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj)
1173{
1174 QtPrivate::SlotObjUniquePtr slot(slotObj); // don't leak if from_msecs throws
1175 const auto ns = from_msecs(interval);
1176 singleShotImpl(ns, timerType, receiver, slot.release());
1177}
1178
1179#include "qurl.h"
1180
1181bool QUrl::operator<(const QUrl &url) const
1182{
1183 return is_lt(compareThreeWay(*this, url));
1184}
1185
1186bool QUrl::operator==(const QUrl &url) const
1187{
1188 return comparesEqual(*this, url);
1189}
1190
1191bool QUrl::operator!=(const QUrl &url) const
1192{
1193 return !comparesEqual(*this, url);
1194}
1195
1196#include "qurlquery.h"
1197
1198bool QUrlQuery::operator==(const QUrlQuery &other) const
1199{
1200 return comparesEqual(*this, other);
1201}
1202
1203#include "qbasictimer.h"
1204
1205void QBasicTimer::start(std::chrono::milliseconds duration, QObject *object)
1206{
1207 start(std::chrono::nanoseconds(duration), object);
1208}
1209
1210void QBasicTimer::start(std::chrono::milliseconds duration, Qt::TimerType timerType, QObject *obj)
1211{
1212 start(std::chrono::nanoseconds(duration), timerType, obj);
1213}
1214
1215#include "quuid.h"
1216
1217bool QUuid::operator<(const QUuid &other) const noexcept
1218{
1219 return is_lt(compareThreeWay(*this, other));
1220}
1221
1222bool QUuid::operator>(const QUuid &other) const noexcept
1223{
1224 return is_gt(compareThreeWay(*this, other));
1225}
1226
1227QUuid QUuid::createUuidV3(const QUuid &ns, const QByteArray &baseData) noexcept
1228{
1229 return createUuidV3(ns, qToByteArrayViewIgnoringNull(baseData));
1230}
1231
1232QUuid QUuid::createUuidV5(const QUuid &ns, const QByteArray &baseData) noexcept
1233{
1234 return createUuidV5(ns, qToByteArrayViewIgnoringNull(baseData));
1235}
1236
1237#if QT_CONFIG(xmlstream)
1238#include "qxmlstream.h" // inlined API
1239#endif // QT_CONFIG(xmlstream)
1240
1241// #include "qotherheader.h"
1242// // implement removed functions from qotherheader.h
1243// order sections alphabetically to reduce chances of merge conflicts
1244
1245#endif // QT_CORE_REMOVED_SINCE(6, 8)
1246
1247#if QT_CORE_REMOVED_SINCE(6, 9)
1248
1249#include "qchar.h" // inlined API
1250
1251
1252#include "qexceptionhandling.h"
1253
1254QT_BEGIN_NAMESPACE
1255Q_NORETURN void qTerminate() noexcept
1256{
1257 std::terminate();
1258}
1259QT_END_NAMESPACE
1260
1261
1262#include "qmetatype.h"
1263
1264bool QMetaType::isRegistered() const
1265{
1266 return isRegistered(QT6_CALL_NEW_OVERLOAD);
1267}
1268
1269bool QMetaType::isValid() const
1270{
1271 return isValid(QT6_CALL_NEW_OVERLOAD);
1272}
1273
1274
1275#include "qmetaobject.h"
1276
1277const char *QMetaEnum::valueToKey(int value) const
1278{
1279 return valueToKey(quint64(uint(value)));
1280}
1281
1282QByteArray QMetaEnum::valueToKeys(int value) const
1283{
1284 return valueToKeys(quint64(uint(value)));
1285}
1286
1287
1288#include "qmutex.h"
1289
1290#if QT_CONFIG(thread)
1291void QBasicMutex::destroyInternal(QMutexPrivate *d)
1292{
1293 destroyInternal(static_cast<void *>(d));
1294}
1295#endif
1296
1297
1298#include "qobject.h"
1299#include "private/qobject_p.h"
1300
1301#ifdef Q_COMPILER_MANGLES_RETURN_TYPE
1302QMetaObject *QObjectData::dynamicMetaObject() const
1303{
1304 // ### keep in sync with the master version in qobject.cpp
1305 return metaObject->toDynamicMetaObject(q_ptr);
1306}
1307#endif // Q_COMPILER_MANGLES_RETURN_TYPE
1308
1309
1310#include "qstring.h"
1311
1312QString QString::arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const
1313{
1314 return arg_impl(a, fieldWidth, base, fillChar);
1315}
1316
1317QString QString::arg(qulonglong a, int fieldWidth, int base, QChar fillChar) const
1318{
1319 return arg_impl(a, fieldWidth, base, fillChar);
1320}
1321
1322QString QString::arg(double a, int fieldWidth, char format, int precision, QChar fillChar) const
1323{
1324 return arg_impl(a, fieldWidth, format, precision, fillChar);
1325}
1326
1327QString QString::arg(char a, int fieldWidth, QChar fillChar) const
1328{
1329 return arg_impl(QAnyStringView(a), fieldWidth, fillChar);
1330}
1331
1332QString QString::arg(QChar a, int fieldWidth, QChar fillChar) const
1333{
1334 return arg_impl(QAnyStringView{a}, fieldWidth, fillChar);
1335}
1336
1337QString QString::arg(const QString &a, int fieldWidth, QChar fillChar) const
1338{
1339 return arg_impl(qToAnyStringViewIgnoringNull(a), fieldWidth, fillChar);
1340}
1341
1342QString QString::arg(QStringView a, int fieldWidth, QChar fillChar) const
1343{
1344 return arg_impl(QAnyStringView(a), fieldWidth, fillChar);
1345}
1346
1347QString QString::arg(QLatin1StringView a, int fieldWidth, QChar fillChar) const
1348{
1349 return arg(QAnyStringView(a), fieldWidth, fillChar);
1350}
1351
1352QString QtPrivate::argToQString(QStringView pattern, size_t n, const ArgBase **args)
1353{
1354 return argToQString(QAnyStringView{pattern}, n, args);
1355}
1356
1357QString QtPrivate::argToQString(QLatin1StringView pattern, size_t n, const ArgBase **args)
1358{
1359 return argToQString(QAnyStringView{pattern}, n, args);
1360}
1361
1362
1363#include "quuid.h"
1364
1365bool QUuid::isNull() const noexcept
1366{
1367 return isNull(QT6_CALL_NEW_OVERLOAD);
1368}
1369
1370QUuid::Variant QUuid::variant() const noexcept
1371{
1372 return variant(QT6_CALL_NEW_OVERLOAD);
1373}
1374
1375QUuid::Version QUuid::version() const noexcept
1376{
1377 return version(QT6_CALL_NEW_OVERLOAD);
1378}
1379
1380// #include "qotherheader.h"
1381// // implement removed functions from qotherheader.h
1382// order sections alphabetically to reduce chances of merge conflicts
1383
1384#endif // QT_CORE_REMOVED_SINCE(6, 9)
1385
1386#if QT_CORE_REMOVED_SINCE(6, 10)
1387
1388#include "qcborstreamwriter.h" // Q_WEAK_OVERLOAD added
1389
1390#include "qcoreapplication.h"
1391
1392#if QT_CONFIG(permissions)
1393void QCoreApplication::requestPermission(const QPermission &requestedPermission,
1394 QtPrivate::QSlotObjectBase *slotObjRaw, const QObject *context)
1395{
1396 return requestPermissionImpl(requestedPermission, slotObjRaw, context);
1397}
1398#endif
1399
1400#include "qdir.h"
1401
1402bool QDir::mkdir(const QString &dirName) const
1403{
1404 return mkdir(dirName, std::nullopt);
1405}
1406
1407bool QDir::mkdir(const QString &dirName, QFile::Permissions permissions) const
1408{
1409 return mkdir(dirName, std::optional{permissions});
1410}
1411
1412bool QDir::mkpath(const QString &dirPath) const
1413{
1414 return mkpath(dirPath, std::nullopt);
1415}
1416
1417#if QT_CONFIG(future)
1418#include "qfuture.h" // for ContinuationWrapper
1419#include "qfutureinterface.h"
1420
1421void QtPrivate::watchContinuationImpl(const QObject *context,
1422 QtPrivate::QSlotObjectBase *slotObj,
1423 QFutureInterfaceBase &fi)
1424{
1425 Q_ASSERT(context);
1426 Q_ASSERT(slotObj);
1427
1428 auto slot = QtPrivate::SlotObjUniquePtr(slotObj);
1429
1430 // That is now a double-inderection, because the setContinuation() overload
1431 // also uses QSlotObjectBase approach. But that's a solution for backwards
1432 // compatibility, so should be fine.
1433 // We pass a default-constructed QVariant() and an Unknown type, because
1434 // that's effectively the same as passing a nullptr continuationData, and
1435 // that's what the old code was doing.
1436 fi.setContinuation(context, QtPrivate::ContinuationWrapper([slot = std::move(slot)]()
1437 {
1438 void *args[] = { nullptr }; // for `void` return value
1439 slot->call(nullptr, args);
1440 }), QVariant(), QFutureInterfaceBase::ContinuationType::Unknown);
1441}
1442
1443void QFutureInterfaceBase::setContinuation(std::function<void(const QFutureInterfaceBase &)> func)
1444{
1445 setContinuation(std::move(func), nullptr);
1446}
1447
1448void QFutureInterfaceBase::setContinuation(std::function<void(const QFutureInterfaceBase &)> func,
1449 QFutureInterfaceBasePrivate *continuationFutureData)
1450{
1451 // Backwards compatibility - the continuation data was used for
1452 // then-continuations
1453 setContinuation(std::move(func), continuationFutureData, ContinuationType::Then);
1454}
1455#endif // QT_CONFIG(future)
1456
1457#include "qlockfile.h" // inlined API
1458
1459#include "qlogging.h"
1460
1461QNoDebug QMessageLogger::noDebug() const noexcept
1462{
1463 return QNoDebug();
1464}
1465
1466#include "qmutex.h" // removed, previously-inline API
1467
1468#include "qobject.h"
1469
1470bool QObject::doSetProperty(const char *name, const QVariant *lvalue, QVariant *rvalue)
1471{
1472 return doSetProperty(name, *lvalue, rvalue);
1473}
1474
1475#include "qstring.h" // inlined API
1476
1477#include "qvariant.h" // inlined API
1478
1479// #include "qotherheader.h"
1480// // implement removed functions from qotherheader.h
1481// order sections alphabetically to reduce chances of merge conflicts
1482
1483#endif // QT_CORE_REMOVED_SINCE(6, 10)
1484
1485#if QT_CORE_REMOVED_SINCE(6, 11)
1486
1487#include "qbytearray.h"
1488
1489QByteArray QByteArray::percentDecoded(char percent) const
1490{
1491 return fromPercentEncoding(*this, percent);
1492}
1493
1494#if QT_CONFIG(thread)
1495// some of the previously inlined API became removed
1496#include "qreadwritelock.h"
1497
1498void QReadWriteLock::lockForRead()
1499{
1500 tryLockForRead(QDeadlineTimer(QDeadlineTimer::Forever));
1501}
1502
1503bool QReadWriteLock::tryLockForRead(QDeadlineTimer timeout)
1504{
1505 return QBasicReadWriteLock::tryLockForRead(timeout);
1506}
1507
1508void QReadWriteLock::lockForWrite()
1509{
1510 tryLockForWrite(QDeadlineTimer(QDeadlineTimer::Forever));
1511}
1512
1513bool QReadWriteLock::tryLockForWrite(QDeadlineTimer timeout)
1514{
1515 return QBasicReadWriteLock::tryLockForWrite(timeout);
1516}
1517
1518void QReadWriteLock::unlock()
1519{
1520 QBasicReadWriteLock::unlock();
1521}
1522#endif // QT_CONFIG(thread)
1523
1524#include "qsavefile.h"
1525
1526QSaveFile::QSaveFile(const QString &name)
1527 : QSaveFile(name, nullptr)
1528{
1529}
1530
1531#include "qtimer.h"
1532
1533void QTimer::singleShotImpl(int msec, Qt::TimerType timerType,
1534 const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj)
1535{
1536 singleShotImpl(std::chrono::milliseconds{msec}, timerType, receiver, slotObj);
1537}
1538
1539// #include "qotherheader.h"
1540// // implement removed functions from qotherheader.h
1541// order sections alphabetically to reduce chances of merge conflicts
1542
1543#endif // QT_CORE_REMOVED_SINCE(6, 11)
1544
1545#if QT_CORE_REMOVED_SINCE(6, 12)
1546
1547#include "qfile.h"
1548
1549bool QFile::copy(const QString &newName)
1550{
1551 return copy(newName, std::nullopt);
1552}
1553
1554bool QFile::copy(const QString &fileName, const QString &newName)
1555{
1556 return QFile(fileName).copy(newName, std::nullopt);
1557}
1558
1559// #include "qotherheader.h"
1560// // implement removed functions from qotherheader.h
1561// order sections alphabetically to reduce chances of merge conflicts
1562
1563#endif // QT_CORE_REMOVED_SINCE(6, 12)