Fix usage of QString

1 - Pass QStrings by const-ref
2 - Don't initialize empty strings with "", they are empty
    by default
3 - Don't compare empty strings with "", use .isEmpty()
4 - don't append or prepend " ", use QChar(' ')
5 - don't compare QStrings with "constant string", use
    QLatin1String(" constant string" )

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-01-26 12:28:38 -02:00 committed by Dirk Hohndel
parent 8b7427c56d
commit ccf29679ae
2 changed files with 10 additions and 10 deletions

View file

@ -7,7 +7,7 @@
class CloudStorageAuthenticate : public QObject {
Q_OBJECT
public:
QNetworkReply* backend(QString email, QString password, QString pin = "", QString newpasswd = "");
QNetworkReply* backend(const QString& email,const QString& password,const QString& pin = QString(),const QString& newpasswd = QString());
explicit CloudStorageAuthenticate(QObject *parent);
signals:
void finishedAuthenticate();