Rename classes for the qt5 VCL plugin to no longer contain the Qt version number "5" in them, e.g. "Qt5Widget" -> "QtWidget". Also, adapt some variable names and comments accordingly. The code will be used for an upcoming qt6 VCL plugin as well, so a "Qt" prefix fits better than a "Qt5" one. Renaming the headers and source files will be done in a separate commit to make tracking git history easier. Change-Id: Idf422f82ca9dafbb70e9a64de9c8cfc4cc8c0909 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122805 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Change-Id: Id6ba8dfcf2f966f0e2e224990dec0309cd4d27d0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122551 Tested-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
For tdf#124292, Qt's own HiDPI scaling was explicitly disabled, but it turns out, you can't really scale QStyle painting then. This patch series had a 2nd approach also used by Gtk+ currently, which relied on the scaling of ths Cairo surface, which works surprisingly good, but has to lie about the real DPI value, so nothing is scaled twice. Also all icons are then scaled instead of rendered with the proper resolution. When HiDPI support in Qt is enabled, and the application is started using QT_SCALE_FACTOR=1.25, Qt simply lowers the reported resolution, keeps the logical DPI value of 96 and changes the devicePixelRatio to the specified value. But LO still expects the real DPI values and sizes, so we have to multiply a lot of rectangles, sizes and positions. The current result is far from perfect, which you can see with the various graphics glitches, but it at least doesn't crash anymore in the ControlType::Editbox sizing code. The main problem is all the up and downscaling in the getNativeControlRegion code, so LO knows the size of the widgets for the correct layouting, since there seem to be no API to get the scaled values from Qt / QStyle. Change-Id: I687b1df6ef27724ce68326d256e9addccd72e759 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86239 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
...as seen with qt5 5.13.2-1.fc31 /home/noel/libo2/vcl/qt5/Qt5System.cxx:18:83: error: 'screenCount' is deprecated: Use QGuiApplication::screens() [-Werror,-Wdeprecated-declarations] ^ /home/noel/libo2/vcl/qt5/Qt5System.cxx:22:44: error: 'screenGeometry' is deprecated: Use QGuiApplication::screens() [-Werror,-Wdeprecated-declarations] QRect qRect = QApplication::desktop()->screenGeometry(nScreen); ^ Change-Id: I73385b56f58284fedf5acbfb914177e06f3512d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86736 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>