[mythtv-commits] mythtv commit: r21875 by mdean
mythtv at cvs.mythtv.org
mythtv at cvs.mythtv.org
Tue Sep 15 22:16:17 UTC 2009
Author: mdean
Date: 2009-09-15 22:16:17 +0000 (Tue, 15 Sep 2009)
New Revision: 21875
Changeset: http://cvs.mythtv.org/trac/changeset/21875
Modified:
trunk/mythtv/libs/libmythdb/mythdbcon.cpp
Log:
Log an error message when preparing a query fails so we don't lose the database error message.
With Qt4 (unlike Qt3) drivers, an error can occur during prepare(). Since Myth code was written for the Qt3 behavior, it doesn't check the prepare() return value. When we attempt to exec() an invalid query, exec() returns false, resulting in another error message. However, since exec() resets lastError(), the message logged will be, "No error type from QSqlError? Strange..." This patch simply ensures we retain enough information about the query to be able to fix it.
More information about the mythtv-commits
mailing list