Commit 1b6b0aed authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Merge pull request #5 from mathstuf/list-all-children

pqObjectNaming: list all available object as a last resort
parents a5c52c52 1974116d
......@@ -255,6 +255,7 @@ QObject* pqObjectNaming::GetObject(const QString& Name)
ErrorMessage += QString("Found up to %1\n").arg(
pqObjectNaming::GetName(*lastObject));
}
bool foundMatch = false;
if(lastObject)
{
QObjectList matches =
......@@ -262,6 +263,15 @@ QObject* pqObjectNaming::GetObject(const QString& Name)
foreach(QObject* o, matches)
{
ErrorMessage += QString("\tPossible match: %1\n").arg(pqObjectNaming::GetName(*o));
foundMatch = true;
}
}
if (!foundMatch)
{
QObjectList matches = lastObject->findChildren<QObject*>();
foreach(QObject* o, matches)
{
ErrorMessage += QString("\tAvailable widget: %1\n").arg(pqObjectNaming::GetName(*o));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment