Bug 138013 - SuSE Patch breaks Qt Library! Wrong return value from static methods in QKDEIntegration
Summary: SuSE Patch breaks Qt Library! Wrong return value from static methods in QKDEI...
Status: RESOLVED DUPLICATE of bug 119090
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: KDE (show other bugs)
Version: Final
Hardware: i686 SuSE Linux 10.0
: P5 - None : Major
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL: http://bugs.kde.org/show_bug.cgi?id=1...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 10:11 UTC by Marc Wäckerlin
Modified: 2005-12-12 10:21 UTC (History)
0 users

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Wäckerlin 2005-12-12 10:11:23 UTC
Please see my bug report in the KDE bug database
and remove or correct your patch to the Qt library
until the problem in KDE has been fixed!

Bug 117993:
"Wrong return value from static methods in
QKDEIntegration"
http://bugs.kde.org/show_bug.cgi?id=117993

Your file qt.patch in package qt-3.3.4-29.src.rpm
contains the problem. You patch a KDE bug into the
Qt library!

The probem is then of course not only in the
source package, but also in the binary package
compiled from the source...

Please remove the patch for QMessageBox until bug
117993 in KDE has been fixed!


Fix: In my program (http://marc.waeckerlin.org/videorekorder), now I have to use the following workaround:

namespace BUGFIXED_QMessageBox {
   int question(QWidget *parent,
                const QString &caption, const QString &text,
                int button0, int button1=0, int button2=0) {
     int res = ::QMessageBox::question(parent, caption, text,
                                       button0, button1, button2);
     return
       button0 && res==button0
       || button1 && res==button1
       || button2 && res==button2 ? res :
       button0 && res==0 ? button0 :
       button1 && res==1 ? button1 :
       button2 && res==2 ? button2 :
       res;
   }
}

then replace QMessageBox::question by BUGFIXED_QMessageBox::question:

   if (BUGFIXED_QMessageBox::question(0, WARNING,
                             tr("Delete selected files?\n"
                                "Files to delete are:\n")
                             +mrw::join(files, "\n"),
                             QMessageBox::Yes,
                             QMessageBox::No) == QMessageBox::Yes) [...]
Comment 1 Dirk Mueller 2005-12-12 10:21:01 UTC

*** This bug has been marked as a duplicate of 119090 ***