diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-29 14:47:46 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-30 10:27:37 +0000 |
commit | 4e88f1aaea94ae021b31d914d54a35ae89125e15 (patch) | |
tree | 33d813a73c8950187b776aba637c85f3693a82b5 /src/plugins/platforms/windows/qwindowsclipboard.cpp | |
parent | 52ddfb36c80f1f0cba4e90d40b43c426687fac41 (diff) |
Windows QPA plugin: Fix debug formatting.
- Introduce QDebugStateSaver for all debug operators.
- Remove the "Flags=" from enumerations since their type is now output
by default.
- Added some spaces since the previous formatting relied on space=true
as a result of some debug operators erroneously returning debug.space(),
which is now fixed in qtbase.
- Fixed formatting, added noquote() where necessary, added some newlines,
used stream modifiers instead of QString::number(n, 16) to output
hex numbers.
- Fix indentation.
Change-Id: I64123a4262916e21448cda2aa61ae1100f07291a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsclipboard.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsclipboard.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp index bfcc9e9bce..4cea845c36 100644 --- a/src/plugins/platforms/windows/qwindowsclipboard.cpp +++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp @@ -71,22 +71,23 @@ static const char formatTextHtmlC[] = "text/html"; QDebug operator<<(QDebug d, const QMimeData &m) { - QDebug nospace = d.nospace(); + QDebugStateSaver saver(d); + d.nospace(); const QStringList formats = m.formats(); - nospace << "QMimeData: " << formats.join(QStringLiteral(", ")) << '\n' + d << "QMimeData: " << formats.join(QStringLiteral(", ")) << '\n' << " Text=" << m.hasText() << " HTML=" << m.hasHtml() << " Color=" << m.hasColor() << " Image=" << m.hasImage() << " URLs=" << m.hasUrls() << '\n'; if (m.hasText()) - nospace << " Text: '" << m.text() << "'\n"; + d << " Text: '" << m.text() << "'\n"; if (m.hasHtml()) - nospace << " HTML: '" << m.html() << "'\n"; + d << " HTML: '" << m.html() << "'\n"; if (m.hasColor()) - nospace << " Color: " << qvariant_cast<QColor>(m.colorData()) << '\n'; + d << " Color: " << qvariant_cast<QColor>(m.colorData()) << '\n'; if (m.hasImage()) - nospace << " Image: " << qvariant_cast<QImage>(m.imageData()).size() << '\n'; + d << " Image: " << qvariant_cast<QImage>(m.imageData()).size() << '\n'; if (m.hasUrls()) - nospace << " URLs: " << m.urls() << '\n'; + d << " URLs: " << m.urls() << '\n'; return d; } |