qt6-bb10/src/corelib/io
Marc Mutz 01e1dc273d Remove all class-level [[nodiscard]] from the code-base
A class-level [[nodiscard]] used to be the only way to get a waring
for code such as

   QMutexLocker(&mutex);

with original C++17 means. This was because a few of our compilers
would warn about the presence of [[nodiscard]] on ctors, which is
really the semantics we want: we don't want to prevent users from
passing QMutexLocker out of functions and users of those functions
from ignoring the return value, if they so choose. That should be the
choice of the author of the function returning such types, not ours.

So QUIP-0019 makes class-level [[nodiscard]] conditional on proper
rationale in the user docs (or the commit message in case of private
API). Since none of the existing uses really strikes this author as
particularly convincing, remove them all.

All these classes have gotten Q_NODISCARD_CTOR on all their ctors, so
we continue to provide the same true positive warnings, minus the
false positives when returning from functions, at least on the
majority of compilers (and it's not as if all compilers interpreted a
class-level [[nodiscard]] as a trigger to warn on the initial example
of this commit message).

Task-number: QTBUG-104164
Pick-to: 6.6
Change-Id: I163356486e7c80f9d69bf67023010a88233fe662
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-28 20:48:45 +00:00
..
forkfd_qt.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qabstractfileengine.cpp Add QFileInfo::readSymLink() to read the raw link path 2022-12-23 06:26:44 +01:00
qabstractfileengine_p.h Add QFileInfo::readSymLink() to read the raw link path 2022-12-23 06:26:44 +01:00
qbuffer.cpp QBuffer: test and document open() behavior 2022-12-14 19:07:19 +01:00
qbuffer.h QBuffer: optimize setData(ptr, n) 2022-08-20 21:22:53 +02:00
qdataurl.cpp Fix int/qsizetype mismatches in data url support 2022-08-21 08:30:11 +02:00
qdataurl_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qdebug.cpp Move the formatting of <chrono> durations to QDebug & QtTest 2023-05-06 17:54:23 +00:00
qdebug.h QDebugStateSaver: mark ctors [[nodiscard]] 2023-06-20 13:25:05 +00:00
qdebug_p.h Port QtDebugUtils::toPrintable() to qint64/qsizetype 2022-08-21 08:28:44 +02:00
qdir.cpp Replace ushort*/uint* with char16_t*/char32_t* in private API [1] 2023-03-15 20:25:57 +00:00
qdir.h Replace usages of Q_CLANG_QDOC with Q_QDOC 2022-10-21 09:48:36 +02:00
qdir_p.h QDir::entryList: don't fill a QFileInfo cache if we just want names 2023-02-07 13:33:01 +01:00
qdiriterator.cpp Port QDir to qsizetype [2/3]: implementation 2022-08-26 19:50:47 +02:00
qdiriterator.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfile.cpp Android: document limitation for QFile::copy() operation for content uri 2023-03-01 18:20:41 +02:00
qfile.h Remove all class-level [[nodiscard]] from the code-base 2023-06-28 20:48:45 +00:00
qfile_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfiledevice.cpp Avoid potential data races caused by qt_ntfs_permission_lookup 2023-02-08 12:59:19 +01:00
qfiledevice.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfiledevice_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfileinfo.cpp Fix few QFileInfo and QDir calls 2023-02-14 00:18:29 +01:00
qfileinfo.h QFileInfo: overload file time related methods to take a QTimeZone arg 2022-12-23 08:27:42 +01:00
qfileinfo_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfileselector.cpp Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qfileselector.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfileselector_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemengine.cpp Port from container::count() and length() to size() - V5 2022-11-03 14:59:24 +01:00
qfilesystemengine_mac.mm Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemengine_p.h Add QFileInfo::readSymLink() to read the raw link path 2022-12-23 06:26:44 +01:00
qfilesystemengine_unix.cpp Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qfilesystemengine_win.cpp Deprecate usage of qt_ntfs_permission_lookup 2023-02-14 13:23:19 +01:00
qfilesystementry.cpp Fix tst_qfilesystementry in unity build 2023-03-15 18:18:01 +01:00
qfilesystementry_p.h Fix tst_qfilesystementry in unity build 2023-03-15 18:18:01 +01:00
qfilesystemiterator_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemiterator_unix.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemiterator_win.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemmetadata_p.h Adapt corelib to use QTimeZone in place of Qt::TimeSpec 2022-12-09 16:16:48 +01:00
qfilesystemwatcher.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher_fsevents.mm Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher_fsevents_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher_inotify.cpp Fix some narrowing conversion warnings 2023-04-08 13:24:04 +02:00
qfilesystemwatcher_inotify_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher_kqueue.cpp Port from qAsConst() to std::as_const() 2022-10-11 23:17:18 +02:00
qfilesystemwatcher_kqueue_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher_polling.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfilesystemwatcher_polling_p.h Use QFileInfo's file times in UTC for file timestamps 2023-01-04 19:15:52 +02:00
qfilesystemwatcher_win.cpp QFileSystemWatcher/Win: remove the pre-QFileInfo path normalization 2023-02-14 11:27:24 -08:00
qfilesystemwatcher_win_p.h qHash: Add seed argument for classes inheriting QString 2022-09-28 17:03:17 +02:00
qfsfileengine.cpp Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qfsfileengine_iterator.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfsfileengine_iterator_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfsfileengine_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qfsfileengine_unix.cpp QFSFileEngine: fix overflow bug when using lseek64 2023-03-13 23:26:28 +02:00
qfsfileengine_win.cpp Add QFileInfo::readSymLink() to read the raw link path 2022-12-23 06:26:44 +01:00
qiodevice.cpp Fix some narrowing conversion warnings 2023-04-08 13:24:04 +02:00
qiodevice.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qiodevice_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qiodevicebase.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qipaddress.cpp Fix some narrowing conversion warnings 2023-04-08 13:24:04 +02:00
qipaddress_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qlockfile.cpp QLockFile: {set}StaleLockTime: use chrono first 2023-03-15 20:48:31 +02:00
qlockfile.h QLockFile: {set}StaleLockTime: use chrono first 2023-03-15 20:48:31 +02:00
qlockfile_p.h QLockFile: {set}StaleLockTime: use chrono first 2023-03-15 20:48:31 +02:00
qlockfile_unix.cpp Fix some narrowing conversion warnings 2023-04-08 13:24:04 +02:00
qlockfile_win.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qloggingcategory.cpp Doc: Fix snippet for Q_DECLARE_EXPORTED_CATEGORY 2023-01-02 18:06:29 +01:00
qloggingcategory.h Don't use var-args for Q_DECLARE_EXPORTED_LOGGING_CATEGORY 2023-01-03 00:41:21 +01:00
qloggingregistry.cpp Misc: Fix qsizetype-related narrowing coversions 2023-03-11 12:39:47 +02:00
qloggingregistry_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnoncontiguousbytedevice.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qnoncontiguousbytedevice_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qntdll_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qprocess.cpp QProcess/Unix: add failChildProcessModifier() 2023-06-09 17:32:33 -07:00
qprocess.h QProcess/Unix: add failChildProcessModifier() 2023-06-09 17:32:33 -07:00
qprocess_darwin.mm Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qprocess_p.h QProcess/Unix: merge some code from startProcess() and startDetached() 2023-06-21 11:12:42 -07:00
qprocess_unix.cpp QProcess/Unix: block all Unix signals between vfork() and exec() 2023-06-28 00:16:31 -07:00
qprocess_win.cpp QProcessPrivate: remove the member variable "crashed" 2023-05-13 20:25:27 +00:00
qresource.cpp Replace {add,sub,mul}_overload with q{Add,Sub,Mul}Overload 2023-06-12 13:11:26 +00:00
qresource.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qresource_iterator.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qresource_iterator_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qresource_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsavefile.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsavefile.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsavefile_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsettings.cpp Android: Restore the default QSettings path to the .config directory 2023-06-13 11:48:05 +00:00
qsettings.h Replace usages of Q_CLANG_QDOC with Q_QDOC 2022-10-21 09:48:36 +02:00
qsettings_mac.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qsettings_p.h Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qsettings_wasm.cpp wasm: avoid LocalStorage past-the-end access on clear() 2022-12-28 18:14:44 +00:00
qsettings_win.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstandardpaths.cpp Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition 2023-03-20 19:18:52 +01:00
qstandardpaths.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstandardpaths_android.cpp Android: fix and document QStandardPaths behavior on different versions 2023-03-01 22:10:57 +02:00
qstandardpaths_haiku.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstandardpaths_mac.mm Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstandardpaths_unix.cpp QStandardPaths/Unix: adjust a comment after recent changes 2023-04-29 18:15:58 +02:00
qstandardpaths_win.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstorageinfo.cpp QStorageInfo: mention bind mounts and btrfs subvolumes in API docs 2023-04-08 13:21:39 +02:00
qstorageinfo.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstorageinfo_linux_p.h QStorageInfo/Linux: use readAll() with /proc/self/mountinfo 2023-06-27 02:28:21 +03:00
qstorageinfo_mac.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qstorageinfo_p.h QStorageInfo/Linux: use readAll() with /proc/self/mountinfo 2023-06-27 02:28:21 +03:00
qstorageinfo_unix.cpp QStorageInfo/Linux: use readAll() with /proc/self/mountinfo 2023-06-27 02:28:21 +03:00
qstorageinfo_win.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtemporarydir.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtemporarydir.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtemporaryfile.cpp QTemporaryFile: fix narrowing conversion warnings 2023-04-08 13:23:37 +02:00
qtemporaryfile.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qtemporaryfile_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qurl.cpp Doc: Fix documentation issues 2023-06-09 18:24:15 +00:00
qurl.h QUrl: Add QUrl::fromEncoded(QByteArrayView) overload 2023-06-08 03:09:52 +03:00
qurl_p.h QDnsLookup: merge some of the domain label expansion code 2023-06-03 19:28:11 -07:00
qurlidna.cpp Replace {add,sub,mul}_overload with q{Add,Sub,Mul}Overload 2023-06-12 13:11:26 +00:00
qurlquery.cpp QtCore: Fix some macro clashes 2023-01-31 18:42:15 +01:00
qurlquery.h QUrlQuery: add missing move constructor 2023-01-20 03:19:21 +00:00
qurlrecode.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwindowspipereader.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwindowspipereader_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwindowspipewriter.cpp Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qwindowspipewriter_p.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qzip.cpp Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00
qzipreader_p.h Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00
qzipwriter_p.h Move QZipReader/Writer from QtGui to QtCore 2023-04-26 12:01:05 +02:00