Use new features of PyOtherSide 1.1.0
This commit is contained in:
parent
2ef9bfe581
commit
238cac1eb8
2 changed files with 11 additions and 6 deletions
|
@ -40,9 +40,13 @@ Python {
|
||||||
signal updatedPodcast(var podcast)
|
signal updatedPodcast(var podcast)
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
setHandler('hello', function (version, copyright) {
|
setHandler('hello', function (version, copyright, date, url) {
|
||||||
console.log('gPodder version ' + version + ' starting up');
|
console.log('gPodder ' + version + ' (' + date + ')');
|
||||||
console.log('Copyright: ' + copyright);
|
console.log(url);
|
||||||
|
console.log(copyright);
|
||||||
|
|
||||||
|
console.log('PyOtherSide ' + py.pluginVersion());
|
||||||
|
console.log('Python ' + py.pythonVersion());
|
||||||
});
|
});
|
||||||
|
|
||||||
setHandler('downloading', py.downloading);
|
setHandler('downloading', py.downloading);
|
||||||
|
@ -57,8 +61,7 @@ Python {
|
||||||
setHandler('updated-podcast', py.updatedPodcast);
|
setHandler('updated-podcast', py.updatedPodcast);
|
||||||
setHandler('refreshing', function(v) { py.refreshing = v; });
|
setHandler('refreshing', function(v) { py.refreshing = v; });
|
||||||
|
|
||||||
var path = Qt.resolvedUrl('../..').substr('file://'.length);
|
addImportPath(Qt.resolvedUrl('../..'));
|
||||||
addImportPath(path);
|
|
||||||
|
|
||||||
// Load the Python side of things
|
// Load the Python side of things
|
||||||
importModule('main', function() {
|
importModule('main', function() {
|
||||||
|
|
4
main.py
4
main.py
|
@ -294,7 +294,9 @@ class gPotherSide:
|
||||||
gpotherside = gPotherSide()
|
gpotherside = gPotherSide()
|
||||||
pyotherside.atexit(gpotherside.atexit)
|
pyotherside.atexit(gpotherside.atexit)
|
||||||
|
|
||||||
pyotherside.send('hello', gpodder.__version__, gpodder.__copyright__)
|
pyotherside.send('hello',
|
||||||
|
gpodder.__version__, gpodder.__copyright__,
|
||||||
|
gpodder.__date__, gpodder.__url__)
|
||||||
|
|
||||||
# Exposed API Endpoints for calls from QML
|
# Exposed API Endpoints for calls from QML
|
||||||
initialize = gpotherside.initialize
|
initialize = gpotherside.initialize
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue