diff --git a/CHANGELOG.md b/CHANGELOG.md index 62a99f59..940ee0f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Version counting is based on semantic versioning (Major.Feature.Patch) * Fixed going forward history navigation. * Continue Reading view that it is shown for the root folder. * UI gets updated when YACReaderLibrary gets updates from YACReader or YACReader for iOS. +* Linux: Add fallback for dynamically loading libqrencode on distros that don't provide unversioned library symlinks ## 9.9.2 diff --git a/YACReaderLibrary/server_config_dialog.cpp b/YACReaderLibrary/server_config_dialog.cpp index 813905bb..d16211eb 100644 --- a/YACReaderLibrary/server_config_dialog.cpp +++ b/YACReaderLibrary/server_config_dialog.cpp @@ -303,6 +303,13 @@ QrEncoder::QrEncoder() QLibrary encoder(QCoreApplication::applicationDirPath() + "/utils/libqrencode.dylib"); #else QLibrary encoder("qrencode"); +#ifdef Q_OS_UNIX + encoder.load(); + // Fallback - this loads libqrencode.4.x.x.so when libqrencode.so is not available + if (!encoder.isLoaded()) { + encoder.setFileNameAndVersion("qrencode", 4); + } +#endif #endif QRcode_encodeString8bit = (_QRcode_encodeString8bit)encoder.resolve("QRcode_encodeString8bit"); QRcode_free = (_QRcode_free)encoder.resolve("QRcode_free");