diff options
author | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-04-06 17:46:04 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@theqtcompany.com> | 2016-04-07 12:05:41 +0000 |
commit | e819357bc91afdfe07264e37c3102d786bfe3b96 (patch) | |
tree | 0f5106f1660b2cf613ae6572ccda70f2067e4cbe | |
parent | c76548ce29ff046c713880c47e195b211f3c56b7 (diff) | |
download | qt-creator-e819357bc91afdfe07264e37c3102d786bfe3b96.tar.gz |
GenericProject: Pass base directory to startParsing(...) method
Change-Id: I59645aabac99261526808887e5fe25e575d8d79d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
-rw-r--r-- | src/plugins/projectexplorer/selectablefilesmodel.cpp | 8 | ||||
-rw-r--r-- | src/plugins/projectexplorer/selectablefilesmodel.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/projectexplorer/selectablefilesmodel.cpp b/src/plugins/projectexplorer/selectablefilesmodel.cpp index 24a1d0abcc..4d2cb8a973 100644 --- a/src/plugins/projectexplorer/selectablefilesmodel.cpp +++ b/src/plugins/projectexplorer/selectablefilesmodel.cpp @@ -560,7 +560,7 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) : connect(m_baseDirChooser, &Utils::PathChooser::validChanged, this, &SelectableFilesWidget::baseDirectoryChanged); connect(m_startParsingButton, &QAbstractButton::clicked, - this, &SelectableFilesWidget::startParsing); + this, [this]() { startParsing(m_baseDirChooser->fileName()); }); m_showFilesFilterLabel->setText(tr("Show files matching:")); m_showFilesFilterEdit->setText(showFilter); @@ -641,7 +641,7 @@ void SelectableFilesWidget::resetModel(const Utils::FileName &path, const Utils: m_baseDirChooser->setFileName(path); m_view->setModel(m_model); - startParsing(); + startParsing(path); } void SelectableFilesWidget::cancelParsing() @@ -675,13 +675,13 @@ void SelectableFilesWidget::baseDirectoryChanged(bool validState) m_startParsingButton->setEnabled(validState); } -void SelectableFilesWidget::startParsing() +void SelectableFilesWidget::startParsing(const Utils::FileName &baseDir) { if (!m_model) return; enableWidgets(false); - m_model->startParsing(m_baseDirChooser->fileName()); + m_model->startParsing(baseDir); } void SelectableFilesWidget::parsingProgress(const Utils::FileName &fileName) diff --git a/src/plugins/projectexplorer/selectablefilesmodel.h b/src/plugins/projectexplorer/selectablefilesmodel.h index c1baa921e9..caee857e09 100644 --- a/src/plugins/projectexplorer/selectablefilesmodel.h +++ b/src/plugins/projectexplorer/selectablefilesmodel.h @@ -176,7 +176,7 @@ private: void applyFilter(); void baseDirectoryChanged(bool validState); - void startParsing(); + void startParsing(const Utils::FileName &baseDir); void parsingProgress(const Utils::FileName &fileName); void parsingFinished(); |