on xenial help sign in
Ensure saveGeometry finishes before the thread it created actually starts to run
c33d3d2Daniel d'Andrada
plugins/Utils/windowstatestorage.cpp+2
@@ -49,6 +49,8 @@ WindowStateStorage::~WindowStateStorage()
49
49
50void WindowStateStorage::saveGeometry(const QString &windowId, const QRect &rect)
50void WindowStateStorage::saveGeometry(const QString &windowId, const QRect &rect)
51{
51{
52+ QMutexLocker mutexLocker(&s_mutex);
53+
52 QString queryString = QString("INSERT OR REPLACE INTO geometry (windowId, x, y, width, height) values ('%1', '%2', '%3', '%4', '%5');")
54 QString queryString = QString("INSERT OR REPLACE INTO geometry (windowId, x, y, width, height) values ('%1', '%2', '%3', '%4', '%5');")
53 .arg(windowId)
55 .arg(windowId)
54 .arg(rect.x())
56 .arg(rect.x())