Use local variable instead of function parameter #5020

This commit is contained in:
Jerry (Xinyu Hou) 2015-10-23 11:59:28 -07:00
parent da315ec164
commit 98385c06e9
2 changed files with 4 additions and 7 deletions

View File

@ -34,8 +34,7 @@ int WebClient::getEdition(
QString responseJson;
int edition = Unknown;
try {
QStringList args("--login-auth");
responseJson = request(email, password, args);
responseJson = request(email, password);
}
catch (std::exception& e)
{
@ -91,9 +90,9 @@ int WebClient::getEdition(
QString WebClient::request(
const QString& email,
const QString& password,
QStringList& args)
const QString& password)
{
QStringList args("--login-auth");
// hash password in case it contains interesting chars.
QString credentials(email + ":" + hash(password) + "\n");
return m_CoreInterface.run(args, credentials);

View File

@ -19,7 +19,6 @@
#define WEBCLIENT_H
#include <QString>
#include <QStringList>
#include <QObject>
#include "CoreInterface.h"
@ -45,8 +44,7 @@ signals:
private:
QString request(const QString& email,
const QString& password,
QStringList& args);
const QString& password);
private:
QString m_Email;