19 #include "scriptloader.h"
21 #include <kapplication.h>
22 #include <kparts/part.h>
23 #include <kparts/componentfactory.h>
27 #include <kdesktopfile.h>
28 #include <kstandarsdirs.h>
29 #include <kstdaccel.h>
33 #include <tqfileinfo.h>
48 ScriptLoader::~ScriptLoader()
57 TQStringList pluginList =
"";
59 TQString searchPath = kapp->name();
60 searchPath +=
"/scripts/";
61 TQDir d(
locate(
"data", searchPath));
63 const QFileInfoList *fileList = d.entryInfoList(
"*.desktop");
64 QFileInfoListIterator it ( *fileList );
67 while( (fi=it.current()))
74 KScriptInterface *tmpIface = KParts::ComponentFactory::createInstanceFromQuery<KScriptInterface>(desktop.
readType() );
77 m_scripts.append(tmpIface);
78 m_scripts.current()->setScript(desktop.
readURL());
81 pluginList.append(desktop.
readName());
104 #include "scriptloader.moc"