Try to fix plugin issue

This commit is contained in:
2026-01-05 21:31:35 +08:00
parent 8ed5660faf
commit e37972b227
13 changed files with 858 additions and 31 deletions
+14 -3
View File
@@ -32,6 +32,7 @@
#include <cstdio>
#include <QMessageBox>
#include <QCoreApplication>
#include <QApplication>
#include <qmessagebox.h>
#include <qobject.h>
#include <QtGlobal>
@@ -254,9 +255,6 @@ OFX::Host::Param::Instance *
OlivePluginInstance::newParam(const std::string &name,
OFX::Host::Param::Descriptor &desc)
{
if (!node_) {
return nullptr;
}
const std::string &type = desc.getType();
if (type == kOfxParamTypeInteger) {
@@ -372,6 +370,11 @@ void OlivePluginInstance::progressStart(const std::string &message,
progress_cancelled_ = false;
progress_active_ = true;
auto *app = qobject_cast<QApplication *>(QCoreApplication::instance());
if (!app) {
return;
}
if (progress_dialog_) {
progress_dialog_->close();
progress_dialog_->deleteLater();
@@ -482,5 +485,13 @@ OFX::Host::ImageEffect::ClipInstance *OlivePluginInstance::newClipInstance(
return clipInstance;
}
OlivePluginInstance::~OlivePluginInstance()
{
if (!QCoreApplication::instance() ||
qEnvironmentVariableIsSet("OAK_OFX_ITEST")) {
_created = false;
}
}
}
}