From 480efb025424f854b9f02f56921346f99ac562a2 Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Wed, 3 Sep 2014 18:16:55 +0200 Subject: [PATCH] Fix compile Change-Id: I3ec711b1b56e59172f54738e64faff0fd7dd707f Reviewed-by: Daniel Teske --- src/plugins/projectexplorer/projectwindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index a956596bcf2..ffa996811f0 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -301,12 +301,12 @@ QWidget *WidgetCache::widgetFor(Project *project, int supportsIndex) QList fac = ProjectPanelFactory::factories(); - int factoryIndex = factoryIndex(projectIndex, supportsIndex); - if (factoryIndex < 0 ||factoryIndex >= m_projects.at(projectIndex).widgets.size()) + int factoryIdx = factoryIndex(projectIndex, supportsIndex); + if (factoryIdx < 0 ||factoryIdx >= m_projects.at(projectIndex).widgets.size()) return 0; - if (!m_projects.at(projectIndex).widgets.at(factoryIndex)) - m_projects[projectIndex].widgets[factoryIndex] = fac.at(factoryIndex)->createWidget(project); - return m_projects.at(projectIndex).widgets.at(factoryIndex); + if (!m_projects.at(projectIndex).widgets.at(factoryIdx)) + m_projects[projectIndex].widgets[factoryIdx] = fac.at(factoryIdx)->createWidget(project); + return m_projects.at(projectIndex).widgets.at(factoryIdx); } bool WidgetCache::isRegistered(Project *project) const @@ -354,7 +354,7 @@ void WidgetCache::sort() int WidgetCache::recheckFactories(Project *project, int oldSupportsIndex) { int projectIndex = indexForProject(project); - int factoryIndex = factoryIndex(projectIndex, oldSupportsIndex); + int factoryIdx = factoryIndex(projectIndex, oldSupportsIndex); ProjectInfo &info = m_projects[projectIndex]; QList fac = ProjectPanelFactory::factories(); @@ -368,14 +368,14 @@ int WidgetCache::recheckFactories(Project *project, int oldSupportsIndex) } } - if (factoryIndex < 0) + if (factoryIdx < 0) return -1; - if (!info.supports.at(factoryIndex)) + if (!info.supports.at(factoryIdx)) return -1; int newIndex = 0; - for (int i = 0; i < factoryIndex; ++i) { + for (int i = 0; i < factoryIdx; ++i) { if (info.supports.at(i)) ++newIndex; }