diff --git a/shell/scripting/appinterface.cpp b/shell/scripting/appinterface.cpp --- a/shell/scripting/appinterface.cpp +++ b/shell/scripting/appinterface.cpp @@ -159,16 +159,13 @@ void AppInterface::sleep(int ms) { - // The nested eventloop here may cause crashes when for example loading a - // LnF because the script runs out of the QML stack. Opening an eventloop - // there and processing QML events may result in touching members objects - // that were meant to be deleted but haven't yet, because the parent event - // loop hasn't returned yet. - qWarning() << "Scripted sleeping starts a nested event loop." \ - " This can cause process instability. Use with care!"; - QEventLoop loop; - QTimer::singleShot(ms, &loop, &QEventLoop::quit); - loop.exec(QEventLoop::ExcludeUserInputEvents); + // TODO KF6 remove + + // Sleep was implemented with a nested event loop which would cause nested + // event processing from QML and offer a wide array of sources for + // segfaulting. There isn't really a need to sleep from the scripting API, + // so it was turned no-op. + qWarning() << "Plasma scripting sleep() is deprecated and does nothing!"; } bool AppInterface::hasBattery() const