[users] Correct DBus return from hostnamed calls

This commit is contained in:
Adriaan de Groot 2020-02-18 10:35:47 +01:00
parent 094c213baa
commit f7e8488edf

View File

@ -99,7 +99,7 @@ setSystemdHostname( const QString& hostname )
bool success = true; bool success = true;
// Static, writes /etc/hostname // Static, writes /etc/hostname
{ {
QDBusReply< uint > r = hostnamed.call( "SetStaticHostname", hostname, false ); QDBusReply< void > r = hostnamed.call( "SetStaticHostname", hostname, false );
if ( !r.isValid() ) if ( !r.isValid() )
{ {
cWarning() << "Could not set hostname through org.freedesktop.hostname1.SetStaticHostname." << r.error(); cWarning() << "Could not set hostname through org.freedesktop.hostname1.SetStaticHostname." << r.error();
@ -108,7 +108,7 @@ setSystemdHostname( const QString& hostname )
} }
// Dynamic, updates kernel // Dynamic, updates kernel
{ {
QDBusReply< uint > r = hostnamed.call( "SetHostname", hostname, false ); QDBusReply< void > r = hostnamed.call( "SetHostname", hostname, false );
if ( !r.isValid() ) if ( !r.isValid() )
{ {
cWarning() << "Could not set hostname through org.freedesktop.hostname1.SetHostname." << r.error(); cWarning() << "Could not set hostname through org.freedesktop.hostname1.SetHostname." << r.error();