Logo Search packages:      
Sourcecode: webissues version File versions  Download package

template<class T, typename IT, typename R>
QList<const T*> WebIssues::localeAwareSortRows ( IT  it,
R(T::*)() const   order 
) [inline]

Sort rows of a table using given property.

The values of the property are compared using QString::localeAwareCompare().

it Row iterator of any kind.
order Getter method of the property to use for sorting.
The list of rows ordered by the property value.
See also:

Definition at line 69 of file rowhelpers.h.

Referenced by WebIssues::AddFolderDialog::AddFolderDialog(), WebIssues::AddMemberDialog::AddMemberDialog(), WebIssues::IssueViewSettings::loadAttributes(), WebIssues::IssuesTableModel::toolTip(), and WebIssues::UserValueEditor::UserValueEditor().

    QList<const T*> list;
    while ( it.next() ) {
        const T* row = it.get();
        typename QList<const T*>::iterator jt = list.begin();
        for ( ; jt != list.end(); ++jt ) {
            if ( QString::localeAwareCompare( ( ( *jt )->*order )() , ( row->*order )() ) > 0 )
        list.insert( jt, row );
    return list;

Generated by  Doxygen 1.6.0   Back to index