From 37374e6ef3de320446ec96c719452ebd90945078 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sat, 23 Mar 2019 02:52:13 +1100 Subject: [PATCH] more fixes for migrating to QLibrary --- effects/internal/frei0reffect.cpp | 26 +++----------------------- effects/internal/frei0reffect.h | 1 - effects/internal/vsthost.h | 1 - 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/effects/internal/frei0reffect.cpp b/effects/internal/frei0reffect.cpp index 94d93a611..e5c0516df 100644 --- a/effects/internal/frei0reffect.cpp +++ b/effects/internal/frei0reffect.cpp @@ -50,29 +50,9 @@ Frei0rEffect::Frei0rEffect(Clip* c, const EffectMeta *em) : if (!handle.load()) { - QString dll_error; - -#ifdef _WIN32 - DWORD dll_err = GetLastError(); - dll_error = QString::number(dll_err); -#elif __linux__ - dll_error = dlerror(); -#endif - qCritical() << "Failed to load Frei0r plugin" << dll_fn << "-" << dll_error; - - QString msg_err = tr("Failed to load Frei0r plugin \"%1\": %2").arg(dll_fn, dll_error); - -#ifdef _WIN32 - if (dll_err == 193) { -#ifdef _WIN64 - msg_err += "\n\n" + tr("NOTE: You can't load 32-bit Frei0r plugins into a 64-bit build of Olive. Please find a 64-bit version of this plugin or switch to a 32-bit build of Olive."); -#elif _WIN32 - msg_err += "\n\n" + tr("NOTE: You can't load 64-bit Frei0r plugins into a 32-bit build of Olive. Please find a 32-bit version of this plugin or switch to a 64-bit build of Olive."); -#endif - } -#endif - - QMessageBox::critical(nullptr, tr("Error loading Frei0r plugin"), msg_err); + QString dll_error = handle.errorString(); + QMessageBox::critical(nullptr, tr("Error loading Frei0r plugin"), + tr("Failed to load Frei0r plugin \"%1\": %2").arg(dll_fn, dll_error)); return; } diff --git a/effects/internal/frei0reffect.h b/effects/internal/frei0reffect.h index b309a15cd..2078289b0 100644 --- a/effects/internal/frei0reffect.h +++ b/effects/internal/frei0reffect.h @@ -27,7 +27,6 @@ #include #include "effects/effect.h" -#include "global/crossplatformlib.h" typedef void (*f0rGetParamInfo)(f0r_param_info_t * info, int param_index ); diff --git a/effects/internal/vsthost.h b/effects/internal/vsthost.h index 1d64548ef..216cb8401 100644 --- a/effects/internal/vsthost.h +++ b/effects/internal/vsthost.h @@ -25,7 +25,6 @@ #include #include "effects/effect.h" -#include "global/crossplatformlib.h" #include "include/vestige.h" // Plugin's dispatcher function