Use local variable instead of function parameter #5020
This commit is contained in:
parent
da315ec164
commit
98385c06e9
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue