From 9ce10f74da1c80440eb12c36d7587f5eff192cb1 Mon Sep 17 00:00:00 2001 From: Integral Date: Mon, 4 Nov 2024 11:44:51 +0800 Subject: [PATCH] Apply clang-format patch --- src/function.cpp | 2 +- src/gui/mainwindow.cpp | 3 ++- src/gui/shell.cpp | 3 ++- src/gui/shellwidget/shellwidget.cpp | 3 ++- test/tst_neovimconnector.cpp | 8 ++++---- test/tst_neovimobject.cpp | 10 +++++++--- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/function.cpp b/src/function.cpp index 2cf657883..c8b7d8a79 100644 --- a/src/function.cpp +++ b/src/function.cpp @@ -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 diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 528c244ae..4daea24f3 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -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()); diff --git a/src/gui/shell.cpp b/src/gui/shell.cpp index 8cfb0b7e4..8d4e0340e 100644 --- a/src/gui/shell.cpp +++ b/src/gui/shell.cpp @@ -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(); } } diff --git a/src/gui/shellwidget/shellwidget.cpp b/src/gui/shellwidget/shellwidget.cpp index f88807f2b..df837d71e 100644 --- a/src/gui/shellwidget/shellwidget.cpp +++ b/src/gui/shellwidget/shellwidget.cpp @@ -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())); } } diff --git a/test/tst_neovimconnector.cpp b/test/tst_neovimconnector.cpp index 5e6a76868..d40d0a9d4 100644 --- a/test/tst_neovimconnector.cpp +++ b/test/tst_neovimconnector.cpp @@ -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*/); diff --git a/test/tst_neovimobject.cpp b/test/tst_neovimobject.cpp index a65a903cd..8fb385f63 100644 --- a/test/tst_neovimobject.cpp +++ b/test/tst_neovimobject.cpp @@ -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)