context holder & generic

This commit is contained in:
王劲鹏
2021-02-05 18:12:25 +08:00
committed by osborn
parent 41640c1399
commit 24f7bb2498
9 changed files with 51 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
#ifndef DORICNATIVEPLUGIN_H
#define DORICNATIVEPLUGIN_H
#include "../utils/DoricContextHolder.h"
class DoricNativePlugin : public DoricContextHolder {
public:
using DoricContextHolder::DoricContextHolder;
};
#endif // DORICNATIVEPLUGIN_H

View File

@@ -2,8 +2,6 @@
#include <QDebug>
DoricShaderPlugin::DoricShaderPlugin(QObject *parent) : QObject(parent) {}
void DoricShaderPlugin::render(QJSValue jsValue, QString callbackId) {
qDebug() << "";
qDebug() << getContext();
}

View File

@@ -4,10 +4,12 @@
#include <QJSValue>
#include <QObject>
class DoricShaderPlugin : public QObject {
#include "DoricNativePlugin.h"
class DoricShaderPlugin : public DoricNativePlugin {
Q_OBJECT
public:
DoricShaderPlugin(QObject *parent);
using DoricNativePlugin::DoricNativePlugin;
Q_INVOKABLE void render(QJSValue jsValue, QString callbackId);
};