1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02: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 <QInputDialog>
#include <QMessageBox>
SBI_NetworkIconDialog::SBI_NetworkIconDialog(QWidget* parent)
: QDialog(parent)
@ -64,6 +65,13 @@ void SBI_NetworkIconDialog::addProxy()
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();
if (index < 0) {
return;