diff options
author | Martin Smith <msmith@trolltech.com> | 2009-07-08 12:54:59 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2009-07-08 12:56:34 (GMT) |
commit | d85d31c50620a215647ab2c3d27636006c04a01d (patch) | |
tree | 6dae79a4e5a9d72fec7b0fc9855d9184b64b5ead /tools/qdoc3/separator.cpp | |
parent | 0f34ed602bcb00b19b0e550d790ae6521de37aa6 (diff) | |
download | Qt-d85d31c50620a215647ab2c3d27636006c04a01d.zip Qt-d85d31c50620a215647ab2c3d27636006c04a01d.tar.gz Qt-d85d31c50620a215647ab2c3d27636006c04a01d.tar.bz2 |
doc: Output a clearer "All functions in this class are..." statement.
Task-number: 189232
Diffstat (limited to 'tools/qdoc3/separator.cpp')
-rw-r--r-- | tools/qdoc3/separator.cpp | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/tools/qdoc3/separator.cpp b/tools/qdoc3/separator.cpp index 8f27f90..60674be 100644 --- a/tools/qdoc3/separator.cpp +++ b/tools/qdoc3/separator.cpp @@ -48,22 +48,30 @@ QT_BEGIN_NAMESPACE -QString separator( int index, int count ) +QString separator(int index, int count) { - if ( index == count - 1 ) - return tr( ".", "terminator" ); + if (index == count - 1) + return tr(".", "terminator"); + if (count == 2) + return tr(" and ", "separator when N = 2"); + if (index == 0) + return tr(", ", "first separator when N > 2"); + if (index < count - 2) + return tr(", ", "general separator when N > 2"); + return tr(", and ", "last separator when N > 2"); +} - if ( count == 2 ) { - return tr( " and ", "separator when N = 2" ); - } else { - if ( index == 0 ) { - return tr( ", ", "first separator when N > 2" ); - } else if ( index < count - 2 ) { - return tr( ", ", "general separator when N > 2" ); - } else { - return tr( ", and ", "last separator when N > 2" ); - } - } +QString comma(int index, int count) +{ + if (index == count - 1) + return QString(""); + if (count == 2) + return tr(" and ", "separator when N = 2"); + if (index == 0) + return tr(", ", "first separator when N > 2"); + if (index < count - 2) + return tr(", ", "general separator when N > 2"); + return tr(", and ", "last separator when N > 2"); } QT_END_NAMESPACE |