Consolidate input completion code in preparation for advanced completion strategies (#4639)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Daniel Sage
2023-09-24 08:17:17 -04:00
committed by GitHub
parent 06eb30a50a
commit 37009e8e6b
39 changed files with 1358 additions and 621 deletions
+13
View File
@@ -271,4 +271,17 @@ int64_t parseDurationToSeconds(const QString &inputString,
return (int64_t)currentValue;
}
bool compareEmoteStrings(const QString &a, const QString &b)
{
// try comparing insensitively, if they are the same then sensitively
// (fixes order of LuL and LUL)
int k = QString::compare(a, b, Qt::CaseInsensitive);
if (k == 0)
{
return a > b;
}
return k < 0;
}
} // namespace chatterino