plasmoid.hasExtension(string) -> allows plasmoids to check which extensions actually made it into the run time

svn path=/trunk/KDE/kdebase/runtime/; revision=1048914
This commit is contained in:
Aaron J. Seigo 2009-11-14 07:33:42 +00:00
parent 8ec33f16dd
commit bdfdfae083
2 changed files with 6 additions and 0 deletions

View File

@ -326,6 +326,11 @@ bool AppletInterface::include(const QString &script)
return m_appletScriptEngine->include(path); return m_appletScriptEngine->include(path);
} }
bool AppletInterface::hasExtension(const QString &extension) const
{
return m_appletScriptEngine->loadedExtensions().contains(extension.toLower());
}
void AppletInterface::debug(const QString &msg) void AppletInterface::debug(const QString &msg)
{ {
kDebug() << msg; kDebug() << msg;

View File

@ -219,6 +219,7 @@ enum QtScrollBarPolicy {
Q_INVOKABLE QString file(const QString &fileType, const QString &filePath); Q_INVOKABLE QString file(const QString &fileType, const QString &filePath);
Q_INVOKABLE bool include(const QString &script); Q_INVOKABLE bool include(const QString &script);
Q_INVOKABLE bool hasExtension(const QString &extension) const;
Q_INVOKABLE void debug(const QString &msg); Q_INVOKABLE void debug(const QString &msg);