kdbg icon indicating copy to clipboard operation
kdbg copied to clipboard

Port to Qt6/KF6

Open davispuh opened this issue 1 year ago • 5 comments

This allows to build it against Qt6/KF6. Depends on #25

davispuh avatar Mar 06 '23 02:03 davispuh

Thank you for your contribution. Unfortunately, in the current form I cannot merge the branch because it requires Qt6 and KF6 unconditionally. This is a precondition that we cannot require from our consumers at this time.

The best course of action would be to have a build system that adjusts to the libraries that are available or can choose between Qt5 and Qt6. But I am not a cmake expert and do not know how to accomplish this or if it is possible at all.

Some of the patches look like they could be applied to a Qt5-based build nevertheless, e.g., perhaps the sorry() -> error() change. Shuffling around the patches would probably suffice, i.e., that the switch to Qt6/KF6 happens as late as possible in the series.

j6t avatar Mar 12 '23 14:03 j6t

I don't really need it merged. Just putting it out here :P Also yes it's perfectly possible to support both Qt5 and Qt6 at same time but this was just quick way to get it build.

There are several approaches to make it work, you can take a look at https://doc.qt.io/qt-6/cmake-qt5-and-qt6-compatibility.html

Anyway I won't be investing any more time in this so if you think any commits from here could be useful you can just take those (and fix commit messages aswell).

davispuh avatar Mar 12 '23 22:03 davispuh

@j6t what do you think about this now, 1.5 years later?

@davispuh meanwhile, it doesn't build anyway with errors like these:

regwnd.cpp:232:34: error: conversion from ‘unsigned int’ to ‘QChar’ is ambiguous
  232 |         result.insert(0, (v & 7) + '0');
      |                          ~~~~~~~~^~~~~

and

CMake Error at kdbg/CMakeLists.txt:100 (install):
  install FILES given no DESTINATION!

(needs porting away from deprecated KDEInstallDirs)

a17r avatar Sep 09 '24 16:09 a17r

My system is still on KF5 and I assume that I am not the only one stuck to KF5. So my stance hadn't changed: an unconditional switch to KF6 is not welcome. The other points I mentioned above are still valid.

j6t avatar Sep 09 '24 20:09 j6t

@davispuh meanwhile, it doesn't build anyway with errors like these:

regwnd.cpp:232:34: error: conversion from ‘unsigned int’ to ‘QChar’ is ambiguous
  232 |         result.insert(0, (v & 7) + '0');
      |                          ~~~~~~~~^~~~~

and

CMake Error at kdbg/CMakeLists.txt:100 (install):
  install FILES given no DESTINATION!

(needs porting away from deprecated KDEInstallDirs)

When I submitted this PR then it built fine for me on Arch Linux. It's possible now it needs more changes to get it working with everything latest.

davispuh avatar Sep 09 '24 23:09 davispuh