diff options
author | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-02-13 15:44:18 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@theqtcompany.com> | 2015-02-17 10:26:49 +0200 |
commit | 4caba7a3dda9a22a505d96799233dc35de29dba3 (patch) | |
tree | fc7597077e76c3c905cf32c47d566bb8a9ac521e /plugins/autotest/testtreemodel.cpp | |
parent | 223b43e9e0d978e1c6c2afc5002489eef09ec9e4 (diff) | |
download | qt-creator-4caba7a3dda9a22a505d96799233dc35de29dba3.tar.gz |
Perform parsing asynchronously...
...to avoid blocking the ui thread. Parsing will now performed
in a separate thread, except for small changes where this would
create too much overhead.
Change-Id: I1db441594f1684f969bb86c9423c0fb0bcb1a53a
Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
Diffstat (limited to 'plugins/autotest/testtreemodel.cpp')
-rw-r--r-- | plugins/autotest/testtreemodel.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp index cc54b6969a..8b9de455ad 100644 --- a/plugins/autotest/testtreemodel.cpp +++ b/plugins/autotest/testtreemodel.cpp @@ -55,15 +55,20 @@ TestTreeModel::TestTreeModel(QObject *parent) : m_rootItem->appendChild(m_autoTestRootItem); m_rootItem->appendChild(m_quickTestRootItem); - connect(m_parser, &TestCodeParser::cacheCleared, this, &TestTreeModel::removeAllTestItems); - connect(m_parser, &TestCodeParser::testItemCreated, this, &TestTreeModel::addTestTreeItem); - connect(m_parser, &TestCodeParser::testItemsCreated, this, &TestTreeModel::addTestTreeItems); - connect(m_parser, &TestCodeParser::testItemModified, this, &TestTreeModel::modifyTestTreeItem); - connect(m_parser, &TestCodeParser::testItemsRemoved, this, &TestTreeModel::removeTestTreeItems); + connect(m_parser, &TestCodeParser::cacheCleared, this, + &TestTreeModel::removeAllTestItems, Qt::QueuedConnection); + connect(m_parser, &TestCodeParser::testItemCreated, + this, &TestTreeModel::addTestTreeItem, Qt::QueuedConnection); + connect(m_parser, &TestCodeParser::testItemsCreated, + this, &TestTreeModel::addTestTreeItems, Qt::QueuedConnection); + connect(m_parser, &TestCodeParser::testItemModified, + this, &TestTreeModel::modifyTestTreeItem, Qt::QueuedConnection); + connect(m_parser, &TestCodeParser::testItemsRemoved, + this, &TestTreeModel::removeTestTreeItems, Qt::QueuedConnection); connect(m_parser, &TestCodeParser::unnamedQuickTestsUpdated, - this, &TestTreeModel::updateUnnamedQuickTest); + this, &TestTreeModel::updateUnnamedQuickTest, Qt::QueuedConnection); connect(m_parser, &TestCodeParser::unnamedQuickTestsRemoved, - this, &TestTreeModel::removeUnnamedQuickTests); + this, &TestTreeModel::removeUnnamedQuickTests, Qt::QueuedConnection); // CppTools::CppModelManagerInterface *cppMM = CppTools::CppModelManagerInterface::instance(); // if (cppMM) { |