#ifndef COMPATIBILITY_H #define COMPATIBILITY_H #include "coreSQLiteStudio_global.h" #include #include #include template inline QSet toSet(const QList& list) { #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) return QSet(list.begin(), list.end()); #else return list.toSet(); #endif } template inline void unite(QHash& h1, const QHash& h2) { #if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) h1.insert(h2); #else h1.unite(h2); #endif } template void sSort(T& collection) { std::sort(collection.begin(), collection.end()); } template void sSort(T& collection, C cmp) { std::sort(collection.begin(), collection.end(), cmp); } API_EXPORT void strSort(QStringList& collection, Qt::CaseSensitivity cs); #endif // COMPATIBILITY_H