From ffb470a38035b2eb2cf63909572e8d56082dc83b Mon Sep 17 00:00:00 2001 From: Tom Tanner Date: Sat, 9 May 2015 18:10:38 +0100 Subject: Add in a tab to allow saving of steam username and password. --- src/organizercore.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/organizercore.cpp') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index c2eaeae7..30d38be3 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -86,7 +86,18 @@ static void startSteam(QWidget *widget) QString exe = steamSettings.value("SteamExe", "").toString(); if (!exe.isEmpty()) { QString temp = QString("\"%1\"").arg(exe); - if (!QProcess::startDetached(temp)) { + //See if username and password supplied. If so, pass them into steam. + QStringList args; + QString username; + QString password; + if (Settings::instance().getSteamLogin(username, password)) { + args << "-login"; + args << username; + if (password != "") { + args << password; + } + } + if (!QProcess::startDetached(temp, args)) { reportError(QObject::tr("Failed to start \"%1\"").arg(temp)); } else { QMessageBox::information(widget, QObject::tr("Waiting"), -- cgit v1.3.1