[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - vcl/inc vcl/qt5
Katarina Behrens
Katarina.Behrens at cib.de
Wed Apr 18 08:20:40 UTC 2018
Rebased ref, commits from common ancestor:
commit 03b28bf39f4b41e1e0abf85dba15a24d358a06db
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Mon Apr 16 13:30:23 2018 +0200
Frames can now be closed by clicking top-right corner [x]
Change-Id: I4f841bfd8fe819a322af1ecaa95d17273d3031ec
diff --git a/vcl/inc/qt5/Qt5Widget.hxx b/vcl/inc/qt5/Qt5Widget.hxx
index 83077796298f..7e7ed8240802 100644
--- a/vcl/inc/qt5/Qt5Widget.hxx
+++ b/vcl/inc/qt5/Qt5Widget.hxx
@@ -53,6 +53,7 @@ class Qt5Widget : public QWidget
virtual void resizeEvent(QResizeEvent*) override;
virtual void showEvent(QShowEvent*) override;
virtual void wheelEvent(QWheelEvent*) override;
+ virtual void closeEvent(QCloseEvent*) override;
public:
Qt5Widget(Qt5Frame& rFrame, QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index 6b082eef1c1f..bb3ca8aaa44b 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -173,6 +173,11 @@ void Qt5Widget::showEvent(QShowEvent*)
m_pFrame->CallCallback(SalEvent::Paint, &aPaintEvt);
}
+void Qt5Widget::closeEvent(QCloseEvent* /*pEvent*/)
+{
+ m_pFrame->CallCallback(SalEvent::Close, nullptr);
+}
+
static sal_uInt16 GetKeyCode(int keyval)
{
sal_uInt16 nCode = 0;
More information about the Libreoffice-commits
mailing list