Commit 607e6db6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Reserve vector

parent cb151242
......@@ -38,11 +38,11 @@ find_package(KF5 REQUIRED COMPONENTS
find_package(KF5 REQUIRED COMPONENTS SysGuard)
#add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
#add_definitions(-DQT_USE_QSTRINGBUILDER)
add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
add_definitions(-DQT_USE_QSTRINGBUILDER)
#add_definitions(-DQT_NO_CAST_FROM_ASCII)
#add_definitions(-DQT_NO_CAST_TO_ASCII)
#add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
add_definitions(-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
#add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x060000)
......
......@@ -283,6 +283,7 @@ ListView::answerReceived(int id, const QList<QByteArray>& answer)
/* add the new columns */
mModel.clear();
QStringList translatedHeaders;
translatedHeaders.reserve(headers.count());
for (uint i = 0; i < headers.count(); i++) {
translatedHeaders.append( i18nc("heading from daemon", headers[i].constData()) );
}
......@@ -317,7 +318,7 @@ ListView::answerReceived(int id, const QList<QByteArray>& answer)
break;
case Percentage:
item->setData(records[j].toInt(), Qt::UserRole);
item->setText(records[j] + "%");
item->setText(records[j] + QLatin1Char('%'));
break;
case Float:
item->setData(records[j].toFloat(), Qt::DisplayRole);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment