Commit d1425773 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Sqlite: Add additional Utf8String::operator==.



There was operator==(const Utf8String &, const char *), but not the
counterpart with the argument types switched.

Change-Id: Ie9ef5c21da0c39881ecad7ea080b87eefe6c4d02
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent f1139b1d
......@@ -227,6 +227,11 @@ bool operator==(const Utf8String &first, const char *second)
return first.byteArray == second;
}
bool operator==(const char *first, const Utf8String &second)
{
return second == first;
}
bool operator==(const Utf8String &first, const QString &second)
{
return first.byteArray == second.toUtf8();
......
......@@ -45,6 +45,7 @@ class SQLITE_EXPORT Utf8String
friend SQLITE_EXPORT bool operator!=(const Utf8String &first, const Utf8String &second);
friend SQLITE_EXPORT bool operator==(const Utf8String &first, const Utf8String &second);
friend SQLITE_EXPORT bool operator==(const Utf8String &first, const char *second);
friend SQLITE_EXPORT bool operator==(const char *first, const Utf8String &second);
friend SQLITE_EXPORT bool operator==(const Utf8String &first, const QString &second);
friend SQLITE_EXPORT bool operator<(const Utf8String &first, const Utf8String &second);
......@@ -111,6 +112,7 @@ SQLITE_EXPORT const Utf8String operator+(const Utf8String &first, const Utf8Stri
SQLITE_EXPORT bool operator!=(const Utf8String &first, const Utf8String &second);
SQLITE_EXPORT bool operator==(const Utf8String &first, const Utf8String &second);
SQLITE_EXPORT bool operator==(const Utf8String &first, const char *second);
SQLITE_EXPORT bool operator==(const char *first, const Utf8String &second);
SQLITE_EXPORT bool operator==(const Utf8String &first, const QString &second);
SQLITE_EXPORT bool operator<(const Utf8String &first, const Utf8String &second);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment