[Pkg-owncloud-commits] [owncloud-client] 304/484: Share dialog: Initialize expected expire date #4075
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:56 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 196ee05fccc4687187376f4f8e44ceca69a4300f
Author: Christian Kamm <mail at ckamm.de>
Date: Wed Nov 11 13:01:12 2015 +0100
Share dialog: Initialize expected expire date #4075
---
src/gui/sharelinkwidget.cpp | 10 ++++++----
src/gui/sharelinkwidget.h | 2 +-
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp
index 9c64dde..5f21488 100644
--- a/src/gui/sharelinkwidget.cpp
+++ b/src/gui/sharelinkwidget.cpp
@@ -69,7 +69,7 @@ ShareLinkWidget::ShareLinkWidget(AccountPtr account,
connect(_ui->lineEdit_password, SIGNAL(textChanged(QString)), this, SLOT(slotPasswordChanged(QString)));
connect(_ui->pushButton_setPassword, SIGNAL(clicked(bool)), SLOT(slotPasswordReturnPressed()));
connect(_ui->checkBox_expire, SIGNAL(clicked()), this, SLOT(slotCheckBoxExpireClicked()));
- connect(_ui->calendar, SIGNAL(dateChanged(QDate)), SLOT(slotCalendarClicked(QDate)));
+ connect(_ui->calendar, SIGNAL(dateChanged(QDate)), SLOT(slotExpireDateChanged(QDate)));
connect(_ui->checkBox_editing, SIGNAL(clicked()), this, SLOT(slotCheckBoxEditingClicked()));
//Disable checkbox
@@ -156,9 +156,11 @@ void ShareLinkWidget::slotExpireSet()
_pi_date->stopAnimation();
}
-void ShareLinkWidget::slotCalendarClicked(const QDate &date)
+void ShareLinkWidget::slotExpireDateChanged(const QDate &date)
{
- setExpireDate(date);
+ if (_ui->checkBox_expire->isChecked()) {
+ setExpireDate(date);
+ }
}
ShareLinkWidget::~ShareLinkWidget()
@@ -246,9 +248,9 @@ void ShareLinkWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shar
}
_ui->checkBox_expire->setEnabled(true);
+ _ui->calendar->setMinimumDate(QDate::currentDate().addDays(1));
if (_share->getExpireDate().isValid()) {
_ui->calendar->setDate(_share->getExpireDate());
- _ui->calendar->setMinimumDate(QDate::currentDate().addDays(1));
_ui->calendar->setEnabled(true);
_ui->checkBox_expire->setChecked(true);
} else {
diff --git a/src/gui/sharelinkwidget.h b/src/gui/sharelinkwidget.h
index 6fb78ff..d6950b3 100644
--- a/src/gui/sharelinkwidget.h
+++ b/src/gui/sharelinkwidget.h
@@ -60,7 +60,7 @@ private slots:
void slotDeleteShareFetched();
void slotPasswordSet();
void slotExpireSet();
- void slotCalendarClicked(const QDate &date);
+ void slotExpireDateChanged(const QDate &date);
void slotCheckBoxShareLinkClicked();
void slotCheckBoxPasswordClicked();
void slotCheckBoxExpireClicked();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list