fixed several qml warnings

This commit is contained in:
Luis Ángel San Martín
2016-01-13 21:24:23 +01:00
parent ac4772812a
commit 97c788203c
2 changed files with 24 additions and 6 deletions

View File

@ -39,7 +39,6 @@ GridComicsView::GridComicsView(QWidget *parent) :
container->setMinimumSize(200, 200);
container->setFocusPolicy(Qt::TabFocus);
view->setSource(QUrl("qrc:/qml/GridComicsView.qml"));
createCoverSizeSliderWidget();
@ -81,6 +80,25 @@ GridComicsView::GridComicsView(QWidget *parent) :
ctxt->setContextProperty("fontSpacing", 0.5);
#endif
ctxt->setContextProperty("backgroundImage", QUrl());
ctxt->setContextProperty("backgroundBlurOpacity", 0.0);
ctxt->setContextProperty("backgroundBlurRadius", 0.0);
ctxt->setContextProperty("backgroundBlurVisible", false);
ComicModel *model = new ComicModel();
QItemSelectionModel *selectionModel = new QItemSelectionModel(model);
ctxt->setContextProperty("comicsList", model);
ctxt->setContextProperty("comicsSelection", selectionModel);
ctxt->setContextProperty("contextMenuHelper",this);
ctxt->setContextProperty("comicsSelectionHelper", this);
ctxt->setContextProperty("comicRatingHelper", this);
ctxt->setContextProperty("dummyValue", true);
ctxt->setContextProperty("dragManager", this);
ctxt->setContextProperty("dropManager", this);
view->setSource(QUrl("qrc:/qml/GridComicsView.qml"));
setShowMarks(true);//TODO save this in settings
QVBoxLayout * l = new QVBoxLayout;
@ -188,9 +206,9 @@ void GridComicsView::updateBackgroundConfig()
}
else
{
ctxt->setContextProperty("backgroundImage", QVariant());
ctxt->setContextProperty("backgroundBlurOpacity", 0);
ctxt->setContextProperty("backgroundBlurRadius", 0);
ctxt->setContextProperty("backgroundImage", QUrl());
ctxt->setContextProperty("backgroundBlurOpacity", 0.0);
ctxt->setContextProperty("backgroundBlurRadius", 0.0);
ctxt->setContextProperty("backgroundBlurVisible", false);
}