Bug 507927

Summary: KMyMoney5.2.1 build failure with Qt 6.7.2
Product: [Applications] kmymoney Reporter: Schrijvers Luc <begasus>
Component: buildsystemAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.1   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In: 5.2.2
Sentry Crash Report:

Description Schrijvers Luc 2025-08-06 07:52:54 UTC
SUMMARY

Trying to update our port from 5.2.0 to 5.2.1 failed on our buildmasters with Qt 6.7.2, local build with Qt 6.9.0 works fine.

STEPS TO REPRODUCE
1. Build with Qt 6.7.2

OBSERVED RESULT

Error on:

```
[  7%] Building CXX object kmymoney/misc/CMakeFiles/kmm_selections.dir/selectedobjects.cpp.o
/sources/kmymoney-5.2.1/kmymoney/misc/kmm_codec.cpp: In static member function 'static QByteArray KMM_Codec::encodingForLocale()':
/sources/kmymoney-5.2.1/kmymoney/misc/kmm_codec.cpp:248:52: error: no matching function for call to 'QStringDecoder::QStringDecoder(QString)'
 248 |     QStringDecoder decoder(QLocale::system().name());
     |                                                    ^
In file included from /boot/system/develop/headers/Qt6/QtCore/qstring.h:1581,
                from /boot/system/develop/headers/Qt6/QtCore/qobject.h:11,
                from /boot/system/develop/headers/Qt6/QtWidgets/qwidget.h:9,
                from /boot/system/develop/headers/Qt6/QtWidgets/qcombobox.h:8,
                from /boot/system/develop/headers/Qt6/QtWidgets/QComboBox:1,
                from /sources/kmymoney-5.2.1/kmymoney/misc/kmm_codec.cpp:11:
/boot/system/develop/headers/Qt6/QtCore/qstringconverter.h:95:14: note: candidate: 'QStringDecoder::QStringDecoder(const char*, QStringConverterBase::Flags)'
  95 |     explicit QStringDecoder(const char *name, Flags f = Flag::Default)
     |              ^~~~~~~~~~~~~~
```

EXPECTED RESULT

Build completes without errors

SOFTWARE/OS VERSIONS
Haiku: 32bit/64bit R1B5
KDE Frameworks Version: 6.16.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Log output from our buildmaster (64bit in this case, output is the same for 32bit).

https://build.haiku-os.org/buildmaster/master/x86_64/logviewer.html?buildruns/12869/builds/85615.log
Comment 1 Thomas Baumgart 2025-08-06 18:11:51 UTC
Git commit aac6f62208c3bc856c70971ca98d44558e7d6e93 by Thomas Baumgart.
Committed on 06/08/2025 at 17:13.
Pushed by tbaumgart into branch 'master'.

Support Qt < 6.8

QStringDecoder and QStringEncoder only support char* as argument in
older Qt versions.
FIXED-IN: 5.2.2

M  +2    -2    kmymoney/misc/kmm_codec.cpp
M  +1    -1    kmymoney/plugins/csv/import/core/csvimportercore.cpp
M  +1    -1    kmymoney/plugins/ofx/import/dialogs/kofxdirectconnectdlg.cpp
M  +1    -1    kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp
M  +1    -1    kmymoney/plugins/ofx/import/dialogs/mymoneyofxconnector.cpp

https://invent.kde.org/office/kmymoney/-/commit/aac6f62208c3bc856c70971ca98d44558e7d6e93
Comment 2 Schrijvers Luc 2025-08-06 18:26:55 UTC
Thanks! Confirmed working. +1
Comment 3 Thomas Baumgart 2025-08-06 18:32:54 UTC
Git commit c9bd024383a6e43b70af3fe39c311e932a10dc72 by Thomas Baumgart.
Committed on 06/08/2025 at 18:12.
Pushed by tbaumgart into branch '5.2'.

Support Qt < 6.8

QStringDecoder and QStringEncoder only support char* as argument in
older Qt versions.
FIXED-IN: 5.2.2
(cherry picked from commit aac6f62208c3bc856c70971ca98d44558e7d6e93)

M  +2    -2    kmymoney/misc/kmm_codec.cpp
M  +1    -1    kmymoney/plugins/csv/import/core/csvimportercore.cpp
M  +1    -1    kmymoney/plugins/ofx/import/dialogs/kofxdirectconnectdlg.cpp
M  +1    -1    kmymoney/plugins/ofx/import/dialogs/konlinebankingsetupwizard.cpp
M  +1    -1    kmymoney/plugins/ofx/import/dialogs/mymoneyofxconnector.cpp

https://invent.kde.org/office/kmymoney/-/commit/c9bd024383a6e43b70af3fe39c311e932a10dc72