Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.12.2
-
None
-
macOS 10.13.6
-
-
2b566231a6e35ee1646754cee09b30fc99240a80 (qt/qtdeclarative/5.14)
Description
FolderListModel (version 2.12, REVISION 12) works for me in all respects except that its caseSensitive property is always set to true and can't be turned off. I don't see any coding error in folderlistmodel/qquickfolderlistmodel.{h,cpp} that would explain this problem. The impact is that calls to its indexOf method can return -1 instead of the expected index of a case-insensitive file-URL match.
import Qt.labs.folderlistmodel 2.12;
FolderListModel {
id: testModel;
// This property doesn't seem to work as documented.
caseSensitive: false;
folder: "file:///path/to/folder";
Component.onCompleted: {
// Set a breakpoint here to watch the value *not* change.
caseSensitive = false;
caseSensitive = false;
console.log(caseSensitive); // logs "true"
{
{ }{{}