From 5ef8b38e55c1883224fe1f01f47aba45b7b42666 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 1 Apr 2013 15:04:58 +0200 Subject: initial import --- action.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 action.cpp (limited to 'action.cpp') 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()); +} -- cgit v1.2.3