From fcc1d92aaafa872e6478e402becd61f76972f9bb 2010-02-22 09:34:12 From: florianlink Date: 2010-02-22 09:34:12 Subject: [PATCH] added comparison to classes and sorted them git-svn-id: svn://svn.code.sf.net/p/pythonqt/code/trunk@136 ea8d5007-eb21-0410-b261-ccb3ea6e24a9 --- diff --git a/generator/abstractmetalang.h b/generator/abstractmetalang.h index 49c0421..820540c 100644 --- a/generator/abstractmetalang.h +++ b/generator/abstractmetalang.h @@ -831,6 +831,10 @@ public: void setTypeAlias(bool typeAlias) { m_is_type_alias = typeAlias; } bool isTypeAlias() const { return m_is_type_alias; } + bool operator <(const AbstractMetaClass &a) const { + return qualifiedCppName() < a.qualifiedCppName(); + } + private: uint m_namespace : 1; uint m_qobject : 1; diff --git a/generator/generator.cpp b/generator/generator.cpp index ef78394..d170726 100644 --- a/generator/generator.cpp +++ b/generator/generator.cpp @@ -62,6 +62,7 @@ void Generator::generate() return; } + qStableSort(m_classes); foreach (AbstractMetaClass *cls, m_classes) { if (!shouldGenerate(cls))