diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-03-29 07:02:34 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-03-29 07:02:34 (GMT) |
commit | c253bd186f95573650cc1c25983cdab24a5c35c2 (patch) | |
tree | 1d0e36115d673f3ccf80be6bb3f2d3872ce4f61f /src/declarative/qml/qdeclarativesqldatabase.cpp | |
parent | ac808649bd3f63c9e5d5a77db24ccde2cb327ed1 (diff) | |
download | Qt-c253bd186f95573650cc1c25983cdab24a5c35c2.zip Qt-c253bd186f95573650cc1c25983cdab24a5c35c2.tar.gz Qt-c253bd186f95573650cc1c25983cdab24a5c35c2.tar.bz2 |
Use error enum not numbers
(easier to doc)
Diffstat (limited to 'src/declarative/qml/qdeclarativesqldatabase.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativesqldatabase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp index 2d5f096..37d2d5b 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -279,7 +279,7 @@ static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScri QString foundvers = context->thisObject().property(QLatin1String("version")).toString(); if (from_version!=foundvers) { - THROW_SQL(2,QDeclarativeEngine::tr("Version mismatch: expected %1, found %2").arg(from_version).arg(foundvers)); + THROW_SQL(VERSION_ERR,QDeclarativeEngine::tr("Version mismatch: expected %1, found %2").arg(from_version).arg(foundvers)); return engine->undefinedValue(); } @@ -293,7 +293,7 @@ static QScriptValue qmlsqldatabase_change_version(QScriptContext *context, QScri } else { if (!db.commit()) { db.rollback(); - THROW_SQL(0,QDeclarativeEngine::tr("SQL transaction failed")); + THROW_SQL(UNKNOWN_ERR,QDeclarativeEngine::tr("SQL transaction failed")); } else { ok = true; } |