context holder & generic
This commit is contained in:
11
doric-Qt/doric/plugin/DoricNativePlugin.h
Normal file
11
doric-Qt/doric/plugin/DoricNativePlugin.h
Normal 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
|
@@ -2,8 +2,6 @@
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
DoricShaderPlugin::DoricShaderPlugin(QObject *parent) : QObject(parent) {}
|
||||
|
||||
void DoricShaderPlugin::render(QJSValue jsValue, QString callbackId) {
|
||||
qDebug() << "";
|
||||
qDebug() << getContext();
|
||||
}
|
||||
|
@@ -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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user