🔧 fix: trigger preview action when color or palette changes

This commit is contained in:
2026-02-28 22:51:04 +01:00
parent 603adb1a7a
commit 4c482937a1
4 changed files with 53 additions and 25 deletions
+24 -17
View File
@@ -20,6 +20,11 @@ using namespace WallReel::Core;
WALLREEL_DECLARE_SENDER("Main")
int main(int argc, char* argv[]) {
// Destruction order after QApplication quits its event loop:
// 1. QQmlApplicationEngine (with all QML objects)
// 2. provider (manages states and connections)
// 3. bootstrap (manages lifecycle of all managers)
// 4. QApplication
QApplication a(argc, argv);
a.setApplicationName(APP_NAME);
@@ -42,27 +47,29 @@ int main(int argc, char* argv[]) {
return 0;
}
Provider::Carousel provider(&a, bootstrap);
qmlRegisterSingletonInstance(
COREMODULE_URI,
MODULE_VERSION_MAJOR,
MODULE_VERSION_MINOR,
"CarouselProvider",
&provider);
{
QQmlApplicationEngine engine;
Provider::Carousel provider(&a, bootstrap);
qmlRegisterSingletonInstance(
COREMODULE_URI,
MODULE_VERSION_MAJOR,
MODULE_VERSION_MINOR,
"CarouselProvider",
&provider);
{
QQmlApplicationEngine engine;
QObject::connect(
&engine,
&QQmlApplicationEngine::objectCreationFailed,
&a,
[]() { QCoreApplication::exit(-1); },
Qt::QueuedConnection);
engine.loadFromModule(UIMODULE_URI, "Main");
QObject::connect(
&engine,
&QQmlApplicationEngine::objectCreationFailed,
&a,
[]() { QCoreApplication::exit(-1); },
Qt::QueuedConnection);
engine.loadFromModule(UIMODULE_URI, "Main");
provider.start();
bootstrap.start();
return a.exec();
return a.exec();
}
}
}
}