simple access to file paths in the package
svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=960161
This commit is contained in:
parent
f9657ce683
commit
816cddf4cd
@ -171,8 +171,19 @@ QScriptValue AppletInterface::readConfig(const QString &entry) const
|
||||
return m_appletScriptEngine->variantToScriptValue(result);
|
||||
}
|
||||
|
||||
QString AppletInterface::file(const QString &fileType)
|
||||
{
|
||||
return m_appletScriptEngine->package()->filePath(fileType.toLocal8Bit().constData());
|
||||
}
|
||||
|
||||
QString AppletInterface::file(const QString &fileType, const QString &filePath)
|
||||
{
|
||||
return m_appletScriptEngine->package()->filePath(fileType.toLocal8Bit().constData(), filePath);
|
||||
}
|
||||
|
||||
const Plasma::Package *AppletInterface::package() const
|
||||
{
|
||||
kDebug() << "woot";
|
||||
return m_appletScriptEngine->package();
|
||||
}
|
||||
|
||||
|
@ -145,6 +145,9 @@ enum QtOrientation {
|
||||
|
||||
Q_INVOKABLE void writeConfig(const QString &entry, const QVariant &value);
|
||||
|
||||
Q_INVOKABLE QString file(const QString &fileType);
|
||||
Q_INVOKABLE QString file(const QString &fileType, const QString &filePath);
|
||||
|
||||
Plasma::DataEngine *dataEngine(const QString &name);
|
||||
|
||||
const Plasma::Package *package() const;
|
||||
|
Loading…
Reference in New Issue
Block a user