Sqlite: Add equal operator for QString to Utf8String

Change-Id: I60993e2a140445468b6fe98604cb19329dc35b1c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Marco Bubke
2015-08-19 16:18:06 +02:00
parent 8e2bb1048d
commit f2e8abfe67
2 changed files with 7 additions and 0 deletions

View File

@@ -222,6 +222,11 @@ bool operator==(const Utf8String &first, const char *second)
return first.byteArray == second;
}
bool operator==(const Utf8String &first, const QString &second)
{
return first.byteArray == second.toUtf8();
}
bool operator<(const Utf8String &first, const Utf8String &second)
{
if (first.byteSize() == second.byteSize())