forked from quickshell/quickshell
core/reloader: trigger onPostReload if launched post-reload
This is similar to the check in Reloadable, and fixes a number of hard to debug issues with Process, IpcHandler, NotificationServer, and GlobalShortcut not working depending on where you put them in a QML file.
This commit is contained in:
parent
0e6518a706
commit
9708d8212a
8 changed files with 36 additions and 38 deletions
|
|
@ -18,7 +18,7 @@ void TestProcess::startAfterReload() {
|
|||
QVERIFY(!process.isRunning());
|
||||
QCOMPARE(startedSpy.count(), 0);
|
||||
|
||||
process.onPostReload();
|
||||
process.postReload();
|
||||
|
||||
QVERIFY(process.isRunning());
|
||||
QVERIFY(startedSpy.wait(100));
|
||||
|
|
@ -29,7 +29,7 @@ void TestProcess::testExec() {
|
|||
auto startedSpy = QSignalSpy(&process, &Process::started);
|
||||
auto exitedSpy = QSignalSpy(&process, &Process::exited);
|
||||
|
||||
process.onPostReload();
|
||||
process.postReload();
|
||||
|
||||
process.setCommand({"sleep", "30"});
|
||||
process.setRunning(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue