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)
|
||||
{
|
||||
const MemoryScriptObject* mem = static_cast<const MemoryScriptObject*>(userData);
|
||||
MemoryScriptObject* mem = static_cast<MemoryScriptObject*>(userData);
|
||||
|
||||
if (mem != nullptr)
|
||||
{
|
||||
const QJSValue* func = mem->getReadFunc(address);
|
||||
QJSValue* func = mem->getReadFunc(address);
|
||||
|
||||
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)
|
||||
{
|
||||
const MemoryScriptObject* mem = static_cast<const MemoryScriptObject*>(userData);
|
||||
MemoryScriptObject* mem = static_cast<MemoryScriptObject*>(userData);
|
||||
|
||||
if (mem != nullptr)
|
||||
{
|
||||
const QJSValue* func = mem->getWriteFunc(address);
|
||||
QJSValue* func = mem->getWriteFunc(address);
|
||||
|
||||
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)
|
||||
{
|
||||
const MemoryScriptObject* mem = static_cast<const MemoryScriptObject*>(userData);
|
||||
MemoryScriptObject* mem = static_cast<MemoryScriptObject*>(userData);
|
||||
|
||||
if (mem != nullptr)
|
||||
{
|
||||
const QJSValue* func = mem->getExecFunc(address);
|
||||
QJSValue* func = mem->getExecFunc(address);
|
||||
|
||||
if (func != nullptr)
|
||||
{
|
||||
|
|
|
@ -80,9 +80,9 @@ public:
|
|||
void setDialog(QScriptDialog_t* _dialog){ dialog = _dialog; }
|
||||
void reset();
|
||||
|
||||
const QJSValue* getReadFunc(int address) const { return readFunc[address]; }
|
||||
const QJSValue* getWriteFunc(int address) const { return writeFunc[address]; }
|
||||
const QJSValue* getExecFunc(int address) const { return execFunc[address]; }
|
||||
QJSValue* getReadFunc(int address) { return readFunc[address]; }
|
||||
QJSValue* getWriteFunc(int address) { return writeFunc[address]; }
|
||||
QJSValue* getExecFunc(int address) { return execFunc[address]; }
|
||||
private:
|
||||
static constexpr int AddressRange = 0x10000;
|
||||
QJSEngine* engine = nullptr;
|
||||
|
|
Loading…
Reference in New Issue