[Libreoffice-commits] core.git: vcl/inc vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Nov 2 08:58:53 UTC 2018
vcl/inc/qt5/Qt5Frame.hxx | 12 ++++++------
vcl/qt5/Qt5Frame.cxx | 17 ++++++-----------
2 files changed, 12 insertions(+), 17 deletions(-)
New commits:
commit 88657bf4bed6754c182b08a442d8582a7ad30ece
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Nov 2 00:44:01 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Nov 2 09:58:25 2018 +0100
Qt5 constify some functions to fix build
Change-Id: Ic0e85b2077c89a63301cf1d5b1cede7f6a0d7dce
Reviewed-on: https://gerrit.libreoffice.org/62767
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index f3fd1f19b0ec..766044a7b6d5 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -84,7 +84,7 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame
Size CalcDefaultSize();
void SetDefaultSize();
- bool isChild(bool bPlug = true, bool bSysChild = true)
+ bool isChild(bool bPlug = true, bool bSysChild = true) const
{
SalFrameStyleFlags nMask = SalFrameStyleFlags::NONE;
if (bPlug)
@@ -94,11 +94,11 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame
return bool(m_nStyle & nMask);
}
- bool isWindow();
- QWindow* windowHandle();
- QScreen* screen();
- bool isMinimized();
- bool isMaximized();
+ bool isWindow() const;
+ QWindow* windowHandle() const;
+ QScreen* screen() const;
+ bool isMinimized() const;
+ bool isMaximized() const;
void TriggerPaintEvent();
void TriggerPaintEvent(QRect aRect);
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index f7e6a571458c..b5680b654771 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -236,7 +236,7 @@ bool Qt5Frame::PostEvent(std::unique_ptr<ImplSVEvent> pData)
return true;
}
-bool Qt5Frame::isWindow()
+bool Qt5Frame::isWindow() const
{
if (m_pTopLevel)
return m_pTopLevel->isWindow();
@@ -244,7 +244,7 @@ bool Qt5Frame::isWindow()
return m_pQWidget->isWindow();
}
-QWindow* Qt5Frame::windowHandle()
+QWindow* Qt5Frame::windowHandle() const
{
if (m_pTopLevel)
return m_pTopLevel->windowHandle();
@@ -252,7 +252,7 @@ QWindow* Qt5Frame::windowHandle()
return m_pQWidget->windowHandle();
}
-QScreen* Qt5Frame::screen()
+QScreen* Qt5Frame::screen() const
{
QWindow* const pWindow = windowHandle();
if (pWindow)
@@ -261,7 +261,7 @@ QScreen* Qt5Frame::screen()
return nullptr;
}
-bool Qt5Frame::isMinimized()
+bool Qt5Frame::isMinimized() const
{
if (m_pTopLevel)
return m_pTopLevel->isMinimized();
@@ -269,7 +269,7 @@ bool Qt5Frame::isMinimized()
return m_pQWidget->isMinimized();
}
-bool Qt5Frame::isMaximized()
+bool Qt5Frame::isMaximized() const
{
if (m_pTopLevel)
return m_pTopLevel->isMaximized();
@@ -474,12 +474,7 @@ void Qt5Frame::SetModal(bool bModal)
}
}
-bool Qt5Frame::GetModal() const
-{
- if (isWindow())
- return windowHandle()->getModality() == Qt::WindowModal;
- return false;
-}
+bool Qt5Frame::GetModal() const { return isWindow() && windowHandle()->isModal(); }
void Qt5Frame::SetWindowState(const SalFrameState* pState)
{
More information about the Libreoffice-commits
mailing list