diff options
| author | lambdcalculus <lambdcalcullus@gmail.com> | 2024-06-24 16:15:21 -0300 |
|---|---|---|
| committer | lambdcalculus <lambdcalcullus@gmail.com> | 2024-06-24 17:22:27 -0300 |
| commit | 25ef804ae71159c900a7372ac39f6adf6e86c4b4 (patch) | |
| tree | e584bad84264d1dc31fc62b8b15185ddc8a5ab23 /src/main.cpp | |
| parent | 8004477d0ca0f1955bd08871347427617e0f5193 (diff) | |
remove unnecessary plugin loaders
imageformats plugins are loaded automatically, we just need to check if
they were actually loaded
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.cpp b/src/main.cpp index 955b1fff..bad49ad1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -8,8 +8,8 @@ #include <QDebug> #include <QDirIterator> +#include <QImageReader> #include <QLibraryInfo> -#include <QPluginLoader> #include <QResource> #include <QTranslator> @@ -28,7 +28,6 @@ int main(int argc, char *argv[]) } #endif - AOApplication::addLibraryPath(AOApplication::applicationDirPath() + "/lib"); QResource::registerResource(main_app.get_asset("themes/" + Options::getInstance().theme() + ".rcc")); QFont main_font = main_app.font(); @@ -46,16 +45,14 @@ int main(int argc, char *argv[]) fontDatabase.addApplicationFont(it.next()); } - QPluginLoader apngPlugin("qapng"); - if (!apngPlugin.load()) + if (!QImageReader::supportedImageFormats().contains("apng")) { - qCritical() << "QApng plugin could not be loaded"; + qCritical() << "QApng plugin could not be loaded. Errors may occur when loading .apng files."; } - QPluginLoader webpPlugin("qwebp"); - if (!webpPlugin.load()) + if (!QImageReader::supportedImageFormats().contains("webp")) { - qCritical() << "QWebp plugin could not be loaded"; + qCritical() << "QWebP plugin could not be loaded. Errors may occur when loading .webp files."; } QString p_language = Options::getInstance().language(); |
