forked from qt-creator/qt-creator
ProjectExplorer: Use qAsConst w/ non-const Qt containers in range-loops
Change-Id: I6422b3e40a6925504a231be2d47b3214d86c6e06 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -419,7 +419,7 @@ void TaskWindow::delayedInitialization()
|
||||
|
||||
alreadyDone = true;
|
||||
|
||||
for (ITaskHandler *h : g_taskHandlers) {
|
||||
for (ITaskHandler *h : qAsConst(g_taskHandlers)) {
|
||||
if (h->isDefaultHandler() && !d->m_defaultHandler)
|
||||
d->m_defaultHandler = h;
|
||||
|
||||
@@ -843,7 +843,7 @@ void TaskDelegate::currentChanged(const QModelIndex ¤t, const QModelIndex
|
||||
|
||||
QString TaskDelegate::hrefForPos(const QPointF &pos)
|
||||
{
|
||||
for (const auto &link : m_hrefs) {
|
||||
for (const auto &link : qAsConst(m_hrefs)) {
|
||||
if (link.first.contains(pos))
|
||||
return link.second;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user