Author Topic: Dooble releases-Qt6  (Read 28934 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5168
  • Karma: +118/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #135 on: November 30, 2024, 05:41:00 pm »

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +26/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Dooble releases-Qt6
« Reply #136 on: November 30, 2024, 11:52:08 pm »
Dave / Paul,

OMG! I've been out of the loop too long! It's going to take me a while to figure out the plumbing on this thing.

The goal is to use whatever info is available within Dooble to get back to a window's native handle (hwnd), then use that to trigger an update. All this info is available in 'qos2window.cc' but getting there programmatically looks like it will require a steep learning curve.

One good thing I've found: if I set the CP on the splash screen, the main window's titlebar displays UTF8 correctly. I assume this means it only has to be done once per session.

Dave... it appears that the new-style cast for
#define HMQ_CURRENT  ((HMQ)1)
is
#define HMQ_CURRENT  (static_cast<HMQ>(1))

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2370
  • Karma: +183/-0
    • View Profile
Re: Dooble releases-Qt6
« Reply #137 on: December 01, 2024, 08:23:37 am »
I also wonder what's changed given qt5 apparently worked. I'd have to expect something in https://github.com/psmedley/qt6-base-os2/blob/main/src/corelib/text/qlocale_unix.cpp but I don't see anything obviously different.
« Last Edit: December 01, 2024, 09:34:50 am by Paul Smedley »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5168
  • Karma: +118/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #138 on: December 01, 2024, 05:28:24 pm »
The Qt5 build is currently the same as the Qt6 build when it comes to the titlebar, lots of question marks. It just didn't have the problems with the other weird characters that you fixed.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5168
  • Karma: +118/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #139 on: December 01, 2024, 06:04:29 pm »
I noticed this in dooble_main.cc,
Code: [Select]
#ifdef Q_OS_WINDOWS
  QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL, true);
#endif
Tried adding Q_OS_OS2 to the ifdef, webgl crashed the browser when used. So read up on it, https://doc.qt.io/qt-6/windows-graphics.html.
It is to load a non standard 3D driver including a software solution, they suggest Mesa llvmpipe which would need lvm. There are other software OpenGL drivers around such as TinyGL or PortableGL. Mentore has built TinyGL and I've built PortableGL previously IIRC.
The problem to overcome is that Cloudflare has become the gatekeeper of much of the internet with it's "Are you human" checks. These depend on WebGL to display, so we just get a spinning circle. Even a really slow 3D renderer would be better then nothing for these cases. And actually, given a small window, software OpenGL often doesn't perform too bad.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +26/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: Dooble releases-Qt6
« Reply #140 on: December 01, 2024, 08:37:35 pm »
The problem to overcome is that Cloudflare has become the gatekeeper of much of the internet with it's "Are you human" checks.

I think I found an underlying cause for at least some of these Cloudfare checks: the UserAgent string.

A news website I read daily had become unusable because every time I clicked on a link to an article, I got Cloudflare. Casting about for solutions, I reset my UserAgent to the default. Since then, I haven't gotten the Cloudflare page on that site even once (or anywhere else, IIRC). I have to assume that it compares the capabilities that _should_ be present for a given UA with the capabilities the browser itself reports. If they don't match, it assumes something is fishy.

BTW... I'm going to take my titlebar activities to PM/email (at such time as I have something to report or try). Meanwhile, it might be better to put your titlebar tweaks on hold since they'll likely have to be rolled back if my efforts are successful. For the time being, seeing raw UTF8 is unlikely to cause users grievous psychological damage.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5168
  • Karma: +118/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #141 on: December 01, 2024, 11:35:39 pm »
I'm using the default userstring, today not only am I getting the cloudflare thing, but it is crashing the browser, simply vanishing at first, then when I tried a new profile, crashed recursively, 10 trp files, all sigaborts. Finally tried the Qt5 build and still got stuck in the loop of it checking and failing.
It was on the SeaMonkey newsgroup, alt.comp.software.seamonkey now as Mozilla shut down its newsgroups, that people were blaming the lack of WebGL support for the cloudflare problems.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2370
  • Karma: +183/-0
    • View Profile
Re: Dooble releases-Qt6
« Reply #142 on: December 02, 2024, 02:44:21 am »
I noticed this in dooble_main.cc,
Code: [Select]
#ifdef Q_OS_WINDOWS
  QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL, true);
#endif
Tried adding Q_OS_OS2 to the ifdef, webgl crashed the browser when used. So read up on it, https://doc.qt.io/qt-6/windows-graphics.html.
It is to load a non standard 3D driver including a software solution, they suggest Mesa llvmpipe which would need lvm. There are other software OpenGL drivers around such as TinyGL or PortableGL. Mentore has built TinyGL and I've built PortableGL previously IIRC.
The problem to overcome is that Cloudflare has become the gatekeeper of much of the internet with it's "Are you human" checks. These depend on WebGL to display, so we just get a spinning circle. Even a really slow 3D renderer would be better then nothing for these cases. And actually, given a small window, software OpenGL often doesn't perform too bad.

