mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Add a simple qml error logger to YACReaderLibrary
This commit is contained in:
parent
381c0f6560
commit
15e5618454
@ -40,6 +40,16 @@ GridComicsView::GridComicsView(QWidget *parent) :
|
||||
qmlRegisterType<ComicInfo>("com.yacreader.ComicInfo",1,0,"ComicInfo");
|
||||
|
||||
view = new QQuickView();
|
||||
connect(
|
||||
view, &QQuickView::statusChanged,
|
||||
[=] (QQuickView::Status status)
|
||||
{
|
||||
if (status == QQuickView::Error)
|
||||
{
|
||||
QLOG_ERROR() << view->errors();
|
||||
}
|
||||
}
|
||||
);
|
||||
container = QWidget::createWindowContainer(view, this);
|
||||
|
||||
container->setMinimumSize(200, 200);
|
||||
|
@ -19,6 +19,17 @@ InfoComicsView::InfoComicsView(QWidget *parent)
|
||||
qmlRegisterType<ComicInfo>("com.yacreader.ComicInfo",1,0,"ComicInfo");
|
||||
|
||||
view = new QQuickView();
|
||||
connect(
|
||||
view, &QQuickView::statusChanged,
|
||||
[=] (QQuickView::Status status)
|
||||
{
|
||||
if (status == QQuickView::Error)
|
||||
{
|
||||
QLOG_ERROR() << view->errors();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
container = QWidget::createWindowContainer(view, this);
|
||||
|
||||
container->setFocusPolicy(Qt::StrongFocus);
|
||||
|
Loading…
Reference in New Issue
Block a user