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