forked from qt-creator/qt-creator
Core: Modernize (minor)
Replace 2 loops with range loops, and use nullptr. Change-Id: I9f8920bb978ed218c5ec9ca01105652ebb51d842 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
12e253df9d
commit
9364e4b8ec
@@ -355,7 +355,7 @@ void MainWindow::openDroppedFiles(const QList<DropSupport::FileSpec> &files)
|
||||
|
||||
IContext *MainWindow::currentContextObject() const
|
||||
{
|
||||
return m_activeContext.isEmpty() ? 0 : m_activeContext.first();
|
||||
return m_activeContext.isEmpty() ? nullptr : m_activeContext.first();
|
||||
}
|
||||
|
||||
QStatusBar *MainWindow::statusBar() const
|
||||
@@ -1086,8 +1086,7 @@ void MainWindow::updateContext()
|
||||
contexts.add(m_lowPrioAdditionalContexts);
|
||||
|
||||
Context uniquecontexts;
|
||||
for (int i = 0; i < contexts.size(); ++i) {
|
||||
const Id id = contexts.at(i);
|
||||
for (const Id &id : qAsConst(contexts)) {
|
||||
if (!uniquecontexts.contains(id))
|
||||
uniquecontexts.add(id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user