[Libreoffice-commits] core.git: vcl/inc

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 11 17:42:33 UTC 2020


 vcl/inc/qt5/Qt5Tools.hxx |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

New commits:
commit 4f09fb9f64951340d140badb00b336dd99c68f2b
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Sep 11 16:07:41 2020 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Fri Sep 11 19:41:51 2020 +0200

    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 at fbihome.de>

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: */


More information about the Libreoffice-commits mailing list