Commit f41883f2 authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Known size, reserve.

parent b7bb8d94
......@@ -306,6 +306,7 @@ bool Device::isTrusted() const
QStringList Device::availableLinks() const
{
QStringList sl;
sl.reserve(m_deviceLinks.size());
Q_FOREACH(DeviceLink* dl, m_deviceLinks) {
sl.append(dl->provider()->name());
}
......
......@@ -109,8 +109,10 @@ void SendNotificationsConfig::save()
config()->set(QStringLiteral("generalUrgency"), m_ui->spin_urgency->value());
QVariantList list;
for (const auto& a: appModel->apps())
list << QVariant::fromValue<NotifyingApplication>(a);
list.reserve(appModel->apps().size());
for (const auto& a: appModel->apps()) {
list.append(QVariant::fromValue<NotifyingApplication>(a));
}
config()->setList(QStringLiteral("applications"), list);
KCModule::save();
Q_EMIT changed(false);
......
Markdown is supported
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