diff --git a/vcl/inc/qt5/QtInstanceTreeView.hxx b/vcl/inc/qt5/QtInstanceTreeView.hxx index 110bc09c8bd2..a57734ed9079 100644 --- a/vcl/inc/qt5/QtInstanceTreeView.hxx +++ b/vcl/inc/qt5/QtInstanceTreeView.hxx @@ -42,7 +42,7 @@ public: virtual int get_selected_index() const override; virtual void select(int nPos) override; virtual void unselect(int nPos) override; - virtual void remove(int pos) override; + virtual void remove(int nPos) override; virtual OUString get_text(int nRow, int nCol = -1) const override; virtual void set_text(int nRow, const OUString& rText, int nCol = -1) override; virtual void set_sensitive(int row, bool bSensitive, int col = -1) override; diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx index 34bf6dee0c13..613987c44a80 100644 --- a/vcl/qt5/QtInstanceTreeView.cxx +++ b/vcl/qt5/QtInstanceTreeView.cxx @@ -142,7 +142,12 @@ void QtInstanceTreeView::unselect(int nPos) }); } -void QtInstanceTreeView::remove(int) { assert(false && "Not implemented yet"); } +void QtInstanceTreeView::remove(int nPos) +{ + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { m_pModel->removeRow(nPos); }); +} OUString QtInstanceTreeView::get_text(int nRow, int nCol) const {