diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-01 15:04:58 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-01 15:04:58 +0200 |
commit | 5ef8b38e55c1883224fe1f01f47aba45b7b42666 (patch) | |
tree | 67a873c6a7c5263d202793314c3b3a61543fbb40 /action.cpp | |
download | tapasboard-5ef8b38e55c1883224fe1f01f47aba45b7b42666.tar.gz tapasboard-5ef8b38e55c1883224fe1f01f47aba45b7b42666.zip |
initial import
Diffstat (limited to 'action.cpp')
-rw-r--r-- | action.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/action.cpp b/action.cpp new file mode 100644 index 0000000..df52dcc --- /dev/null +++ b/action.cpp @@ -0,0 +1,18 @@ +#include "board.h" +#include "action.h" + +Action::Action(Board *board) : + QObject(board), _board(board) +{ +} + +void Action::handleDatabaseError(const char *what, const QSqlError &err) +{ + QString message = QString("Database error while %1: %2").arg(what).arg(err.text()); + emit error(this, message); +} + +void Action::handleDatabaseError(const char *what, const QSqlQuery &query) +{ + handleDatabaseError(what, query.lastError()); +} |