#include "logger.hpp" #include "playlist-controller.hpp" #include #include #include #include #include int main(int argc, char *argv[]) { qInstallMessageHandler(MessageHandler); std::filesystem::path cwd = std::filesystem::current_path(); Logger::info(cwd.string()); QGuiApplication app(argc, argv); // qmlRegisterType("MediaSystem", 1, 0, // "PlaylistController"); QQmlApplicationEngine engine; // engine.addImportPath(app.applicationDirPath()); PlaylistController playlist; engine.rootContext()->setContextProperty("playlist", &playlist); const QUrl url(QStringLiteral("qrc:/App/ui/main.qml")); QObject::connect( &engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.load(url); Logger::info("Engine loaded"); return app.exec(); }