summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-07 19:41:11 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-11-07 19:46:40 (GMT)
commita37f54add5c53e09afd0d3ff11cc492f56f99f83 (patch)
treef6b410237c8755dfe7084900803e09946f4d27ac
parent2d12a652a3774f7bbe5228d8f1977a7bcb7bf994 (diff)
Prevent empty runtime trace items
-rw-r--r--src/lib/marble/layers/FloatItemsLayer.cpp5
-rw-r--r--src/lib/marble/layers/FloatItemsLayer.h2
-rw-r--r--src/lib/marble/layers/TextureLayer.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/marble/layers/FloatItemsLayer.cpp b/src/lib/marble/layers/FloatItemsLayer.cpp
index 995a295..80043b0 100644
--- a/src/lib/marble/layers/FloatItemsLayer.cpp
+++ b/src/lib/marble/layers/FloatItemsLayer.cpp
@@ -73,6 +73,11 @@ QList<AbstractFloatItem *> FloatItemsLayer::floatItems() const
return m_floatItems;
}
+QString FloatItemsLayer::runtimeTrace() const
+{
+ return QStringLiteral("Float Items: %1").arg(m_floatItems.size());
+}
+
void FloatItemsLayer::updateVisibility(bool visible, const QString &nameId)
{
emit visibilityChanged(nameId, visible);
diff --git a/src/lib/marble/layers/FloatItemsLayer.h b/src/lib/marble/layers/FloatItemsLayer.h
index 647748a..f3d5438 100644
--- a/src/lib/marble/layers/FloatItemsLayer.h
+++ b/src/lib/marble/layers/FloatItemsLayer.h
@@ -46,6 +46,8 @@ class FloatItemsLayer : public QObject, public LayerInterface
*/
QList<AbstractFloatItem *> floatItems() const;
+ QString runtimeTrace() const override;
+
Q_SIGNALS:
/**
* @brief Signal that a render item has been initialized
diff --git a/src/lib/marble/layers/TextureLayer.cpp b/src/lib/marble/layers/TextureLayer.cpp
index 1b83f36..2622c25 100644
--- a/src/lib/marble/layers/TextureLayer.cpp
+++ b/src/lib/marble/layers/TextureLayer.cpp
@@ -305,6 +305,7 @@ bool TextureLayer::render( GeoPainter *painter, ViewportParams *viewport,
{
Q_UNUSED( renderPos );
Q_UNUSED( layer );
+ d->m_runtimeTrace = QStringLiteral("Texture Cache: %1 ").arg(d->m_tileLoader.tileCount());
d->m_renderState = RenderState(QStringLiteral("Texture Tiles"));
// Stop repaint timer if it is already running
@@ -350,7 +351,6 @@ bool TextureLayer::render( GeoPainter *painter, ViewportParams *viewport,
const QRect dirtyRect = QRect( QPoint( 0, 0), viewport->size() );
d->m_texmapper->mapTexture( painter, viewport, d->m_tileZoomLevel, dirtyRect, d->m_texcolorizer );
d->m_renderState.addChild( d->m_tileLoader.renderState() );
- d->m_runtimeTrace = QStringLiteral("Texture Cache: %1 ").arg(d->m_tileLoader.tileCount());
return true;
}