diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2014-07-01 11:08:26 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-07-01 11:52:08 +0200 |
commit | 93304df0381cbeabf4c8435aec0ad55fbc7f8fe7 (patch) | |
tree | 7cbe348b1e3f88041b7e159aa335031e2c41bfc8 /src/plugins/projectexplorer/taskwindow.cpp | |
parent | 139449239c7cd63ab933d13e20b37cd717a45fe7 (diff) | |
download | qt-creator-93304df0381cbeabf4c8435aec0ad55fbc7f8fe7.tar.gz |
Always pass Core::Id by value.
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/projectexplorer/taskwindow.cpp')
-rw-r--r-- | src/plugins/projectexplorer/taskwindow.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index 0bc1c088bb..dcd064af6d 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -361,7 +361,7 @@ QWidget *TaskWindow::outputWidget(QWidget *) return d->m_listview; } -void TaskWindow::clearTasks(const Core::Id &categoryId) +void TaskWindow::clearTasks(Core::Id categoryId) { if (categoryId.uniqueIdentifier() != 0 && !d->m_filter->filteredCategories().contains(categoryId)) { if (d->m_filter->filterIncludesErrors()) @@ -383,7 +383,7 @@ void TaskWindow::clearTasks(const Core::Id &categoryId) setBadgeNumber(d->m_badgeCount); } -void TaskWindow::setCategoryVisibility(const Core::Id &categoryId, bool visible) +void TaskWindow::setCategoryVisibility(Core::Id categoryId, bool visible) { if (categoryId.uniqueIdentifier() == 0) return; @@ -424,7 +424,7 @@ void TaskWindow::visibilityChanged(bool visible) delayedInitialization(); } -void TaskWindow::addCategory(const Core::Id &categoryId, const QString &displayName, bool visible) +void TaskWindow::addCategory(Core::Id categoryId, const QString &displayName, bool visible) { d->m_model->addCategory(categoryId, displayName); if (!visible) { @@ -557,7 +557,7 @@ void TaskWindow::updateCategoriesMenu() const QList<Core::Id> filteredCategories = d->m_filter->filteredCategories(); QMap<QString, Core::Id> nameToIds; - foreach (const Core::Id &categoryId, d->m_model->categoryIds()) + foreach (Core::Id categoryId, d->m_model->categoryIds()) nameToIds.insert(d->m_model->categoryDisplayName(categoryId), categoryId); const NameToIdsConstIt cend = nameToIds.constEnd(); @@ -581,17 +581,17 @@ void TaskWindow::filterCategoryTriggered(QAction *action) setCategoryVisibility(categoryId, action->isChecked()); } -int TaskWindow::taskCount(const Core::Id &category) const +int TaskWindow::taskCount(Core::Id category) const { return d->m_model->taskCount(category); } -int TaskWindow::errorTaskCount(const Core::Id &category) const +int TaskWindow::errorTaskCount(Core::Id category) const { return d->m_model->errorTaskCount(category); } -int TaskWindow::warningTaskCount(const Core::Id &category) const +int TaskWindow::warningTaskCount(Core::Id category) const { return d->m_model->warningTaskCount(category); } |