blob: e4c906884f393232f5e4287eb0c9c54d1301c287 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
#include <QtDebug>
#include <QQmlComponent>
//! [1]
void statusChanged(QQmlComponent::Status status) {
if (status == QQmlComponent::Error) {
for (const QQmlError &error: std::as_const(component->errors())) {
const QByteArray file = error.url().toEncoded();
QMessageLogger(file.constData(), error.line(), 0).debug() << error.description();
}
}
}
//! [1]
//! [2]
const QLoggingCategory &category();
//! [2]
|