Session 025: Fix QTextCodec migration issues
- Z/src/qsql_informix/qsql_informix.cpp: Fixed QTextCodec include path (QtCore → QtGui) as QTextCodec moved to QtGui module in Qt6 - Z/src/qsql_informix/CMakeLists.txt: Added Qt6::Gui dependency required for QTextCodec - Lts/Tools/TextEditorTest/textedit.cpp: Fixed Qt::codecForHtml → QTextCodec::codecForHtml (static method on QTextCodec class in Qt6) These are minimal fixes required for Qt6 compatibility. QTextCodec is now part of QtGui module and codecForHtml is a static method on QTextCodec class rather than Qt namespace function. Co-authored-by: Copilot <2235566219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
ec83f017be
commit
c143ff8a4f
3 files changed
+3
-2
No files matched your search
@@ -367,7 +367,7 @@ bool TextEdit::load(const QString &f)
|
||||
return false;
|
||||
|
||||
QByteArray data = file.readAll();
|
||||
QTextCodec *codec = Qt::codecForHtml(data);
|
||||
QTextCodec *codec = QTextCodec::codecForHtml(data);
|
||||
QString str = codec->toUnicode(data);
|
||||
if (Qt::mightBeRichText(str)) {
|
||||
QUrl baseUrl = (f.front() == QLatin1Char(':') ? QUrl(f) : QUrl::fromLocalFile(f)).adjusted(QUrl::RemoveFilename);
|
||||
|
||||
Reference in new issue
Block a user