Porting from Qt 5.15.2 to Qt 6.3.1
-
I'm trying to build an existing project previous using Qt 5.15.2, I've added the kit for 5.6.3.1, some differences in the folder structure, also a lot of things now won't compile, errors like:
/Users/sy/XMLMPAM/clsJSON.cpp:14: error: 'QTextCodec' file not found ../clsJSON.cpp:14:10: fatal error: 'QTextCodec' file not found #include <QTextCodec> ^~~~~~~~~~~~ /Users/sy/XMLMPAM/clsMainWnd.h:379: error: 'QDesktopWidget' file not found In file included from ../clsMainWnd.cpp:7: In file included from ../../XMLMPAM/clsCNT.h:50: ../../XMLMPAM/clsMainWnd.h:379:14: fatal error: 'QDesktopWidget' file not found #include <QDesktopWidget> ^~~~~~~~~~~~~~~~ :-1: error: [clsJSON.o] Error 1 /Users/sy/XMLMPAM/clsDebugService.cpp:59: error: no member named 'midRef' in 'QString' ../clsDebugService.cpp:59:43: error: no member named 'midRef' in 'QString' uint16DebugLevel = strMsg.midRef(0, intLevelLength).toUInt(); ~~~~~~ ^
Is this possible to port ? Is there a guide ?
-
I'm trying to build an existing project previous using Qt 5.15.2, I've added the kit for 5.6.3.1, some differences in the folder structure, also a lot of things now won't compile, errors like:
/Users/sy/XMLMPAM/clsJSON.cpp:14: error: 'QTextCodec' file not found ../clsJSON.cpp:14:10: fatal error: 'QTextCodec' file not found #include <QTextCodec> ^~~~~~~~~~~~ /Users/sy/XMLMPAM/clsMainWnd.h:379: error: 'QDesktopWidget' file not found In file included from ../clsMainWnd.cpp:7: In file included from ../../XMLMPAM/clsCNT.h:50: ../../XMLMPAM/clsMainWnd.h:379:14: fatal error: 'QDesktopWidget' file not found #include <QDesktopWidget> ^~~~~~~~~~~~~~~~ :-1: error: [clsJSON.o] Error 1 /Users/sy/XMLMPAM/clsDebugService.cpp:59: error: no member named 'midRef' in 'QString' ../clsDebugService.cpp:59:43: error: no member named 'midRef' in 'QString' uint16DebugLevel = strMsg.midRef(0, intLevelLength).toUInt(); ~~~~~~ ^
Is this possible to port ? Is there a guide ?
@SPlatten said in Porting from Qt 5.15.2 to Qt 5.6.3.1:
Is this possible to port ? Is there a guide ?
Porting guides normally describe how to port to a newer version, not to an older version.
Having said that, Qt 5.6 definitely has QTextCodec, QDesktopWidget, and QString::midRef().
some differences in the folder structure
This is probably the cause of your errors. Don't change the folder structure.
-
@SPlatten said in Porting from Qt 5.15.2 to Qt 5.6.3.1:
Is this possible to port ? Is there a guide ?
Porting guides normally describe how to port to a newer version, not to an older version.
Having said that, Qt 5.6 definitely has QTextCodec, QDesktopWidget, and QString::midRef().
some differences in the folder structure
This is probably the cause of your errors. Don't change the folder structure.
@JKSH I'm almost 100% sure the OP meant
Qt 6.3.1
instead ofQt 5.6.3.1
@SPlatten take a look here for at least a general guideline :
https://doc.qt.io/qt-6/portingguide.html -
@SPlatten said in Porting from Qt 5.15.2 to Qt 5.6.3.1:
Is this possible to port ? Is there a guide ?
Porting guides normally describe how to port to a newer version, not to an older version.
Having said that, Qt 5.6 definitely has QTextCodec, QDesktopWidget, and QString::midRef().
some differences in the folder structure
This is probably the cause of your errors. Don't change the folder structure.
-
@JKSH I'm almost 100% sure the OP meant
Qt 6.3.1
instead ofQt 5.6.3.1
@SPlatten take a look here for at least a general guideline :
https://doc.qt.io/qt-6/portingguide.html@J-Hilk said in Porting from Qt 5.15.2 to Qt 5.6.3.1:
@JKSH I'm almost 100% sure the OP meant
Qt 6.3.1
instead ofQt 5.6.3.1
D'oh, of course 😂
6.3.1 doesn't have QTextCodec, QDesktopWidget, and QString::midRef() indeed!
-
@J-Hilk said in Porting from Qt 5.15.2 to Qt 5.6.3.1:
@JKSH I'm almost 100% sure the OP meant
Qt 6.3.1
instead ofQt 5.6.3.1
D'oh, of course 😂
6.3.1 doesn't have QTextCodec, QDesktopWidget, and QString::midRef() indeed!
-
@SPlatten said in Porting from Qt 5.15.2 to Qt 6.3.1:
@JKSH , thank you, is there a way forward ?
You're welcome. Yes, the link that @J-Hilk posted shows you how to move forward. The first part of the process is to eliminate all deprecation warnings when you build with Qt 5.15.
-
@SPlatten said in Porting from Qt 5.15.2 to Qt 6.3.1:
@JKSH , thank you, is there a way forward ?
You're welcome. Yes, the link that @J-Hilk posted shows you how to move forward. The first part of the process is to eliminate all deprecation warnings when you build with Qt 5.15.