[Development] Menu Problem on OS/2
Hi, I've recently updated the OS/2 port of Qt 5.15 (https://github.com/bitwiseworks/qt5-os2) to Qt 6.2.4 (https://github.com/psmedley/qt6-base-os2) There is a thread at os2world (https://www.os2world.com/forum/index.php?topic=3182.msg36954#msg36954) there the status of the port, and of some ported apps is being discussed. I'm working through issues that have come up, but one that is puzzling me, is that menu items are appears offset to where they should be - too high and to the left Any thoughts on where this might be controlled? Hopefully the screen shot at https://photos.app.goo.gl/ZxywgPxMRWtduwJ28 helps explain it better than the text above :) Thoughts appreciated! Cheers, Paul ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] Problems porting Qt5.15 to Qt 6.2 for OS/2
Thanks Alexey and Fabian - this worked a treat! On 15/11/22 20:08, Fabian Kosmale via Development wrote: Hi, to expand on what Alexey said: Without linking against Qt::Gui, you will not have qpa in your include paths, which in turn means that QPlatformIntegrationFactoryInterface_iid won't be macro-expanded to the string literals that is defined in qplatformintegrationplugin.h. In turn, moc will complain because it is expecting a string literal after IID. Regards, Fabian On 15.11.22 10:28, Alexey Edelev via Development wrote: Hi, Please try to add LIBRARIES Qt::Gui to the qt_internal_add_plugin call in https://github.com/psmedley/qt6-os2/blob/main/src/plugins/platforms/os2/CMakeLists.txt <https://github.com/psmedley/qt6-os2/blob/main/src/plugins/platforms/os2/CMakeLists.txt> Regards, Alexey. *From:* Development on behalf of Paul Smedley *Sent:* Tuesday, November 15, 2022 10:01 AM *To:* development@qt-project.org *Subject:* [Development] Problems porting Qt5.15 to Qt 6.2 for OS/2 Hi All, I'm attempting to update the OS/2 port of Qt 5.15 (https://github.com/bitwiseworks/qtbase-os2 <https://github.com/bitwiseworks/qtbase-os2>) to Qt 6.2.4 (https://github.com/psmedley/qt6-os2 <https://github.com/psmedley/qt6-os2>) Things are going pretty well and I have a number of DLLs built, howeever I'm now stuck on building the OS/2 plugin. I'm getting the following: AutoMoc subprocess error The moc process failed to compile "SRC:/src/plugins/platforms/os2/main.cpp" into "SRC:/build/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/include/main.moc" included by "SRC:/src/plugins/platforms/os2/main.cpp" Command --- U:/DEV/qtbase-everywhere-src-6.2.4/build/bin/moc.exe -DQOS2IntegrationPlugin_EXPORTS -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x06 -DQT_DISABLE_DEPRECATED_BEFORE=0x05 -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -IU:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2 -IU:/DEV/qtbase-everywhere-src-6.2.4/build/src/plugins/platforms/os2 -IU:/DEV/qtbase-everywhere-src-6.2.4/build/include -IU:/DEV/qtbase-everywhere-src-6.2.4/mkspecs/os2-g++ -Iu:/extras/include -Iu:/openldap/include -Iu:/usr/include -IU:/OS2TK45/H -IU:/usr/local1220/include/c++/12.2.0 -IU:/usr/local1220/include/c++/12.2.0/i686-pc-os2-emx -IU:/usr/local1220/include/c++/12.2.0/backward -IU:/usr/local1220/lib/gcc/i686-pc-os2-emx/12.2.0/include -IU:/usr/local1220/lib/gcc/i686-pc-os2-emx/12.2.0/include-fixed -I/usr/local/include -IU:/usr/local1220/include --include U:/DEV/qtbase-everywhere-src-6.2.4/build/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/moc_predefs.h -o U:/DEV/qtbase-everywhere-src-6.2.4/build/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/include/main.moc U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/main.cpp Output -- U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/main.cpp:49:1: error: Parse error at "IID" Line 49 of main.cpp contains: Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "os2.json") Any clues on how to resolve the parse error? Cheers, Paul ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development <https://lists.qt-project.org/listinfo/development> ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
[Development] Problems porting Qt5.15 to Qt 6.2 for OS/2
Hi All, I'm attempting to update the OS/2 port of Qt 5.15 (https://github.com/bitwiseworks/qtbase-os2) to Qt 6.2.4 (https://github.com/psmedley/qt6-os2) Things are going pretty well and I have a number of DLLs built, howeever I'm now stuck on building the OS/2 plugin. I'm getting the following: AutoMoc subprocess error The moc process failed to compile "SRC:/src/plugins/platforms/os2/main.cpp" into "SRC:/build/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/include/main.moc" included by "SRC:/src/plugins/platforms/os2/main.cpp" Command --- U:/DEV/qtbase-everywhere-src-6.2.4/build/bin/moc.exe -DQOS2IntegrationPlugin_EXPORTS -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x06 -DQT_DISABLE_DEPRECATED_BEFORE=0x05 -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_PLUGIN -IU:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2 -IU:/DEV/qtbase-everywhere-src-6.2.4/build/src/plugins/platforms/os2 -IU:/DEV/qtbase-everywhere-src-6.2.4/build/include -IU:/DEV/qtbase-everywhere-src-6.2.4/mkspecs/os2-g++ -Iu:/extras/include -Iu:/openldap/include -Iu:/usr/include -IU:/OS2TK45/H -IU:/usr/local1220/include/c++/12.2.0 -IU:/usr/local1220/include/c++/12.2.0/i686-pc-os2-emx -IU:/usr/local1220/include/c++/12.2.0/backward -IU:/usr/local1220/lib/gcc/i686-pc-os2-emx/12.2.0/include -IU:/usr/local1220/lib/gcc/i686-pc-os2-emx/12.2.0/include-fixed -I/usr/local/include -IU:/usr/local1220/include --include U:/DEV/qtbase-everywhere-src-6.2.4/build/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/moc_predefs.h -o U:/DEV/qtbase-everywhere-src-6.2.4/build/src/plugins/platforms/os2/QOS2IntegrationPlugin_autogen/include/main.moc U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/main.cpp Output -- U:/DEV/qtbase-everywhere-src-6.2.4/src/plugins/platforms/os2/main.cpp:49:1: error: Parse error at "IID" Line 49 of main.cpp contains: Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "os2.json") Any clues on how to resolve the parse error? Cheers, Paul ___ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development
Re: [Development] Updating community Qt4 port for OS/2 to Qt5
Hi Robin, On 05/08/17 22:28, Robin Burchell wrote: On Sat, Aug 5, 2017, at 11:41 AM, Paul Smedley wrote: Thanks for the reply. Any hints on the minimal files necessary for gui apps to work. At this stage, I'm not fussed about clipboard, drag and drop, etc, just the bare minimal to get gui apps working. Hi Paul, So the basic idea you've probably already gathered is that each platform needs to implement a "QPA" plugin: https://wiki.qt.io/Getting_Started_With_Lighthouse covers some of the basics here, but in a little more detail: A QPA plugin provides the glue for things like windowing and input between Qt and a native windowing system. To start with, take a look at the 'minimal' QPA plugin (which just does software rendering, AFAIR directed to image files on disk), and look at how to fill in things from there -- the starting points you'll want are a QPlatformIntegration, QPlatformWindow, and QPlatformBackingStore. You want to look at QWindowSystemInterface to deliver events (like expose events saying "please start/stop rendering the window", and input events) from your QPA plugin to QtGui. What you want past there is a bit more fuzzy and depends both on how complete you want your integration to be and what your platform provides, e.g. QPlatformClipboard and stuff like that, but I'd put most of that stuff in the "optional extras" basket. As you've already figured out, the structure and code involved is quite different, so I doubt it'll be a 1:1 port - but the existing plugins provide pretty good guidance on how to lay things out, and your existing code would be adaptable without too much work I think. Thanks - this is the kind of this I was looking for. Appreciate the tips! Cheers, Paul ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Updating community Qt4 port for OS/2 to Qt5
Hi Allan!! On 05/08/17 16:19, Allan Sandfeld Jensen wrote: On Samstag, 5. August 2017 03:48:00 CEST Paul Smedley wrote: Hi All, You may or may not be aware, that OS/2 has a Qt port that is currently at v4.7.3 (http://trac.netlabs.org/qt4) This project has stagnated for time, but I need at least Qt 4.8.x for Wireshark 2.4.0 - so I've started looking at updating. I have Qt 4.8.x building, with a few nits still to resolve. I next want to look at building Qt 5.x. I see that the way the OS specific GUI code is handled has changed significantly, instead of files like: src\gui\kernel\*win.cpp We now have all the OS specific files in (for eg) qtbase\src\plugins\platforms\windows\*.cpp Are there any tips on porting a platform from Qt 4.x to 5.x? Is it likely that much of the GUI code can be re-used (albeit the file structure is different)? A lot of the GUI code probably won't be relevant and won't need to be ported. I can see they have their own QPixmap type, but since 4.8 the raster engine is used for pixmaps, and that code can be removed. The same will apply to any native paint-engine. Thanks for the reply. Any hints on the minimal files necessary for gui apps to work. At this stage, I'm not fussed about clipboard, drag and drop, etc, just the bare minimal to get gui apps working. Cheers, Paul ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
[Development] Updating community Qt4 port for OS/2 to Qt5
Hi All, You may or may not be aware, that OS/2 has a Qt port that is currently at v4.7.3 (http://trac.netlabs.org/qt4) This project has stagnated for time, but I need at least Qt 4.8.x for Wireshark 2.4.0 - so I've started looking at updating. I have Qt 4.8.x building, with a few nits still to resolve. I next want to look at building Qt 5.x. I see that the way the OS specific GUI code is handled has changed significantly, instead of files like: src\gui\kernel\*win.cpp We now have all the OS specific files in (for eg) qtbase\src\plugins\platforms\windows\*.cpp Are there any tips on porting a platform from Qt 4.x to 5.x? Is it likely that much of the GUI code can be re-used (albeit the file structure is different)? Thanks in advance, Paul ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development