mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
style(qt6): fix 80-char violations in main.cpp
Extract ctx alias for rootContext() calls and wrap long string literals to stay within the 80-character line margin. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,20 +36,25 @@ int main(int argc, char *argv[]) {
|
||||
PackageLoader packageLoader;
|
||||
NodeRegistry nodeRegistry;
|
||||
registry.loadPackage("frontpage");
|
||||
packageLoader.setPackagesDir(QDir(QStringLiteral(SRCDIR) + QStringLiteral("/packages")).absolutePath());
|
||||
packageLoader.setPackagesDir(
|
||||
QDir(QStringLiteral(SRCDIR) + QStringLiteral("/packages"))
|
||||
.absolutePath());
|
||||
packageLoader.scan();
|
||||
packageLoader.setWatching(true);
|
||||
|
||||
// Load workflow node type registry
|
||||
const QString registryPath = QDir::cleanPath(
|
||||
QStringLiteral(SRCDIR) + QStringLiteral("/../../workflow/plugins/registry/node-registry.json"));
|
||||
QStringLiteral(SRCDIR)
|
||||
+ QStringLiteral(
|
||||
"/../../workflow/plugins/registry/node-registry.json"));
|
||||
nodeRegistry.loadRegistry(registryPath);
|
||||
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("PackageRegistry"), ®istry);
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("ModPlayer"), &modPlayer);
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("DBALClient"), &dbalClient);
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("PackageLoader"), &packageLoader);
|
||||
engine.rootContext()->setContextProperty(QStringLiteral("NodeRegistry"), &nodeRegistry);
|
||||
auto *ctx = engine.rootContext();
|
||||
ctx->setContextProperty(QStringLiteral("PackageRegistry"), ®istry);
|
||||
ctx->setContextProperty(QStringLiteral("ModPlayer"), &modPlayer);
|
||||
ctx->setContextProperty(QStringLiteral("DBALClient"), &dbalClient);
|
||||
ctx->setContextProperty(QStringLiteral("PackageLoader"), &packageLoader);
|
||||
ctx->setContextProperty(QStringLiteral("NodeRegistry"), &nodeRegistry);
|
||||
|
||||
const QUrl url(QStringLiteral("qrc:/qt/qml/DBALObservatory/App.qml"));
|
||||
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
|
||||
|
||||
Reference in New Issue
Block a user