1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

[SBI_NetworkIcon] Ask user before removing proxy.

This commit is contained in:
nowrep 2013-05-29 23:39:49 +02:00
parent b6a386f73b
commit aa18827a49

View File

@ -21,6 +21,7 @@
#include "ui_sbi_networkicondialog.h" #include "ui_sbi_networkicondialog.h"
#include <QInputDialog> #include <QInputDialog>
#include <QMessageBox>
SBI_NetworkIconDialog::SBI_NetworkIconDialog(QWidget* parent) SBI_NetworkIconDialog::SBI_NetworkIconDialog(QWidget* parent)
: QDialog(parent) : QDialog(parent)
@ -64,6 +65,13 @@ void SBI_NetworkIconDialog::addProxy()
void SBI_NetworkIconDialog::removeProxy() void SBI_NetworkIconDialog::removeProxy()
{ {
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Remove current proxy"), tr("Are you sure to remove current proxy?"),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
if (button != QMessageBox::Yes) {
return;
}
int index = ui->comboBox->currentIndex(); int index = ui->comboBox->currentIndex();
if (index < 0) { if (index < 0) {
return; return;