Quit the dash commuunicator thread before destroying it
Fixes "QThread: Destroyed while thread is still running"
commit6b86c8b5b46801d45ee48066a84f799c1da061fc
authorAlbert Astals Cid <albert.astals@canonical.com>
dateWed 2 Dec 2015, 15:12 (11 years ago)
parenta3c5737
plugins/Unity/DashCommunicator/dashcommunicator.cpp+6
@@ -27,6 +27,12 @@ DashCommunicator::DashCommunicator(QObject *parent):
2727 start();
2828}
2929
30+DashCommunicator::~DashCommunicator()
31+{
32+ quit();
33+ wait();
34+}
35+
3036void DashCommunicator::setCurrentScope(int index, bool animate, bool isSwipe)
3137{
3238 m_mutex.lock();
plugins/Unity/DashCommunicator/dashcommunicator.h+1−1
@@ -28,7 +28,7 @@ class DashCommunicator: public QThread
2828 Q_OBJECT
2929public:
3030 explicit DashCommunicator(QObject *parent = 0);
31− ~DashCommunicator() = default;
31+ ~DashCommunicator();
3232
3333public Q_SLOTS:
3434 void setCurrentScope(int index, bool animate, bool isSwipe);