Checks if share link exists before settings password.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2018-08-02 20:22:37 +02:00
parent 8e0398426d
commit 2cd32261a2
No known key found for this signature in database
GPG key ID: 7A4A6121E88E2AD4

View file

@ -386,19 +386,16 @@ void ShareLinkWidget::setPassword(const QString &password)
void ShareLinkWidget::slotPasswordSet()
{
auto share = selectedShare();
if (sender() != share.data())
if (!_linkShare)
return;
_pi_password->stopAnimation();
_ui->checkBox_password->setEnabled(true);
_ui->lineEdit_password->setText(QString());
if (share->isPasswordSet()) {
if (_linkShare->isPasswordSet()) {
_ui->lineEdit_password->setPlaceholderText("********");
_ui->lineEdit_password->setEnabled(true);
} else {
_ui->lineEdit_password->setPlaceholderText(QString());
_ui->lineEdit_password->setEnabled(false);
}
/*