forked from qt-creator/qt-creator
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: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -227,6 +227,11 @@ bool operator==(const Utf8String &first, const char *second)
|
|||||||
return first.byteArray == second;
|
return first.byteArray == second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator==(const char *first, const Utf8String &second)
|
||||||
|
{
|
||||||
|
return second == first;
|
||||||
|
}
|
||||||
|
|
||||||
bool operator==(const Utf8String &first, const QString &second)
|
bool operator==(const Utf8String &first, const QString &second)
|
||||||
{
|
{
|
||||||
return first.byteArray == second.toUtf8();
|
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 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 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 QString &second);
|
||||||
friend SQLITE_EXPORT bool operator<(const Utf8String &first, const Utf8String &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 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 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 QString &second);
|
||||||
SQLITE_EXPORT bool operator<(const Utf8String &first, const Utf8String &second);
|
SQLITE_EXPORT bool operator<(const Utf8String &first, const Utf8String &second);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user