diff options
| author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2025-09-01 11:12:23 +0200 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2025-09-03 16:43:57 +0200 |
| commit | e97cb95572fabdb5c34282da6370b4e92906cc99 (patch) | |
| tree | fd128239fd293b3be1dd71e0d6a4a53081ac5bcf /src/corelib/io/qfile.cpp | |
| parent | 80ff44e243b2bb77f8fb107b31aaaf2ffe0db341 (diff) | |
Add QFilePrivate::writeToDebugStream
It's useful to see the file name of a file based QIODevice
when debug logging it.
Change-Id: Iaaa1639f4940024e9030b27da6219c959224bd3f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/io/qfile.cpp')
| -rw-r--r-- | src/corelib/io/qfile.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp index 8c22483fbfe..e1fc043a0ff 100644 --- a/src/corelib/io/qfile.cpp +++ b/src/corelib/io/qfile.cpp @@ -1375,6 +1375,15 @@ qint64 QFile::size() const concurrent updates to \l qt_ntfs_permission_lookup. */ +#ifndef QT_NO_DEBUG_STREAM +void QFilePrivate::writeToDebugStream(QDebug &dbg) const +{ + Q_Q(const QFile); + dbg.nospace(); + dbg << "QFile(" << q->fileName() << ')'; +} +#endif + QT_END_NAMESPACE #ifndef QT_NO_QOBJECT |
