[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - vcl/inc vcl/qt5

Katarina Behrens Katarina.Behrens at cib.de
Mon Apr 16 11:41:48 UTC 2018


 vcl/inc/qt5/Qt5Widget.hxx |    1 +
 vcl/qt5/Qt5Widget.cxx     |    5 +++++
 2 files changed, 6 insertions(+)

New commits:
commit c06a42cffdb54e9a8399a293293f0e8111adc336
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..b52d48fbcb67 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