Skip to content

Commit e209204

Browse files
committed
chore: run pre-commit on all files
Signed-off-by: ComixHe <ComixHe1895@outlook.com>
1 parent 44670b5 commit e209204

82 files changed

Lines changed: 640 additions & 744 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ exclude: |
1212
misc/image/|
1313
po/|
1414
tools/quicktype/|
15-
tools/openapi-c-libcurl-client/
15+
tools/openapi-c-libcurl-client/|
16+
.obs/|
17+
misc/share/linglong/builder/templates/|
18+
apps/ll-builder-utils/patch/
1619
)
1720
1821
ci:

.tx/config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ file_filter = po/<lang>.po
66
source_file = po/en_US.po
77
source_lang = en_US
88
type = PO
9-

apps/ll-driver-detect/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,4 @@ make ll-driver-detect
117117

118118
## 许可证
119119

120-
本项目遵循 LGPL-3.0-or-later 许可证。
120+
本项目遵循 LGPL-3.0-or-later 许可证。

apps/ll-driver-detect/src/application_singleton.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "linglong/utils/log/log.h"
88

99
#include <filesystem>
10+
1011
namespace linglong::driver::detect {
1112

1213
ApplicationSingleton::ApplicationSingleton(const std::string &lockFilePath)

apps/ll-driver-detect/src/dbus_notifier.cpp

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ DBusNotifier::sendInteractiveNotification(const NotificationRequest &request)
5858
bool userInteracted = false;
5959
QEventLoop loop;
6060

61-
struct SignalGuard {
61+
struct SignalGuard
62+
{
6263
QMetaObject::Connection closeConn;
6364
QMetaObject::Connection actionConn;
6465

@@ -67,27 +68,29 @@ DBusNotifier::sendInteractiveNotification(const NotificationRequest &request)
6768
QObject::disconnect(closeConn);
6869
QObject::disconnect(actionConn);
6970
}
70-
} signalGuard{{}, {}};
71+
} signalGuard{ {}, {} };
7172

7273
// 连接信号处理函数
73-
signalGuard.closeConn = QObject::connect(this,
74-
&DBusNotifier::notificationClosed,
75-
[&](quint32 id, quint32 closeReason) {
76-
if (notificationID != 0 && id == notificationID) {
77-
LogD("Notification {} closed with reason: {}", id, closeReason);
78-
loop.quit();
79-
}
80-
});
81-
82-
signalGuard.actionConn = QObject::connect(this,
83-
&DBusNotifier::actionInvoked,
84-
[&](quint32 id, const QString &actionKey) {
85-
if (notificationID != 0 && id == notificationID) {
86-
LogD("Notification {} action invoked: {}", id, actionKey.toStdString());
87-
choice = actionKey;
88-
userInteracted = true;
89-
}
90-
});
74+
signalGuard.closeConn =
75+
QObject::connect(this,
76+
&DBusNotifier::notificationClosed,
77+
[&](quint32 id, quint32 closeReason) {
78+
if (notificationID != 0 && id == notificationID) {
79+
LogD("Notification {} closed with reason: {}", id, closeReason);
80+
loop.quit();
81+
}
82+
});
83+
84+
signalGuard.actionConn = QObject::connect(
85+
this,
86+
&DBusNotifier::actionInvoked,
87+
[&](quint32 id, const QString &actionKey) {
88+
if (notificationID != 0 && id == notificationID) {
89+
LogD("Notification {} action invoked: {}", id, actionKey.toStdString());
90+
choice = actionKey;
91+
userInteracted = true;
92+
}
93+
});
9194

9295
// 检查信号连接是否成功
9396
if (!signalGuard.closeConn || !signalGuard.actionConn) {

apps/ll-driver-detect/src/driver_detection_manager.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ struct DriverDetectionResult
1818

1919
bool hasAvailableDrivers() const
2020
{
21-
return std::any_of(detectedDrivers.begin(),
22-
detectedDrivers.end(),
23-
[](const auto &driver) {
24-
return !driver.isInstalled;
25-
});
21+
return std::any_of(detectedDrivers.begin(), detectedDrivers.end(), [](const auto &driver) {
22+
return !driver.isInstalled;
23+
});
2624
}
2725
};
2826

apps/ll-driver-detect/src/nvidia_driver_detector.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ NVIDIADriverDetector::checkPackageInstalled(const std::string &packageName)
7676
linglong::utils::command::Cmd("ll-cli").exec({ "info", packageName.c_str() });
7777

7878
if (!listResult) {
79-
LogD("Can not get package info with `ll-cli info`, maybe the package is not installed: {}",
80-
listResult.error().message());
79+
LogD(
80+
"Can not get package info with `ll-cli info`, maybe the package is not installed: {}",
81+
listResult.error().message());
8182
return false;
8283
}
8384

libs/linglong/tests/ll-tests/data/demo/app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ permissions:
3838

3939
namespaces:
4040
- type: pid
41-
- type: uts
41+
- type: uts

0 commit comments

Comments
 (0)