Skip to content

Qt 6 upgrade #7774

Open
Refactoring
@c4rlo

Description

@c4rlo

Summary

Qt 6 was released in Dec 2020. We should ultimately port KeePassXC to it from Qt 5. I'd be happy to help out with this.

Details

Before completely switching to Qt 6, we should introduce an opt-in build mode for it.

The Porting to Qt 6 guide notes:

Before upgrading to Qt 6, make sure that your Qt 5 application is updated to Qt 5.15. The latest Qt 5 version has the least amount of changes when porting to Qt 6.

Currently, when building KeePassXC with -DWITH_DEV_BUILD=ON, there are a lot of warnings about usage of deprecated Qt features. For example:

src/cli/keepassxc-cli.cpp:236:71: warning: ‘QTextStream& QTextStreamFunctions::endl(QTextStream&)’ is deprecated: Use Qt::endl [-Wdeprecated-declarations]
  236 |         err << QObject::tr("Invalid command %1.").arg(commandName) << endl;
      |                                                                       ^~~~

However, Qt::endl is only available from Qt 5.14.

INSTALL.md currently lists "Qt 5 (>= 5.9.5)" as a requirement.

Question: Should we increase our minimum Qt 5 version requirement, to make porting to Qt 6 easier? Or would the maintainers prefer to keep the current minimum requirement? If the latter, then adding Qt 6 support would involve a few more #if QT_VERSION >= ... checks.

Metadata

Metadata

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions