diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2018-11-02 00:44:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-02 09:58:25 +0100 |
commit | 88657bf4bed6754c182b08a442d8582a7ad30ece (patch) | |
tree | 7a1da9bcaa67054d2912849aef60343c9623249c | |
parent | f8a493ae29a66d70d4672dbc105614075aad5a92 (diff) |
Qt5 constify some functions to fix build
Change-Id: Ic0e85b2077c89a63301cf1d5b1cede7f6a0d7dce
Reviewed-on: https://gerrit.libreoffice.org/62767
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/inc/qt5/Qt5Frame.hxx | 12 | ||||
-rw-r--r-- | vcl/qt5/Qt5Frame.cxx | 17 |
2 files changed, 12 insertions, 17 deletions
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) { |