~stolowski/unity-scopes-shell/not-expandable

« back to all changes in this revision

Viewing changes to src/Unity/scope.cpp

  • Committer: Bileto Bot
  • Author(s): Marcus Tomlinson
  • Date: 2016-10-04 08:59:14 UTC
  • mfrom: (345.1.1 trunk)
  • Revision ID: ci-train-bot@canonical.com-20161004085914-6oqgwuine69q82z4
Don't make changes to the settings model from a separate thread. (LP: #1627795)

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
 
134
134
Scope::~Scope()
135
135
{
136
 
    m_childScopesFuture.waitForFinished();
137
136
}
138
137
 
139
138
void Scope::processSearchChunk(PushEvent* pushEvent)
964
963
        // reset the flag so that re-entering this method won't restart the update unnecessarily
965
964
        m_childScopesDirty = false;
966
965
 
967
 
        // just in case we have another update still running, wait here for it to complete
968
 
        m_childScopesFuture.waitForFinished();
969
 
 
970
 
        // run the update in a seperate thread
971
 
        m_childScopesFuture = QtConcurrent::run([this]
972
 
        {
973
 
            m_settingsModel->update_child_scopes(m_scopesInstance->getAllMetadata());
974
 
        });
 
966
        m_settingsModel->update_child_scopes(m_scopesInstance->getAllMetadata());
975
967
    }
976
968
}
977
969