[Libreoffice-commits] core.git: vcl/qt5
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 13 12:11:22 UTC 2020
vcl/qt5/Qt5Frame.cxx | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit 09597ab01d22820137ada0dc08b5a9bf481468a8
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Jan 13 09:55:12 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Jan 13 13:10:49 2020 +0100
Silence -Werror,-Wdeprecated-declarations for now
...as seen with qt5-qtbase-devel-5.13.2-1.fc31.x86_64:
> vcl/qt5/Qt5Frame.cxx:481:73: error: 'screenGeometry' is deprecated: Use QGuiApplication::screens() [-Werror,-Wdeprecated-declarations]
> toSize(pScreen ? pScreen->size() : QApplication::desktop()->screenGeometry(0).size()));
> ^
> /usr/include/qt5/QtWidgets/qdesktopwidget.h:79:5: note: 'screenGeometry' has been explicitly marked deprecated here
> QT_DEPRECATED_X("Use QGuiApplication::screens()") const QRect screenGeometry(int screen = -1) const;
> ^
[...]
> vcl/qt5/Qt5Frame.cxx:490:56: error: 'screenNumber' is deprecated: Use QGuiApplication::screenAt() [-Werror,-Wdeprecated-declarations]
> int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 0));
> ^
> /usr/include/qt5/QtWidgets/qdesktopwidget.h:75:5: note: 'screenNumber' has been explicitly marked deprecated here
> QT_DEPRECATED_X("Use QGuiApplication::screenAt()") int screenNumber(const QPoint &) const;
> ^
[...]
Change-Id: I7db00ee0e7cd7f652af4f7426f9ea0172206d485
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86660
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index c5cc9dfaa0d1..905e542a65b0 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -477,17 +477,25 @@ Size Qt5Frame::CalcDefaultSize()
if (!m_bFullScreen)
{
const QScreen* pScreen = screen();
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
aSize = bestmaxFrameSizeForScreenSize(
toSize(pScreen ? pScreen->size() : QApplication::desktop()->screenGeometry(0).size()));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
}
else
{
if (!m_bFullScreenSpanAll)
+ {
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
aSize = toSize(
QApplication::desktop()->screenGeometry(maGeometry.nDisplayScreenNumber).size());
+ SAL_WNODEPRECATED_DECLARATIONS_POP
+ }
else
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 0));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
aSize = toSize(QApplication::screens()[nLeftScreen]->availableVirtualGeometry().size());
}
}
@@ -1183,14 +1191,18 @@ void Qt5Frame::SetScreenNumber(unsigned int nScreen)
if (!m_bFullScreenSpanAll)
{
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
screenGeo = QApplication::desktop()->screenGeometry(nScreen);
+ SAL_WNODEPRECATED_DECLARATIONS_POP
pWindow->setScreen(QApplication::screens()[nScreen]);
}
else // special case: fullscreen over all available screens
{
assert(m_bFullScreen);
// left-most screen
+ SAL_WNODEPRECATED_DECLARATIONS_PUSH
int nLeftScreen = QApplication::desktop()->screenNumber(QPoint(0, 0));
+ SAL_WNODEPRECATED_DECLARATIONS_POP
// entire virtual desktop
screenGeo = QApplication::screens()[nLeftScreen]->availableVirtualGeometry();
pWindow->setScreen(QApplication::screens()[nLeftScreen]);
More information about the Libreoffice-commits
mailing list