summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-09-11 16:07:41 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-09-11 19:41:51 +0200
commit4f09fb9f64951340d140badb00b336dd99c68f2b (patch)
tree1e552c5be54e970584488d923b43ae4ce31bdfca
parentf33c253ee9572ce83016e527ab0d050aab71a674 (diff)
Qt5 add some output formaters for Qt classes
This simply converts them to LO equivalents. Since this is just for easier debugging, there is IMHO no need for "more optimized" variants. Change-Id: I283d0e2b69f945517aaa79f3c6dbea38dcb50ef0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102489 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--vcl/inc/qt5/Qt5Tools.hxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/vcl/inc/qt5/Qt5Tools.hxx b/vcl/inc/qt5/Qt5Tools.hxx
index 971ae42b5bab..1110c7099d80 100644
--- a/vcl/inc/qt5/Qt5Tools.hxx
+++ b/vcl/inc/qt5/Qt5Tools.hxx
@@ -151,4 +151,32 @@ sal_uInt16 GetMouseModCode(Qt::MouseButtons eButtons);
QImage toQImage(const Image& rImage);
+template <typename charT, typename traits>
+inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream,
+ const QString& rString)
+{
+ return stream << toOUString(rString);
+}
+
+template <typename charT, typename traits>
+inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream,
+ const QRect& rRect)
+{
+ return stream << toRectangle(rRect);
+}
+
+template <typename charT, typename traits>
+inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream,
+ const QSize& rSize)
+{
+ return stream << toSize(rSize);
+}
+
+template <typename charT, typename traits>
+inline std::basic_ostream<charT, traits>& operator<<(std::basic_ostream<charT, traits>& stream,
+ const QPoint& rPoint)
+{
+ return stream << toPoint(rPoint);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */