Author Topic: Qt6 Development  (Read 234350 times)

TeLLie

  • Full Member
  • ***
  • Posts: 233
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #45 on: November 15, 2022, 08:55:55 pm »
Hi Paul,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

G:/qt6-os2/src/network/kernel/qhostinfo.cpp:413:5: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  413 |     sockaddr_in6 sa6;
      |     ^~~~~~~~~~~~
      |     sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:425:44: error: 'sa6' was not declared in this scope; did you mean 'sa'?
  425 |         sa = reinterpret_cast<sockaddr *>(&sa6);
      |                                            ^~~
      |                                            sa
G:/qt6-os2/src/network/kernel/qhostinfo.cpp: In static member function 'static QHostInfo QHostInfoAgent::lookup(const QString&)':
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:17: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                 ^~~~~~~~~~~~
      |                 sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:31: error: 'sa6' was not declared in this scope
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                               ^~~
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:52: error: expected primary-expression before ')' token
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                                                    ^

Here it ends, will look tomorrow more as im now busy witj other things ..
« Last Edit: November 15, 2022, 09:57:06 pm by TeLLie »

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #46 on: November 15, 2022, 09:29:56 pm »
Hi Rich,

G:/qt6-os2/src/plugins/platforms/os2/main.cpp:49:1: error: Parse error at "IID"

The code in question is:
Code: [Select]
Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "os2.json")

'IID' identifies the datatype of "QPlatformIntegrationFactoryInterface_iid" but the compiler has no idea of what that may be because 'IID' hasn't been defined (or typedef'd).

From the context, I'd guess that 'IID' is a very fundamental type that should have been defined in a header #included by some ancestor of this class - you shouldn't have to #include it yourself. Since other platforms use this same function, maybe the definition of 'IID' was conditionally-compiled out for the OS/2 platform. Just a WAG...

I'd grep'd all the headers looking for this definition without success. It looks like the answer is to include Qt::Gui in the LIBRARIES (per the Qt mailing list).

Cheers,

Paul.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #47 on: November 15, 2022, 09:31:10 pm »
Hey Tellie,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

Did you do a 'git pull' the use my change, or you made your own edit? (Curious, as based on a review on windows/cmakelists.txt, I added more to cmakelists.txt that just Qt::Gui)

Cheers,

Paul.

TeLLie

  • Full Member
  • ***
  • Posts: 233
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #48 on: November 15, 2022, 09:58:35 pm »
I did a git pull, but maybe you dint push the change yet

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #49 on: November 15, 2022, 10:07:37 pm »
I did a git pull, but maybe you dint push the change yet
Oops - I did try to do it before I left for work, it must have failed :(

I basically made the os2/CMakeLists.txt more like windows/CMakeLists.txt (not including the windows specific libs of course).

It will be interesting to see how much further you get. I'll attempt to continue work this evening.

Cheers,

Paul.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #50 on: November 15, 2022, 10:08:39 pm »
Hey Tellie,

Hi Paul,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

G:/qt6-os2/src/network/kernel/qhostinfo.cpp:413:5: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  413 |     sockaddr_in6 sa6;
      |     ^~~~~~~~~~~~
      |     sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:425:44: error: 'sa6' was not declared in this scope; did you mean 'sa'?
  425 |         sa = reinterpret_cast<sockaddr *>(&sa6);
      |                                            ^~~
      |                                            sa
G:/qt6-os2/src/network/kernel/qhostinfo.cpp: In static member function 'static QHostInfo QHostInfoAgent::lookup(const QString&)':
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:17: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                 ^~~~~~~~~~~~
      |                 sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:31: error: 'sa6' was not declared in this scope
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                               ^~~
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:52: error: expected primary-expression before ')' token
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                                                    ^

Here it ends, will look tomorrow more as im now busy witj other things ..

I had this too - do a 'git pull' and it should address it.

TeLLie

  • Full Member
  • ***
  • Posts: 233
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #51 on: November 15, 2022, 10:13:47 pm »
Hey Tellie,

Hi Paul,

I add that to the cmakelist and now it bypass the error :)

i will report later where it ends...

G:/qt6-os2/src/network/kernel/qhostinfo.cpp:413:5: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  413 |     sockaddr_in6 sa6;
      |     ^~~~~~~~~~~~
      |     sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:425:44: error: 'sa6' was not declared in this scope; did you mean 'sa'?
  425 |         sa = reinterpret_cast<sockaddr *>(&sa6);
      |                                            ^~~
      |                                            sa
G:/qt6-os2/src/network/kernel/qhostinfo.cpp: In static member function 'static QHostInfo QHostInfoAgent::lookup(const QString&)':
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:17: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_in'?
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                 ^~~~~~~~~~~~
      |                 sockaddr_in
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:31: error: 'sa6' was not declared in this scope
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                               ^~~
G:/qt6-os2/src/network/kernel/qhostinfo.cpp:499:52: error: expected primary-expression before ')' token
  499 |                 sockaddr_in6 *sa6 = (sockaddr_in6 *) node->ai_addr;
      |                                                    ^

Here it ends, will look tomorrow more as im now busy witj other things ..

I had this too - do a 'git pull' and it should address it.

I get this after i had did the pull...
I try later again....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #52 on: November 15, 2022, 10:24:43 pm »
hmmm this code is wrapped around QT_NO_IPV6 which should be defined... I'll investigate...

You could try adding:
Code: [Select]
qt_internal_extend_target(Network CONDITION os2
    DEFINES
        QT_NO_IPV6
)

to src/network/CMakeLists.txt
« Last Edit: November 15, 2022, 10:26:29 pm by Paul Smedley »

TeLLie

  • Full Member
  • ***
  • Posts: 233
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #53 on: November 15, 2022, 11:14:32 pm »
hmmm this code is wrapped around QT_NO_IPV6 which should be defined... I'll investigate...

You could try adding:
Code: [Select]
qt_internal_extend_target(Network CONDITION os2
    DEFINES
        QT_NO_IPV6
)

to src/network/CMakeLists.txt

Hi Paul,

I did a clean build with the latest changes, but now configure stops....

TeLLie

  • Full Member
  • ***
  • Posts: 233
  • Karma: +11/-0
    • View Profile
Re: Qt6
« Reply #54 on: November 15, 2022, 11:30:49 pm »
Hi Paul

I notice something weird before when i had theqt6core dll building
So before i build a clean build

it seems that the dll are linking as lib/qt6core6.dll

** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 2.0beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Created on:       22/11/15 21:27:50
Executable Image: lib/Qt6Core6.dll
creating an OS/2 EMX dynamic link library

Do you see that to ?
As i try to run uic it says it's looking for the lib/qt6core6.dll


Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #55 on: November 16, 2022, 01:23:33 am »
Hi Tellie,

I notice something weird before when i had theqt6core dll building
So before i build a clean build

it seems that the dll are linking as lib/qt6core6.dll

** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 2.0beta1 Limited Availability
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Created on:       22/11/15 21:27:50
Executable Image: lib/Qt6Core6.dll
creating an OS/2 EMX dynamic link library

Do you see that to ?
As i try to run uic it says it's looking for the lib/qt6core6.dll

Yes - I get Qt6Core6.dll too. I assume this is the default naming convention - I've done nothing to change this.

Cheers,

Paul.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #56 on: November 16, 2022, 01:25:15 am »
hmmm this code is wrapped around QT_NO_IPV6 which should be defined... I'll investigate...

You could try adding:
Code: [Select]
qt_internal_extend_target(Network CONDITION os2
    DEFINES
        QT_NO_IPV6
)

to src/network/CMakeLists.txt

Hi Paul,

I did a clean build with the latest changes, but now configure stops....

I'll investigate tonight...

Cheers,

Paul

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6
« Reply #57 on: November 16, 2022, 02:27:08 am »
I've been adding the define to src/network/qtnetwork-config.h

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4808
  • Karma: +100/-1
    • View Profile
Re: Qt6
« Reply #58 on: November 16, 2022, 03:04:23 am »
Lots of errors here in src/plugins/platforms/os2/qos2clipboard, enough I'm not going to bother pasting them but guessing it might need a bit of a rewrite or hopefully just a bit of adapting.
BTW, git pull didn't find anything so I tried this,
Code: [Select]
index be461530..7c822111 100644
--- a/src/plugins/platforms/os2/CMakeLists.txt
+++ b/src/plugins/platforms/os2/CMakeLists.txt
@@ -21,7 +21,17 @@ qt_internal_add_plugin(QOS2IntegrationPlugin
         qos2theme.cpp
         qos2window.cpp

+    DEFINES
+        QT_NO_CAST_FROM_ASCII
+        QT_NO_FOREACH
+
     INCLUDE_DIRECTORIES
         ${CMAKE_CURRENT_SOURCE_DIR}
+    LIBRARIES
+        Qt::Core
+        Qt::CorePrivate
+        Qt::Gui
+        Qt::GuiPrivate
+
 )

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2095
  • Karma: +160/-0
    • View Profile
Re: Qt6
« Reply #59 on: November 16, 2022, 04:20:51 am »
That's pretty must what I did this morning (from memory), I'll re-push it when I get home.