Allow editing fields in existing DB tables

Make it possible to rename columns and change their types even when
editing an existing table. This requires a workaround to not use the
ALTER TABLE command which is not fully supported by SQLite.
This commit is contained in:
Martin Kleusberg
2013-01-07 23:33:52 +01:00
parent b0af89c1cb
commit fac589c3e3
4 changed files with 88 additions and 16 deletions

View File

@@ -1103,16 +1103,14 @@ void MainWindow::editField(){
if(!ui->dbTreeWidget->currentItem())
return;
// 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();
QTreeWidgetItem *item = ui->dbTreeWidget->currentItem();
editFieldForm dialog(this);
dialog.setInitialValues(&db, false, item->parent()->text(0), item->text(0), item->text(2));
if(dialog.exec())
{
item->setText(0, dialog.field_name);
item->setText(2, dialog.field_type);
}*/
}
}
void MainWindow::deleteField(){