van-ess0 / qwnPlayer

5 stars 0 forks source link

Fix bug with qml modules #10

Closed suratovvlad closed 8 years ago

suratovvlad commented 8 years ago

The application crashes if you haven't qt5-quickcontrols or qt5-graphicaleffects modules which must be installed to your system with Qt libraries.

There is the log of the application on crash: // =========================================================== [INFOWARNING] [unknown:0 unknown] - QQmlComponent: Component is not ready [INFOWARNING] [unknown:0 unknown] - QObject::connect: Cannot connect (null)::signalCollectionData(QByteArray) to ResponseDecoder::slotCollectionData(QByteArray) Segmentation fault // ===========================================================

I've found the only one way to check modules loading in runtime. If I use isReady() function of QQmlComponent class after component.create(context) function, I can use knowledge about errors in engine to log it and to finish the app correctly. So, now, developers know about the missing modules (check it in the application log).

Other improvements: