>> Do we need a new class that we use internally. In this class we store
>> a filename, which is case-sensitive on case-sensitive filesystem, that >> is guaranteed to be a long filename and not a short one (on Windows), >> that is not a symlink, that is relative or absolute (pick one or both). >> >> >This could work, though it looks as if we're duplicating what QFileInfo >does, and we might run into similar problems about caching to what we >had before. I don't know---but I think this makes some sense out of why >they want to return false if the files don't exist. The problem, as I see >it, is that QFileInfo objects are getting created so often, which requires >filesystem access, even independently of the caching stuff. And I'm not >sure how that can be avoided. Why is the class called FileName by the way ? This really sounds like a class that governs the FileNAME and all related things. And QFileInfo really sounds like things that have to do with the physical file. Anyway, I want to have a class which can freely be instantiated and another class with the warning that it can have performance issues because it's related to files on the disk. We might duplicate things, but with our own simple FileName class we are _sure_ that we don't access the disk. By the way, to convert filenames and stuff we still can use QFileInfo to be cross-platform. We just use it once, and when the filename is in our own class, we are sure that it has the correct format. That was the idea. >Anyway, here's another idea. Why are we calling loadIfNeeded() every time? True, that should be fixed too. >But it bothers me that we're checking whether every needed file is loaded >every time we type a key. Me too. >And, while we're at it, maybe a similar solution could work for updateMacros(). Yes, you might remember I was complaining about the infinite number of calls to updateMacros a while ago. If you think about it, why would we want to call the updateMacros function of a child document. Like that could have changed by pressing a character in the master document ?!? I hope other devs also have an opinion on this, but I guess we should fix it all of the above. >Richard Vincent
