mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-21 11:31:00 -06:00
Show message box when editing a table column fails
When editing a column of an existing table, this process might fail for all sorts of reasons. Instead of printing an error message to stdout this commit changes it to show a message box, so the user knows the editing failed.
This commit is contained in:
@@ -449,7 +449,10 @@ void EditTableDialog::itemChanged(QTreeWidgetItem *item, int column)
|
||||
}
|
||||
|
||||
if(callRenameColumn)
|
||||
pdb.renameColumn(m_table, oldFieldName, field);
|
||||
{
|
||||
if(!pdb.renameColumn(m_table, oldFieldName, field))
|
||||
QMessageBox::warning(this, qApp->applicationName(), tr("Modifying this column failed. Error returned from database:\n%1").arg(pdb.lastErrorMessage));
|
||||
}
|
||||
}
|
||||
|
||||
checkInput();
|
||||
|
||||
Reference in New Issue
Block a user