[Uml-devel] branches/KDE/4.9/kdesdk/umbrello/umbrello/dialogs

Ralf Habacker ralf.habacker at gmail.com
Tue Jul 10 20:38:35 UTC 2012


SVN commit 1305125 by habacker:

Merged 1305113 from trunk.

Sort operation list in sequence diagrams.

 M  +6 -0      selectopdlg.cpp  


--- branches/KDE/4.9/kdesdk/umbrello/umbrello/dialogs/selectopdlg.cpp #1305124:1305125
@@ -31,6 +31,11 @@
 #include <QtGui/QRadioButton>
 #include <QtGui/QGroupBox>
 
+bool caseInsensitiveLessThan(const UMLOperation *s1, const UMLOperation *s2)
+{
+    return s1->name().toLower() < s2->name().toLower();
+}
+
 SelectOpDlg::SelectOpDlg(QWidget * parent, UMLClassifier * c)
    : KDialog(parent)
 {
@@ -73,6 +78,7 @@
     mainLayout->addWidget(m_pOpLE, 2, 1);
 
     UMLOperationList list = c->getOpList(true);
+    qSort(list.begin(), list.end(), caseInsensitiveLessThan);
     foreach (UMLOperation* obj, list ) {
         insertOperation( obj->toString(Uml::SignatureType::SigNoVis), list.count() );
     }




More information about the umbrello-devel mailing list