Fix multi-arg warnings

This commit is contained in:
Alex Spataru 2021-09-24 18:25:56 -05:00
parent 749cc48cd7
commit fe98b20adb
2 changed files with 3 additions and 5 deletions

View File

@ -195,12 +195,10 @@ void Export::writeValues()
// Construct dataset title from group, dataset title & units
QString title;
if (datasetUnits.isEmpty())
title = QString("(%1) %2").arg(groupTitle).arg(datasetTitle);
title = QString("(%1) %2").arg(groupTitle, datasetTitle);
else
title = QString("(%1) %2 [%3]")
.arg(groupTitle)
.arg(datasetTitle)
.arg(datasetUnits);
.arg(groupTitle, datasetTitle, datasetUnits);
// Add dataset title & value to lists
titles.append(title);

View File

@ -113,7 +113,7 @@ bool Dataset::read(const QJsonObject &object)
widget = widget.replace("\n", "");
widget = widget.replace("\r", "");
if (!value.isEmpty())
if (!value.isEmpty() && !title.isEmpty())
{
m_graph = graph;
m_title = title;