mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Remove certificateDate property and other superfluous code
This commit is contained in:
parent
9ba88f6baf
commit
ba3bab8f49
8 changed files with 6 additions and 38 deletions
2
binary
2
binary
|
@ -1 +1 @@
|
|||
Subproject commit 8b3bea417edfdce2136f73fbe1e9f248f8c924d0
|
||||
Subproject commit 96dd38811b58b28146a204124a8e764b3513b7f4
|
|
@ -110,7 +110,7 @@ QString queryPassword(const QString &user)
|
|||
class HttpCredentialsText : public HttpCredentials {
|
||||
public:
|
||||
HttpCredentialsText(const QString& user, const QString& password)
|
||||
: HttpCredentials(user, password, "", "", ""), // FIXME: not working with client certs yet (qknight)
|
||||
: HttpCredentials(user, password, "", ""), // FIXME: not working with client certs yet (qknight)
|
||||
_sslTrusted(false)
|
||||
{}
|
||||
|
||||
|
|
|
@ -152,8 +152,7 @@ void OwncloudHttpCredsPage::setErrorString(const QString& err)
|
|||
|
||||
AbstractCredentials* OwncloudHttpCredsPage::getCredentials() const
|
||||
{
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
return new HttpCredentialsGui(_ui.leUsername->text(), _ui.lePassword->text(), _ocWizard->ownCloudCertificatePath, now.toString(QLatin1String("yyyy-MM-dd")), _ocWizard->ownCloudCertificatePasswd);
|
||||
return new HttpCredentialsGui(_ui.leUsername->text(), _ui.lePassword->text(), _ocWizard->ownCloudCertificatePath, _ocWizard->ownCloudCertificatePasswd);
|
||||
}
|
||||
|
||||
void OwncloudHttpCredsPage::setConfigExists(bool config)
|
||||
|
|
|
@ -65,7 +65,6 @@ static const char downloadLimitC[] = "BWLimit/downloadLimit";
|
|||
static const char maxLogLinesC[] = "Logging/maxLogLines";
|
||||
|
||||
const char certPath[] = "http_certificatePath";
|
||||
const char certDate[] = "http_certificateDate";
|
||||
const char certPasswd[] = "http_certificatePasswd";
|
||||
QString ConfigFile::_confDir = QString::null;
|
||||
bool ConfigFile::_askedUser = false;
|
||||
|
@ -584,18 +583,6 @@ void ConfigFile::setCertificatePath(const QString& cPath)
|
|||
settings.sync();
|
||||
}
|
||||
|
||||
QString ConfigFile::certificateDate() const
|
||||
{
|
||||
return retrieveData(QString(), QLatin1String(certDate)).toString();
|
||||
}
|
||||
|
||||
void ConfigFile::setCertificateDate(const QString& cDate)
|
||||
{
|
||||
QSettings settings(configFile(), QSettings::IniFormat);
|
||||
settings.setValue( QLatin1String(certDate), cDate);
|
||||
settings.sync();
|
||||
}
|
||||
|
||||
QString ConfigFile::certificatePasswd() const
|
||||
{
|
||||
return retrieveData(QString(), QLatin1String(certPasswd)).toString();
|
||||
|
|
|
@ -118,8 +118,6 @@ public:
|
|||
|
||||
QString certificatePath() const;
|
||||
void setCertificatePath(const QString& cPath);
|
||||
QString certificateDate() const;
|
||||
void setCertificateDate(const QString& cDate);
|
||||
QString certificatePasswd() const;
|
||||
void setCertificatePasswd(const QString& cPasswd);
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@ public:
|
|||
void fixupOldPassword();
|
||||
QString certificatePath() const;
|
||||
void setCertificatePath(const QString& cPath);
|
||||
QString certificateDate() const;
|
||||
void setCertificateDate(const QString& cDate);
|
||||
QString certificatePasswd() const;
|
||||
void setCertificatePasswd(const QString& cPasswd);
|
||||
|
||||
|
|
|
@ -55,9 +55,6 @@ int getauth(const char *prompt,
|
|||
QString qPrompt = QString::fromLatin1( prompt ).trimmed();
|
||||
QString user = http_credentials->user();
|
||||
QString pwd = http_credentials->password();
|
||||
QString certificatePath = http_credentials->certificatePath();
|
||||
QString certificateDate = http_credentials->certificateDate();
|
||||
QString certificatePasswd = http_credentials->certificatePasswd();
|
||||
|
||||
if( qPrompt == QLatin1String("Enter your username:") ) {
|
||||
// qDebug() << "OOO Username requested!";
|
||||
|
@ -80,7 +77,6 @@ namespace
|
|||
const char userC[] = "user";
|
||||
const char certifPathC[] = "certificatePath";
|
||||
const char certifPasswdC[] = "certificatePasswd";
|
||||
const char certifDateC[] = "certificateDate";
|
||||
const char authenticationFailedC[] = "owncloud-authentication-failed";
|
||||
} // ns
|
||||
|
||||
|
@ -104,7 +100,6 @@ HttpCredentials::HttpCredentials()
|
|||
: _user(),
|
||||
_password(),
|
||||
_certificatePath(),
|
||||
_certificateDate(),
|
||||
_certificatePasswd(),
|
||||
_ready(false),
|
||||
_fetchJobInProgress(false),
|
||||
|
@ -112,11 +107,10 @@ HttpCredentials::HttpCredentials()
|
|||
{
|
||||
}
|
||||
|
||||
HttpCredentials::HttpCredentials(const QString& user, const QString& password, const QString& certificatePath, const QString& certificateDate, const QString& certificatePasswd)
|
||||
HttpCredentials::HttpCredentials(const QString& user, const QString& password, const QString& certificatePath, const QString& certificatePasswd)
|
||||
: _user(user),
|
||||
_password(password),
|
||||
_certificatePath(certificatePath),
|
||||
_certificateDate(certificateDate),
|
||||
_certificatePasswd(certificatePasswd),
|
||||
_ready(true),
|
||||
_fetchJobInProgress(false)
|
||||
|
@ -187,11 +181,6 @@ QString HttpCredentials::certificatePath() const
|
|||
return _certificatePath;
|
||||
}
|
||||
|
||||
QString HttpCredentials::certificateDate() const
|
||||
{
|
||||
return _certificateDate;
|
||||
}
|
||||
|
||||
QString HttpCredentials::certificatePasswd() const
|
||||
{
|
||||
return _certificatePasswd;
|
||||
|
@ -357,7 +346,6 @@ void HttpCredentials::persist()
|
|||
_account->setCredentialSetting(QLatin1String(userC), _user);
|
||||
_account->setCredentialSetting(QLatin1String(certifPathC), _certificatePath);
|
||||
_account->setCredentialSetting(QLatin1String(certifPasswdC), _certificatePasswd);
|
||||
_account->setCredentialSetting(QLatin1String(certifDateC), _certificateDate);
|
||||
WritePasswordJob *job = new WritePasswordJob(Theme::instance()->appName());
|
||||
QSettings *settings = _account->settingsWithGroup(Theme::instance()->appName());
|
||||
settings->setParent(job); // make the job parent to make setting deleted properly
|
||||
|
|
|
@ -36,7 +36,7 @@ class OWNCLOUDSYNC_EXPORT HttpCredentials : public AbstractCredentials
|
|||
|
||||
public:
|
||||
explicit HttpCredentials();
|
||||
HttpCredentials(const QString& user, const QString& password, const QString& certificatePath, const QString& certificateDate, const QString& certificatePasswd);
|
||||
HttpCredentials(const QString& user, const QString& password, const QString& certificatePath, const QString& certificatePasswd);
|
||||
|
||||
void syncContextPreInit(CSYNC* ctx) Q_DECL_OVERRIDE;
|
||||
void syncContextPreStart(CSYNC* ctx) Q_DECL_OVERRIDE;
|
||||
|
@ -54,7 +54,6 @@ public:
|
|||
QString fetchUser();
|
||||
virtual bool sslIsTrusted() { return false; }
|
||||
QString certificatePath() const;
|
||||
QString certificateDate() const;
|
||||
QString certificatePasswd() const;
|
||||
|
||||
private Q_SLOTS:
|
||||
|
@ -68,7 +67,6 @@ protected:
|
|||
|
||||
private:
|
||||
QString _certificatePath;
|
||||
QString _certificateDate;
|
||||
QString _certificatePasswd;
|
||||
bool _ready;
|
||||
bool _fetchJobInProgress; //True if the keychain job is in progress or the input dialog visible
|
||||
|
@ -78,7 +76,7 @@ private:
|
|||
class OWNCLOUDSYNC_EXPORT HttpCredentialsGui : public HttpCredentials {
|
||||
public:
|
||||
explicit HttpCredentialsGui() : HttpCredentials() {}
|
||||
HttpCredentialsGui(const QString& user, const QString& password, const QString& certificatePath, const QString& certificateDate, const QString& certificatePasswd) : HttpCredentials(user, password, certificatePath, certificateDate, certificatePasswd) {}
|
||||
HttpCredentialsGui(const QString& user, const QString& password, const QString& certificatePath, const QString& certificatePasswd) : HttpCredentials(user, password, certificatePath, certificatePasswd) {}
|
||||
QString queryPassword(bool *ok) Q_DECL_OVERRIDE;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue