Removed const qualifiers to fix Qt build. Different versions of Qt QJSValue don't allow the call method to called from a const object.
This commit is contained in:
parent
fe0496a6cf
commit
b03c9c9c8b
|
@ -206,11 +206,11 @@ QString EmuScriptObject::getDir()
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
static void addressReadCallback(unsigned int address, unsigned int value, void *userData)
|
static void addressReadCallback(unsigned int address, unsigned int value, void *userData)
|
||||||
{
|
{
|
||||||
const MemoryScriptObject* mem = static_cast<const MemoryScriptObject*>(userData);
|
MemoryScriptObject* mem = static_cast<MemoryScriptObject*>(userData);
|
||||||
|
|
||||||
if (mem != nullptr)
|
if (mem != nullptr)
|
||||||
{
|
{
|
||||||
const QJSValue* func = mem->getReadFunc(address);
|
QJSValue* func = mem->getReadFunc(address);
|
||||||
|
|
||||||
if (func != nullptr)
|
if (func != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -223,11 +223,11 @@ static void addressReadCallback(unsigned int address, unsigned int value, void *
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
static void addressWriteCallback(unsigned int address, unsigned int value, void *userData)
|
static void addressWriteCallback(unsigned int address, unsigned int value, void *userData)
|
||||||
{
|
{
|
||||||
const MemoryScriptObject* mem = static_cast<const MemoryScriptObject*>(userData);
|
MemoryScriptObject* mem = static_cast<MemoryScriptObject*>(userData);
|
||||||
|
|
||||||
if (mem != nullptr)
|
if (mem != nullptr)
|
||||||
{
|
{
|
||||||
const QJSValue* func = mem->getWriteFunc(address);
|
QJSValue* func = mem->getWriteFunc(address);
|
||||||
|
|
||||||
if (func != nullptr)
|
if (func != nullptr)
|
||||||
{
|
{
|
||||||
|
@ -240,11 +240,11 @@ static void addressWriteCallback(unsigned int address, unsigned int value, void
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
static void addressExecCallback(unsigned int address, unsigned int value, void *userData)
|
static void addressExecCallback(unsigned int address, unsigned int value, void *userData)
|
||||||
{
|
{
|
||||||
const MemoryScriptObject* mem = static_cast<const MemoryScriptObject*>(userData);
|
MemoryScriptObject* mem = static_cast<MemoryScriptObject*>(userData);
|
||||||
|
|
||||||
if (mem != nullptr)
|
if (mem != nullptr)
|
||||||
{
|
{
|
||||||
const QJSValue* func = mem->getExecFunc(address);
|
QJSValue* func = mem->getExecFunc(address);
|
||||||
|
|
||||||
if (func != nullptr)
|
if (func != nullptr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,9 +80,9 @@ public:
|
||||||
void setDialog(QScriptDialog_t* _dialog){ dialog = _dialog; }
|
void setDialog(QScriptDialog_t* _dialog){ dialog = _dialog; }
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
const QJSValue* getReadFunc(int address) const { return readFunc[address]; }
|
QJSValue* getReadFunc(int address) { return readFunc[address]; }
|
||||||
const QJSValue* getWriteFunc(int address) const { return writeFunc[address]; }
|
QJSValue* getWriteFunc(int address) { return writeFunc[address]; }
|
||||||
const QJSValue* getExecFunc(int address) const { return execFunc[address]; }
|
QJSValue* getExecFunc(int address) { return execFunc[address]; }
|
||||||
private:
|
private:
|
||||||
static constexpr int AddressRange = 0x10000;
|
static constexpr int AddressRange = 0x10000;
|
||||||
QJSEngine* engine = nullptr;
|
QJSEngine* engine = nullptr;
|
||||||
|
|
Loading…
Reference in New Issue