Review Request: Use QT_USE_FAST_CONCATENATION and QT_USE_FAST_OPERATOR_PLUS for performance.

Alex Merry kde at randomguy3.me.uk
Fri Oct 1 15:06:55 CEST 2010



> On 2010-09-29 16:17:46, Alex Merry wrote:
> > src/aboutdialog/OcsPersonItem.cpp, lines 174-177
> > <http://git.reviewboard.kde.org/r/100008/diff/1/?file=462#file462line174>
> >
> >     The new behaviour is different to the old behaviour when both city and country are populated.
> >     
> >     Also, I don't think either version works sensibly when city is populated but country isn't.
> 
> Mark Kretschmann wrote:
>     Got a concrete solution maybe?

Three cases:
if ( !ocsPerson.city().isEmpty() && !ocsPerson.country().isEmpty() )
  m_aboutText.append( QString( "<br/>" + ocsPerson.city() + ", " + ocsPerson.country() ) );
else if ( !ocsPerson.city().isEmpty() )
  m_aboutText.append( QString( "<br/>" + ocsPerson.city() ) );
else if ( !ocsPerson.country().isEmpty() )
  m_aboutText.append( QString( "<br/>" + ocsPerson.country() ) );


- Alex


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100008/#review39
-----------------------------------------------------------


On 2010-09-30 16:12:51, Mark Kretschmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100008/
> -----------------------------------------------------------
> 
> (Updated 2010-09-30 16:12:51)
> 
> 
> Review request for amarok.
> 
> 
> Summary
> -------
> 
>     Use QT_USE_FAST_CONCATENATION and QT_USE_FAST_OPERATOR_PLUS for performance.
>     
>     See http://doc.trolltech.com/4.6/qstring.html#more-efficient-string-construction.
>     
>     I had to clean up lots of incorrect string concatenations. Please check for
>     correctness.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt abdcee8 
>   src/aboutdialog/OcsPersonItem.cpp 6685aa1 
>   src/browsers/collectionbrowser/CollectionWidget.cpp 196837c 
>   src/browsers/playlistbrowser/DynamicModel.cpp af7742d 
>   src/context/applets/similarartists/SimilarArtistsApplet.cpp e1e5d59 
>   src/context/applets/upcomingevents/UpcomingEventsApplet.cpp 7233785 
>   src/core-impl/collections/audiocd/AudioCdCollection.cpp a10976b 
>   src/core-impl/collections/daap/DaapCollection.cpp 06e97b2 
>   src/core-impl/collections/sqlcollection/SqlCollectionLocation.cpp e9411e6 
>   src/core-impl/collections/sqlcollection/mysqlecollection/MySqlEmbeddedStorage.cpp b3b40bc 
>   src/core/support/Debug.h 62766c4 
>   src/dynamic/Bias.cpp dec2db2 
>   src/dynamic/BiasSolver.cpp 0be91da 
>   src/dynamic/biases/EchoNest.cpp 2d0038a 
>   src/scriptengine/AmarokCollectionScript.cpp da87d33 
>   src/services/lastfm/CMakeLists.txt 7f17ff7 
>   src/services/lastfm/LastFmService.cpp 3b291fe 
>   src/services/lastfm/LastFmServiceSettings.cpp 6517fea 
>   src/services/lastfm/biases/LastFmBias.cpp 6f3286c 
>   src/services/lastfm/biases/WeeklyTopBias.cpp 98f9257 
> 
> Diff: http://git.reviewboard.kde.org/r/100008/diff
> 
> 
> Testing
> -------
> 
> This still fails to compile because of one error in libLastFM. Who is up for fixing the lib? :)
> 
> 
> Thanks,
> 
> Mark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/amarok-devel/attachments/20101001/d405840d/attachment-0001.htm 


More information about the Amarok-devel mailing list