diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-05-04 14:36:47 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-05-04 14:19:23 +0000 |
commit | df8b982e9768b6a38e24bac602f0984da62884d7 (patch) | |
tree | be3a2be9128a90b263231ea7d30b22e2fdfb4f7b /src/runtime/q3dsanimationmanager.cpp | |
parent | e355fc153700344bdc7b7e169a9eeb254e394ae5 (diff) |
Move logging categories to a single central place
Also add a new category for the animation manager.
The behavior does not change (debug prints are enabled). Not sure if we
really want to change this at all (unless it affects performance). But the
option to do so by a single function call is now there.
Change-Id: Idf0973f37c35475c03405b0e56b2f1b6fb63cd84
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/runtime/q3dsanimationmanager.cpp')
-rw-r--r-- | src/runtime/q3dsanimationmanager.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/runtime/q3dsanimationmanager.cpp b/src/runtime/q3dsanimationmanager.cpp index 748b26a..756ecfc 100644 --- a/src/runtime/q3dsanimationmanager.cpp +++ b/src/runtime/q3dsanimationmanager.cpp @@ -31,6 +31,7 @@ #include "q3dsdatamodelparser_p.h" #include "q3dsscenemanager_p.h" #include "q3dsslideplayer_p.h" +#include "q3dslogging_p.h" #include <QLoggingCategory> @@ -45,8 +46,6 @@ QT_BEGIN_NAMESPACE -Q_DECLARE_LOGGING_CATEGORY(lcScene) - static struct AnimatableExtraMeta { QString type3DS; QString name3DS; @@ -263,7 +262,7 @@ void Q3DSAnimationManager::updateAnimationHelper(const AnimationTrackListMap<T * static const auto initAnimator = [](Q3DSGraphObjectAttached *data, Q3DSSlide *slide) { static const bool animDebug = qEnvironmentVariableIntValue("Q3DS_DEBUG") >= 2; if (animDebug) - qCDebug(lcScene) << "initAnimator@:" << data << "animationData:" << data->animationDataMap[slide] + qCDebug(lcAnim) << "initAnimator@:" << data << "animationData:" << data->animationDataMap[slide] << "slide:" << slide->name(); Q_ASSERT(data->entity); @@ -279,7 +278,7 @@ void Q3DSAnimationManager::updateAnimationHelper(const AnimationTrackListMap<T * Q3DSSlideAttached *slideAttached = static_cast<Q3DSSlideAttached *>(slide->attached()); slideAttached->animators.append(animator); if (animDebug) - qCDebug(lcScene) << "\tnew Clip Animator: " << animator << "slideAttached: " + qCDebug(lcAnim) << "\tnew Clip Animator: " << animator << "slideAttached: " << slideAttached << "new list: " << slideAttached->animators; return animator; @@ -394,7 +393,7 @@ void Q3DSAnimationManager::updateAnimationHelper(const AnimationTrackListMap<T * AnimatableTab *animatables, Q3DSGraphObject *target, const QStringList &prop) { - qCDebug(lcScene, "Building dynamic key-frame for %s's property %s", target->id().constData(), qPrintable(prop[0])); + qCDebug(lcAnim, "Building dynamic key-frame for %s's property %s", target->id().constData(), qPrintable(prop[0])); if (prop.count() == 1) { const float value = animatables->value(prop[0]).getter(target, QString::fromLatin1("")).toFloat(); keyFrame.value = value; @@ -541,7 +540,7 @@ private: void Q3DSAnimationManager::clearAnimations(Q3DSSlide *slide, bool editorMode) { - qCDebug(lcScene, "Clearing animations for slide (%s)", qPrintable(slide->name())); + qCDebug(lcAnim, "Clearing animations for slide (%s)", qPrintable(slide->name())); // Clear the old slide animator static const auto clearSlideAnimator = [](Q3DSSlide *slide) { @@ -693,7 +692,7 @@ void Q3DSAnimationManager::updateAnimations(Q3DSSlide *slide, bool editorMode) { Q_ASSERT(slide); - qCDebug(lcScene, "Updating animations for slide (%s)", qPrintable(slide->name())); + qCDebug(lcAnim, "Updating animations for slide (%s)", qPrintable(slide->name())); buildClipAnimator(slide); @@ -809,7 +808,7 @@ void Q3DSAnimationManager::updateAnimations(Q3DSSlide *slide, bool editorMode) buildTrackListMap(masterSlide, false); buildTrackListMap(slide, true); - qCDebug(lcScene, "Slide %s has %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d animated objects", slide->id().constData(), + qCDebug(lcAnim, "Slide %s has %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d animated objects", slide->id().constData(), defMatAnims.count(), customMatAnims.count(), effectAnims.count(), camAnims.count(), lightAnims.count(), modelAnims.count(), groupAnims.count(), compAnims.count(), textAnims.count(), imageAnims.count(), layerAnims.count(), aliasAnims.count()); |