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

List:       kde-commits
Subject:    Re: KDE/kdelibs/interfaces/ktexteditor
From:       David Faure <faure () kde ! org>
Date:       2010-10-21 11:10:57
Message-ID: 201010211310.58561.faure () kde ! org
[Download RAW message or body]

On Thursday 21 October 2010, Pascal Létourneau wrote:
> SVN commit 1188023 by pletourn:
> 
> I'm too tired to figure out why this make any difference...

Well, you were calling operator= on a _copy_ of this :-)

I think static_cast<QTextCharFormat &>(*this) = QTextCharFormat() would have 
worked too, but your solution is simpler anyway.

> --- trunk/KDE/kdelibs/interfaces/ktexteditor/attribute.cpp #1188022:1188023
> @@ -140,7 +140,7 @@
> 
>  void Attribute::clear( )
>  {
> -  static_cast<QTextCharFormat>(*this) = QTextCharFormat();
> +  QTextCharFormat::operator=(QTextCharFormat());
> 
>    d->associatedActions.clear();
>    d->dynamicAttributes.clear();


-- 
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