Logo Search packages:      
Sourcecode: palapeli version File versions  Download package

void Palapeli::PatternTrader::rescanConfigurations (  ) 

Flushes and rebuilds the list of available Palapeli::PalapeliConfiguration instances.

Warning:
This method invalidates Palapeli::PatternConfiguration instances previously fetched from the trader.

Definition at line 74 of file pattern-trader.cpp.

References Palapeli::PatternPlugin::createInstances().

{
      //flush configuration list
      while (p->m_configs.count() != 0)
            delete p->m_configs.takeFirst();
      //fill configuration list
      KService::List offers = KServiceTypeTrader::self()->query("Palapeli/PatternPlugin");
      foreach (KService::Ptr offer, offers)
      {
            QVariantList args;
            args << offer->property("X-PluginIdentifier", QVariant::String).toString();
            args << offer->name();
            args << offer->icon();
            Palapeli::PatternPlugin* plugin = offer->createInstance<Palapeli::PatternPlugin>(0, args);
            if (plugin == 0)
                  continue;
            p->m_configs << plugin->createInstances();
            delete plugin;
      }
}


Generated by  Doxygen 1.6.0   Back to index