aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-08-29 11:40:38 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-09-03 09:15:30 +0000
commit82bcf4e9f54337faf24a7372cfd622632f4988f8 (patch)
tree8d6576cef11e1b6819f6567d872e28e4b450af28 /src/plugins/qmlprofiler
parent6f4aa0458c991e3f81154469265899e30fe8121e (diff)
Remove usages of deprecated APIs
Replaced: QPalette::ColorRole::Background -> QPalette::ColorRole::Window QPalette::ColorRole::Foreground -> QPalette::ColorRole::WindowText Qt::ItemDataRole::TextColorRole -> Qt::ItemDataRole::ForegroundRole QFontMetrics::width() -> QFontMetrics::horizontalAdvance() Task-number: QTBUG-76491 Change-Id: I1302e6b569e725daa6f7be1428ffe055657fc644 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r--src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
index 6192f17bf4..ad203258a6 100644
--- a/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilerstatisticsmodel.cpp
@@ -219,7 +219,7 @@ QVariant QmlProfilerStatisticsModel::dataForMainEntry(const QModelIndex &index,
return m_rootDuration > 0 ? "+" : "-";
case TypeIdRole:
return s_mainEntryTypeId;
- case Qt::TextColorRole:
+ case Qt::ForegroundRole:
return Utils::creatorTheme()->color(Utils::Theme::Timeline_TextColor);
case SortRole:
switch (index.column()) {
@@ -296,7 +296,7 @@ QVariant QmlProfilerStatisticsModel::data(const QModelIndex &index, int role) co
auto it = m_notes.constFind(typeIndex);
return it == m_notes.constEnd() ? QString() : it.value();
}
- case Qt::TextColorRole:
+ case Qt::ForegroundRole:
return (stats.recursive > 0 || m_notes.contains(typeIndex))
? Utils::creatorTheme()->color(Utils::Theme::Timeline_HighlightColor)
: Utils::creatorTheme()->color(Utils::Theme::Timeline_TextColor);
@@ -393,7 +393,7 @@ void QmlProfilerStatisticsModel::typeDetailsChanged(int typeIndex)
void QmlProfilerStatisticsModel::notesChanged(int typeIndex)
{
- static const QVector<int> noteRoles({Qt::ToolTipRole, Qt::TextColorRole});
+ static const QVector<int> noteRoles({Qt::ToolTipRole, Qt::ForegroundRole});
const Timeline::TimelineNotesModel *notesModel = m_modelManager->notesModel();
if (typeIndex == s_invalidTypeId) {
m_notes.clear();
@@ -564,7 +564,7 @@ QVariant QmlProfilerStatisticsRelativesModel::dataForMainEntry(qint64 totalDurat
switch (role) {
case TypeIdRole:
return QmlProfilerStatisticsModel::s_mainEntryTypeId;
- case Qt::TextColorRole:
+ case Qt::ForegroundRole:
return Utils::creatorTheme()->color(Utils::Theme::Timeline_TextColor);
case SortRole:
if (column == RelativeTotalTime)
@@ -614,7 +614,7 @@ QVariant QmlProfilerStatisticsRelativesModel::data(const QModelIndex &index, int
return type.location().column();
case Qt::ToolTipRole:
return stats.isRecursive ? tr("called recursively") : QString();
- case Qt::TextColorRole:
+ case Qt::ForegroundRole:
return stats.isRecursive
? Utils::creatorTheme()->color(Utils::Theme::Timeline_HighlightColor)
: Utils::creatorTheme()->color(Utils::Theme::Timeline_TextColor);