Seems it was a thread issue. my RpmInstall class was constructed in a different thread(SailClient) from "mainthread" below lines (parent is main class) fixed it: (Actually I need to read more about how threads works in Qt kinda confusing...)
moveToThread(parent->thread()); setParent(parent); But now I got a bit confused again because I noticed that my phone emited alot of "status 1" for other packages already installed :S is this correct? just a short dump(the full log is alot bigger): ...... [D] RpmInstall::onPackageStatusChanged:37 - install (not mine ignored) "jolla-email- all-translations-pack" status 1 [D] RpmInstall::onPackageStatusChanged:37 - install (not mine ignored) "jolla-email- settings" status 1 [D] RpmInstall::onPackageStatusChanged:37 - install (not mine ignored) "jolla- firstsession" status 1 ..... code: void RpmInstall::onPackageStatusChanged(const QString &filename, int status) { SailHttpServer *server = dynamic_cast <SailHttpServer *>(parent()); if (installFilename != filename) { qDebug() << "install (not mine ignored) " << filename << " status " << status; return ; } qDebug() << "install " << filename << " status " << status; if (status == 1) // installed { if (server && server->property("removeRpmAfterInstall").toBool()) { QFile file(filename); file.remove(); } } } On Thursday, June 12, 2014 16:34:44 Kimmo Lindholm wrote: > does QDBusConnection::sessionBus().lastError().message() give any details on > error? > > From: devel-boun...@lists.sailfishos.org > [mailto:devel-boun...@lists.sailfishos.org] On Behalf Of Mikael Hermansson > Sent: Thursday, June 12, 2014 10:25 AM > To: sailfish-devel > Subject: [SailfishDevel] rpminstall signal packageStatusChanged > > > I want to connect to the signal packageStatusChanged from the harbour FAQ I > read this: > > > > signal path=/StoreClient; interface=com.jolla.jollastore; > member=packageStatusChanged > > string "filename.rpm" > > int32 0 (not installed?), 1 (installed?) and 2 (progressing?) > > > > But I have problem getting the receive the signal from jollastore in my app > I connect to the store using QDBus API : > > > > result = QDBusConnection::sessionBus().connect("com.jolla.jollastore", > "/StoreClient", "com.jolla.jollastore" ,"packageStatusChanged", this, > SLOT(onPackageStatusChanged(QString,int))); > > > > qDebug() << "DBUSconnect== " << result; > > > > > > However the signal seems not connect since it returns: > > > > [D] RpmInstall::RpmInstall:19 - DBUSconnect== false > > > > > > the signal is not emited... Any idea what I do wrong? > > > > > > Regards > > > > Mikael > > > > > > -- > > "Put mankind back on earth" -- "Put mankind back on earth"
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org