Skip to content

Commit

Permalink
Add a warning for patching lovers
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Sep 22, 2023
1 parent b361d61 commit d3ac9dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/rp_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
#include <QtGui/QColorSpace>
#include <private/qwidget_p.h>

// Patching out this code without patching out all other private API usage
// and the Qt::{Core,Gui,Widgets}Private cmake dependency is asking
// for memory corruption
class TWidgetPrivate : public QWidgetPrivate {
public:
#if QT_VERSION >= QT_VERSION_CHECK(6, 4, 0)
Expand Down

2 comments on commit d3ac9dc

@mid-kid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lmao

@mid-kid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this again, I'm really not sure how removing this bit would cause memory corruption, but I'll cede on this one for now. You guys are a weird bunch anyway.
Here's a link to my rationale at least: gentoo/gentoo@8a5a020#diff-8315709143da5111f1130b2203fb0f0018086a8794b564787dd15f05662d1801R3
From a "Qt is a stable library with good backwards-compat (and safety checks where there's not)" POV, hacks like these are pretty bad. I've traced the code that errors out, when the ABI check fails, and it's really only related to QWidgetPrivate, which checks for the ABI version when the class instantiates.. The rest of the library can apparently deal with tinkering in private portions and minor version upgrades despite all that.

Please sign in to comment.