on xenial help sign in
Be more thread safe
5509d1aAlbert Astals
plugins/Dash/croppedimagesizer.h+1−1
@@ -47,7 +47,7 @@ public:
47 void setHeight(qreal height);
47 void setHeight(qreal height);
48
48
49 QSize sourceSize() const;
49 QSize sourceSize() const;
50− void setSourceSize(const QSize &sourceSize);
50+ Q_INVOKABLE void setSourceSize(const QSize &sourceSize);
51
51
52Q_SIGNALS:
52Q_SIGNALS:
53 void inputParamsChanged();
53 void inputParamsChanged();
plugins/Dash/croppedimagesizerasyncworker.cpp+1−1
@@ -78,7 +78,7 @@ void CroppedImageSizerAsyncWorker::processRequestFinished(qreal width, qreal hei
78
78
79 worker->m_mutex.lock();
79 worker->m_mutex.lock();
80 if (worker->m_sizer) {
80 if (worker->m_sizer) {
81− worker->m_sizer->setSourceSize(sourceSize);
81+ QMetaObject::invokeMethod(worker->m_sizer, "setSourceSize", Qt::QueuedConnection, Q_ARG(QSize, sourceSize));
82 }
82 }
83 worker->m_mutex.unlock();
83 worker->m_mutex.unlock();
84
84