Operating System: KDE neon 5.14
KDE Plasma Version: 5.15.0
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.0
Kernel Version: 4.15.0-45-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i7-6600U CPU @ 2.60GHz
Memory: 7.7 GiB of RAM
After an update, my Icon-Only-TaskManager stopped working.
When I hover over the taskmanager, the following error message pops up (screenshot: https://imgur.com/a/POq6Cnx):
- Code: Select all
Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:27:1: module "org.kde.plasma.private.taskmanager" is not installed
Today, my desktop went black and I can’t switch activities anymore. I still can switch programs with ALT+TAB.
Further, my application launcher stopped working.
When I hover over the application launcher, the following error message pops up (screenshot: https://imgur.com/a/Q2gJC5t):
- Code: Select all
Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/Kickoff.qml:31:1: module "org.kde.plasma.private.kicker" is not installed
When I try to add a widget to the panel, Plasma closes unexpectedly.
Details: Executable: plasmashell PID: 17861 Signal: Segmentation fault (11) Time: 15.02.19 10:37:17
(Backtrace below)
Is there a way to repair KDE NEON?
Backtrace generated by the crash, when trying to add a widget:
Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library «/lib/x86_64-linux-gnu/libthread_db.so.1».
[Current thread is 1 (Thread 0x7fb983f94840 (LWP 17861))]
Thread 7 (Thread 0x7fb92bf8e700 (LWP 20354)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb924008920, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb977037539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb924005830, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#4 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb92bf8dd40, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#5 0x00007fb97d8db41a in QThread::exec ([email protected]=0x559cf69cde90) at thread/qthread.cpp:531
#6 0x00007fb9816d32e5 in QQmlThreadPrivate::run (this=0x559cf69cde90) at qml/ftw/qqmlthread.cpp:148
#7 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf69cde90) at thread/qthread_unix.cpp:361
#8 0x00007fb97cc9f6db in start_thread (arg=0x7fb92bf8e700) at pthread_create.c:463
#9 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 6 (Thread 0x7fb940aa6700 (LWP 18303)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb93c003ce0, nfds=1, timeout=2861524) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb977037539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb93c000b20, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#4 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb940aa5d20, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#5 0x00007fb97d8db41a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6 0x00007fb943403f77 in KCupsConnection::run() () from /usr/lib/x86_64-linux-gnu/libkcupslib.so
#7 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf525fe90) at thread/qthread_unix.cpp:361
#8 0x00007fb97cc9f6db in start_thread (arg=0x7fb940aa6700) at pthread_create.c:463
#9 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 5 (Thread 0x7fb958c48700 (LWP 17956)):
#0 0x00007fb97cca59f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x559cf44789d8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x559cf4478988, cond=0x559cf44789b0) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x559cf44789b0, mutex=0x559cf4478988) at pthread_cond_wait.c:655
#3 0x00007fb9597a2b1b in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4 0x00007fb9597a2847 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5 0x00007fb97cc9f6db in start_thread (arg=0x7fb958c48700) at pthread_create.c:463
#6 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 4 (Thread 0x7fb966dbc700 (LWP 17921)):
#0 0x00007fb97d1cb0b4 in __GI___libc_read (fd=10, buf=0x7fb966dbbb30, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1 0x00007fb97707bcd0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb977037027 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb9770374e0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb95c000b20, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#6 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb966dbbd40, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#7 0x00007fb97d8db41a in QThread::exec ([email protected]=0x559cf44810f0) at thread/qthread.cpp:531
#8 0x00007fb9816d32e5 in QQmlThreadPrivate::run (this=0x559cf44810f0) at qml/ftw/qqmlthread.cpp:148
#9 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf44810f0) at thread/qthread_unix.cpp:361
#10 0x00007fb97cc9f6db in start_thread (arg=0x7fb966dbc700) at pthread_create.c:463
#11 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7fb96c973700 (LWP 17901)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb960004db0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb977037539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb960000b20, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#4 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb96c972d30, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#5 0x00007fb97d8db41a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6 0x00007fb97ebb9015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x7fb97ee30d80) at thread/qthread_unix.cpp:361
#8 0x00007fb97cc9f6db in start_thread (arg=0x7fb96c973700) at pthread_create.c:463
#9 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 2 (Thread 0x7fb96eb46700 (LWP 17881)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb96eb45c78, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb9827eb747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007fb9827ed36a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007fb970ccad4a in QXcbEventQueue::run (this=0x559cf43556f0) at qxcbeventqueue.cpp:225
#4 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf43556f0) at thread/qthread_unix.cpp:361
#5 0x00007fb97cc9f6db in start_thread (arg=0x7fb96eb46700) at pthread_create.c:463
#6 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7fb983f94840 (LWP 17861)):
[KCrash Handler]
#6 0x0000559cf3e556d0 in ?? ()
#7 0x00007fb97dae4f3f in QtPrivate::QSlotObjectBase::call (a=0x7ffd8e020080, r=0x559cf4423050, this=0x559cf466c7d0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#8 QMetaObject::activate (sender=0x559cf4659e80, signalOffset=<optimized out>, [email protected]=4, [email protected]=0x7ffd8e020080) at kernel/qobject.cpp:3759
#9 0x00007fb97dae54f7 in QMetaObject::activate (sender=<optimized out>, [email protected]=0x7fb9825cbf20 <Plasma::Containment::staticMetaObject>, [email protected]=4, [email protected]=0x7ffd8e020080) at kernel/qobject.cpp:3631
#10 0x00007fb982348725 in Plasma::Containment::showAddWidgetsInterface (this=<optimized out>, _t1=…) at ./obj-x86_64-linux-gnu/src/plasma/KF5Plasma_autogen/include/moc_containment.cpp:445
#11 0x00007fb98235a890 in Plasma::ContainmentPrivate::triggerShowAddWidgets (this=<optimized out>) at ./src/plasma/private/containment_p.cpp:133
#12 0x00007fb98234acc1 in Plasma::Containment::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./obj-x86_64-linux-gnu/src/plasma/KF5Plasma_autogen/include/moc_containment.cpp:189
#13 0x00007fb97dae4e25 in QMetaObject::activate ([email protected]=0x559cf448d920, signalOffset=<optimized out>, [email protected]=1, [email protected]=0x7ffd8e020230) at kernel/qobject.cpp:3778
#14 0x00007fb97dae54f7 in QMetaObject::activate ([email protected]=0x559cf448d920, [email protected]=0x7fb97fae1820 <QAction::staticMetaObject>, [email protected]=1, [email protected]=0x7ffd8e020230) at kernel/qobject.cpp:3631
#15 0x00007fb97f4090f2 in QAction::triggered ([email protected]=0x559cf448d920, _t1=<optimized out>) at .moc/moc_qaction.cpp:380
#16 0x00007fb97f40b70c in QAction::activate (this=0x559cf448d920, event=<optimized out>) at kernel/qaction.cpp:1166
#17 0x0000559cf3e49fcf in ?? ()
#18 0x0000559cf3e4a835 in ?? ()
#19 0x00007fb981678af9 in QQmlObjectOrGadget::metacall ([email protected]=0x7ffd8e0206f0, [email protected]=QMetaObject::InvokeMetaMethod, index=<optimized out>, [email protected]=82, [email protected]=0x7ffd8e020400) at qml/qqmlpropertycache.cpp:1735
#20 0x00007fb98157a62b in CallMethod (object=…, index=82, [email protected]=43, [email protected]=0, [email protected]=0x0, [email protected]=0x559cf7c78580, callArgs=0x7fb929da2800, callType=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1231
#21 0x00007fb98157c522 in CallPrecise (object=…, data=…, [email protected]=0x559cf7c78580, [email protected]=0x7fb929da2800, [email protected]=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1479
#22 0x00007fb98157d1ff in QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=0x7fb929da27a0, argv=<optimized out>, argc=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:2017
#23 0x00007fb9816033b9 in QV4::FunctionObject::call (argc=0, argv=0x7fb929da2758, thisObject=0x7fb929da27a0, this=<optimized out>) at jsruntime/qv4functionobject_p.h:202
#24 QV4::Runtime::method_callProperty (engine=0x559cf7c78580, base=<optimized out>, nameIndex=<optimized out>, argv=0x7fb929da2758, argc=<optimized out>) at jsruntime/qv4runtime.cpp:1385
#25 0x00007fb9815974e0 in QV4::Moth::VME::interpret (frame=0x7ffd8e020a60, engine=0x559cf7c78580, code=0x7fb928996e1a «1602») at jsruntime/qv4vme_moth.cpp:718
#26 0x00007fb98159a746 in QV4::Moth::VME::exec ([email protected]=0x7ffd8e020a60, [email protected]=0x559cf7c78580) at jsruntime/qv4vme_moth.cpp:441
#27 0x00007fb98152d91b in QV4::Function::call ([email protected]=0x559cf7cde1b0, [email protected]=0x7fb929da2740, [email protected]=0x7fb929da2758, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:68
#28 0x00007fb9816a1737 in QQmlJavaScriptExpression::evaluate ([email protected]=0x559cf7d69590, [email protected]=0x7fb929da2728, [email protected]=0x0) at qml/qqmljavascriptexpression.cpp:216
#29 0x00007fb981641289 in QQmlBoundSignalExpression::evaluate ([email protected]=0x559cf7d69590, [email protected]=0x7ffd8e022bb0) at qml/qqmlboundsignal.cpp:225
#30 0x00007fb98164260b in QQmlBoundSignal_callback (e=0x559cf7ce7b80, a=0x7ffd8e022bb0) at qml/qqmlboundsignal.cpp:358
#31 0x00007fb981682cc3 in QQmlNotifier::emitNotify (endpoint=<optimized out>, [email protected]=0x7ffd8e022bb0) at qml/qqmlnotifier.cpp:106
#32 0x00007fb981623329 in QQmlData::signalEmitted (object=0x559cf994aff0, index=<optimized out>, a=0x7ffd8e022bb0) at qml/qqmlengine.cpp:880
#33 0x00007fb97dae465f in QMetaObject::activate (sender=0x559cf994aff0, signalOffset=<optimized out>, local_signal_index=<optimized out>, [email protected]=0x7ffd8e022bb0) at kernel/qobject.cpp:3647
#34 0x00007fb98161d6c5 in QQmlVMEMetaObject::activate ([email protected]=0x559cf7d04770, object=<optimized out>, [email protected]=69, [email protected]=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:1246
#35 0x00007fb98161f918 in QQmlVMEMetaObject::metaCall (this=0x559cf7d04770, o=<optimized out>, c=QMetaObject::InvokeMetaMethod, _id=69, a=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:922
#36 0x00007fb98161e9f9 in QQmlVMEMetaObject::metaCall (this=0x559cf9916ba0, o=<optimized out>, c=QMetaObject::InvokeMetaMethod, _id=69, a=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:979
#37 0x00007fb98161e9f9 in QQmlVMEMetaObject::metaCall (this=0x559cf7ce79a0, o=<optimized out>, c=QMetaObject::InvokeMetaMethod, _id=69, a=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:979
#38 0x00007fb981678af9 in QQmlObjectOrGadget::metacall ([email protected]=0x7ffd8e022ea0, [email protected]=QMetaObject::InvokeMetaMethod, index=<optimized out>, [email protected]=69, [email protected]=0x7ffd8e022bb0) at qml/qqmlpropertycache.cpp:1735
#39 0x00007fb98157a62b in CallMethod (object=…, index=69, [email protected]=43, [email protected]=0, [email protected]=0x0, [email protected]=0x559cf7c78580, callArgs=0x7fb929da26f0, callType=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1231
#40 0x00007fb98157c522 in CallPrecise (object=…, data=…, [email protected]=0x559cf7c78580, [email protected]=0x7fb929da26f0, [email protected]=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1479
#41 0x00007fb98157d1ff in QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=0x7fb929da2690, argv=<optimized out>, argc=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:2017
#42 0x00007fb9816033b9 in QV4::FunctionObject::call (argc=0, argv=0x7fb929da2648, thisObject=0x7fb929da2690, this=<optimized out>) at jsruntime/qv4functionobject_p.h:202
#43 QV4::Runtime::method_callProperty (engine=0x559cf7c78580, base=<optimized out>, nameIndex=<optimized out>, argv=0x7fb929da2648, argc=<optimized out>) at jsruntime/qv4runtime.cpp:1385
#44 0x00007fb9815974e0 in QV4::Moth::VME::interpret (frame=0x7ffd8e023210, engine=0x559cf7c78580, code=0x7fb9289708da «3006330260602`») at jsruntime/qv4vme_moth.cpp:718
#45 0x00007fb98159a746 in QV4::Moth::VME::exec ([email protected]=0x7ffd8e023210, [email protected]=0x559cf7c78580) at jsruntime/qv4vme_moth.cpp:441
#46 0x00007fb98152d91b in QV4::Function::call ([email protected]=0x559cf7ca9b50, [email protected]=0x7fb929da2628, [email protected]=0x7fb929da2640, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:68
#47 0x00007fb9816a1737 in QQmlJavaScriptExpression::evaluate ([email protected]=0x559cf7d59d00, [email protected]=0x7fb929da2610, [email protected]=0x0) at qml/qqmljavascriptexpression.cpp:216
#48 0x00007fb981641289 in QQmlBoundSignalExpression::evaluate ([email protected]=0x559cf7d59d00, [email protected]=0x7ffd8e024fa0) at qml/qqmlboundsignal.cpp:225
#49 0x00007fb98164260b in QQmlBoundSignal_callback (e=0x559cf9950490, a=0x7ffd8e024fa0) at qml/qqmlboundsignal.cpp:358
#50 0x00007fb981682cc3 in QQmlNotifier::emitNotify (endpoint=<optimized out>, [email protected]=0x7ffd8e024fa0) at qml/qqmlnotifier.cpp:106
#51 0x00007fb981623329 in QQmlData::signalEmitted (object=0x559cf99d3b30, index=<optimized out>, a=0x7ffd8e024fa0) at qml/qqmlengine.cpp:880
#52 0x00007fb97dae465f in QMetaObject::activate (sender=0x559cf99d3b30, signalOffset=<optimized out>, [email protected]=0, [email protected]=0x7ffd8e024fa0) at kernel/qobject.cpp:3647
#53 0x00007fb97dae54f7 in QMetaObject::activate (sender=<optimized out>, [email protected]=0x7fb9584440c0 <QQuickAction1::staticMetaObject>, [email protected]=0, [email protected]=0x7ffd8e024fa0) at kernel/qobject.cpp:3631
#54 0x00007fb95821f3ef in QQuickAction1::triggered (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qquickaction_p.cpp:366
#55 0x00007fb9581fbd53 in QQuickAction1::trigger (this=<optimized out>, source=<optimized out>) at qquickaction.cpp:462
#56 0x00007fb9581fc94b in QQuickAction1::trigger (this=<optimized out>, source=<optimized out>) at qquickaction.cpp:456
#57 0x00007fb95821f9dc in QQuickAction1::qt_static_metacall ([email protected]=0x559cf99d3b30, [email protected]=QMetaObject::InvokeMetaMethod, [email protected]=12, [email protected]=0x7ffd8e025150) at .moc/moc_qquickaction_p.cpp:169
#58 0x00007fb95821fe45 in QQuickAction1::qt_metacall (this=0x559cf99d3b30, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7ffd8e025150) at .moc/moc_qquickaction_p.cpp:330
#59 0x00007fb981678af9 in QQmlObjectOrGadget::metacall ([email protected]=0x7ffd8e025490, [email protected]=QMetaObject::InvokeMetaMethod, index=<optimized out>, [email protected]=17, argv=<optimized out>) at qml/qqmlpropertycache.cpp:1735
#60 0x00007fb98157abf5 in CallMethod (object=…, index=<optimized out>, [email protected]=43, argCount=<optimized out>, argTypes=<optimized out>, [email protected]=0x559cf7c78580, callArgs=<optimized out>, callType=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:1213
#61 0x00007fb98157c55f in CallPrecise (object=…, data=…, [email protected]=0x559cf7c78580, [email protected]=0x7fb929da25c0, [email protected]=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1475
#62 0x00007fb98157d5ec in CallOverloaded (callType=QMetaObject::InvokeMetaMethod, propertyCache=0x7fb95c150a70, callArgs=0x7fb929da25c0, engine=0x559cf7c78580, data=…, object=…) at jsruntime/qv4qobjectwrapper.cpp:1549
#63 QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, argc=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:2019
#64 0x00007fb9816033b9 in QV4::FunctionObject::call (argc=1, argv=0x7fb929da2570, thisObject=0x7fb929da2558, this=<optimized out>) at jsruntime/qv4functionobject_p.h:202
#65 QV4::Runtime::method_callProperty (engine=0x559cf7c78580, base=<optimized out>, nameIndex=<optimized out>, argv=0x7fb929da2570, argc=<optimized out>) at jsruntime/qv4runtime.cpp:1385
#66 0x00007fb9815974e0 in QV4::Moth::VME::interpret (frame=0x7ffd8e025800, engine=0x559cf7c78580, code=0x7fb928970c16 «3006330260602») at jsruntime/qv4vme_moth.cpp:718
#67 0x00007fb98159a746 in QV4::Moth::VME::exec ([email protected]=0x7ffd8e025800, [email protected]=0x559cf7c78580) at jsruntime/qv4vme_moth.cpp:441
#68 0x00007fb98152d91b in QV4::Function::call ([email protected]=0x559cf7ca9d80, [email protected]=0x7fb929da24f0, [email protected]=0x7fb929da2508, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:68
#69 0x00007fb9816a1737 in QQmlJavaScriptExpression::evaluate ([email protected]=0x559cf7d0e1a0, [email protected]=0x7fb929da24d8, [email protected]=0x0) at qml/qqmljavascriptexpression.cpp:216
#70 0x00007fb981641289 in QQmlBoundSignalExpression::evaluate ([email protected]=0x559cf7d0e1a0, [email protected]=0x7ffd8e027590) at qml/qqmlboundsignal.cpp:225
#71 0x00007fb98164260b in QQmlBoundSignal_callback (e=0x559cf7d0e150, a=0x7ffd8e027590) at qml/qqmlboundsignal.cpp:358
#72 0x00007fb981682cc3 in QQmlNotifier::emitNotify (endpoint=<optimized out>, [email protected]=0x7ffd8e027590) at qml/qqmlnotifier.cpp:106
#73 0x00007fb981623329 in QQmlData::signalEmitted (object=0x559cf68f5a90, index=<optimized out>, a=0x7ffd8e027590) at qml/qqmlengine.cpp:880
#74 0x00007fb97dae465f in QMetaObject::activate ([email protected]=0x559cf68f5a90, signalOffset=<optimized out>, [email protected]=15, [email protected]=0x7ffd8e027590) at kernel/qobject.cpp:3647
#75 0x00007fb97dae54f7 in QMetaObject::activate ([email protected]=0x559cf68f5a90, [email protected]=0x7fb9820ede60 <QQuickMouseArea::staticMetaObject>, [email protected]=15, [email protected]=0x7ffd8e027590) at kernel/qobject.cpp:3631
#76 0x00007fb981cf4832 in QQuickMouseArea::released ([email protected]=0x559cf68f5a90, _t1=<optimized out>, [email protected]=0x559cf68f5d18) at .moc/moc_qquickmousearea_p.cpp:659
#77 0x00007fb981cf604c in QQuickMouseArea::setPressed ([email protected]=0x559cf68f5a90, button=<optimized out>, [email protected]=false, source=<optimized out>) at items/qquickmousearea.cpp:1234
#78 0x00007fb981cf71e8 in QQuickMouseArea::mouseReleaseEvent (this=0x559cf68f5a90, event=0x7ffd8e027ec0) at items/qquickmousearea.cpp:806
#79 0x00007fb981c5fc78 in QQuickItem::event (this=0x559cf68f5a90, ev=0x7ffd8e027ec0) at items/qquickitem.cpp:8096
#80 0x00007fb97f40f83c in QApplicationPrivate::notify_helper ([email protected]=0x559cf43387d0, [email protected]=0x559cf68f5a90, [email protected]=0x7ffd8e027ec0) at kernel/qapplication.cpp:3752
#81 0x00007fb97f416dd0 in QApplication::notify (this=0x7ffd8e028380, receiver=0x559cf68f5a90, e=0x7ffd8e027ec0) at kernel/qapplication.cpp:3499
#82 0x00007fb97dab5328 in QCoreApplication::notifyInternal2 (receiver=0x559cf68f5a90, event=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1061
#83 0x00007fb97dab54fe in QCoreApplication::sendEvent ([email protected]=0x559cf68f5a90, [email protected]=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1451
#84 0x00007fb981c790ed in QQuickWindowPrivate::deliverMouseEvent ([email protected]=0x559cf8730a70, pointerEvent=0x559cf7d3a310) at items/qquickwindow.cpp:1784
#85 0x00007fb981c7a2db in QQuickWindowPrivate::deliverPointerEvent ([email protected]=0x559cf8730a70, event=0x559cf7d3a310) at items/qquickwindow.cpp:2346
#86 0x00007fb981c7af6e in QQuickWindowPrivate::handleMouseEvent (this=0x559cf8730a70, event=0x7ffd8e027ec0) at items/qquickwindow.cpp:2210
#87 0x00007fb97e088ac5 in QWindow::event ([email protected]=0x559cf86c2760, [email protected]=0x7ffd8e027ec0) at kernel/qwindow.cpp:2336
#88 0x00007fb981c7c285 in QQuickWindow::event (this=0x559cf86c2760, e=0x7ffd8e027ec0) at items/qquickwindow.cpp:1673
#89 0x00007fb97f40f83c in QApplicationPrivate::notify_helper ([email protected]=0x559cf43387d0, [email protected]=0x559cf86c2760, [email protected]=0x7ffd8e027ec0) at kernel/qapplication.cpp:3752
#90 0x00007fb97f416dd0 in QApplication::notify (this=0x7ffd8e028380, receiver=0x559cf86c2760, e=0x7ffd8e027ec0) at kernel/qapplication.cpp:3499
#91 0x00007fb97dab5328 in QCoreApplication::notifyInternal2 (receiver=0x559cf86c2760, event=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1061
#92 0x00007fb97dab550e in QCoreApplication::sendSpontaneousEvent ([email protected]=0x559cf86c2760, [email protected]=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1463
#93 0x00007fb97e07d52b in QGuiApplicationPrivate::processMouseEvent (e=0x559cf6e218d0) at kernel/qguiapplication.cpp:2102
#94 0x00007fb97e07e695 in QGuiApplicationPrivate::processWindowSystemEvent ([email protected]=0x559cf6e218d0) at kernel/qguiapplication.cpp:1837
#95 0x00007fb97e05714b in QWindowSystemInterface::sendWindowSystemEvents ([email protected]=…) at kernel/qwindowsysteminterface.cpp:1068
#96 0x00007fb970ccbd2a in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#97 0x00007fb977037387 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#98 0x00007fb9770375c0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#99 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#100 0x00007fb97db1213f in QEventDispatcherGlib::processEvents (this=0x559cf43e4ac0, flags=…) at kernel/qeventdispatcher_glib.cpp:422
#101 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7ffd8e028260, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#102 0x00007fb97dabc800 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1364
#103 0x0000559cf3e35f95 in ?? ()
#104 0x00007fb97d0dcb97 in __libc_start_main (main=0x559cf3e35450, argc=1, argv=0x7ffd8e028538, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd8e028528) at ../csu/libc-start.c:310
#105 0x0000559cf3e3641a in _start ()
arch, kde, plasma
0
0
При клике вылезает окно со следующим сообщением:
Ошибка загрузки файла QML: file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/Kickoff.qml:31:1: plugin cannot be loaded for module "org.kde.plasma.private.kicker": Cannot load library /usr/lib/qt/qml/org/kde/plasma/private/kicker/libkickerplugin.so: (libstemmer.so.0: невозможно открыть разделяемый объектный файл: Нет такого файла или каталога)
Запуск plasmashell ничего не возвращает
- Ссылка
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
- v-62
- ↓
-
16 апреля 2020, 06:56
Покажите вывод
inxi -xxxS
и
pacman -Q plasma-framework
p5ql/epu q9300 clover,hackintosh,mint,void,manjaro,only kde
- testoffonovich
- ↑
- ↓
-
23 марта 2021, 00:00
У меня аналогичная проблема. После обновления системы случилось. Исчезли все значки в системном трее. Не могу найти решение. Сможете помочь?
OS: Manjaro Linux x86_64
Kernel: 5.9.16-1-MANJARO
DE: Plasma 5.21.3
$ inxi -xxxS
$ System: Host: ManjaroPC Kernel: 5.9.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.0 Desktop: KDE Plasma 5.21.3 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux
$ pacman -Q plasma-framework
$ plasma-framework-git .r15753.g353bb1578-1
Последний раз редактировалось 23 марта 2021, 08:12
- v-62
- ↑
- ↓
-
23 марта 2021, 08:09
$ plasma-framework-git .r15753.g353bb1578-1
это откуда взялось?
p5ql/epu q9300 clover,hackintosh,mint,void,manjaro,only kde
- testoffonovich
- ↑
- ↓
-
23 марта 2021, 13:27
Здравствуйте.
Мне неведомо, откуда «это откуда взялось?»
После обновления системы возможно «это откуда-то взялось».
До обновления, проблемы отсутствовали.
- testoffonovich
- ↑
- ↓
-
23 марта 2021, 14:07
Заменил plasma-framework
Теперь:
Пришлось перестановить: plasma-framework | sddm | plasma-desktop
Значки в трее появились. В меню пуск проблемы исчезли.
Сбились правда заодно все настройки, но это поправимо.
Но ошибка «Error loading QML file» осталась.
Вот что с этой ошибкой делать?
Последний раз редактировалось 23 марта 2021, 22:11
- testoffonovich
- ↑
- ↓
-
23 марта 2021, 16:46
Увы.
Мои эксперименты привели к краху системы.
Причину ошибки и способ устранения так и не выявил.
Занимаюсь переустановкой системы.
- v-62
- ↑
- ↓
-
23 марта 2021, 18:51
Печаль. Скажите Вы обновления устанавливали через памак или пакман
p5ql/epu q9300 clover,hackintosh,mint,void,manjaro,only kde
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Open
timtinan37 opened this issue
Aug 23, 2020
· 19 comments
Comments
Error trace:
Error loading QML file: file:///home/timtinan37/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/main.qml:108:37: Type PopupView unavailable
file:///home/timtinan37/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/PopupView.qml:288:3: Type TimerView unavailable
file:///home/timtinan37/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimerView.qml:91:5: Cannot assign to non-existent property "icon"
KDE Plasma version: 5.12.9
KDE Frameworks version: 5.44.0
Qt version: 5.9.5
Ubuntu 18.04
Kernel version: 4.15.0-112-generic
Re-installing the widget by downloading the plasmoid file from https://store.kde.org/p/998901 removes the problem. Previously I’d installed it from Plasma add-on installer.
I’m having the exact same issue, even installing manually
KDE Plasma version: 5.12.9
KDE Frameworks version: 5.44.0
Qt version: 5.9.5
Ubuntu 18.04
Kernel version: 5.4.0-42-generic
Recent EventCalendar versions requires a newer version of Qt. You need to install an older version of EventCalendar then restart Plasma (logout + login). Not sure which older version works.
Could you tell me which version would be necessary? Thanks.
No idea. Not downloading 18.04 to check or skimming 200 code patches to guess. Try the most recent, relog. If it doesn’t work then uninstall, install the next, then relog. There’s 4 versions available on 1 should probably work.
Use the following to make sure you’ve properly installed the older versions. The «Download new widgets» GUI has a few issues atm when uninstalling widgets. That might be a Plasma 5.18+ bug though. Not sure if it affects Plasma 5.12 which was released 3 years ago.
grep Version ~/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/metadata.desktop /usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/metadata.desktop
OK, thanks. I’ll keep you posted.
Hmmm, I don’t think I wrote instructions above on how to install them.
To install from source using the .zip
links I linked above, extract the v68.zip
.
Then:
kpackagetool5 --type=Plasma/Applet -r org.kde.plasma.eventcalendar # Uninstall installed version
kpackagetool5 --type=Plasma/Applet -i ~/Downloads/v68/package # Install the package dir in the older version
Make sure to extract v68
, as the git repo nest’s the widgets metadata.desktop
and other source code under package/metadata.desktop
so you need to install the «package» directory. If you install the «v68» directory instead with all the install scripts + ReadMe.md
it won’t install because metadata.desktop
will be missing from the folder.
v68 seems to work, thanks!
It’s a shame though that I can’t get any updates now… for example, google event would be better for me if they are notified 10 minutes before, and not at the starting time…
I have a computer with Ubuntu 18.04 LTS. I have the same error and now is not possible go to an older version after the #177 solution. The net admin doesn’t allow me upgrade to 20.04, any possible way to make it work?
v69 — July 27 2020
- Refactor to use PlasmaComponents3/QtQuickControls2, and Kirigami Units/Colors in the config.
Fiiiine, since v68 works you can use the following instructions to use an API client id+secret specifically for it (or anything above v64).
- Install v68
- Download https://github.com/Zren/plasma-applet-eventcalendar/archive/v68.zip
- Extract
v68.zip
- Uninstall the current version of the widget (probably v71)
kpackagetool5 --type=Plasma/Applet -r org.kde.plasma.eventcalendar
- Install the
package
dir from the downloaded older version (v68) containing themetadata.desktop
file.kpackagetool5 --type=Plasma/Applet -i ~/Downloads/v68/plasma-applet-eventcalendar-68/package
- Restart plasmashell (relog)
- Open EventCalendar’s config and enable Debugging
- A new
Advanced
config tab should have appeared, open it. - Edit
client_id
andclient_secret
to:client_id
:391436299960-8h0m09bckek77cpnu7sdpiikav6dlit2.apps.googleusercontent.com
client_secret
:Lj0z0yxpGxhBWK_ohX2dH-AI
- Make sure there isn’t any spaces before or after the string of characters.
- If Google Calendar detects you as logged in, logout.
- Login to Google Calendar again.
Edit: Please remember to update to v69 (or whatever is the latest version of the widget) when you update to Kubuntu 20.04 with Qt 5.15.1. Otherwise plasmashell will segfault (Issue #154).
Zren
changed the title
Error loading QML file
Error loading QML file (Qt 5.9 / Kubuntu 18.04) (Fix in comments)
Nov 19, 2020
I change the plasmoid version, relog and change the client id and client secret. Now, when I clic the accounts.google.com link, it give me a 400 google error.
Zren
mentioned this issue
Dec 2, 2020
Zren
mentioned this issue
Feb 9, 2021
Zren
mentioned this issue
Feb 23, 2021
Hey!
If you want to use v74, I’ve managed to run it on Kubuntu 18.04.
Since 18.04 support has been dropped officially, I’ve forked the project and added that support myself.You can see it here: https://github.com/80avin/plasma-applet-eventcalendar
Thanks, I’ll give it a try!
This was referenced
May 22, 2023
Operating System: KDE neon 5.14
KDE Plasma Version: 5.15.0
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.0
Kernel Version: 4.15.0-45-generic
OS Type: 64-bit
Processors: 4 × Intel® Core™ i7-6600U CPU @ 2.60GHz
Memory: 7.7 GiB of RAM
After an update, my Icon-Only-TaskManager stopped working.
When I hover over the taskmanager, the following error message pops up (screenshot: https://imgur.com/a/POq6Cnx):
- Code: Select all
Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/main.qml:27:1: module "org.kde.plasma.private.taskmanager" is not installed
Today, my desktop went black and I can’t switch activities anymore. I still can switch programs with ALT+TAB.
Further, my application launcher stopped working.
When I hover over the application launcher, the following error message pops up (screenshot: https://imgur.com/a/Q2gJC5t):
- Code: Select all
Error loading QML file: file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/Kickoff.qml:31:1: module "org.kde.plasma.private.kicker" is not installed
When I try to add a widget to the panel, Plasma closes unexpectedly.
Details: Executable: plasmashell PID: 17861 Signal: Segmentation fault (11) Time: 15.02.19 10:37:17
(Backtrace below)
Is there a way to repair KDE NEON?
Backtrace generated by the crash, when trying to add a widget:
Application: Plasma (plasmashell), signal: Segmentation fault
Using host libthread_db library «/lib/x86_64-linux-gnu/libthread_db.so.1».
[Current thread is 1 (Thread 0x7fb983f94840 (LWP 17861))]
Thread 7 (Thread 0x7fb92bf8e700 (LWP 20354)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb924008920, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb977037539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb924005830, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#4 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb92bf8dd40, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#5 0x00007fb97d8db41a in QThread::exec ([email protected]=0x559cf69cde90) at thread/qthread.cpp:531
#6 0x00007fb9816d32e5 in QQmlThreadPrivate::run (this=0x559cf69cde90) at qml/ftw/qqmlthread.cpp:148
#7 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf69cde90) at thread/qthread_unix.cpp:361
#8 0x00007fb97cc9f6db in start_thread (arg=0x7fb92bf8e700) at pthread_create.c:463
#9 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 6 (Thread 0x7fb940aa6700 (LWP 18303)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb93c003ce0, nfds=1, timeout=2861524) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb977037539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb93c000b20, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#4 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb940aa5d20, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#5 0x00007fb97d8db41a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6 0x00007fb943403f77 in KCupsConnection::run() () from /usr/lib/x86_64-linux-gnu/libkcupslib.so
#7 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf525fe90) at thread/qthread_unix.cpp:361
#8 0x00007fb97cc9f6db in start_thread (arg=0x7fb940aa6700) at pthread_create.c:463
#9 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 5 (Thread 0x7fb958c48700 (LWP 17956)):
#0 0x00007fb97cca59f3 in futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x559cf44789d8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
#1 __pthread_cond_wait_common (abstime=0x0, mutex=0x559cf4478988, cond=0x559cf44789b0) at pthread_cond_wait.c:502
#2 __pthread_cond_wait (cond=0x559cf44789b0, mutex=0x559cf4478988) at pthread_cond_wait.c:655
#3 0x00007fb9597a2b1b in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4 0x00007fb9597a2847 in ?? () from /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5 0x00007fb97cc9f6db in start_thread (arg=0x7fb958c48700) at pthread_create.c:463
#6 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 4 (Thread 0x7fb966dbc700 (LWP 17921)):
#0 0x00007fb97d1cb0b4 in __GI___libc_read (fd=10, buf=0x7fb966dbbb30, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1 0x00007fb97707bcd0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb977037027 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb9770374e0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb95c000b20, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#6 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb966dbbd40, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#7 0x00007fb97d8db41a in QThread::exec ([email protected]=0x559cf44810f0) at thread/qthread.cpp:531
#8 0x00007fb9816d32e5 in QQmlThreadPrivate::run (this=0x559cf44810f0) at qml/ftw/qqmlthread.cpp:148
#9 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf44810f0) at thread/qthread_unix.cpp:361
#10 0x00007fb97cc9f6db in start_thread (arg=0x7fb966dbc700) at pthread_create.c:463
#11 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 3 (Thread 0x7fb96c973700 (LWP 17901)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb960004db0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb977037539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00007fb97db1215b in QEventDispatcherGlib::processEvents (this=0x7fb960000b20, flags=…) at kernel/qeventdispatcher_glib.cpp:424
#4 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7fb96c972d30, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#5 0x00007fb97d8db41a in QThread::exec (this=<optimized out>) at thread/qthread.cpp:531
#6 0x00007fb97ebb9015 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x7fb97ee30d80) at thread/qthread_unix.cpp:361
#8 0x00007fb97cc9f6db in start_thread (arg=0x7fb96c973700) at pthread_create.c:463
#9 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 2 (Thread 0x7fb96eb46700 (LWP 17881)):
#0 0x00007fb97d1cfbf9 in __GI___poll (fds=0x7fb96eb45c78, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007fb9827eb747 in ?? () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#2 0x00007fb9827ed36a in xcb_wait_for_event () from /usr/lib/x86_64-linux-gnu/libxcb.so.1
#3 0x00007fb970ccad4a in QXcbEventQueue::run (this=0x559cf43556f0) at qxcbeventqueue.cpp:225
#4 0x00007fb97d8dcbc2 in QThreadPrivate::start (arg=0x559cf43556f0) at thread/qthread_unix.cpp:361
#5 0x00007fb97cc9f6db in start_thread (arg=0x7fb96eb46700) at pthread_create.c:463
#6 0x00007fb97d1dc88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Thread 1 (Thread 0x7fb983f94840 (LWP 17861)):
[KCrash Handler]
#6 0x0000559cf3e556d0 in ?? ()
#7 0x00007fb97dae4f3f in QtPrivate::QSlotObjectBase::call (a=0x7ffd8e020080, r=0x559cf4423050, this=0x559cf466c7d0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:394
#8 QMetaObject::activate (sender=0x559cf4659e80, signalOffset=<optimized out>, [email protected]=4, [email protected]=0x7ffd8e020080) at kernel/qobject.cpp:3759
#9 0x00007fb97dae54f7 in QMetaObject::activate (sender=<optimized out>, [email protected]=0x7fb9825cbf20 <Plasma::Containment::staticMetaObject>, [email protected]=4, [email protected]=0x7ffd8e020080) at kernel/qobject.cpp:3631
#10 0x00007fb982348725 in Plasma::Containment::showAddWidgetsInterface (this=<optimized out>, _t1=…) at ./obj-x86_64-linux-gnu/src/plasma/KF5Plasma_autogen/include/moc_containment.cpp:445
#11 0x00007fb98235a890 in Plasma::ContainmentPrivate::triggerShowAddWidgets (this=<optimized out>) at ./src/plasma/private/containment_p.cpp:133
#12 0x00007fb98234acc1 in Plasma::Containment::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./obj-x86_64-linux-gnu/src/plasma/KF5Plasma_autogen/include/moc_containment.cpp:189
#13 0x00007fb97dae4e25 in QMetaObject::activate ([email protected]=0x559cf448d920, signalOffset=<optimized out>, [email protected]=1, [email protected]=0x7ffd8e020230) at kernel/qobject.cpp:3778
#14 0x00007fb97dae54f7 in QMetaObject::activate ([email protected]=0x559cf448d920, [email protected]=0x7fb97fae1820 <QAction::staticMetaObject>, [email protected]=1, [email protected]=0x7ffd8e020230) at kernel/qobject.cpp:3631
#15 0x00007fb97f4090f2 in QAction::triggered ([email protected]=0x559cf448d920, _t1=<optimized out>) at .moc/moc_qaction.cpp:380
#16 0x00007fb97f40b70c in QAction::activate (this=0x559cf448d920, event=<optimized out>) at kernel/qaction.cpp:1166
#17 0x0000559cf3e49fcf in ?? ()
#18 0x0000559cf3e4a835 in ?? ()
#19 0x00007fb981678af9 in QQmlObjectOrGadget::metacall ([email protected]=0x7ffd8e0206f0, [email protected]=QMetaObject::InvokeMetaMethod, index=<optimized out>, [email protected]=82, [email protected]=0x7ffd8e020400) at qml/qqmlpropertycache.cpp:1735
#20 0x00007fb98157a62b in CallMethod (object=…, index=82, [email protected]=43, [email protected]=0, [email protected]=0x0, [email protected]=0x559cf7c78580, callArgs=0x7fb929da2800, callType=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1231
#21 0x00007fb98157c522 in CallPrecise (object=…, data=…, [email protected]=0x559cf7c78580, [email protected]=0x7fb929da2800, [email protected]=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1479
#22 0x00007fb98157d1ff in QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=0x7fb929da27a0, argv=<optimized out>, argc=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:2017
#23 0x00007fb9816033b9 in QV4::FunctionObject::call (argc=0, argv=0x7fb929da2758, thisObject=0x7fb929da27a0, this=<optimized out>) at jsruntime/qv4functionobject_p.h:202
#24 QV4::Runtime::method_callProperty (engine=0x559cf7c78580, base=<optimized out>, nameIndex=<optimized out>, argv=0x7fb929da2758, argc=<optimized out>) at jsruntime/qv4runtime.cpp:1385
#25 0x00007fb9815974e0 in QV4::Moth::VME::interpret (frame=0x7ffd8e020a60, engine=0x559cf7c78580, code=0x7fb928996e1a «1602») at jsruntime/qv4vme_moth.cpp:718
#26 0x00007fb98159a746 in QV4::Moth::VME::exec ([email protected]=0x7ffd8e020a60, [email protected]=0x559cf7c78580) at jsruntime/qv4vme_moth.cpp:441
#27 0x00007fb98152d91b in QV4::Function::call ([email protected]=0x559cf7cde1b0, [email protected]=0x7fb929da2740, [email protected]=0x7fb929da2758, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:68
#28 0x00007fb9816a1737 in QQmlJavaScriptExpression::evaluate ([email protected]=0x559cf7d69590, [email protected]=0x7fb929da2728, [email protected]=0x0) at qml/qqmljavascriptexpression.cpp:216
#29 0x00007fb981641289 in QQmlBoundSignalExpression::evaluate ([email protected]=0x559cf7d69590, [email protected]=0x7ffd8e022bb0) at qml/qqmlboundsignal.cpp:225
#30 0x00007fb98164260b in QQmlBoundSignal_callback (e=0x559cf7ce7b80, a=0x7ffd8e022bb0) at qml/qqmlboundsignal.cpp:358
#31 0x00007fb981682cc3 in QQmlNotifier::emitNotify (endpoint=<optimized out>, [email protected]=0x7ffd8e022bb0) at qml/qqmlnotifier.cpp:106
#32 0x00007fb981623329 in QQmlData::signalEmitted (object=0x559cf994aff0, index=<optimized out>, a=0x7ffd8e022bb0) at qml/qqmlengine.cpp:880
#33 0x00007fb97dae465f in QMetaObject::activate (sender=0x559cf994aff0, signalOffset=<optimized out>, local_signal_index=<optimized out>, [email protected]=0x7ffd8e022bb0) at kernel/qobject.cpp:3647
#34 0x00007fb98161d6c5 in QQmlVMEMetaObject::activate ([email protected]=0x559cf7d04770, object=<optimized out>, [email protected]=69, [email protected]=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:1246
#35 0x00007fb98161f918 in QQmlVMEMetaObject::metaCall (this=0x559cf7d04770, o=<optimized out>, c=QMetaObject::InvokeMetaMethod, _id=69, a=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:922
#36 0x00007fb98161e9f9 in QQmlVMEMetaObject::metaCall (this=0x559cf9916ba0, o=<optimized out>, c=QMetaObject::InvokeMetaMethod, _id=69, a=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:979
#37 0x00007fb98161e9f9 in QQmlVMEMetaObject::metaCall (this=0x559cf7ce79a0, o=<optimized out>, c=QMetaObject::InvokeMetaMethod, _id=69, a=0x7ffd8e022bb0) at qml/qqmlvmemetaobject.cpp:979
#38 0x00007fb981678af9 in QQmlObjectOrGadget::metacall ([email protected]=0x7ffd8e022ea0, [email protected]=QMetaObject::InvokeMetaMethod, index=<optimized out>, [email protected]=69, [email protected]=0x7ffd8e022bb0) at qml/qqmlpropertycache.cpp:1735
#39 0x00007fb98157a62b in CallMethod (object=…, index=69, [email protected]=43, [email protected]=0, [email protected]=0x0, [email protected]=0x559cf7c78580, callArgs=0x7fb929da26f0, callType=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1231
#40 0x00007fb98157c522 in CallPrecise (object=…, data=…, [email protected]=0x559cf7c78580, [email protected]=0x7fb929da26f0, [email protected]=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1479
#41 0x00007fb98157d1ff in QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=0x7fb929da2690, argv=<optimized out>, argc=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:2017
#42 0x00007fb9816033b9 in QV4::FunctionObject::call (argc=0, argv=0x7fb929da2648, thisObject=0x7fb929da2690, this=<optimized out>) at jsruntime/qv4functionobject_p.h:202
#43 QV4::Runtime::method_callProperty (engine=0x559cf7c78580, base=<optimized out>, nameIndex=<optimized out>, argv=0x7fb929da2648, argc=<optimized out>) at jsruntime/qv4runtime.cpp:1385
#44 0x00007fb9815974e0 in QV4::Moth::VME::interpret (frame=0x7ffd8e023210, engine=0x559cf7c78580, code=0x7fb9289708da «3006330260602`») at jsruntime/qv4vme_moth.cpp:718
#45 0x00007fb98159a746 in QV4::Moth::VME::exec ([email protected]=0x7ffd8e023210, [email protected]=0x559cf7c78580) at jsruntime/qv4vme_moth.cpp:441
#46 0x00007fb98152d91b in QV4::Function::call ([email protected]=0x559cf7ca9b50, [email protected]=0x7fb929da2628, [email protected]=0x7fb929da2640, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:68
#47 0x00007fb9816a1737 in QQmlJavaScriptExpression::evaluate ([email protected]=0x559cf7d59d00, [email protected]=0x7fb929da2610, [email protected]=0x0) at qml/qqmljavascriptexpression.cpp:216
#48 0x00007fb981641289 in QQmlBoundSignalExpression::evaluate ([email protected]=0x559cf7d59d00, [email protected]=0x7ffd8e024fa0) at qml/qqmlboundsignal.cpp:225
#49 0x00007fb98164260b in QQmlBoundSignal_callback (e=0x559cf9950490, a=0x7ffd8e024fa0) at qml/qqmlboundsignal.cpp:358
#50 0x00007fb981682cc3 in QQmlNotifier::emitNotify (endpoint=<optimized out>, [email protected]=0x7ffd8e024fa0) at qml/qqmlnotifier.cpp:106
#51 0x00007fb981623329 in QQmlData::signalEmitted (object=0x559cf99d3b30, index=<optimized out>, a=0x7ffd8e024fa0) at qml/qqmlengine.cpp:880
#52 0x00007fb97dae465f in QMetaObject::activate (sender=0x559cf99d3b30, signalOffset=<optimized out>, [email protected]=0, [email protected]=0x7ffd8e024fa0) at kernel/qobject.cpp:3647
#53 0x00007fb97dae54f7 in QMetaObject::activate (sender=<optimized out>, [email protected]=0x7fb9584440c0 <QQuickAction1::staticMetaObject>, [email protected]=0, [email protected]=0x7ffd8e024fa0) at kernel/qobject.cpp:3631
#54 0x00007fb95821f3ef in QQuickAction1::triggered (this=<optimized out>, _t1=<optimized out>) at .moc/moc_qquickaction_p.cpp:366
#55 0x00007fb9581fbd53 in QQuickAction1::trigger (this=<optimized out>, source=<optimized out>) at qquickaction.cpp:462
#56 0x00007fb9581fc94b in QQuickAction1::trigger (this=<optimized out>, source=<optimized out>) at qquickaction.cpp:456
#57 0x00007fb95821f9dc in QQuickAction1::qt_static_metacall ([email protected]=0x559cf99d3b30, [email protected]=QMetaObject::InvokeMetaMethod, [email protected]=12, _a=[email protected]=0x7ffd8e025150) at .moc/moc_qquickaction_p.cpp:169
#58 0x00007fb95821fe45 in QQuickAction1::qt_metacall (this=0x559cf99d3b30, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7ffd8e025150) at .moc/moc_qquickaction_p.cpp:330
#59 0x00007fb981678af9 in QQmlObjectOrGadget::metacall ([email protected]=0x7ffd8e025490, [email protected]=QMetaObject::InvokeMetaMethod, index=<optimized out>, [email protected]=17, argv=<optimized out>) at qml/qqmlpropertycache.cpp:1735
#60 0x00007fb98157abf5 in CallMethod (object=…, index=<optimized out>, [email protected]=43, argCount=<optimized out>, argTypes=<optimized out>, [email protected]=0x559cf7c78580, callArgs=<optimized out>, callType=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:1213
#61 0x00007fb98157c55f in CallPrecise (object=…, data=…, [email protected]=0x559cf7c78580, [email protected]=0x7fb929da25c0, [email protected]=QMetaObject::InvokeMetaMethod) at jsruntime/qv4qobjectwrapper.cpp:1475
#62 0x00007fb98157d5ec in CallOverloaded (callType=QMetaObject::InvokeMetaMethod, propertyCache=0x7fb95c150a70, callArgs=0x7fb929da25c0, engine=0x559cf7c78580, data=…, object=…) at jsruntime/qv4qobjectwrapper.cpp:1549
#63 QV4::QObjectMethod::callInternal (this=<optimized out>, thisObject=<optimized out>, argv=<optimized out>, argc=<optimized out>) at jsruntime/qv4qobjectwrapper.cpp:2019
#64 0x00007fb9816033b9 in QV4::FunctionObject::call (argc=1, argv=0x7fb929da2570, thisObject=0x7fb929da2558, this=<optimized out>) at jsruntime/qv4functionobject_p.h:202
#65 QV4::Runtime::method_callProperty (engine=0x559cf7c78580, base=<optimized out>, nameIndex=<optimized out>, argv=0x7fb929da2570, argc=<optimized out>) at jsruntime/qv4runtime.cpp:1385
#66 0x00007fb9815974e0 in QV4::Moth::VME::interpret (frame=0x7ffd8e025800, engine=0x559cf7c78580, code=0x7fb928970c16 «3006330260602») at jsruntime/qv4vme_moth.cpp:718
#67 0x00007fb98159a746 in QV4::Moth::VME::exec ([email protected]=0x7ffd8e025800, [email protected]=0x559cf7c78580) at jsruntime/qv4vme_moth.cpp:441
#68 0x00007fb98152d91b in QV4::Function::call ([email protected]=0x559cf7ca9d80, [email protected]=0x7fb929da24f0, [email protected]=0x7fb929da2508, argc=<optimized out>, context=<optimized out>) at jsruntime/qv4function.cpp:68
#69 0x00007fb9816a1737 in QQmlJavaScriptExpression::evaluate ([email protected]=0x559cf7d0e1a0, [email protected]=0x7fb929da24d8, [email protected]=0x0) at qml/qqmljavascriptexpression.cpp:216
#70 0x00007fb981641289 in QQmlBoundSignalExpression::evaluate ([email protected]=0x559cf7d0e1a0, [email protected]=0x7ffd8e027590) at qml/qqmlboundsignal.cpp:225
#71 0x00007fb98164260b in QQmlBoundSignal_callback (e=0x559cf7d0e150, a=0x7ffd8e027590) at qml/qqmlboundsignal.cpp:358
#72 0x00007fb981682cc3 in QQmlNotifier::emitNotify (endpoint=<optimized out>, [email protected]=0x7ffd8e027590) at qml/qqmlnotifier.cpp:106
#73 0x00007fb981623329 in QQmlData::signalEmitted (object=0x559cf68f5a90, index=<optimized out>, a=0x7ffd8e027590) at qml/qqmlengine.cpp:880
#74 0x00007fb97dae465f in QMetaObject::activate ([email protected]=0x559cf68f5a90, signalOffset=<optimized out>, [email protected]=15, [email protected]=0x7ffd8e027590) at kernel/qobject.cpp:3647
#75 0x00007fb97dae54f7 in QMetaObject::activate ([email protected]=0x559cf68f5a90, [email protected]=0x7fb9820ede60 <QQuickMouseArea::staticMetaObject>, [email protected]=15, [email protected]=0x7ffd8e027590) at kernel/qobject.cpp:3631
#76 0x00007fb981cf4832 in QQuickMouseArea::released ([email protected]=0x559cf68f5a90, _t1=<optimized out>, [email protected]=0x559cf68f5d18) at .moc/moc_qquickmousearea_p.cpp:659
#77 0x00007fb981cf604c in QQuickMouseArea::setPressed ([email protected]=0x559cf68f5a90, button=<optimized out>, [email protected]=false, source=<optimized out>) at items/qquickmousearea.cpp:1234
#78 0x00007fb981cf71e8 in QQuickMouseArea::mouseReleaseEvent (this=0x559cf68f5a90, event=0x7ffd8e027ec0) at items/qquickmousearea.cpp:806
#79 0x00007fb981c5fc78 in QQuickItem::event (this=0x559cf68f5a90, ev=0x7ffd8e027ec0) at items/qquickitem.cpp:8096
#80 0x00007fb97f40f83c in QApplicationPrivate::notify_helper ([email protected]=0x559cf43387d0, [email protected]=0x559cf68f5a90, [email protected]=0x7ffd8e027ec0) at kernel/qapplication.cpp:3752
#81 0x00007fb97f416dd0 in QApplication::notify (this=0x7ffd8e028380, receiver=0x559cf68f5a90, e=0x7ffd8e027ec0) at kernel/qapplication.cpp:3499
#82 0x00007fb97dab5328 in QCoreApplication::notifyInternal2 (receiver=0x559cf68f5a90, event=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1061
#83 0x00007fb97dab54fe in QCoreApplication::sendEvent ([email protected]=0x559cf68f5a90, [email protected]=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1451
#84 0x00007fb981c790ed in QQuickWindowPrivate::deliverMouseEvent ([email protected]=0x559cf8730a70, pointerEvent=0x559cf7d3a310) at items/qquickwindow.cpp:1784
#85 0x00007fb981c7a2db in QQuickWindowPrivate::deliverPointerEvent ([email protected]=0x559cf8730a70, event=0x559cf7d3a310) at items/qquickwindow.cpp:2346
#86 0x00007fb981c7af6e in QQuickWindowPrivate::handleMouseEvent (this=0x559cf8730a70, event=0x7ffd8e027ec0) at items/qquickwindow.cpp:2210
#87 0x00007fb97e088ac5 in QWindow::event ([email protected]=0x559cf86c2760, [email protected]=0x7ffd8e027ec0) at kernel/qwindow.cpp:2336
#88 0x00007fb981c7c285 in QQuickWindow::event (this=0x559cf86c2760, e=0x7ffd8e027ec0) at items/qquickwindow.cpp:1673
#89 0x00007fb97f40f83c in QApplicationPrivate::notify_helper ([email protected]=0x559cf43387d0, [email protected]=0x559cf86c2760, [email protected]=0x7ffd8e027ec0) at kernel/qapplication.cpp:3752
#90 0x00007fb97f416dd0 in QApplication::notify (this=0x7ffd8e028380, receiver=0x559cf86c2760, e=0x7ffd8e027ec0) at kernel/qapplication.cpp:3499
#91 0x00007fb97dab5328 in QCoreApplication::notifyInternal2 (receiver=0x559cf86c2760, event=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1061
#92 0x00007fb97dab550e in QCoreApplication::sendSpontaneousEvent ([email protected]=0x559cf86c2760, [email protected]=0x7ffd8e027ec0) at kernel/qcoreapplication.cpp:1463
#93 0x00007fb97e07d52b in QGuiApplicationPrivate::processMouseEvent (e=0x559cf6e218d0) at kernel/qguiapplication.cpp:2102
#94 0x00007fb97e07e695 in QGuiApplicationPrivate::processWindowSystemEvent ([email protected]=0x559cf6e218d0) at kernel/qguiapplication.cpp:1837
#95 0x00007fb97e05714b in QWindowSystemInterface::sendWindowSystemEvents ([email protected]=…) at kernel/qwindowsysteminterface.cpp:1068
#96 0x00007fb970ccbd2a in xcbSourceDispatch (source=<optimized out>) at qxcbeventdispatcher.cpp:105
#97 0x00007fb977037387 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#98 0x00007fb9770375c0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#99 0x00007fb97703764c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#100 0x00007fb97db1213f in QEventDispatcherGlib::processEvents (this=0x559cf43e4ac0, flags=…) at kernel/qeventdispatcher_glib.cpp:422
#101 0x00007fb97dab364a in QEventLoop::exec ([email protected]=0x7ffd8e028260, flags=…, [email protected]=…) at kernel/qeventloop.cpp:225
#102 0x00007fb97dabc800 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1364
#103 0x0000559cf3e35f95 in ?? ()
#104 0x00007fb97d0dcb97 in __libc_start_main (main=0x559cf3e35450, argc=1, argv=0x7ffd8e028538, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd8e028528) at ../csu/libc-start.c:310
#105 0x0000559cf3e3641a in _start ()
30.01.2018
Написать программу для просмотра qml-файлов не составляет большого труда и сделать это можно несколькими способами, но хотелось бы получить простое и удобное решение — запуск файла после его выбора. Для этого создадим приложение (сервис без интерфейса и даже без консольного окна), а после укажем его в качестве программы, запускаемой при выборе файлов с расширением qml. Получится сервис для запуска локальных qml-файлов. Если потребуется открывать удалённые файлы, то это можно осуществить в коде локального qml-файла.
Откроем Qt Creator и создадим пустое приложение Qt Quick (Qt Quick Controls 2). Данный шаблон выбран для более удобного вывода сообщений и логов на экран при возникновении ошибок. После создания проекта в папке ресурсов появится файл main.qml, который и будет использоваться для этого.
Код главного файла проекта main.cpp выглядеть как-то так:
QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); if (engine.rootObjects().isEmpty()) return -1;
Нам необходимо вместо «qrc:/main.qml» указать путь к открываемому файлу.
Файл передаётся сервису в виде параметра командной строки и в Windows это выгладит очень просто. Проверяем количество параметров в командной строке и загружаем файл, полный путь к которому указан во втором параметре:
if(argc==2){ engine.load(argv[1]); }
Если параметр не указан (сервис вызван напрямую и количество аргументов равно 1) то можно вывести сообщение о необходимости указания второго параметра. Для взаимодействия между Qt С++ и Qml создаётся класс С++ с нужными свойствами и методами, а затем производится связь контекстов. Добавим к проект новый класс Utils. Тогда связь будет выглядеть так:
Utils ut;
engine.rootContext()->setContextProperty(«qtc», &ut); // «qtc» — свойство Qml, &ut — ссылка на объект класса.
После этого открытые методы класса Utils будут доступны через объект qtc. Добавьте в класс свойство для обмена сообщениями мижду C++ и Qml.
Для отображения командной строки на вкладке «Проекты» выберите для заданного комплекта сборки опцию «Запуск». Создайте тестовый qml-файл, укажите в этой командной строке путь к нему запустите сервис для проверки его работы.
Получение параметров запуска на Android выглядит на java так:
Intent intent = getIntent(); Uri data = intent.getData(); String path = data.getPath();
Для доступ к Java из Qt служит интерфнйс JNI — Java Native Interface, который предоставляет объект QAndroidJniObject. Воспользуемся им для получения эквивалентного кода:
QAndroidJniObject activity = QtAndroid::androidActivity(); if (activity.isValid()) { QAndroidJniObject intent = activity.callObjectMethod("getIntent", "()Landroid/content/Intent;"); if (intent.isValid()) { QAndroidJniObject data = intent.callObjectMethod("getData", "()Landroid/net/Uri;"); if (data.isValid()) { QAndroidJniObject path = data.callObjectMethod("getPath", "()Ljava/lang/String;"); if (path.isValid()){ ut.engine.load("file://"+ut.getPath()); } } } }
Для разделения кода, включая и объявления подключаемых библиотек, используются директивы:
#ifdef Q_OS_WIN // код для работы в среде Windows #endif #ifdef Q_OS_ANDROID // код для работы в среде Android #endif
Если в процессе работы сервиса или открытия файла возникнет ошибка, то приложение закроется с кодом -1 и будет непонятно, ошибка возникла при работе сервиса или связана с открытием файла. Для отслеживания этого потребуется дополнительный код:
Пытаемся открыть qml-файл. Если он не загружается (в сервисе или файле возникла ошибка), то открываем заведомо исправный файл ресурса main.qml и пробуем загрузить qml-файл в нём при помощи блока Loader. Если ресурсный файл main.qml не открывается — ошибка при работе сервиса. Если же не выполняется содержимое qml-файла, то ошибка в его коде.
Для реализации этого в main.cpp добавим код:
if (engine.rootObjects().isEmpty()){ engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); } if (engine.rootObjects().isEmpty()) return -1;
Для загрузки файла в Qml нужно передать путь к нему. Для этого в класс Utils добавим методы setPath(QString path) и getPath(), а коде Qml вызовем его методом qtc.getPath()
Для запуска сервиса на Android при открытии файла qml необходимо дополнить манифест сервиса:
<intent-filter> <action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="text/*.qml"/> </intent-filter>
Для генерации файла манифеста перейдите на вкладку «Проекты», далее выберите опцию «Сборка» для комплекта сборки под Android, на панели перейдите в раздел «Собрать Android APK» и нажмите кнопку «Создать шаблоны». В проекте появится новая папка «Другие файлы», в которой и находится файл манифеста AndroidManifest.xml
Исходный код можно загрузить здесь.