summaryrefslogtreecommitdiffstats
path: root/src/runtime
diff options
context:
space:
mode:
authorAntti Määttä <antti.maatta@qt.io>2019-10-07 09:36:13 +0300
committerAntti Määttä <antti.maatta@qt.io>2019-10-07 11:00:24 +0300
commitda8d2d55ccc3edd28ef3e77de46dae255282a46b (patch)
tree39dac8f97de6c531ad849165dcd7b208c750e5fc /src/runtime
parent0582de9c1063ec5d83f3ee931925e1d8a276d3b6 (diff)
Use logging categories with all debug messages
Task-number: QT3DS-3712 Change-Id: Ibb751d2ad462685f0ba39cef6a4d932708faac57 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/Qt3DSApplication.cpp27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/runtime/Qt3DSApplication.cpp b/src/runtime/Qt3DSApplication.cpp
index abe93c8..e8ed57e 100644
--- a/src/runtime/Qt3DSApplication.cpp
+++ b/src/runtime/Qt3DSApplication.cpp
@@ -221,13 +221,6 @@ struct SHandleElementPairComparator
static int s_debug = -1;
-static bool debuggingEnabled()
-{
- if (s_debug == -1)
- s_debug = qEnvironmentVariableIntValue("QT3DS_DEBUG");
- return s_debug >= 1;
-}
-
struct SSlideResourceCounter
{
QHash<QString, int> counters;
@@ -295,20 +288,20 @@ struct SSlideResourceCounter
}
void print()
{
- if (debuggingEnabled()) {
- qDebug() << "SlideResourceCounter resources:";
+ if (qt3ds::TRACE_INFO().isInfoEnabled()) {
+ qCInfo(qt3ds::TRACE_INFO) << "SlideResourceCounter resources:";
const auto keys = counters.keys();
for (auto &x : keys)
- qDebug() << x << ": " << counters[x];
+ qCInfo(qt3ds::TRACE_INFO) << x << ": " << counters[x];
if (createSet.size()) {
- qDebug() << "New resources: ";
+ qCInfo(qt3ds::TRACE_INFO) << "New resources: ";
for (auto y : qAsConst(createSet))
- qDebug() << y;
+ qCInfo(qt3ds::TRACE_INFO) << y;
}
if (deleteSet.size()) {
- qDebug() << "Deleted resources: ";
+ qCInfo(qt3ds::TRACE_INFO) << "Deleted resources: ";
for (auto y : qAsConst(deleteSet))
- qDebug() << y;
+ qCInfo(qt3ds::TRACE_INFO) << y;
}
}
}
@@ -1220,7 +1213,7 @@ struct SApp : public IApplication
slidesystem.setUnloadSlide(key, false);
const QString completeName = presentation->GetName() + QLatin1Char(':')
+ QString::fromUtf8(key.m_Component->m_Name) + QLatin1Char(':') + slideName;
- qCInfo(PERF_INFO) << "Load component slide resources: " << completeName;
+ qCInfo(TRACE_INFO) << "Load component slide resources: " << completeName;
m_resourceCounter.handleLoadSlide(completeName, key, slidesystem);
if (m_uploadRenderTask)
m_uploadRenderTask->add(m_resourceCounter.createSet, wait);
@@ -1231,7 +1224,7 @@ struct SApp : public IApplication
getComponentSlideAssets(newAssets, presentation, component, index);
if (newAssets.size())
- qCInfo(PERF_INFO) << "Slide assets: " << newAssets;
+ qCInfo(TRACE_INFO) << "Slide assets: " << newAssets;
for (QT3DSU32 idx = 0, end = m_OrderedAssets.size(); idx < end; ++idx) {
QString assetId = QString::fromUtf8(m_OrderedAssets[idx].first.c_str());
if (newAssets.contains(assetId) && !GetPresentationById(qUtf8Printable(assetId))) {
@@ -1292,7 +1285,7 @@ struct SApp : public IApplication
if (!slidesystem.isActiveSlide(key)) {
const QString completeName = presentation->GetName() + QLatin1Char(':')
+ QString::fromUtf8(key.m_Component->m_Name) + QLatin1Char(':') + slideName;
- qCInfo(PERF_INFO) << "Unload component slide resources: " << completeName;
+ qCInfo(TRACE_INFO) << "Unload component slide resources: " << completeName;
m_resourceCounter.handleUnloadSlide(completeName, key, slidesystem);
if (m_uploadRenderTask)