diff options
Diffstat (limited to 'mappingtreewidget.cpp')
-rw-r--r-- | mappingtreewidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mappingtreewidget.cpp b/mappingtreewidget.cpp index 92366e0..7e62ba3 100644 --- a/mappingtreewidget.cpp +++ b/mappingtreewidget.cpp @@ -18,6 +18,7 @@ #include <QHideEvent> #include <QAction> #include <QMenu> +#include <QSqlError> #include <algorithm> @@ -142,7 +143,8 @@ void MappingTreeWidget::deleteChild(){ int retval = QMessageBox::question(this, tr("Question"), question, QMessageBox::Yes | QMessageBox::No); if(retval == QMessageBox::Yes){ if(!mModel->deleteChild(real)){ - QString msg = QString(tr("Failed to delete %1. Most likely there are still items mapped.")).arg(real.data().toString()); + QSqlError last = mModel->lastError(); + QString msg = QString(tr("Failed to delete %1. Database said: %2")).arg(real.data().toString()).arg(last.text()); QMessageBox::critical(this, tr("Error"), msg); } } |