@@ -270,7 +270,8 @@ void NvidiaInstaller::cancelOperation() {
270270 }
271271
272272 m_cancelRequested->store (true , std::memory_order_relaxed);
273- emit progressMessage (tr (" Cancel requested. Waiting for the active command to stop safely..." ));
273+ emit progressMessage (
274+ tr (" Cancel requested. Waiting for the active command to stop safely..." ));
274275}
275276
276277void NvidiaInstaller::setProprietaryAgreement (bool required,
@@ -368,7 +369,8 @@ void NvidiaInstaller::installProprietary(bool agreementAccepted) {
368369 return ;
369370 }
370371
371- const SessionUtil::SessionInfo sessionInfo = SessionUtil::detectSessionInfo ();
372+ const SessionUtil::SessionInfo sessionInfo =
373+ SessionUtil::detectSessionInfo ();
372374 const QString sessionType = sessionInfo.type .trimmed ().toLower ();
373375 if (sessionType != QStringLiteral (" wayland" ) &&
374376 sessionType != QStringLiteral (" x11" )) {
@@ -393,13 +395,12 @@ void NvidiaInstaller::installProprietary(bool agreementAccepted) {
393395 " Installing the closed-source NVIDIA driver with one privileged "
394396 " authorization..." ));
395397 emitProgressAsync (
396- guard,
397- NvidiaInstaller::tr (" Closed-source install packages for %1: %2" )
398- .arg (sessionType == QStringLiteral (" wayland" )
399- ? NvidiaInstaller::tr (" Wayland" )
400- : NvidiaInstaller::tr (" X11" ))
401- .arg (quotedList (buildDriverInstallTargets (
402- QStringLiteral (" akmod-nvidia" ), sessionType))));
398+ guard, NvidiaInstaller::tr (" Closed-source install packages for %1: %2" )
399+ .arg (sessionType == QStringLiteral (" wayland" )
400+ ? NvidiaInstaller::tr (" Wayland" )
401+ : NvidiaInstaller::tr (" X11" ))
402+ .arg (quotedList (buildDriverInstallTargets (
403+ QStringLiteral (" akmod-nvidia" ), sessionType))));
403404
404405 QStringList installArgs{QStringLiteral (" install" ), QStringLiteral (" -y" ),
405406 QStringLiteral (" --refresh" ),
@@ -423,21 +424,21 @@ void NvidiaInstaller::installProprietary(bool agreementAccepted) {
423424 {QStringLiteral (" akmods" ), {QStringLiteral (" --force" )}});
424425 rootCommands.append (buildSessionSpecificRootCommands (sessionType));
425426
426- emitProgressAsync (
427- guard, NvidiaInstaller::tr (" Detected %1 session via %2." )
428- .arg (sessionType == QStringLiteral (" wayland" )
429- ? NvidiaInstaller::tr (" Wayland" )
430- : NvidiaInstaller::tr (" X11" ),
431- sessionInfo.source .isEmpty ()
432- ? NvidiaInstaller::tr (" session probe" )
433- : sessionInfo.source ));
427+ emitProgressAsync (guard, NvidiaInstaller::tr (" Detected %1 session via %2." )
428+ .arg (sessionType == QStringLiteral (" wayland" )
429+ ? NvidiaInstaller::tr (" Wayland" )
430+ : NvidiaInstaller::tr (" X11" ),
431+ sessionInfo.source .isEmpty ()
432+ ? NvidiaInstaller::tr (" session probe" )
433+ : sessionInfo.source ));
434434
435435 auto result = runner.runAsRootBatch (rootCommands, runOptions);
436436 if (!result.success ()) {
437- const QString error = commandCanceled (result)
438- ? NvidiaInstaller::tr (" Operation canceled by user." )
439- : NvidiaInstaller::tr (" Installation failed: " ) +
440- commandError (result);
437+ const QString error =
438+ commandCanceled (result)
439+ ? NvidiaInstaller::tr (" Operation canceled by user." )
440+ : NvidiaInstaller::tr (" Installation failed: " ) +
441+ commandError (result);
441442 QMetaObject::invokeMethod (
442443 guard,
443444 [guard, error]() {
@@ -493,7 +494,8 @@ void NvidiaInstaller::installOpenSource() {
493494 NvidiaInstaller::tr (
494495 " Switching to the community open-source graphics driver stack..." ));
495496
496- const SessionUtil::SessionInfo sessionInfo = SessionUtil::detectSessionInfo ();
497+ const SessionUtil::SessionInfo sessionInfo =
498+ SessionUtil::detectSessionInfo ();
497499 const QString sessionType = sessionInfo.type .trimmed ().toLower ();
498500 if (sessionType != QStringLiteral (" wayland" ) &&
499501 sessionType != QStringLiteral (" x11" )) {
@@ -525,14 +527,13 @@ void NvidiaInstaller::installOpenSource() {
525527 QList<CommandRunner::RootCommand> rootCommands =
526528 buildCommunityNouveauRootCommands (sessionType);
527529
528- emitProgressAsync (
529- guard, NvidiaInstaller::tr (" Detected %1 session via %2." )
530- .arg (sessionType == QStringLiteral (" wayland" )
531- ? NvidiaInstaller::tr (" Wayland" )
532- : NvidiaInstaller::tr (" X11" ),
533- sessionInfo.source .isEmpty ()
534- ? NvidiaInstaller::tr (" session probe" )
535- : sessionInfo.source ));
530+ emitProgressAsync (guard, NvidiaInstaller::tr (" Detected %1 session via %2." )
531+ .arg (sessionType == QStringLiteral (" wayland" )
532+ ? NvidiaInstaller::tr (" Wayland" )
533+ : NvidiaInstaller::tr (" X11" ),
534+ sessionInfo.source .isEmpty ()
535+ ? NvidiaInstaller::tr (" session probe" )
536+ : sessionInfo.source ));
536537
537538 auto result = runner.runAsRootBatch (rootCommands, runOptions);
538539 if (!result.success ()) {
@@ -598,12 +599,11 @@ void NvidiaInstaller::remove() {
598599
599600 const bool success = result.success ();
600601 const QString message =
601- success
602- ? NvidiaInstaller::tr (" Driver removed successfully." )
603- : (commandCanceled (result)
604- ? NvidiaInstaller::tr (" Operation canceled by user." )
605- : NvidiaInstaller::tr (" Removal failed: " ) +
606- result.stderr .trimmed ());
602+ success ? NvidiaInstaller::tr (" Driver removed successfully." )
603+ : (commandCanceled (result)
604+ ? NvidiaInstaller::tr (" Operation canceled by user." )
605+ : NvidiaInstaller::tr (" Removal failed: " ) +
606+ result.stderr .trimmed ());
607607 QMetaObject::invokeMethod (
608608 guard,
609609 [guard, success, message]() {
@@ -661,10 +661,9 @@ void NvidiaInstaller::deepClean() {
661661 return ;
662662 }
663663
664- const auto cleanResult =
665- runner.runAsRoot (QStringLiteral (" dnf" ),
666- {QStringLiteral (" clean" ), QStringLiteral (" all" )},
667- runOptions);
664+ const auto cleanResult = runner.runAsRoot (
665+ QStringLiteral (" dnf" ), {QStringLiteral (" clean" ), QStringLiteral (" all" )},
666+ runOptions);
668667 if (!cleanResult.success ()) {
669668 const QString error =
670669 commandCanceled (cleanResult)
0 commit comments