From 177c0973883adeea306570649eb3ec33f0c55074 2010-03-11 08:51:47 From: florianlink Date: 2010-03-11 08:51:47 Subject: [PATCH] improved function sorting removed QByteArray string != op git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@164 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/generator/shellgenerator.cpp b/generator/shellgenerator.cpp index c23b280..a6948d8 100644 --- a/generator/shellgenerator.cpp +++ b/generator/shellgenerator.cpp @@ -252,6 +252,8 @@ void ShellGenerator::writeFunctionSignature(QTextStream &s, s << " const"; } +bool function_sorter(AbstractMetaFunction *a, AbstractMetaFunction *b); + AbstractMetaFunctionList ShellGenerator::getFunctionsToWrap(const AbstractMetaClass* meta_class) { AbstractMetaFunctionList functions = meta_class->queryFunctions( @@ -274,7 +276,7 @@ AbstractMetaFunctionList ShellGenerator::getFunctionsToWrap(const AbstractMetaCl resultFunctions << func; } } - qStableSort(resultFunctions); + qSort(resultFunctions.begin(), resultFunctions.end(), function_sorter); return resultFunctions; } @@ -284,7 +286,7 @@ AbstractMetaFunctionList ShellGenerator::getVirtualFunctionsForShell(const Abstr AbstractMetaClass::VirtualFunctions | AbstractMetaClass::WasVisible // | AbstractMetaClass::NotRemovedFromTargetLang ); - qStableSort(functions); + qSort(functions.begin(), functions.end(), function_sorter); return functions; } @@ -297,7 +299,7 @@ AbstractMetaFunctionList ShellGenerator::getProtectedFunctionsThatNeedPromotion( functions << func; } } - qStableSort(functions); + qSort(functions.begin(), functions.end(), function_sorter); return functions; } diff --git a/generator/typesystem_core-common.xml b/generator/typesystem_core-common.xml index 150ec99..25652b8 100644 --- a/generator/typesystem_core-common.xml +++ b/generator/typesystem_core-common.xml @@ -894,6 +894,7 @@ + diff --git a/generator/typesystem_core.xml b/generator/typesystem_core.xml index 76a1852..33ed74e 100644 --- a/generator/typesystem_core.xml +++ b/generator/typesystem_core.xml @@ -1134,6 +1134,7 @@ +