[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#64196: marked as done (g++: class method overload bug (qt related))



Your message dated Fri, 29 Jun 2001 20:09:19 +0200
with message-id <15164.50255.316784.984953@gargle.gargle.HOWL>
and subject line bug in code, not a gcc bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Darren Benham
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 16 May 2000 07:10:40 +0000
>From ujr@physik.phy.tu-dresden.de Tue May 16 02:10:40 2000
Received: from pop3.tu-dresden.de [141.30.2.83] 
	by master.debian.org with smtp (Exim 3.12 #2 (Debian))
	id 12rbV2-0004Ga-00; Tue, 16 May 2000 02:10:40 -0500
Received: from rmail.urz.tu-dresden.de by rks3 with SMTP (PP);
          Tue, 16 May 2000 09:07:55 +0200
Received: from physik.phy.tu-dresden.de by rmail with SMTP (IC-PP);
          Tue, 16 May 2000 09:06:20 +0200
Received: from pkfp20.phy.tu-dresden.de 
          by physik.phy.tu-dresden.de (AIX 3.2/UCB 5.64/4.03) id AA26331;
          Tue, 16 May 2000 09:10:00 +0200
Received: from ujr by pkfp20.phy.tu-dresden.de 
          with local (Exim 3.12 #1 (Debian)) id 12rbUO-0000YU-00;
          Tue, 16 May 2000 09:10:00 +0200
From: Ulf Jaenicke-Roessler <ujr@physik.phy.tu-dresden.de>
Subject: g++: class method overload bug (qt related)
To: submit@bugs.debian.org
X-Mailer: bug 3.3.2
Message-Id: <E12rbUO-0000YU-00@pkfp20.phy.tu-dresden.de>
Date: Tue, 16 May 2000 09:10:00 +0200
Delivered-To: submit@bugs.debian.org

Package: g++
Version: 1:2.95.2-9
Severity: normal

Hi,

 I think this is a bug, but OTOH I'm not that experienced with C++, so YMMV.
 Also, I think that the bug subject is not too good, but I could not come up
 with a better one - sorry.
 I used 
c++ -I /usr/include/qt -c t.cpp
 to compile the following little program with QT2:

#include "qapplication.h"

int main(void) {
 QColorGroup normal( QColor( QRgb(0) ));
 QColorGroup disabled( QColor( QRgb(8421504) ));
 QColorGroup active( QColor( QRgb(0) ));
 QPalette palette( normal, disabled, active );
 return 0;
}

 I receive the following error message:

t.cpp: In function `int main()':
t.cpp:4: call of overloaded `QColor(int)' is ambiguous
/usr/include/qt/qcolor.h:72: candidates are: QColor::QColor(unsigned int, unsigned int = 0ffffffff)
/usr/include/qt/qcolor.h:73:                 QColor::QColor(const QString &)
/usr/include/qt/qcolor.h:74:                 QColor::QColor(const char *)
/usr/include/qt/qcolor.h:75:                 QColor::QColor(const QColor &) <near match>
t.cpp:5: redeclaration of `class QColor QRgb'
t.cpp:4: `class QColor QRgb' previously declared here
t.cpp:6: redeclaration of `class QColor QRgb'
t.cpp:5: `class QColor QRgb' previously declared here
t.cpp:6: call of overloaded `QColor(int)' is ambiguous
/usr/include/qt/qcolor.h:72: candidates are: QColor::QColor(unsigned int, unsigned int = 0ffffffff)
/usr/include/qt/qcolor.h:73:                 QColor::QColor(const QString &)
/usr/include/qt/qcolor.h:74:                 QColor::QColor(const char *)
/usr/include/qt/qcolor.h:75:                 QColor::QColor(const QColor &) <near match>
t.cpp:7: no matching function for call to `QPalette::QPalette (QColorGroup (&)(), QColorGroup (&)(), QColorGroup (&)())'
/usr/include/qt/qpalette.h:99: candidates are: QPalette::QPalette()
/usr/include/qt/qpalette.h:100:                 QPalette::QPalette(const QColor &)
/usr/include/qt/qpalette.h:101:                 QPalette::QPalette(const QColor &, const QColor &)
/usr/include/qt/qpalette.h:103:                 QPalette::QPalette(const QColorGroup &, const QColorGroup &, const QColorGroup &)
/usr/include/qt/qpalette.h:104:                 QPalette::QPalette(const QPalette &)

 The error message goes away if I put additional parentheses around the
 argument of the QColorGroup constructor, i.e.

 QColorGroup normal( (QColor( QRgb(0) )));
 QColorGroup disabled( (QColor( QRgb(8421504) )));
 QColorGroup active( (QColor( QRgb(0) )));
 QPalette palette( normal, disabled, active );

 It would be nice, if that could be fixed.

 Thanks,

  Ulf

-- System Information
Debian Release: 2.2
Kernel Version: Linux pkfp20 2.2.15 #1 Fri May 5 11:16:20 CEST 2000 i686 unknown

Versions of the packages g++ depends on:
ii  gcc            2.95.2-9       The GNU C compiler.
ii  libc6          2.1.3-10       GNU C Library: Shared libraries and Timezone
ii  libstdc++2.10- 2.95.2-9       The GNU stdc++ library (development files)

---------------------------------------
Received: (at 64196-done) by bugs.debian.org; 29 Jun 2001 18:12:50 +0000
>From doko@cs.tu-berlin.de Fri Jun 29 13:12:50 2001
Return-path: <doko@cs.tu-berlin.de>
Received: from mail.cs.tu-berlin.de [::ffff:130.149.17.13] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 15G2l8-0002bn-00; Fri, 29 Jun 2001 13:12:50 -0500
Received: from bolero.cs.tu-berlin.de (doko@bolero.cs.tu-berlin.de [130.149.19.1])
	by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id UAA23072
	for <64196-done@bugs.debian.org>; Fri, 29 Jun 2001 20:09:20 +0200 (MET DST)
Received: (from doko@localhost)
	by bolero.cs.tu-berlin.de (8.10.2+Sun/8.9.3) id f5TI9JU27336;
	Fri, 29 Jun 2001 20:09:19 +0200 (MEST)
From: Matthias Klose <doko@cs.tu-berlin.de>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <15164.50255.316784.984953@gargle.gargle.HOWL>
Date: Fri, 29 Jun 2001 20:09:19 +0200
To: 64196-done@bugs.debian.org
Subject: bug in code, not a gcc bug
X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid
Delivered-To: 64196-done@bugs.debian.org

... as explained by Laurent Bonnaud <Laurent.Bonnaud@inpg.fr>



Reply to: