Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #1009

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion core/tools/objectinspector/connectionsextension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion launcher/core/injector/basicwindllinjector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
7 changes: 3 additions & 4 deletions plugins/localeinspector/localedataaccessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);)
Expand Down Expand Up @@ -213,7 +212,7 @@ void LocaleDataAccessorRegistry::init()
return locale.measurementSystem()
== QLocale::ImperialSystem
? QStringLiteral(
"Imperial")
"Imperial")
: QStringLiteral("Metric");)

LOCALE_SIMPLE_DEFAULT_ACCESSOR(FloatFormat,
Expand Down
4 changes: 2 additions & 2 deletions plugins/localeinspector/localedataaccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct LocaleDataAccessor
{ \
explicit Locale##NAME##Accessor(LocaleDataAccessorRegistry *registry) \
: LocaleDataAccessor( \
registry) \
registry) \
{ \
} \
QString accessorName() override \
Expand All @@ -95,7 +95,7 @@ struct LocaleDataAccessor
{ \
explicit Locale##NAME##Accessor(LocaleDataAccessorRegistry *registry) \
: LocaleDataAccessor( \
registry, true) \
registry, true) \
{ \
} \
\
Expand Down
16 changes: 8 additions & 8 deletions plugins/network/networkreplywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
6 changes: 3 additions & 3 deletions plugins/positioning/geopositioninfosourcefactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand Down
7 changes: 2 additions & 5 deletions plugins/quickinspector/quickinspector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down