Moc: prevent potential unnecessary detach
Change Generator::generateSignal() to take by const FunctionDef*, so that it can be called with the return of QList::at(). Change-Id: I5ffb0726a5ded6561e0000a2bea1973ada675152 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
17df4bf528
commit
475d5266e4
@ -627,7 +627,7 @@ void Generator::generateCode()
|
||||
// Generate internal signal functions
|
||||
//
|
||||
for (int signalindex = 0; signalindex < int(cdef->signalList.size()); ++signalindex)
|
||||
generateSignal(&cdef->signalList[signalindex], signalindex);
|
||||
generateSignal(&cdef->signalList.at(signalindex), signalindex);
|
||||
|
||||
//
|
||||
// Generate plugin meta data
|
||||
@ -1408,7 +1408,7 @@ void Generator::generateStaticMetacall()
|
||||
fprintf(out, "}\n");
|
||||
}
|
||||
|
||||
void Generator::generateSignal(FunctionDef *def,int index)
|
||||
void Generator::generateSignal(const FunctionDef *def, int index)
|
||||
{
|
||||
if (def->wasCloned || def->isAbstract)
|
||||
return;
|
||||
|
@ -40,7 +40,7 @@ private:
|
||||
void generateProperties();
|
||||
void generateMetacall();
|
||||
void generateStaticMetacall();
|
||||
void generateSignal(FunctionDef *def, int index);
|
||||
void generateSignal(const FunctionDef *def, int index);
|
||||
void generatePluginMetaData();
|
||||
QMultiMap<QByteArray, int> automaticPropertyMetaTypesHelper();
|
||||
QMap<int, QMultiMap<QByteArray, int>>
|
||||
|
Loading…
Reference in New Issue
Block a user