MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / confirmRestartAsAdminForSteam

Function confirmRestartAsAdminForSteam

src/spawn.cpp:307–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307QMessageBox::StandardButton confirmRestartAsAdminForSteam(QWidget* parent,
308 const SpawnParameters& sp)
309{
310 const auto title = QObject::tr("Elevation required");
311 const auto mainText = QObject::tr("Steam is running as administrator");
312 const auto content = QObject::tr(
313 "Running Steam as administrator is typically unnecessary and can cause "
314 "problems when Mod Organizer itself is not running as administrator."
315 "\r\n\r\n"
316 "You can restart Mod Organizer as administrator and try launching the "
317 "program again.");
318
319 return MOBase::TaskDialog(parent, title)
320 .main(mainText)
321 .content(content)
322 .icon(QMessageBox::Question)
323 .button(
324 {QObject::tr("Restart Mod Organizer as administrator"),
325 QObject::tr("You must allow \"helper.exe\" to make changes to the system."),
326 QMessageBox::Yes})
327 .button({QObject::tr("Continue"), QObject::tr("The program might fail to run."),
328 QMessageBox::No})
329 .button({QObject::tr("Cancel"), QMessageBox::Cancel})
330 .remember("steamAdminQuery", sp.binary.fileName())
331 .exec();
332}
333
334bool eventLogNotRunning(QWidget* parent, const env::Service& s,
335 const SpawnParameters& sp)

Callers 1

checkSteamFunction · 0.85

Calls 2

execMethod · 0.45
iconMethod · 0.45

Tested by

no test coverage detected