Commit 56d874b1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent 9f9fdb13
......@@ -24,7 +24,7 @@
static QString intPairListToString(const QVariant &var)
{
auto arg = var.value<QList<QPair<int, int>>>();
const auto arg = var.value<QList<QPair<int, int>>>();
QString ret;
for (const auto &pair : arg) {
if (!ret.isEmpty()) {
......
......@@ -65,7 +65,7 @@ DbConsole::DbConsole(QWidget *parent)
queries = group.readEntry("queryTexts", QStringList());
}
for (const auto &query : queries) {
for (const auto &query : qAsConst(queries)) {
auto tab = addTab();
tab->setQuery(query);
}
......
......@@ -65,7 +65,7 @@ QString DebugModel::cacheString(const QString &str, QMap<QString, QString> &cach
return identifier;
} else if (cache[identifier].isEmpty()) {
cache[identifier] = name;
auto item = model->findItems(identifier).first();
const auto item = model->findItems(identifier).constFirst();
item->setData(displaySender(identifier), Qt::DisplayRole);
}
return identifier;
......@@ -93,7 +93,7 @@ bool DebugModel::removeRows(int row, int count, const QModelIndex& parent)
// find elements that needs to be deleted.
for(const auto &identifer: mSenderCache.keys()) {
bool found = false;
for(const auto &msg: mMessages) {
for(const auto &msg: qAsConst(mMessages)) {
if (msg.sender == identifer) {
found = true;
break;
......
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