aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-06-18 16:06:12 +0200
committerKai Koehne <kai.koehne@digia.com>2013-06-18 17:14:00 +0300
commit490bfe3160ab27b73090a668bec4a3db6ad4ac56 (patch)
tree0f7c3bf3e9505b1bbb992130eeea15b836eca005
parentb2e0c79feb78571f0dd4f3ce6f6908892e9ee475 (diff)
Make Scene Graph labels translatable
Also write 'Scene Graph' instead of 'SceneGraph' Change-Id: I8a11e78bff1740241f908eb770b08f72b7223b92 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
-rw-r--r--plugins/qmlprofilerextended/scenegraphtimelinemodel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/qmlprofilerextended/scenegraphtimelinemodel.cpp b/plugins/qmlprofilerextended/scenegraphtimelinemodel.cpp
index 0633c183c7..73bc92c229 100644
--- a/plugins/qmlprofilerextended/scenegraphtimelinemodel.cpp
+++ b/plugins/qmlprofilerextended/scenegraphtimelinemodel.cpp
@@ -128,7 +128,7 @@ int SceneGraphTimelineModel::categoryCount() const
const QString SceneGraphTimelineModel::categoryLabel(int categoryIndex) const
{
Q_UNUSED(categoryIndex);
- return QLatin1String("SceneGraph");
+ return tr("Scene Graph");
}
int SceneGraphTimelineModel::findFirstIndex(qint64 startTime) const
@@ -263,8 +263,11 @@ float SceneGraphTimelineModel::getHeight(int index) const
QString labelForSGType(int t)
{
switch ((SceneGraphCategoryType)t) {
- case SceneGraphRenderThread: return QLatin1String("Renderer Thread");
- case SceneGraphGUIThread: return QLatin1String("GUI Thread");
+ case SceneGraphRenderThread:
+ return QGuiApplication::translate("SceneGraphTimelineModel", "Renderer Thread");
+ case SceneGraphGUIThread:
+ return QGuiApplication::translate("SceneGraphTimelineModel", "GUI Thread");
+ default: return QString();
}
}
@@ -275,6 +278,7 @@ const QVariantList SceneGraphTimelineModel::getLabelsForCategory(int category) c
if (d->isExpanded && !isEmpty()) {
for (int i = 0; i < MaximumSceneGraphCategoryType; i++) {
QVariantMap element;
+
element.insert(QLatin1String("displayName"), QVariant(labelForSGType(i)));
element.insert(QLatin1String("description"), QVariant(labelForSGType(i)));
element.insert(QLatin1String("id"), QVariant(i));