Skip to content

Commit

Permalink
Apply clang-format patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Integral-Tech committed Nov 4, 2024
1 parent e4fe063 commit 9ce10f7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ QString Function::signature() const
if (can_fail) {
notes += " !fail";
}
return QStringLiteral("%1 %2(%3)%4").arg(return_type, name, sigparams.join(", "), notes);
return QStringLiteral("%1 %2(%3)%4").arg(return_type, name, sigparams.join(", "), notes);
}

} // Namespace
Expand Down
3 changes: 2 additions & 1 deletion src/gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ void MainWindow::neovimError(NeovimConnector::NeovimError err)
}
void MainWindow::neovimIsUnsupported()
{
m_errorWidget->setText(QStringLiteral("Cannot connect to this Neovim, required API version 1, found [%1-%2]")
m_errorWidget->setText(
QStringLiteral("Cannot connect to this Neovim, required API version 1, found [%1-%2]")
.arg(m_nvim->apiCompatibility())
.arg(m_nvim->apiLevel()));
m_errorWidget->showReconnect(m_nvim->canReconnect());
Expand Down
3 changes: 2 additions & 1 deletion src/gui/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,8 @@ void Shell::updateWindowId()
m_nvim->connectionType() == NeovimConnector::SpawnedConnection) {
WId window_id = effectiveWinId();
m_nvim->api0()->vim_set_var("GuiWindowId", QVariant(window_id));
m_nvim->api0()->vim_command(QStringLiteral("let v:windowid = %1").arg(window_id).toLatin1());
m_nvim->api0()->vim_command(
QStringLiteral("let v:windowid = %1").arg(window_id).toLatin1());
updateClientInfo();
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/gui/shellwidget/shellwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ bool ShellWidget::setShellFont(const QFont& font, bool force) noexcept
}

if (isBadMonospace(font)) {
emit fontError(QStringLiteral("Warning: Font \"%1\" reports bad fixed pitch metrics").arg(font.family()));
emit fontError(QStringLiteral("Warning: Font \"%1\" reports bad fixed pitch metrics")
.arg(font.family()));
}
}

Expand Down
8 changes: 4 additions & 4 deletions test/tst_neovimconnector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ private slots:
server->listen(QHostAddress::LocalHost);
QVERIFY(server->isListening());

NeovimConnector *c = NeovimConnector::connectToNeovim(
QStringLiteral("%1:%2")
.arg(server->serverAddress().toString())
.arg(server->serverPort()));
NeovimConnector* c =
NeovimConnector::connectToNeovim(QStringLiteral("%1:%2")
.arg(server->serverAddress().toString())
.arg(server->serverPort()));

// Test Performance: timeout expected, set value carefully.
c->setRequestTimeout(1000 /*msec*/);
Expand Down
10 changes: 7 additions & 3 deletions test/tst_neovimobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ void TestNeovimObject::delayedSetup()
connect(n, &NeovimQt::NeovimApi1::neovimNotification,
this, &TestNeovimObject::test_event);

n->vim_command(QStringLiteral("call rpcnotify(%1, \"test_event\", \"WAT\")").arg(m_c->channel()).toUtf8());
n->vim_command(QStringLiteral("call rpcnotify(%1, \"test_event\", 42)").arg(m_c->channel()).toUtf8());
n->vim_command(QStringLiteral("call rpcnotify(%1, \"test_event\", [\"one\", \"two\", \"\"])").arg(m_c->channel()).toUtf8());
n->vim_command(
QStringLiteral("call rpcnotify(%1, \"test_event\", \"WAT\")").arg(m_c->channel()).toUtf8());
n->vim_command(
QStringLiteral("call rpcnotify(%1, \"test_event\", 42)").arg(m_c->channel()).toUtf8());
n->vim_command(QStringLiteral("call rpcnotify(%1, \"test_event\", [\"one\", \"two\", \"\"])")
.arg(m_c->channel())
.toUtf8());
}

void TestNeovimObject::test_event(const QByteArray& name, const QVariantList& params)
Expand Down

0 comments on commit 9ce10f7

Please sign in to comment.