Use heap allocation for array with unknown size.
With msvc, arrays can only allocated on the stack if the size is known at compile time.
This commit is contained in:
parent
ce69493714
commit
7127770c64
1 changed files with 2 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ static bool emitNormalSignal(QObject* source, int signalIndex, const char* signa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* signalArgs[argsGiven+1];
|
void** signalArgs = new void*[argsGiven+1];
|
||||||
signalArgs[0] = 0;
|
signalArgs[0] = 0;
|
||||||
|
|
||||||
for (int i = 0; i < argsGiven; ++i)
|
for (int i = 0; i < argsGiven; ++i)
|
||||||
|
|
@ -232,6 +232,7 @@ static bool emitNormalSignal(QObject* source, int signalIndex, const char* signa
|
||||||
// FIXME: This will cause troubles with non-direct connections.
|
// FIXME: This will cause troubles with non-direct connections.
|
||||||
for (int i = 0; i < argsGiven; ++i)
|
for (int i = 0; i < argsGiven; ++i)
|
||||||
Shiboken::TypeResolver::get(qPrintable(argTypes[i]))->deleteObject(signalArgs[i+1]);
|
Shiboken::TypeResolver::get(qPrintable(argTypes[i]))->deleteObject(signalArgs[i+1]);
|
||||||
|
delete[] signalArgs;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue