Show those TODO message also when using the toolbar or the popup menu

This should let the user know that something's not working instead of
offering him a not working dialog and winding him up this way. That
should make the behaviour of the program much easier to understand.
This commit is contained in:
Martin Kleusberg
2013-01-02 23:04:04 +01:00
parent 7424268f28
commit 9b2e8cd5a4
3 changed files with 31 additions and 8 deletions

View File

@@ -1217,20 +1217,26 @@ void MainWindow::on_add_field(){
}
}
void MainWindow::on_edit_field(){
if( !ui->dbTreeWidget->currentItem() ){
if(!ui->dbTreeWidget->currentItem())
return;
}
QTreeWidgetItem *item = ui->dbTreeWidget->currentItem();
// TODO
QMessageBox::information(this, QApplication::applicationName(), tr("Sorry! This function is currently not implemented as SQLite does not support editing columns yet."));
/*QTreeWidgetItem *item = ui->dbTreeWidget->currentItem();
editFieldForm *fieldForm = new editFieldForm( this );
fieldForm->setInitialValues(&db, false, item->parent()->text(0), item->text(0), item->text(2));
if (fieldForm->exec())
{
//modified = true;
//do the sql rename here
//qDebug(fieldForm->name + fieldForm->type);
item->setText(0,fieldForm->field_name);
item->setText(2,fieldForm->field_type);
}
}*/
}
void MainWindow::on_delete_field(){
if(!ui->dbTreeWidget->currentItem())
return;
// TODO
QMessageBox::information(this, QApplication::applicationName(), tr("Sorry! This function is currently not implemented as SQLite does not support the deletion of columns yet."));
}
void MainWindow::openRecentFile()