users: repair broken tests

Applying the styling tool breaks the string literals.
This commit is contained in:
Adriaan de Groot 2023-10-14 00:33:04 +02:00
parent d8415cfd53
commit 7abbcd685e

View File

@ -60,14 +60,14 @@ writeFileEtcHosts( const QString& hostname )
{ {
// The actual hostname gets substituted in at %1 // The actual hostname gets substituted in at %1
const QString standard_hosts = QStringLiteral( R"(# Standard host addresses const QString standard_hosts = QStringLiteral( R"(# Standard host addresses
127.0.0.1 localhost 127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback ::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes ff02::1 ip6-allnodes
ff02::2 ip6-allrouters ff02::2 ip6-allrouters
)" ); )" );
const QString this_host = QStringLiteral( R"(# This host address const QString this_host = QStringLiteral( R"(# This host address
127.0.1.1 %1 127.0.1.1 %1
)" ); )" );
const QString etc_hosts = standard_hosts + ( hostname.isEmpty() ? QString() : this_host.arg( hostname ) ); const QString etc_hosts = standard_hosts + ( hostname.isEmpty() ? QString() : this_host.arg( hostname ) );
return Calamares::System::instance()->createTargetFile( return Calamares::System::instance()->createTargetFile(