Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qlogging.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
5
6#include <QtDebug>
7#include <QQmlComponent>
8
9//! [1]
10 void statusChanged(QQmlComponent::Status status) {
11 if (status == QQmlComponent::Error) {
12 for (const QQmlError &error: std::as_const(component->errors())) {
13 const QByteArray file = error.url().toEncoded();
14 QMessageLogger(file.constData(), error.line(), 0).debug() << error.description();
15 }
16 }
17 }
18//! [1]
19
20//! [2]
22//! [2]
const QLoggingCategory & category()
[1]
void statusChanged(QQmlComponent::Status status)
[1]
Definition qlogging.cpp:10