I had read something similar previously - in theory at least, it should be possible to utilise some of the software GL stuff from Chromium...

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5168
  • Karma: +118/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #143 on: December 02, 2024, 05:30:52 am »
That was why I enabled it, hoping there was a software GL stuff in there somewhere.
It did produce some interesting trps.

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2370
  • Karma: +183/-0
    • View Profile
Re: Dooble releases-Qt6
« Reply #144 on: December 02, 2024, 08:22:56 am »
Right now, qtbase is configured with '-no-opengl' so it definitely won't work....

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2370
  • Karma: +183/-0
    • View Profile
Re: Dooble releases-Qt6
« Reply #145 on: December 02, 2024, 09:16:03 am »
The Qt5 build is currently the same as the Qt6 build when it comes to the titlebar, lots of question marks. It just didn't have the problems with the other weird characters that you fixed.

Ahh OK :) My bad I thought qt5 worked correctly, I feel better now :)

Paul Smedley

  • Hero Member
  • *****
  • Posts: 2370
  • Karma: +183/-0
    • View Profile
Re: Dooble releases-Qt6
« Reply #146 on: December 02, 2024, 09:33:57 am »
Right now, qtbase is configured with '-no-opengl' so it definitely won't work....
I tried configuring without -no-opengl and with tinygl installed.

configure failed:
Code: [Select]
Run Build Command(s):C:/USR/BIN/ninja.exe cmTC_d65cf && [1/2] Building CXX object CMakeFiles/cmTC_d65cf.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_d65cf.dir/src.cxx.o
c:/usr/local1420/bin/c++.exe -DHAVE_EGL  -std=gnu++17 -o CMakeFiles/cmTC_d65cf.dir/src.cxx.o -c 'U:/dev/qt6-base-os2/build/CMakeFiles/CMakeTmp/src.cxx'
U:/dev/qt6-base-os2/build/CMakeFiles/CMakeTmp/src.cxx:2:10: fatal error: EGL/egl.h: No such file or directory
    2 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.


Source file was:

#include <EGL/egl.h>

int main(int, char **) {
    [[maybe_unused]] EGLint x = 0;
    EGLDisplay dpy = 0; EGLContext ctx = 0;
    eglDestroyContext(dpy, ctx);
}
Performing C++ SOURCE FILE Test HAVE_GLESv2 failed with the following output:
Change Dir: U:/dev/qt6-base-os2/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/USR/BIN/ninja.exe cmTC_d65fe && [1/2] Building CXX object CMakeFiles/cmTC_d65fe.dir/src.cxx.o
FAILED: CMakeFiles/cmTC_d65fe.dir/src.cxx.o
c:/usr/local1420/bin/c++.exe -DHAVE_GLESv2  -std=gnu++17 -o CMakeFiles/cmTC_d65fe.dir/src.cxx.o -c 'U:/dev/qt6-base-os2/build/CMakeFiles/CMakeTmp/src.cxx'
U:/dev/qt6-base-os2/build/CMakeFiles/CMakeTmp/src.cxx:6:12: fatal error: GLES2/gl2.h: No such file or directory
    6 | #  include <GLES2/gl2.h>
      |            ^~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.


Source file was:

#ifdef __APPLE__
#  include <OpenGLES/ES2/gl.h>
#else
#  define GL_GLEXT_PROTOTYPES
#  include <GLES2/gl2.h>
#endif

int main(int, char **) {
    glUniform1f(1, GLfloat(1.0));
    glClear(GL_COLOR_BUFFER_BIT);
}

Need at minimum <GLES2/gl2.h> or <EGL/egl.h> to get thru configure......

Remy

  • Hero Member
  • *****
  • Posts: 780
  • Karma: +12/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #147 on: December 02, 2024, 05:26:14 pm »
The Qt5 build is currently the same as the Qt6 build when it comes to the titlebar, lots of question marks. It just didn't have the problems with the other weird characters that you fixed.

I don't see any issue under Dooble QT5, only QT6 has
Here two screencopy of the same link (my web page)
- one with QT5 build, the other with QT6 build. 

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5168
  • Karma: +118/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #148 on: December 02, 2024, 06:19:23 pm »
Looks like you haven't installed Paul's latest qos2.dll. You are right that they do display differently though, just not that different.

Remy

  • Hero Member
  • *****
  • Posts: 780
  • Karma: +12/-1
    • View Profile
Re: Dooble releases-Qt6
« Reply #149 on: December 02, 2024, 09:05:30 pm »
Looks like you haven't installed Paul's latest qos2.dll. You are right that they do display differently though, just not that different.

Right, here after replacing qos2.dll (better but not good)