Notes |
|
(0021719)
|
Blzut3
|
2021-08-10 17:49
|
|
Made a temporary version of this for Qt 6 effort:'https://bitbucket.org/Doomseeker/doomseeker/commits/849f63742459c141edd9f91521e57062f9dfabe9 [^]'
It seems like despite Qt claiming its a full replacement, the interaction between QCompleter and QFileSystemModel isn't great. Although I haven't done an exhaustive search it seems that other people are having the same issue, for example Kitware is seeing this with CMake's GUI:'https://gitlab.kitware.com/cmake/cmake/-/issues/21609 [^]'
Specifically the issue is that even when set up seemingly correctly, suggestions are only given if you start from the root directory. Modifying what's already there doesn't work.
We can sit on this issue for awhile longer, so may be worth waiting to see how the problem gets solved by others. |
|
|
|
/home/wub/.local/src/doomseeker/doomseeker/src/core/gui/configuration/cfgwadseekergeneral.cpp: In
member function ‘void CFGWadseekerGeneral::activateCompleter()’:
/home/wub/.local/src/doomseeker/doomseeker/src/core/gui/configuration/cfgwadseekergeneral.cpp:88:81:
warning: ‘QDirModel::QDirModel(QObject*)’ is deprecated: Use QFileSystemModel [-Wdeprecated-declarations]
88 | d->cbTargetDirectory->setCompleter(new QCompleter(new QDirModel()));
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDirModel:1,
from /home/wub/.local/src/doomseeker/doomseeker/src/core/gui/configuration/cfgwadseekergeneral.cpp:33:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdirmodel.h:73:67: note: declared here
73 | QT_DEPRECATED_VERSION_X_5_15("Use QFileSystemModel") explicit QDirModel(QObject
*parent = nullptr);
| ^~~~~~~~~
/home/wub/.local/src/doomseeker/doomseeker/src/core/gui/freedoomdialog.cpp: In member function ‘void
FreedoomDialog::setupInstallPaths()’:
/home/wub/.local/src/doomseeker/doomseeker/src/core/gui/freedoomdialog.cpp:241:52: warning: ‘QDirModel::QDirModel(QObject*)’
is deprecated: Use QFileSystemModel [-Wdeprecated-declarations]
241 | completer->setModel(new QDirModel(completer));
| ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QDirModel:1,
from /home/wub/.local/src/doomseeker/doomseeker/src/core/gui/freedoomdialog.cpp:36:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qdirmodel.h:73:67: note: declared here
73 | QT_DEPRECATED_VERSION_X_5_15("Use QFileSystemModel") explicit QDirModel(QObject
*parent = nullptr);
| ^~~~~~~~~ |
|
|
(0021896)
|
Blzut3
|
2021-12-14 09:03
|
|
Poked at this again and although I thought I tried this already, this change seems to resolve most of the problem with QFileSystemModel:'https://bitbucket.org/Doomseeker/doomseeker/commits/60730df5e5b3f670804d1628c3cabd192b13726e [^]'
Due to a known issue with QFileSystemModel in most versions of Qt 5 (and Qt 4), I'm not really comfortable with using the code path on Qt 5 even with the deprecation warning. Perhaps it wouldn't be unreasonable to relax the check to include using QFileSystemModel if you compile against 5.15 which should be fine, but testing should be done on all three operating systems. |
|