forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.0'
Conflicts: src/plugins/debugger/debuggerruncontrol.cpp src/plugins/projectexplorer/projectwizardpage.cpp src/plugins/projectexplorer/xcodebuildparser.h src/plugins/qmldesigner/qmldesignerplugin.cpp src/tools/clangbackend/ipcsource/translationunits.cpp Change-Id: Ibf0857cf8dbf95fc9ac13d5c2112b3f4a2ca7de6
This commit is contained in:
@@ -88,10 +88,10 @@ static bool isNestedInstantiationEnclosingTemplate(
|
||||
ClassOrNamespace *nestedClassOrNamespaceInstantiation,
|
||||
ClassOrNamespace *enclosingTemplateClassInstantiation)
|
||||
{
|
||||
QList<ClassOrNamespace *> processed;
|
||||
QSet<ClassOrNamespace *> processed;
|
||||
while (enclosingTemplateClassInstantiation
|
||||
&& !processed.contains(enclosingTemplateClassInstantiation)) {
|
||||
processed.append(enclosingTemplateClassInstantiation);
|
||||
processed.insert(enclosingTemplateClassInstantiation);
|
||||
if (enclosingTemplateClassInstantiation == nestedClassOrNamespaceInstantiation)
|
||||
return false;
|
||||
enclosingTemplateClassInstantiation = enclosingTemplateClassInstantiation->parent();
|
||||
@@ -454,8 +454,13 @@ QList<LookupItem> LookupContext::lookup(const Name *name, Scope *scope) const
|
||||
candidates = binding->find(name);
|
||||
|
||||
// try find this name in parent class
|
||||
while (candidates.isEmpty() && (binding = binding->parent()))
|
||||
QSet<ClassOrNamespace *> processed;
|
||||
while (candidates.isEmpty() && (binding = binding->parent())) {
|
||||
if (processed.contains(binding))
|
||||
break;
|
||||
processed.insert(binding);
|
||||
candidates = binding->find(name);
|
||||
}
|
||||
|
||||
if (! candidates.isEmpty())
|
||||
return candidates;
|
||||
@@ -1143,8 +1148,13 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
|
||||
instantiation->_name = templId;
|
||||
instantiation->_templateId = templId;
|
||||
|
||||
while (!origin->_symbols.isEmpty() && origin->_symbols[0]->isBlock())
|
||||
QSet<ClassOrNamespace *> processed;
|
||||
while (!origin->_symbols.isEmpty() && origin->_symbols[0]->isBlock()) {
|
||||
if (processed.contains(origin))
|
||||
break;
|
||||
processed.insert(origin);
|
||||
origin = origin->parent();
|
||||
}
|
||||
|
||||
instantiation->_instantiationOrigin = origin;
|
||||
|
||||
|
||||
@@ -140,6 +140,9 @@ int OverviewModel::columnCount(const QModelIndex &) const
|
||||
|
||||
QVariant OverviewModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
// account for no symbol item
|
||||
if (!index.parent().isValid() && index.row() == 0) {
|
||||
switch (role) {
|
||||
@@ -243,7 +246,9 @@ void OverviewModel::rebuild(Document::Ptr doc)
|
||||
|
||||
Qt::ItemFlags OverviewModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(index)
|
||||
if (!index.isValid())
|
||||
return 0;
|
||||
|
||||
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user