[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdecore
From:       David Faure <faure () kde ! org>
Date:       2010-11-09 20:19:18
Message-ID: 201011092119.19042.faure () kde ! org
[Download RAW message or body]

On Tuesday 09 November 2010, Christian Ehrlicher wrote:
> SVN commit 1194758 by chehrlic:
> 
> compile++
> why does this compile with gcc?
>
> --- trunk/KDE/kdelibs/kdecore/date/kcalendarsystemhebrew.cpp 
#1194757:1194758
> @@ -258,7 +258,7 @@
>      virtual int latestValidYear() const;
>  
>      virtual int integerFromString( const QString &string, int maxLength, 
int &readLength ) const;
> -    virtual QString stringFromInteger( int number, int padWidth = 0, QChar 
padChar = '0' ) const;
> +    virtual QString stringFromInteger( int number, int padWidth = 0, QChar 
padChar = QLatin1Char('0') ) const;
>      virtual QString stringFromInteger( int number, int padWidth, QChar 
padChar, KLocale::DigitSet digitSet ) const;

Good question. I guess because the base class doesn't have default values in 
the definition of the virtual method, and the derived method is never called 
directly.

John, shouldn't the derived methods be stripped from default values too?
It's a bit weird otherwise. (or maybe I'm missing something)

-- 
David Faure, faure@kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic