Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.8.0
-
None
-
macOS 10.12.3 (16D32), Qt 5.8.0 precompiled binary
Description
QFileSystemWatcher on macOS behave strange with unicode path names
QString compare problem.
https://bugreports.qt.io/browse/QTBUG-59778
Or this: QFileSystemWatcher can't watch unicode paths ( closed )
https://bugreports.qt.io/browse/QTBUG-55896
Assume this: I have folder on my disk: "/Users/fbucek/ř" - it exists all programs can work with it. My program can work with it, everything works as expected except QFileSystemWatcher and QString.
1) I cannot watch path using QFileSystemWatcher when I use addPath("/User/fbucek/ř)
- It will be added but signals wont be called.
2) I can watch path using QFileSystemWatcher when the path name came from internal macOS functions.
QString name = QString::fromLocal8Bit(attrs.name + attrs.name_info.attr_dataoffset); // It is correct name and it works even for chinese of thai letters / there is no problem I guess
- signals will be called
- but return string will be different ( will look same, but wont be )
void directoryChanged(const QString &path, QPrivateSignal);
- So added path will be "/Users/fbucek/ř",
- Returned path will be "/Users/fbucek/ř",
- But when I use QString compare it wont be the same.
How it is possible that QString looks the same, but it is different.
How it is possible that QFileSystem watcher can store both version, but emiting only when added version is from macOS internal functions.
When use path hardcoded, or from QDir::fileInfoList it does not work correctly. Path wont be emited.