summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-12-08 08:07:37 (GMT)
committerMontel Laurent <montel@kde.org>2016-12-08 08:07:37 (GMT)
commit3b6209b94045db76e3f18e29237b86c6a054401c (patch)
tree550004bea33fb21dd875d334b2217655a01d4048
parent406b7674ae24a0a2cba1e2aff6feeebaaa04d6c8 (diff)
Fix cancel/getpreview sound
-rw-r--r--src/qt-oauth-lib/logindialog.cpp14
-rw-r--r--src/qt-oauth-lib/logindialog.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/qt-oauth-lib/logindialog.cpp b/src/qt-oauth-lib/logindialog.cpp
index 6d5b9a3..dabe66f 100644
--- a/src/qt-oauth-lib/logindialog.cpp
+++ b/src/qt-oauth-lib/logindialog.cpp
@@ -45,6 +45,8 @@ LoginDialog::LoginDialog(QWidget *parent) :
ui(new Ui::LoginDialog)
{
ui->setupUi(this);
+ connect(ui->CancelButton, &QPushButton::clicked, this, &LoginDialog::slotRejected);
+ connect(ui->GetHQpreview, &QPushButton::clicked, this, &LoginDialog::slotGetHQPreview);
setWindowTitle(i18n("Freesound Login"));
ui->FreeSoundLoginLabel->setText(i18n("Enter your freesound account details to download the highest quality version of this file. Or use the High Quality preview file instead (no freesound account required)."));
// ui->textBrowser
@@ -56,6 +58,18 @@ LoginDialog::~LoginDialog()
delete ui;
}
+void LoginDialog::slotGetHQPreview()
+{
+ emit UseHQPreview();
+ QDialog::accept();
+}
+
+void LoginDialog::slotRejected()
+{
+ emit canceled();
+ QDialog::reject();
+}
+
/**
* @brief LoginDialog::urlChanged
* @param url \n
diff --git a/src/qt-oauth-lib/logindialog.h b/src/qt-oauth-lib/logindialog.h
index 7335485..fec25a8 100644
--- a/src/qt-oauth-lib/logindialog.h
+++ b/src/qt-oauth-lib/logindialog.h
@@ -84,6 +84,8 @@ signals:
private slots:
void urlChanged(const QUrl& url);
+ void slotGetHQPreview();
+ void slotRejected();
private:
Ui::LoginDialog *ui;
QString m_strAuthCode;