Custom Query (27 matches)
Results (16 - 18 of 27)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#31 | fixed | qfile_pm.cpp: isValidFile() doesn't work correctly for filenames with national characters | ||
Description |
Мелочь, поэтому напишу по русски :) . bool isValidFile( const QString& fileName ) использует strchr() для проверки символа в имени файла на if ( strchr( badChars, fileName[i] ) ) Перед этим для приведения fileName[i] к char неявно вызывается метод latin1(), который для символов в уникоде (>0xFF) возвращает 0. Но согласно спецификации strchr() 0 это допустимы символ для поиска и более того конец строки '\0' также включается в поиск. В результате имеем FALSE для всех имён с национальными символами. Вот исправление: for ( int i = 0; i < (int) fileName.length(); i++) { if ( fileName[i] < QChar( 32 ) ) return FALSE; '''if( (char)fileName[i] == 0 ) continue;''' if ( strchr( badChars, fileName[i] ) ) return FALSE; } Или можно заменить strchr() strnchr() |
|||
#32 | fixed | QDir::rootDirPath() causes an access violation | ||
Description |
Finally I found the bug, which cause QT application trap on my notebook, when using file dialog. It is strange that this mistake doesn't cause trap on desktop PC ;) Here is the fixed version of QDir::rootDirPath() function: QString QDir::rootDirPath() { ULONG bootDrive[1] = {0}; DosQuerySysInfo( QSV_BOOT_DRIVE, QSV_BOOT_DRIVE, (PVOID)bootDrive, sizeof(bootDrive) ); QString d = QChar( (char)(bootDrive[0] + 'A' - 1) ); d += ":/"; return d; } |
|||
#33 | fixed | Add the OS/2 system exception handler to the Qt library | ||
Description |
We want more information about system exceptions happening in the Qt library and in applications built on top of it: the standard OS/2 popup log mechanism, as well as the kLIBC 0.6 exception handler provide not enough details (for example they don't walk the stack frames). In addition, the latter prints the exception info to stderr only, which makes little sense for release versions of PM applications. |