Ask confirmation before removing connection.

Close #5
This commit is contained in:
eelke 2018-04-30 20:17:44 +02:00
parent d67224858d
commit c2d725ec6d
2 changed files with 9 additions and 4 deletions

View file

@ -62,10 +62,15 @@ void ConnectionManagerWindow::on_actionDelete_connection_triggered()
{
auto ci = ui->listView->selectionModel()->currentIndex();
if (ci.isValid()) {
auto res = QMessageBox::question(this, "pglab",
tr("Are you sure you want to remove this connection?"), QMessageBox::Yes, QMessageBox::No);
if (res == QMessageBox::Yes) {
auto clm = m_masterController->getConnectionListModel();
clm->removeRow(ci.row());
}
}
}
void ConnectionManagerWindow::setupWidgetMappings()

View file

@ -20,11 +20,11 @@ DEFINES += WIN32_LEAN_AND_MEAN NOMINMAX _WIN32_WINNT=0x0501
LIBS += -LC:\VSproj\boost32\lib -LC:/PROG/LIB -lws2_32 -llibpq
#debug {
LIBS += c:/prog/lib/botan_imp.lib
LIBS += c:/prog/lib/botand_imp.lib
#}
#release {
#LIBS += c:/prog/lib/botan_imp.lib
#LIBS += c:/prog/lib/botan.lib
#}
win32:RC_ICONS += pglab.ico