style: reformat C/C++ sources and headers with clang-format

Run clang-format over all project C/C++ source and header files
(.c, .cpp, .cc, .h, .hpp, .hh, .m, .mm) under app/ and tests/.
Non-source files (svg, qm, qrc, etc.) were not touched.
This commit is contained in:
2026-07-13 15:34:11 +08:00
parent 6a696bc234
commit f03b6b58ff
61 changed files with 2873 additions and 2740 deletions
+5 -5
View File
@@ -30,7 +30,8 @@ TEST(CommonQtUtils, FlipControlAndShiftModifiers)
// (Qt::ControlModifier & Qt::ShiftModifier is always zero), so the function
// always swaps Control and Shift. This test documents current behavior.
Qt::KeyboardModifiers both = Qt::ControlModifier | Qt::ShiftModifier;
Qt::KeyboardModifiers flipped = olive::QtUtils::FlipControlAndShiftModifiers(both);
Qt::KeyboardModifiers flipped =
olive::QtUtils::FlipControlAndShiftModifiers(both);
EXPECT_TRUE(flipped & Qt::ControlModifier);
EXPECT_FALSE(flipped & Qt::ShiftModifier);
@@ -112,11 +113,10 @@ TEST(CommonQtUtils, ToQColor)
EXPECT_NEAR(qc.alphaF(), 0.4, 0.001);
}
TEST(CommonQtUtils, GetFormattedDateTime)
{
QDateTime dt = QDateTime::fromString(QStringLiteral("2025-01-15T10:30:00"),
Qt::ISODate);
Qt::ISODate);
QString s = olive::QtUtils::GetFormattedDateTime(dt);
EXPECT_FALSE(s.isEmpty());
}
@@ -132,8 +132,8 @@ TEST(CommonQtUtils, WordWrapString)
EXPECT_GE(wrapped.size(), 1u);
// Should preserve manual newlines
wrapped = olive::QtUtils::WordWrapString(
QStringLiteral("line1\nline2"), fm, 1000);
wrapped = olive::QtUtils::WordWrapString(QStringLiteral("line1\nline2"), fm,
1000);
EXPECT_EQ(wrapped.size(), 2);
}