Wizards: Fix custom wizards (fix up delayed creation).

Fixes e5f60a956f
This commit is contained in:
Friedemann Kleint
2010-08-31 14:34:09 +02:00
parent 7607f2ffbe
commit 1d45330153
5 changed files with 25 additions and 3 deletions

View File

@@ -28,6 +28,7 @@
**************************************************************************/
#include "iwizard.h"
#include "coreimpl.h"
#include <extensionsystem/pluginmanager.h>
@@ -139,6 +140,9 @@ using namespace Core;
template <class Predicate>
QList<IWizard*> findWizards(Predicate predicate)
{
// Hack: Trigger delayed creation of wizards
if (Core::Internal::CoreImpl *ci = qobject_cast<Core::Internal::CoreImpl*>(ICore::instance()))
ci->emitNewItemsDialogRequested();
// Filter all wizards
const QList<IWizard*> allWizards = IWizard::allWizards();
QList<IWizard*> rc;
@@ -151,6 +155,9 @@ template <class Predicate>
QList<IWizard*> IWizard::allWizards()
{
// Hack: Trigger delayed creation of wizards
if (Core::Internal::CoreImpl *ci = qobject_cast<Core::Internal::CoreImpl*>(ICore::instance()))
ci->emitNewItemsDialogRequested();
return ExtensionSystem::PluginManager::instance()->getObjects<IWizard>();
}