diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-18 16:19:48 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-05-23 08:59:20 +0000 |
commit | 06de0da1e8429f8174cfa78b644a09c0c23c478d (patch) | |
tree | 779cd3bc8b7eeea89abe2e2cc24cf11d535b0cef /tests/auto/corelib/io/qbuffer | |
parent | cab7e7858ae97eedc122fdfa7df082cbdb590d7c (diff) |
Make warnings of QIODevice more verbose.
Include class name, object name and file name when available.
For the bug in question:
QIODevice::read: device not open
becomes
QIODevice::read (QTcpSocket, "QFtpDTP Passive state socket"): device not open
Adding a static function also makes it easier to set a breakpoint
and find the culprit.
Task-number: QTBUG-46112
Change-Id: Ic181d8ab292912d1acbcc3cb84d9679fe4842ca0
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'tests/auto/corelib/io/qbuffer')
-rw-r--r-- | tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp index f792b34d48..3b730d97f9 100644 --- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp +++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp @@ -151,7 +151,7 @@ void tst_QBuffer::readBlock() QCOMPARE(b.bytesAvailable(), (qint64) arraySize); b.open(QIODevice::WriteOnly); QCOMPARE(b.bytesAvailable(), (qint64) arraySize); - QTest::ignoreMessage(QtWarningMsg, "QIODevice::read: WriteOnly device"); + QTest::ignoreMessage(QtWarningMsg, "QIODevice::read (QBuffer): WriteOnly device"); QCOMPARE(b.read(a, arraySize), (qint64) -1); // no read access b.close(); |