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 <QtGui>
7#include <QtDebug>
8#include <QQmlComponent>
9
10//! [1]
11 void statusChanged(QQmlComponent::Status status) {
12 if (status == QQmlComponent::Error) {
13 for (const QQmlError &error: std::as_const(component->errors())) {
14 const QByteArray file = error.url().toEncoded();
15 QMessageLogger(file.constData(), error.line(), 0).debug() << error.description();
16 }
17 }
18 }
19//! [1]
20
21//! [2]
23//! [2]
const QLoggingCategory & category()
[1]
void statusChanged(QQmlComponent::Status status)
[1]
Definition qlogging.cpp:11