Fix compile

Change-Id: I3ec711b1b56e59172f54738e64faff0fd7dd707f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Daniel Teske
2014-09-03 18:16:55 +02:00
parent 136c860ac9
commit 480efb0254

View File

@@ -301,12 +301,12 @@ QWidget *WidgetCache::widgetFor(Project *project, int supportsIndex)
QList<ProjectPanelFactory *> fac = ProjectPanelFactory::factories(); QList<ProjectPanelFactory *> fac = ProjectPanelFactory::factories();
int factoryIndex = factoryIndex(projectIndex, supportsIndex); int factoryIdx = factoryIndex(projectIndex, supportsIndex);
if (factoryIndex < 0 ||factoryIndex >= m_projects.at(projectIndex).widgets.size()) if (factoryIdx < 0 ||factoryIdx >= m_projects.at(projectIndex).widgets.size())
return 0; return 0;
if (!m_projects.at(projectIndex).widgets.at(factoryIndex)) if (!m_projects.at(projectIndex).widgets.at(factoryIdx))
m_projects[projectIndex].widgets[factoryIndex] = fac.at(factoryIndex)->createWidget(project); m_projects[projectIndex].widgets[factoryIdx] = fac.at(factoryIdx)->createWidget(project);
return m_projects.at(projectIndex).widgets.at(factoryIndex); return m_projects.at(projectIndex).widgets.at(factoryIdx);
} }
bool WidgetCache::isRegistered(Project *project) const bool WidgetCache::isRegistered(Project *project) const
@@ -354,7 +354,7 @@ void WidgetCache::sort()
int WidgetCache::recheckFactories(Project *project, int oldSupportsIndex) int WidgetCache::recheckFactories(Project *project, int oldSupportsIndex)
{ {
int projectIndex = indexForProject(project); int projectIndex = indexForProject(project);
int factoryIndex = factoryIndex(projectIndex, oldSupportsIndex); int factoryIdx = factoryIndex(projectIndex, oldSupportsIndex);
ProjectInfo &info = m_projects[projectIndex]; ProjectInfo &info = m_projects[projectIndex];
QList<ProjectPanelFactory *> fac = ProjectPanelFactory::factories(); QList<ProjectPanelFactory *> fac = ProjectPanelFactory::factories();
@@ -368,14 +368,14 @@ int WidgetCache::recheckFactories(Project *project, int oldSupportsIndex)
} }
} }
if (factoryIndex < 0) if (factoryIdx < 0)
return -1; return -1;
if (!info.supports.at(factoryIndex)) if (!info.supports.at(factoryIdx))
return -1; return -1;
int newIndex = 0; int newIndex = 0;
for (int i = 0; i < factoryIndex; ++i) { for (int i = 0; i < factoryIdx; ++i) {
if (info.supports.at(i)) if (info.supports.at(i))
++newIndex; ++newIndex;
} }