Right now, even in CHM files which carry a TOC, Okular will order the pages alphabetically by file name (or actually, chmlib's chm_enumerate() does). With many CHM files, this produces a page order that is not useful for reading. Instead, it should make use of the TOC data for page ordering if available. Any pages linked from the TOC should be put in the page list first, in the order they appear in the TOC. Then all remaining pages (as there may be pages that are not linked from the TOC but should still be reachable via the page list) can be added at the end, in alphabetical order. (This is which kchmviewer seems to be doing as well.)
All pages in a CHM File are now ordered accordingly to TOC Data. If a page is not in TOC, it will be added at the end. Reviewed at https://git.reviewboard.kde.org/r/130078/