Skip to content

Commit

Permalink
HttpCredentials: initialize all member inline
Browse files Browse the repository at this point in the history
  • Loading branch information
ogoffart committed Oct 19, 2018
1 parent e587ae7 commit d500cdb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/libsync/creds/httpcredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ static void addSettingsToJob(Account *account, QKeychain::Job *job)
job->setSettings(settings.release());
}

HttpCredentials::HttpCredentials()
: _ready(false)
, _keychainMigration(false)
{
}

// From wizard
HttpCredentials::HttpCredentials(const QString &user, const QString &password, const QSslCertificate &certificate, const QSslKey &key)
: _user(user)
Expand Down
8 changes: 4 additions & 4 deletions src/libsync/creds/httpcredentials.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ class OWNCLOUDSYNC_EXPORT HttpCredentials : public AbstractCredentials
/// Don't add credentials if this is set on a QNetworkRequest
static constexpr QNetworkRequest::Attribute DontAddCredentialsAttribute = QNetworkRequest::User;

explicit HttpCredentials();
HttpCredentials(const QString &user, const QString &password, const QSslCertificate &certificate = QSslCertificate(), const QSslKey &key = QSslKey());
HttpCredentials() = default;
explicit HttpCredentials(const QString &user, const QString &password, const QSslCertificate &certificate = QSslCertificate(), const QSslKey &key = QSslKey());

QString authType() const Q_DECL_OVERRIDE;
QNetworkAccessManager *createQNAM() const Q_DECL_OVERRIDE;
Expand Down Expand Up @@ -137,10 +137,10 @@ private Q_SLOTS:
QString _previousPassword;

QString _fetchErrorString;
bool _ready;
bool _ready = false;
QSslKey _clientSslKey;
QSslCertificate _clientSslCertificate;
bool _keychainMigration;
bool _keychainMigration = false;
bool _retryOnKeyChainError = true; // true if we haven't done yet any reading from keychain
};

Expand Down

0 comments on commit d500cdb

Please sign in to comment.