|
|
|
|
@ -22,7 +22,7 @@
|
|
|
|
|
|
|
|
|
|
#include <kdebug.h>
|
|
|
|
|
#include <klibloader.h>
|
|
|
|
|
#include <kdesktopfile.h>
|
|
|
|
|
#include <tdedesktopfile.h>
|
|
|
|
|
#include <tdelocale.h>
|
|
|
|
|
#include <tdeglobal.h>
|
|
|
|
|
#include <tdestandarddirs.h>
|
|
|
|
|
@ -86,7 +86,7 @@ KSim::PluginLoader::~PluginLoader()
|
|
|
|
|
delete d;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool KSim::PluginLoader::loadPlugin(const KDesktopFile &file)
|
|
|
|
|
bool KSim::PluginLoader::loadPlugin(const TDEDesktopFile &file)
|
|
|
|
|
{
|
|
|
|
|
switch (createPlugin(file)) {
|
|
|
|
|
case KSim::PluginLoader::EmptyLibName:
|
|
|
|
|
@ -174,7 +174,7 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
|
|
|
|
|
TQStringList files = TDEGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
|
|
|
|
|
TQStringList::ConstIterator it;
|
|
|
|
|
for (it = files.begin(); it != files.end(); ++it) {
|
|
|
|
|
KDesktopFile file((*it));
|
|
|
|
|
TDEDesktopFile file((*it));
|
|
|
|
|
if (file.readName() == name) {
|
|
|
|
|
location = (*it);
|
|
|
|
|
break;
|
|
|
|
|
@ -186,7 +186,7 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
|
|
|
|
|
TQStringList files = TDEGlobal::dirs()->findAllResources("data", "ksim/monitors/*.desktop");
|
|
|
|
|
TQStringList::ConstIterator it;
|
|
|
|
|
for (it = files.begin(); it != files.end(); ++it) {
|
|
|
|
|
KDesktopFile file((*it));
|
|
|
|
|
TDEDesktopFile file((*it));
|
|
|
|
|
if (file.readEntry("X-KSIM-LIBRARY") == name) {
|
|
|
|
|
location = (*it);
|
|
|
|
|
break;
|
|
|
|
|
@ -195,7 +195,7 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case DesktopFile: {
|
|
|
|
|
if (!KDesktopFile::isDesktopFile(name))
|
|
|
|
|
if (!TDEDesktopFile::isDesktopFile(name))
|
|
|
|
|
return KSim::PluginInfo();
|
|
|
|
|
|
|
|
|
|
location = name;
|
|
|
|
|
@ -203,7 +203,7 @@ KSim::PluginInfo KSim::PluginLoader::findPluginInfo(const TQString &name,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KDesktopFile file(location);
|
|
|
|
|
TDEDesktopFile file(location);
|
|
|
|
|
KSim::PluginInfo info;
|
|
|
|
|
info.m_name = file.readName();
|
|
|
|
|
info.m_libName = file.readEntry("X-KSIM-LIBRARY").local8Bit();
|
|
|
|
|
@ -292,7 +292,7 @@ void KSim::PluginLoader::cleanup()
|
|
|
|
|
m_instance = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KSim::PluginLoader::ErrorCode KSim::PluginLoader::createPlugin(const KDesktopFile &file)
|
|
|
|
|
KSim::PluginLoader::ErrorCode KSim::PluginLoader::createPlugin(const TDEDesktopFile &file)
|
|
|
|
|
{
|
|
|
|
|
d->error = TQString();
|
|
|
|
|
TQCString pluginName(file.readEntry("X-KSIM-LIBRARY").local8Bit());
|
|
|
|
|
|