Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003897Doomseeker[All Projects] Cleanuppublic2021-08-08 22:022021-12-14 09:03
ReporterBlzut3 
Assigned ToBlzut3 
PrioritynoneSeverityminorReproducibilityhave not tried
Statusneeds testingResolutionsuspended 
PlatformOSOS Version
Product Version1.3.2 
Target Version1.3.3Fixed in Version 
Summary0003897: QDirModel cannot be used to build with Qt 6 (needs to be replaced with QFileSystemModel)
DescriptionQDirModel is marked obsolete in Qt 5 and removed in Qt 6. QFileSystemModel was introduced in Qt 4.4 as its replacement.
Attached Files

- Relationships
child of 0003895needs testingBlzut3 Add support for Qt 6.2+ 

-  Notes
User avatar (0021719)
Blzut3 (administrator)
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.
User avatar (0021865)
WubTheCaptain (reporter)
2021-12-09 02:53

/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);
      |                                                                   ^~~~~~~~~
User avatar (0021896)
Blzut3 (administrator)
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.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2021-08-08 22:02 Blzut3 New Issue
2021-08-08 22:02 Blzut3 Relationship added child of 0003895
2021-08-09 20:48 Blzut3 Assigned To => Blzut3
2021-08-09 20:48 Blzut3 Status new => assigned
2021-08-10 17:49 Blzut3 Note Added: 0021719
2021-08-11 04:09 WubTheCaptain Status assigned => resolved
2021-08-11 04:09 WubTheCaptain Resolution open => suspended
2021-08-16 18:51 WubTheCaptain Product Version 1.3.3 => 1.3.2
2021-08-16 18:51 WubTheCaptain Summary Replace use of QDirModel with QFileSystemModel => QDirModel cannot be used to build with Qt6 (needs to be replaced with QFileSystemModel)
2021-08-16 19:37 WubTheCaptain Priority normal => none
2021-08-16 19:37 WubTheCaptain Status resolved => assigned
2021-08-16 19:42 WubTheCaptain Summary QDirModel cannot be used to build with Qt6 (needs to be replaced with QFileSystemModel) => QDirModel cannot be used to build with Qt 6 (needs to be replaced with QFileSystemModel)
2021-12-09 02:53 WubTheCaptain Note Added: 0021865
2021-12-14 09:03 Blzut3 Note Added: 0021896
2021-12-14 09:03 Blzut3 Status assigned => needs testing






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker