|
|
|
@ -83,8 +83,8 @@ KParts::ReadWritePart* KMFPluginFactory::KMFMainView( KParts::MainWindow* parent
|
|
|
|
|
TQValueList<KMFCompilerInterface*>* KMFPluginFactory::CompilersForInstaller( const TQString& osName ) {
|
|
|
|
|
TQValueList<KMFCompilerInterface*> *list = new TQValueList<KMFCompilerInterface*>();
|
|
|
|
|
kdDebug() << "Query: KMyFirewall/Compiler [X-KMyFirewall-Platform] == '" << osName.lower() << "'" << endl;
|
|
|
|
|
KTrader::OfferList offers = KTrader::self()->query( "KMyFirewall/Compiler", "[X-KMyFirewall-Platform] == '" + osName.lower() + "'");
|
|
|
|
|
KTrader::OfferList::iterator it;
|
|
|
|
|
TDETrader::OfferList offers = TDETrader::self()->query( "KMyFirewall/Compiler", "[X-KMyFirewall-Platform] == '" + osName.lower() + "'");
|
|
|
|
|
TDETrader::OfferList::iterator it;
|
|
|
|
|
if ( offers.empty() ) {
|
|
|
|
|
kdDebug() << "NO MATCHING PLUGIN FOUND - KMyFirewall/Compiler" << endl;
|
|
|
|
|
}
|
|
|
|
@ -107,10 +107,10 @@ TQValueList<KMFCompilerInterface*>* KMFPluginFactory::CompilersForInstaller( con
|
|
|
|
|
|
|
|
|
|
TQPtrList<KMFRuleOptionEditInterface>* KMFPluginFactory::KMFRuleOptionEditors( TQObject *parent ){
|
|
|
|
|
TQPtrList<KMFRuleOptionEditInterface> *list = new TQPtrList<KMFRuleOptionEditInterface>;
|
|
|
|
|
KTrader::OfferList offers = KTrader::self()->query( "KMyFirewall/RuleOptionEdit");
|
|
|
|
|
TDETrader::OfferList offers = TDETrader::self()->query( "KMyFirewall/RuleOptionEdit");
|
|
|
|
|
kdDebug() << "Query performed" << endl;
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList::iterator it;
|
|
|
|
|
TDETrader::OfferList::iterator it;
|
|
|
|
|
for ( it = offers.begin(); it != offers.end(); ++it ) {
|
|
|
|
|
KService::Ptr ptr = *it;
|
|
|
|
|
kdDebug() << "Found KMFRuleOptionEdit Plugin: " << ptr->name() << "\nLibrary: "<< ptr->library().local8Bit().data() <<endl;
|
|
|
|
@ -132,10 +132,10 @@ TQPtrList<KMFRuleOptionEditInterface>* KMFPluginFactory::KMFRuleOptionEditors( T
|
|
|
|
|
|
|
|
|
|
TQPtrList<KMFRuleTargetOptionEditInterface>* KMFPluginFactory::KMFRuleTargetOptionEditors( TQObject *parent ) {
|
|
|
|
|
TQPtrList<KMFRuleTargetOptionEditInterface> *list = new TQPtrList<KMFRuleTargetOptionEditInterface>;
|
|
|
|
|
KTrader::OfferList offers = KTrader::self()->query( "KMyFirewall/RuleTargetOptionEdit");
|
|
|
|
|
TDETrader::OfferList offers = TDETrader::self()->query( "KMyFirewall/RuleTargetOptionEdit");
|
|
|
|
|
kdDebug() << "Query performed" << endl;
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList::iterator it;
|
|
|
|
|
TDETrader::OfferList::iterator it;
|
|
|
|
|
for ( it = offers.begin(); it != offers.end(); ++it ) {
|
|
|
|
|
KService::Ptr ptr = *it;
|
|
|
|
|
kdDebug() << "Found KMFRuleTargetOptionEdit Plugin: " << ptr->name() << "\nLibrary: "<< ptr->library().local8Bit().data() <<endl;
|
|
|
|
@ -157,10 +157,10 @@ TQPtrList<KMFRuleTargetOptionEditInterface>* KMFPluginFactory::KMFRuleTargetOpti
|
|
|
|
|
|
|
|
|
|
KMFInstallerInterface* KMFPluginFactory::KMFInstaller( KMFTarget* target ) {
|
|
|
|
|
|
|
|
|
|
KTrader::OfferList offers = KTrader::self()->query( "KMyFirewall/Installer", " [X-KMyFirewall-Platform] == '"+ target->config()->oS().lower() +"'" );
|
|
|
|
|
TDETrader::OfferList offers = TDETrader::self()->query( "KMyFirewall/Installer", " [X-KMyFirewall-Platform] == '"+ target->config()->oS().lower() +"'" );
|
|
|
|
|
kdDebug() << "Query performed" << endl;
|
|
|
|
|
KService::Ptr ptr = offers.first();
|
|
|
|
|
KTrader::OfferList::iterator it;
|
|
|
|
|
TDETrader::OfferList::iterator it;
|
|
|
|
|
if ( offers.empty() ) {
|
|
|
|
|
kdDebug() << "NO MATCHING PLUGIN FOUND" << endl;
|
|
|
|
|
return 0;
|
|
|
|
@ -189,10 +189,10 @@ KMFInstallerInterface* KMFPluginFactory::KMFInstaller( KMFTarget* target ) {
|
|
|
|
|
KMFCompilerInterface* KMFPluginFactory::KMFCompiler( KMFTarget* target ) {
|
|
|
|
|
kdDebug() << "KMFCompilerInterface* KMFGenericDoc::compiler()" << endl;
|
|
|
|
|
kdDebug() << "Start query" << endl;
|
|
|
|
|
KTrader::OfferList offers = KTrader::self()->query( "KMyFirewall/Compiler", "[X-KMyFirewall-Language] == '" + target->config()->backend().lower() +"' and [X-KMyFirewall-Platform] == '" + target->config()->oS().lower() + "'" );
|
|
|
|
|
TDETrader::OfferList offers = TDETrader::self()->query( "KMyFirewall/Compiler", "[X-KMyFirewall-Language] == '" + target->config()->backend().lower() +"' and [X-KMyFirewall-Platform] == '" + target->config()->oS().lower() + "'" );
|
|
|
|
|
kdDebug() << "Query performed" << endl;
|
|
|
|
|
KService::Ptr ptr = offers.first();
|
|
|
|
|
KTrader::OfferList::iterator it;
|
|
|
|
|
TDETrader::OfferList::iterator it;
|
|
|
|
|
if ( offers.empty() ) {
|
|
|
|
|
KMessageBox::error(0, i18n("<qt><b>Could not find a matching compiler plugin.</b></qt>") );
|
|
|
|
|
kdDebug() << "NO MATCHING PLUGIN FOUND" << endl;
|
|
|
|
|