Skip to content

Commit 0a7dcf3

Browse files
committed
build: update clang tooling and reformat
1 parent 1552aca commit 0a7dcf3

File tree

31 files changed

+124
-80
lines changed

31 files changed

+124
-80
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AlignArrayOfStructures: None
22
AlignAfterOpenBracket: BlockIndent
3-
AllowShortBlocksOnASingleLine: Always
3+
AllowShortBlocksOnASingleLine: Empty
44
AllowShortCaseLabelsOnASingleLine: true
55
AllowShortEnumsOnASingleLine: true
66
AllowShortFunctionsOnASingleLine: All

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/iconprovider.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class PixmapCacheIconEngine: public QIconEngine {
2222
QIcon::Mode /*unused*/,
2323
QIcon::State /*unused*/
2424
) override {
25-
qFatal(
26-
) << "Unexpected icon paint request bypassed pixmap method. Please report this as a bug.";
25+
qFatal()
26+
<< "Unexpected icon paint request bypassed pixmap method. Please report this as a bug.";
2727
}
2828

2929
QPixmap pixmap(const QSize& size, QIcon::Mode /*unused*/, QIcon::State /*unused*/) override {

src/core/logging.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ void ThreadLogging::initFs() {
361361
auto* runDir = QsPaths::instance()->instanceRunDir();
362362

363363
if (!runDir) {
364-
qCCritical(logLogging
364+
qCCritical(
365+
logLogging
365366
) << "Could not start filesystem logging as the runtime directory could not be created.";
366367
return;
367368
}
@@ -372,7 +373,8 @@ void ThreadLogging::initFs() {
372373
auto* detailedFile = new QFile(detailedPath);
373374

374375
if (!file->open(QFile::ReadWrite | QFile::Truncate)) {
375-
qCCritical(logLogging
376+
qCCritical(
377+
logLogging
376378
) << "Could not start filesystem logger as the log file could not be created:"
377379
<< path;
378380
delete file;
@@ -383,7 +385,8 @@ void ThreadLogging::initFs() {
383385

384386
// buffered by WriteBuffer
385387
if (!detailedFile->open(QFile::ReadWrite | QFile::Truncate | QFile::Unbuffered)) {
386-
qCCritical(logLogging
388+
qCCritical(
389+
logLogging
387390
) << "Could not start detailed filesystem logger as the log file could not be created:"
388391
<< detailedPath;
389392
delete detailedFile;

src/core/model.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "model.hpp"
22

3-
#include <qhash.h>
43
#include <qbytearray.h>
4+
#include <qhash.h>
55
#include <qnamespace.h>
66

77
QHash<int, QByteArray> UntypedObjectModel::roleNames() const {

src/core/paths.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ void QsPaths::linkRunDir() {
175175
auto* shellDir = this->shellRunDir();
176176

177177
if (!shellDir) {
178-
qCCritical(logPaths
178+
qCCritical(
179+
logPaths
179180
) << "Could not create by-id symlink as the shell runtime path could not be created.";
180181
} else {
181182
auto shellPath = shellDir->filePath(runDir->dirName());
@@ -378,7 +379,8 @@ void QsPaths::createLock() {
378379
qCDebug(logPaths) << "Created instance lock at" << path;
379380
}
380381
} else {
381-
qCCritical(logPaths
382+
qCCritical(
383+
logPaths
382384
) << "Could not create instance lock, as the instance runtime directory could not be created.";
383385
}
384386
}

src/core/scan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ void QmlScanner::scanDir(const QDir& dir) {
3838

3939
for (auto& name: dir.entryList(QDir::Files | QDir::NoDotAndDotDot)) {
4040
if (name == "qmldir") {
41-
qCDebug(logQmlScanner
41+
qCDebug(
42+
logQmlScanner
4243
) << "Found qmldir file, qmldir synthesization will be disabled for directory"
4344
<< path;
4445
seenQmldir = true;

src/core/scriptmodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ void ScriptModel::updateValuesUnique(const QVariantList& newValues) {
7272
do {
7373
++iter;
7474
} while (iter != this->mValues.end()
75-
&& std::find_if(newIter, newValues.end(), eqPredicate(*iter)) == newValues.end()
76-
);
75+
&& std::find_if(newIter, newValues.end(), eqPredicate(*iter))
76+
== newValues.end());
7777

7878
auto index = static_cast<qint32>(std::distance(this->mValues.begin(), iter));
7979
auto startIndex = static_cast<qint32>(std::distance(this->mValues.begin(), startIter));

src/crash/handler.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ void CrashHandler::init() {
5555
this->d->minidumpFd = memfd_create("quickshell:minidump", MFD_CLOEXEC);
5656

5757
if (this->d->minidumpFd == -1) {
58-
qCCritical(logCrashHandler
58+
qCCritical(
59+
logCrashHandler
5960
) << "Failed to allocate minidump memfd, minidumps will be saved in the working directory.";
6061
createHandler(MinidumpDescriptor("."));
6162
} else {
@@ -71,15 +72,17 @@ void CrashHandler::setRelaunchInfo(const RelaunchInfo& info) {
7172
this->d->infoFd = memfd_create("quickshell:instance_info", MFD_CLOEXEC);
7273

7374
if (this->d->infoFd == -1) {
74-
qCCritical(logCrashHandler
75+
qCCritical(
76+
logCrashHandler
7577
) << "Failed to allocate instance info memfd, crash recovery will not work.";
7678
return;
7779
}
7880

7981
QFile file;
8082

8183
if (!file.open(this->d->infoFd, QFile::ReadWrite)) {
82-
qCCritical(logCrashHandler
84+
qCCritical(
85+
logCrashHandler
8386
) << "Failed to open instance info memfd, crash recovery will not work.";
8487
}
8588

src/crash/interface.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ CrashReporterGui::CrashReporterGui(QString reportFolder, int pid)
6666
mainLayout->addSpacing(textHeight);
6767

6868
if (qtVersionMatches) {
69-
mainLayout->addWidget(new QLabel("Please open a bug report for this issue via github or email.")
69+
mainLayout->addWidget(
70+
new QLabel("Please open a bug report for this issue via github or email.")
7071
);
7172
} else {
7273
mainLayout->addWidget(new QLabel(

0 commit comments

Comments
 (0)