mirror of
https://github.com/QuasarApp/SoundBand.git
synced 2025-04-27 15:54:31 +00:00
fix app
This commit is contained in:
parent
369c915523
commit
92c5c908f5
@ -5,6 +5,7 @@
|
||||
#include "imageprovider.h"
|
||||
#include "serverlistmodel.h"
|
||||
#include "playlistsmodel.h"
|
||||
#include "playlistmodel.h"
|
||||
|
||||
|
||||
App::App(QObject* ptr):
|
||||
@ -18,18 +19,20 @@ App::App(QObject* ptr):
|
||||
|
||||
playListsModel = new PlayListsModel();
|
||||
playListsModel->setSource(syncEngine);
|
||||
|
||||
playListModel = new PlayListModel();
|
||||
playListModel->setSource(syncEngine);
|
||||
}
|
||||
|
||||
bool App::run(){
|
||||
|
||||
|
||||
qmlEngine->addImageProvider(QLatin1String("collection"), imageProvider);
|
||||
|
||||
QQmlContext *ctxt = qmlEngine->rootContext();
|
||||
ctxt->setContextProperty("syncEngine", syncEngine);
|
||||
ctxt->setContextProperty("serverListModel", serverListModel);
|
||||
ctxt->setContextProperty("playListsModel", playListsModel);
|
||||
|
||||
ctxt->setContextProperty("playListModel", playListModel);
|
||||
|
||||
qmlEngine->load(QUrl(QStringLiteral("qrc:/main.qml")));
|
||||
if (qmlEngine->rootObjects().isEmpty())
|
||||
|
@ -9,6 +9,7 @@ class QQmlApplicationEngine;
|
||||
class ImageProvider;
|
||||
class ServerListModel;
|
||||
class PlayListsModel;
|
||||
class PlayListModel;
|
||||
|
||||
|
||||
/**
|
||||
@ -23,6 +24,8 @@ private:
|
||||
ImageProvider *imageProvider;
|
||||
ServerListModel *serverListModel;
|
||||
PlayListsModel *playListsModel;
|
||||
PlayListModel *playListModel;
|
||||
|
||||
|
||||
public:
|
||||
explicit App(QObject *ptr = nullptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user