Session 025: Update MIGRATION_STATUS.md with QTextCodec fixes
Document Session 025 changes: - QTextCodec include path fixes (QtCore → QtGui) - Qt6::Gui dependency added for qsql_informix - Qt::codecForHtml → QTextCodec::codecForHtml migration Co-authored-by: Copilot <2235566219+Copilot@users.noreply.github.com> Entire-Checkpoint: 01M0WXBCWW3ZRK04T710CVB0JM
This commit is contained in:
1 parent
cf7dc7ad10
commit
18c350333a
2 files changed
+46
-1
No files matched your search
@@ -1,5 +1,50 @@
|
||||
# Qt5/C++11 → Qt6/C++17 Migration Status
|
||||
|
||||
## Session 025: QTextCodec Migration Fixes (2026-08-24)
|
||||
|
||||
### ✅ QTextCodec Qt6 Compatibility Fixes
|
||||
|
||||
Fixed QTextCodec-related migration issues in Z and Lts/Tools modules:
|
||||
|
||||
**Files Updated:**
|
||||
1. **Z/src/qsql_informix/qsql_informix.cpp**
|
||||
- Line 24: Fixed include path `#include <QtCore/QTextCodec>` → `#include <QtGui/QTextCodec>`
|
||||
- QTextCodec moved from QtCore to QtGui module in Qt6
|
||||
|
||||
2. **Z/src/qsql_informix/CMakeLists.txt**
|
||||
- Added `Qt6::Gui` dependency to TARGET_LINK_LIBRARIES
|
||||
- Required for QTextCodec functionality in Qt6
|
||||
|
||||
3. **Lts/Tools/TextEditorTest/textedit.cpp**
|
||||
- Line 370: Fixed `Qt::codecForHtml(data)` → `QTextCodec::codecForHtml(data)`
|
||||
- In Qt6, codecForHtml is a static method on QTextCodec class, not Qt namespace function
|
||||
|
||||
**Technical Details:**
|
||||
- QTextCodec relocation: QtCore (Qt5) → QtGui (Qt6)
|
||||
- API change: `Qt::codecForHtml()` → `QTextCodec::codecForHtml()` (static method)
|
||||
- Both changes are minimal, required for Qt6 compatibility
|
||||
- No behavioral changes, semantics preserved
|
||||
|
||||
**Verification:**
|
||||
```bash
|
||||
$ grep -r "Qt::codecForHtml" qt6-after/qt6-migrated-legatus/ --include="*.cpp"
|
||||
# Zero results - all instances migrated
|
||||
|
||||
$ grep -r "QTextCodec" qt6-after/qt6-migrated-legatus/ --include="*.cpp" | grep -v "//"
|
||||
# 2 files with valid QTextCodec usage (qsql_informix.cpp, textedit.cpp)
|
||||
```
|
||||
|
||||
**Remaining QTextCodec Usage:**
|
||||
- `Z/src/qsql_informix/qsql_informix.cpp`: Database locale encoding (QTextCodec::codecForName)
|
||||
- `Lts/Tools/TextEditorTest/textedit.cpp`: HTML encoding detection (QTextCodec::codecForHtml)
|
||||
- Both are Qt6-compatible with QtGui module linkage
|
||||
|
||||
**Commits:**
|
||||
- Submodule: `c143ff8a4` (Session 025: Fix QTextCodec migration issues)
|
||||
- Main repo: Pending (submodule reference update)
|
||||
|
||||
---
|
||||
|
||||
## Session 024: Qt5:: CMake References Cleanup Complete (2026-08-24)
|
||||
|
||||
### ✅ All Qt5:: CMake References Migrated to Qt6::
|
||||
|
||||
+1
-1
Submodule qt-migration-legatus updated: ec83f017be...c143ff8a4f.
Reference in new issue
Block a user