[libcalamares] Apply newer clang-formatting

This commit is contained in:
Adriaan de Groot 2024-04-17 10:50:38 +02:00
parent 09dae0437e
commit 4625208ba2
6 changed files with 26 additions and 20 deletions

View File

@ -135,8 +135,7 @@ PowerManagementInterface::inhibitSleep()
QStringLiteral( "/org/freedesktop/PowerManagement/Inhibit" ), QStringLiteral( "/org/freedesktop/PowerManagement/Inhibit" ),
QStringLiteral( "org.freedesktop.PowerManagement.Inhibit" ), QStringLiteral( "org.freedesktop.PowerManagement.Inhibit" ),
QStringLiteral( "Inhibit" ) ); QStringLiteral( "Inhibit" ) );
inhibitCall.setArguments( inhibitCall.setArguments( { { tr( "Calamares" ) }, { tr( "Installation in progress", "@status" ) } } );
{ { tr( "Calamares" ) }, { tr( "Installation in progress", "@status" ) } } );
auto asyncReply = sessionBus.asyncCall( inhibitCall ); auto asyncReply = sessionBus.asyncCall( inhibitCall );
auto* replyWatcher = new QDBusPendingCallWatcher( asyncReply, this ); auto* replyWatcher = new QDBusPendingCallWatcher( asyncReply, this );

View File

@ -110,7 +110,8 @@ PartitionServiceTests::testUnitComparison()
} }
/* Operator to make the table in testUnitNormalisation_data easier to write */ /* Operator to make the table in testUnitNormalisation_data easier to write */
constexpr qint64 operator""_qi( unsigned long long m ) constexpr qint64
operator""_qi( unsigned long long m )
{ {
return qint64( m ); return qint64( m );
} }

View File

@ -24,37 +24,43 @@ namespace Units
{ {
/** User defined literals, 1_KB is 1 KiloByte (= 10^3 bytes) */ /** User defined literals, 1_KB is 1 KiloByte (= 10^3 bytes) */
constexpr qint64 operator""_KB( unsigned long long m ) constexpr qint64
operator""_KB( unsigned long long m )
{ {
return qint64( m ) * 1000; return qint64( m ) * 1000;
} }
/** User defined literals, 1_KiB is 1 KibiByte (= 2^10 bytes) */ /** User defined literals, 1_KiB is 1 KibiByte (= 2^10 bytes) */
constexpr qint64 operator""_KiB( unsigned long long m ) constexpr qint64
operator""_KiB( unsigned long long m )
{ {
return qint64( m ) * 1024; return qint64( m ) * 1024;
} }
/** User defined literals, 1_MB is 1 MegaByte (= 10^6 bytes) */ /** User defined literals, 1_MB is 1 MegaByte (= 10^6 bytes) */
constexpr qint64 operator""_MB( unsigned long long m ) constexpr qint64
operator""_MB( unsigned long long m )
{ {
return operator""_KB( m ) * 1000; return operator""_KB( m ) * 1000;
} }
/** User defined literals, 1_MiB is 1 MibiByte (= 2^20 bytes) */ /** User defined literals, 1_MiB is 1 MibiByte (= 2^20 bytes) */
constexpr qint64 operator""_MiB( unsigned long long m ) constexpr qint64
operator""_MiB( unsigned long long m )
{ {
return operator""_KiB( m ) * 1024; return operator""_KiB( m ) * 1024;
} }
/** User defined literals, 1_GB is 1 GigaByte (= 10^9 bytes) */ /** User defined literals, 1_GB is 1 GigaByte (= 10^9 bytes) */
constexpr qint64 operator""_GB( unsigned long long m ) constexpr qint64
operator""_GB( unsigned long long m )
{ {
return operator""_MB( m ) * 1000; return operator""_MB( m ) * 1000;
} }
/** User defined literals, 1_GiB is 1 GibiByte (= 2^30 bytes) */ /** User defined literals, 1_GiB is 1 GibiByte (= 2^30 bytes) */
constexpr qint64 operator""_GiB( unsigned long long m ) constexpr qint64
operator""_GiB( unsigned long long m )
{ {
return operator""_MiB( m ) * 1024; return operator""_MiB( m ) * 1024;
} }