forked from quickshell/quickshell
core/reloader: add reload signals for visual notifications
This commit is contained in:
parent
569c40494d
commit
7feae55ebe
5 changed files with 48 additions and 6 deletions
|
@ -265,12 +265,16 @@ void EngineGeneration::assignIncubationController() {
|
|||
this->engine->setIncubationController(controller);
|
||||
}
|
||||
|
||||
EngineGeneration* EngineGeneration::findEngineGeneration(QQmlEngine* engine) {
|
||||
return g_generations.value(engine);
|
||||
}
|
||||
|
||||
EngineGeneration* EngineGeneration::findObjectGeneration(QObject* object) {
|
||||
while (object != nullptr) {
|
||||
auto* context = QQmlEngine::contextForObject(object);
|
||||
|
||||
if (context != nullptr) {
|
||||
if (auto* generation = g_generations.value(context->engine())) {
|
||||
if (auto* generation = EngineGeneration::findEngineGeneration(context->engine())) {
|
||||
return generation;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue