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);
|
||||
|
||||
@@ -29,6 +29,7 @@ SET(ifx_SRCS
|
||||
ADD_LIBRARY(qsql_informix SHARED ${ifx_SRCS})
|
||||
TARGET_LINK_LIBRARIES(qsql_informix
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Sql
|
||||
Qt6::Core5Compat
|
||||
${ICLIENT_SDK_LIBRARIES}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include <QtSql/QSqlRecord>
|
||||
#include <QtSql/QSqlQuery>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QTextCodec>
|
||||
#include <QtGui/QTextCodec>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QMetaType>
|
||||
|
||||
Reference in new issue
Block a user