Commit a8549e7a authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Use multi arg to avoid unneeded allocations

parent 048b5a36
......@@ -50,7 +50,7 @@ void DebugView::runDebugger(const GDBTargetConf &conf, const QStringList &ioFifo
}
m_targetConf = conf;
if (ioFifos.size() == 3) {
m_ioPipeString = QStringLiteral("< %1 1> %2 2> %3").arg(ioFifos[0]).arg(ioFifos[1]).arg(ioFifos[2]);
m_ioPipeString = QStringLiteral("< %1 1> %2 2> %3").arg(ioFifos[0], ioFifos[1], ioFifos[2]);
}
if (m_state == none) {
......@@ -79,7 +79,7 @@ void DebugView::runDebugger(const GDBTargetConf &conf, const QStringList &ioFifo
QTimer::singleShot(0, this, &DebugView::issueNextCommand);
}
m_nextCommands << QStringLiteral("file \"%1\"").arg(m_targetConf.executable);
m_nextCommands << QStringLiteral("set args %1 %2").arg(m_targetConf.arguments).arg(m_ioPipeString);
m_nextCommands << QStringLiteral("set args %1 %2").arg(m_targetConf.arguments, m_ioPipeString);
m_nextCommands << QStringLiteral("set inferior-tty /dev/null");
m_nextCommands << m_targetConf.customInit;
m_nextCommands << QStringLiteral("(Q) info breakpoints");
......
......@@ -89,7 +89,7 @@ void TextOutputWidget::showSuccessMessage(const QString &message)
void TextOutputWidget::writeMessage(const QString &msg)
{
m_output->append(QStringLiteral("%1: %2\n").arg(QDateTime::currentDateTime().toString(Qt::SystemLocaleDate)).arg(msg));
m_output->append(QStringLiteral("%1: %2\n").arg(QDateTime::currentDateTime().toString(Qt::SystemLocaleDate), msg));
raise();
}
......@@ -2010,7 +2010,7 @@ public:
// let's consider this expert info and use ISO date
auto now = QDateTime::currentDateTime().toString(Qt::ISODate);
auto text = QStringLiteral("[%1] [%2] [%3]\n%4\n").arg(now).arg(lvl).arg(header).arg(msg.trimmed());
auto text = QStringLiteral("[%1] [%2] [%3]\n%4\n").arg(now, lvl, header, msg.trimmed());
m_messagesView->appendPlainText(text);
if (static_cast<int>(level) <= m_messagesAutoSwitch->currentItem()) {
......
......@@ -64,7 +64,7 @@ public:
{
if (server) {
auto root = server->root().toLocalFile();
return QStringLiteral("%1@%2").arg(server->langId()).arg(root);
return QStringLiteral("%1@%2").arg(server->langId(), root);
} else {
return {};
}
......
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