summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-25 10:11:49 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-08-25 12:48:52 +0200
commit04d0a9626ce61b2e05a40f9562c2bcf12e234639 (patch)
treef1643f829aedc9ac51fcc260f7df2639dfe08360 /src/sql
parent17f3451daa286b88a52f18c802d7b158dfb653b2 (diff)
parentbdc417b3828737334723eae23097c85f70c23a33 (diff)
Merge branch 'master' into refactor
Conflicts: src/gui/kernel/qapplication_qpa.cpp src/gui/kernel/qcursor_qpa.cpp src/gui/kernel/qwindowsysteminterface_qpa.cpp src/gui/kernel/qwindowsysteminterface_qpa.h src/gui/kernel/qwindowsysteminterface_qpa_p.h src/gui/text/qtextcontrol.cpp src/plugins/platforms/wayland/wayland.pro src/widgets/accessible/qaccessible2.h src/widgets/widgets/qwidgetlinecontrol_p.h Change-Id: I5e6f4eb184159dccc67e8f13673edb884d179c74
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/kernel/qsqlerror.cpp20
-rw-r--r--src/sql/kernel/qsqlerror.h2
2 files changed, 22 insertions, 0 deletions
diff --git a/src/sql/kernel/qsqlerror.cpp b/src/sql/kernel/qsqlerror.cpp
index a8ffdffa8a..fd731e4974 100644
--- a/src/sql/kernel/qsqlerror.cpp
+++ b/src/sql/kernel/qsqlerror.cpp
@@ -124,6 +124,26 @@ QSqlError& QSqlError::operator=(const QSqlError& other)
}
/*!
+ Compare the \a other error's values to this error and returns true, if it equal.
+*/
+
+bool QSqlError::operator==(const QSqlError& other)
+{
+ return (errorType == other.errorType);
+}
+
+
+/*!
+ Compare the \a other error's values to this error and returns true if it is not equal.
+*/
+
+bool QSqlError::operator!=(const QSqlError& other)
+{
+ return (errorType != other.errorType);
+}
+
+
+/*!
Destroys the object and frees any allocated resources.
*/
diff --git a/src/sql/kernel/qsqlerror.h b/src/sql/kernel/qsqlerror.h
index fea3ca8526..c1df370a86 100644
--- a/src/sql/kernel/qsqlerror.h
+++ b/src/sql/kernel/qsqlerror.h
@@ -66,6 +66,8 @@ public:
int number = -1);
QSqlError(const QSqlError& other);
QSqlError& operator=(const QSqlError& other);
+ bool operator==(const QSqlError& other);
+ bool operator!=(const QSqlError& other);
~QSqlError();
QString driverText() const;