[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Installing Plasma.Service *.operations file
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2010-12-22 23:40:59
Message-ID: 201012221541.01562.aseigo () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Wednesday, December 22, 2010, Thomas Olsen wrote:
> Except that it doesn't work until it's installed in
> ~/.kde/share/apps/plasma/services. I thought I had messed up my code but it
> works again after I copied it there.
no, that's quite wrong: packages should never install files outside of
themselves ...
bet the Python DataEngine bindings are messed up and don't check for the file
in the "services" location.
*looks*
yes, that's it. *grumble*
the Javascript bindings have a class called JavaScriptService which does this:
void JavaScriptService::registerOperationsScheme()
{
if (!m_dataEngine) {
return;
}
const QString path = m_dataEngine.data()->filePath("services", name() +
".operations");
if (path.isEmpty()) {
kDebug() << "Cannot find operations description:" << name() <<
".operations";
m_dataEngine.clear();
return;
}
QFile file(path);
setOperationsScheme(&file);
}
since the Service does not know about the DataEngine (and can't, at least not
in a reliable fasion; it can be told about the DataEngine, but only after its
too late .. and using the QObject hierarchy is just too error prone and would
invalidate valid use cases where the DataEngine isn't an ancestor), the
ScriptEngine needs to provide a service subclass that does as the above.
you may be able to work around that in your Python code by creating a
Plasma::Service subclass yourself which does the above? it realy does belong
in the Python ScriptEngine, in any case, but that's beyond my python mojo to
do :)
--
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
KDE core developer sponsored by Qt Development Frameworks
["signature.asc" (application/pgp-signature)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic