diff --git a/src/main.cpp b/src/main.cpp index c29eb564d20..711c8169f6a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -65,6 +65,12 @@ int main(int argc, char * argv[]) { #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) && QT_VERSION < QT_VERSION_CHECK(5, 15, 1) qputenv("QV4_FORCE_INTERPRETER", QByteArrayLiteral("1")); #endif +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + // Follow whatever factor the user has selected in the system settings + // By default the value is always rounded to the nearest int. + QGuiApplication::setHighDpiScaleFactorRoundingPolicy( + Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); +#endif // Setting the organization name results in a QDesktopStorage::DataLocation // of "$HOME/Library/Application Support/Mixxx/Mixxx" on OS X. Leave the diff --git a/src/util/db/dbconnection.cpp b/src/util/db/dbconnection.cpp index 03a19c810ed..d7322730073 100644 --- a/src/util/db/dbconnection.cpp +++ b/src/util/db/dbconnection.cpp @@ -195,9 +195,9 @@ const char kLexicographicalCollationFunc[] = "mixxxLexicographicalCollationFunc" // The SQL statement 'A LIKE B' is implemented as 'like(B, A)', and if there is // an escape character, say E, it is implemented as 'like(B, A, E)' //static -void sqliteLike(sqlite3_context *context, - int aArgc, - sqlite3_value **aArgv) { +void sqliteLikeUtf8(sqlite3_context* context, + int aArgc, + sqlite3_value** aArgv) { VERIFY_OR_DEBUG_ASSERT(aArgc == 2 || aArgc == 3) { return; } @@ -277,13 +277,14 @@ bool initDatabase(const QSqlDatabase& database, mixxx::StringCollator* pCollator } result = sqlite3_create_function( - handle, - "like", - 2, - SQLITE_ANY, - nullptr, - sqliteLike, - nullptr, nullptr); + handle, + "like", + 2, + SQLITE_UTF8 | SQLITE_DETERMINISTIC, + nullptr, + sqliteLikeUtf8, + nullptr, + nullptr); VERIFY_OR_DEBUG_ASSERT(result == SQLITE_OK) { kLogger.warning() << "Failed to install custom 2-arg LIKE function for SQLite3:" @@ -291,13 +292,14 @@ bool initDatabase(const QSqlDatabase& database, mixxx::StringCollator* pCollator } result = sqlite3_create_function( - handle, - "like", - 3, - SQLITE_UTF8, // No conversion, Data is stored as UTF8 - nullptr, - sqliteLike, - nullptr, nullptr); + handle, + "like", + 3, // 3rd arg = ESCAPE + SQLITE_UTF8 | SQLITE_DETERMINISTIC, + nullptr, + sqliteLikeUtf8, + nullptr, + nullptr); VERIFY_OR_DEBUG_ASSERT(result == SQLITE_OK) { kLogger.warning() << "Failed to install custom 3-arg LIKE function for SQLite3:"