Author Topic: Sort order for Qt 4 file open dialog  (Read 6633 times)

ak120

  • Guest
Sort order for Qt 4 file open dialog
« on: February 06, 2018, 03:33:54 pm »
Does somebody know about a hidden switch to display the correct sort order in Qt's File Open that's corresponding to the setting for the PM?


Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1317
  • Karma: +26/-0
    • View Profile
Re: Sort order for Qt 4 file open dialog
« Reply #1 on: February 06, 2018, 05:01:52 pm »
Andreas,

Seems like this maybe related to international character code support (judging by the differences in the sorting)? Not sure where QT port stands on this...

ak120

  • Guest
Re: Sort order for Qt 4 file open dialog
« Reply #2 on: February 06, 2018, 06:07:05 pm »
Andreas,

Seems like this maybe related to international character code support (judging by the differences in the sorting)? Not sure where QT port stands on this...
The same directory shows up in CMD using the builtin DIR command compared to some file managers:
Code: [Select]
CMD         FileCommander/2   
dir         2.20      2.40
-------------------------------
Anders     Anders    Änderung 
AnderW      Änderung  Anders   
PROG        AnderW    AnderW   
PROG.01     PROG      PROG     
PROG.1      PROG.01   PROG.01 
Änderung    PROG.1    PROG.1 
Even old OS/2 1.2 PM applications can sort correctly. Without PM only FC/2 Version 2.20 can be trusted, later versions have a strange behaviour and should for security reasons not be used in critical situations.

But why in Qt "file.1" is ranking higher than "file"? No NLS stuff should be affected.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: Sort order for Qt 4 file open dialog
« Reply #3 on: February 06, 2018, 07:26:01 pm »
The difference may be that sometimes collating order is active and sometimes not. IMO it should. In your CMD example collating is off, but case-sensitivity as well.
« Last Edit: February 06, 2018, 08:01:21 pm by Andreas Schnellbacher »

ak120

  • Guest
Re: Sort order for Qt 4 file open dialog
« Reply #4 on: February 06, 2018, 08:25:59 pm »
The difference may be that sometimes collating order is active and sometimes not. IMO it should.
The environment wasn't changed. Same code page and country settings were used all the time. For the sake of completeness I should add that "dir /on" and "dir /b|sort" work correctly.

It seems that locales are not supported or completely broken in the offered KLIBC environment. There are some files in \usr\share\locale for RPM/YUM installations but in undefined state. LC_COLLATE or any real locale support is missing. The whole structure is a big fake that consists only of copied and pasted GNU message files in wrong encodings.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4788
  • Karma: +99/-1
    • View Profile
Re: Sort order for Qt 4 file open dialog
« Reply #5 on: February 07, 2018, 01:08:10 am »
What about ls -l or dir.exe -1 (one)

ak120

  • Guest
Re: Sort order for Qt 4 file open dialog
« Reply #6 on: February 07, 2018, 09:01:59 am »
What about ls -l or dir.exe -1 (one)

By using usr\libexec\bin\dir.exe -1 or ls supplied with RPM a different order is displayed, but still wrong:
Anders
AnderW
Änderung
PROG
PROG.01
PROG.1