From c392d77675d879feae4008f178953be6fe7a6252 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:28:38 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v19.1.1](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.6...v19.1.1) - [github.com/PyCQA/pylint: v3.2.7 → v3.3.1](https://github.com/PyCQA/pylint/compare/v3.2.7...v3.3.1) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 64a44007c..18bf2617e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,7 +6,7 @@ ci: exclude: ^(3rdparty/|cmake/ECM/|cmake/KDAB/|launcher/ui/processlist.*|compat/qasconst.h|docs/api/doxygen-awesome.css|launcher/cli/completions/gammaray.zsh|ui/resources/gammaray/update_icon_sets.sh) repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -21,11 +21,11 @@ repos: - id: destroyed-symlinks - id: check-executables-have-shebangs - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.6 + rev: v19.1.1 hooks: - id: clang-format - repo: https://github.com/PyCQA/pylint - rev: v3.2.7 + rev: v3.3.1 hooks: - id: pylint exclude: ^(.cmake-format.py|conan/.*/conanfile.py) From 84144660f9345ad75f7eae8d3d00d7a9387c1c3c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:29:02 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- core/probe.cpp | 2 +- .../objectinspector/connectionsextension.cpp | 2 +- launcher/core/injector/basicwindllinjector.cpp | 2 +- plugins/localeinspector/localedataaccessor.cpp | 7 +++---- plugins/localeinspector/localedataaccessor.h | 4 ++-- plugins/network/networkreplywidget.cpp | 16 ++++++++-------- .../positioning/geopositioninfosourcefactory.cpp | 6 +++--- plugins/quickinspector/quickinspector.cpp | 7 ++----- ui/codeeditor/codeeditor.cpp | 2 +- ui/uiintegration.cpp | 2 +- 10 files changed, 23 insertions(+), 27 deletions(-) diff --git a/core/probe.cpp b/core/probe.cpp index d72135f7a..0163174a2 100644 --- a/core/probe.cpp +++ b/core/probe.cpp @@ -689,7 +689,7 @@ void Probe::objectRemoved(QObject *obj) EXPENSIVE_ASSERT(!instance()->isObjectCreationQueued(obj)); if (instance()->thread() == QThread::currentThread()) - emit instance()->objectDestroyed(obj); + emit instance() -> objectDestroyed(obj); else instance()->queueDestroyedObject(obj); } diff --git a/core/tools/objectinspector/connectionsextension.cpp b/core/tools/objectinspector/connectionsextension.cpp index e7a7dc9f9..ad3c82d58 100644 --- a/core/tools/objectinspector/connectionsextension.cpp +++ b/core/tools/objectinspector/connectionsextension.cpp @@ -26,7 +26,7 @@ using namespace GammaRay; ConnectionsExtension::ConnectionsExtension(PropertyController *controller) : ConnectionsExtensionInterface( - controller->objectBaseName() + ".connectionsExtension", controller) + controller->objectBaseName() + ".connectionsExtension", controller) , PropertyControllerExtension(controller->objectBaseName() + ".connections") { m_inboundModel = new InboundConnectionsModel(controller); diff --git a/launcher/core/injector/basicwindllinjector.cpp b/launcher/core/injector/basicwindllinjector.cpp index c8a507413..2e3f00fc1 100644 --- a/launcher/core/injector/basicwindllinjector.cpp +++ b/launcher/core/injector/basicwindllinjector.cpp @@ -28,7 +28,7 @@ do { \ } while (false) #define ERROR_CHECK(condition) ERROR_ASSERT( \ - condition, do {} while (false)); + condition, do { } while (false)); BOOL BasicWinDllInjector::addDllDirectory(HANDLE destProcess, wchar_t *dllDirPath) { diff --git a/plugins/localeinspector/localedataaccessor.cpp b/plugins/localeinspector/localedataaccessor.cpp index f3d9e5fc9..9ea2d215d 100644 --- a/plugins/localeinspector/localedataaccessor.cpp +++ b/plugins/localeinspector/localedataaccessor.cpp @@ -101,7 +101,7 @@ void LocaleDataAccessorRegistry::init() LOCALE_SIMPLE_ACCESSOR(TextDirection, return locale.textDirection() == Qt::LeftToRight ? QStringLiteral( - "LTR") + "LTR") : QStringLiteral("RTL");) LOCALE_SIMPLE_DEFAULT_ACCESSOR(TimeFormatLong, @@ -167,8 +167,7 @@ void LocaleDataAccessorRegistry::init() const auto wds = locale.weekdays(); QStringList resultList; resultList.reserve(wds.size()); - for (Qt::DayOfWeek dayNumber - : wds) { + for (Qt::DayOfWeek dayNumber : wds) { resultList << QLocale().dayName(dayNumber); } return QLocale() .createSeparatedList(resultList);) @@ -213,7 +212,7 @@ void LocaleDataAccessorRegistry::init() return locale.measurementSystem() == QLocale::ImperialSystem ? QStringLiteral( - "Imperial") + "Imperial") : QStringLiteral("Metric");) LOCALE_SIMPLE_DEFAULT_ACCESSOR(FloatFormat, diff --git a/plugins/localeinspector/localedataaccessor.h b/plugins/localeinspector/localedataaccessor.h index 02424a24e..99fb91583 100644 --- a/plugins/localeinspector/localedataaccessor.h +++ b/plugins/localeinspector/localedataaccessor.h @@ -80,7 +80,7 @@ struct LocaleDataAccessor { \ explicit Locale##NAME##Accessor(LocaleDataAccessorRegistry *registry) \ : LocaleDataAccessor( \ - registry) \ + registry) \ { \ } \ QString accessorName() override \ @@ -95,7 +95,7 @@ struct LocaleDataAccessor { \ explicit Locale##NAME##Accessor(LocaleDataAccessorRegistry *registry) \ : LocaleDataAccessor( \ - registry, true) \ + registry, true) \ { \ } \ \ diff --git a/plugins/network/networkreplywidget.cpp b/plugins/network/networkreplywidget.cpp index a7968802d..244c1fdc8 100644 --- a/plugins/network/networkreplywidget.cpp +++ b/plugins/network/networkreplywidget.cpp @@ -121,14 +121,14 @@ NetworkReplyWidget::NetworkReplyWidget(QWidget *parent) } #else - QTextCodec::ConverterState state; - QTextCodec *codec = QTextCodec::codecForName("UTF-8"); - const QString text = codec->toUnicode(response.constData(), response.size(), &state); - if (state.invalidChars > 0) { - ui->responseTextEdit->setPlainText(tr("%1: Unable to show response preview").arg(qApp->applicationName())); - } else { - ui->responseTextEdit->setPlainText(text); - } + QTextCodec::ConverterState state; + QTextCodec *codec = QTextCodec::codecForName("UTF-8"); + const QString text = codec->toUnicode(response.constData(), response.size(), &state); + if (state.invalidChars > 0) { + ui->responseTextEdit->setPlainText(tr("%1: Unable to show response preview").arg(qApp->applicationName())); + } else { + ui->responseTextEdit->setPlainText(text); + } #endif }); ui->responseTextEdit->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont)); diff --git a/plugins/positioning/geopositioninfosourcefactory.cpp b/plugins/positioning/geopositioninfosourcefactory.cpp index 6a56a9cc9..53bc9ea74 100644 --- a/plugins/positioning/geopositioninfosourcefactory.cpp +++ b/plugins/positioning/geopositioninfosourcefactory.cpp @@ -69,9 +69,9 @@ QGeoPositionInfoSource *GeoPositionInfoSourceFactory::positionInfoSource(QObject const auto rData = metaData.at(rhs).toCbor(); return lData.value(QStringLiteral("Priority")).toInteger() > rData.value(QStringLiteral("Priority")).toInteger(); #else - const auto lData = metaData.at(lhs).value(QStringLiteral("MetaData")).toObject(); - const auto rData = metaData.at(rhs).value(QStringLiteral("MetaData")).toObject(); - return lData.value(QStringLiteral("Priority")).toInt() > rData.value(QStringLiteral("Priority")).toInt(); + const auto lData = metaData.at(lhs).value(QStringLiteral("MetaData")).toObject(); + const auto rData = metaData.at(rhs).value(QStringLiteral("MetaData")).toObject(); + return lData.value(QStringLiteral("Priority")).toInt() > rData.value(QStringLiteral("Priority")).toInt(); #endif }); diff --git a/plugins/quickinspector/quickinspector.cpp b/plugins/quickinspector/quickinspector.cpp index e765ea227..f578f941c 100644 --- a/plugins/quickinspector/quickinspector.cpp +++ b/plugins/quickinspector/quickinspector.cpp @@ -718,14 +718,11 @@ void QuickInspector::setSlowMode(bool slow) auto it = connections.find(window); if (it == connections.end()) { - connections.insert(window, connect( - window, &QQuickWindow::beforeRendering, this, [this, window]() { + connections.insert(window, connect(window, &QQuickWindow::beforeRendering, this, [this, window]() { auto it = connections.find(window); QUnifiedTimer::instance()->setSlowModeEnabled(m_slowDownEnabled); QObject::disconnect(it.value()); - connections.erase(it); - }, - Qt::DirectConnection)); + connections.erase(it); }, Qt::DirectConnection)); } } diff --git a/ui/codeeditor/codeeditor.cpp b/ui/codeeditor/codeeditor.cpp index 90b1cf98a..e6435cf2e 100644 --- a/ui/codeeditor/codeeditor.cpp +++ b/ui/codeeditor/codeeditor.cpp @@ -321,7 +321,7 @@ void CodeEditor::toggleFold(const QTextBlock &startBlock) // redraw document document()->markContentsDirty(startBlock.position(), endBlock.position() - startBlock.position() + 1); // update scrollbars - emit document()->documentLayout()->documentSizeChanged(document()->documentLayout()->documentSize()); + emit document() -> documentLayout()->documentSizeChanged(document()->documentLayout()->documentSize()); #else Q_UNUSED(startBlock); #endif diff --git a/ui/uiintegration.cpp b/ui/uiintegration.cpp index 8e7066377..714018c37 100644 --- a/ui/uiintegration.cpp +++ b/ui/uiintegration.cpp @@ -41,7 +41,7 @@ UiIntegration *UiIntegration::instance() void UiIntegration::requestNavigateToCode(const QUrl &url, int lineNumber, int columnNumber) { if (UiIntegration::instance()) - emit UiIntegration::instance()->navigateToCode(url, lineNumber, columnNumber); + emit UiIntegration::instance() -> navigateToCode(url, lineNumber, columnNumber); } bool UiIntegration::hasDarkUI() From 83fa5abbc1a5b3ce08821f07202572ce13c04c96 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:41:48 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- core/probe.cpp | 2 +- ui/codeeditor/codeeditor.cpp | 2 +- ui/uiintegration.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/probe.cpp b/core/probe.cpp index 0163174a2..d72135f7a 100644 --- a/core/probe.cpp +++ b/core/probe.cpp @@ -689,7 +689,7 @@ void Probe::objectRemoved(QObject *obj) EXPENSIVE_ASSERT(!instance()->isObjectCreationQueued(obj)); if (instance()->thread() == QThread::currentThread()) - emit instance() -> objectDestroyed(obj); + emit instance()->objectDestroyed(obj); else instance()->queueDestroyedObject(obj); } diff --git a/ui/codeeditor/codeeditor.cpp b/ui/codeeditor/codeeditor.cpp index e6435cf2e..90b1cf98a 100644 --- a/ui/codeeditor/codeeditor.cpp +++ b/ui/codeeditor/codeeditor.cpp @@ -321,7 +321,7 @@ void CodeEditor::toggleFold(const QTextBlock &startBlock) // redraw document document()->markContentsDirty(startBlock.position(), endBlock.position() - startBlock.position() + 1); // update scrollbars - emit document() -> documentLayout()->documentSizeChanged(document()->documentLayout()->documentSize()); + emit document()->documentLayout()->documentSizeChanged(document()->documentLayout()->documentSize()); #else Q_UNUSED(startBlock); #endif diff --git a/ui/uiintegration.cpp b/ui/uiintegration.cpp index 714018c37..8e7066377 100644 --- a/ui/uiintegration.cpp +++ b/ui/uiintegration.cpp @@ -41,7 +41,7 @@ UiIntegration *UiIntegration::instance() void UiIntegration::requestNavigateToCode(const QUrl &url, int lineNumber, int columnNumber) { if (UiIntegration::instance()) - emit UiIntegration::instance() -> navigateToCode(url, lineNumber, columnNumber); + emit UiIntegration::instance()->navigateToCode(url, lineNumber, columnNumber); } bool UiIntegration::hasDarkUI()