Review Request: Convert all uses of QPointer to QWeakPointer, for better performance.

Mark Kretschmann kretschmann at kde.org
Fri Oct 8 10:00:55 CEST 2010


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

(Updated 2010-10-08 08:00:54.657094)


Review request for Amarok.


Changes
-------

Made more progress with the conversion. Still lots to do (well, it's hard to estimate how much remains, maybe it's almost done).


Summary
-------

Convert all uses of QPointer to QWeakPointer, for better performance.
    
    See http://doc.trolltech.com/4.6/qweakpointer.html
    
    Unfortunately this is pretty monotonous work, as QWeakPointer doesn't
    support all normal pointer semantics, e.g. no foo->blah(). I got pretty far,
    but then had to give up at a strange compiler error.
    
    Anyone want to help finishing it?


Diffs (updated)
-----

  src/ActionClasses.h bf0149d 
  src/App.h 5866aa2 
  src/EngineController.h ecd81e9 
  src/MainWindow.h b86470e 
  src/MainWindow.cpp 54c6751 
  src/TrayIcon.h 2cb3eca 
  src/browsers/BrowserDock.h cf99dad 
  src/browsers/BrowserDock.cpp 06d6320 
  src/context/ContextDock.h 06fe848 
  src/context/ContextDock.cpp fd8d1a1 
  src/context/ContextView.h 2a6ff7d 
  src/context/ToolbarView.h 95ea6af 
  src/context/ToolbarView.cpp bb0f065 
  src/context/applets/labels/LabelsApplet.h fdef463 
  src/context/applets/videoclip/VideoclipApplet.h 38edb46 
  src/context/engines/labels/LabelsEngine.h 497d7fe 
  src/core-impl/collections/daap/DaapCollection.h fdba0af 
  src/core-impl/collections/daap/DaapCollection.cpp 253fe12 
  src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.h 56dd268 
  src/core-impl/collections/mediadevicecollection/MediaDeviceMeta.cpp 4b39d7c 
  src/core-impl/collections/mtpcollection/handler/capabilities/MtpReadCapability.h 464db43 
  src/core-impl/collections/sqlcollection/SqlCollection.h 89fcdc0 
  src/core-impl/collections/sqlcollection/SqlMeta.cpp 5000ec1 
  src/core-impl/collections/sqlcollection/SqlQueryMaker.cpp 714fac7 
  src/core-impl/collections/sqlcollection/SqlQueryMakerInternal.h 98e6976 
  src/core-impl/collections/support/MemoryQueryMakerInternal.h fa2a7f5 
  src/core-impl/logger/ProxyLogger.h f321ca0 
  src/core-impl/meta/file/File.cpp 0b86acb 
  src/core-impl/meta/proxy/MetaProxy.cpp 316baaa 
  src/core-impl/meta/stream/Stream.cpp c86d495 
  src/core/engine/EngineObserver.h 449677b 
  src/core/support/Amarok.h a4fb497 
  src/core/support/Amarok.cpp 33d9d0b 
  src/covermanager/CoverFetcher.h 335e0ce 
  src/covermanager/CoverFoundDialog.h ca83535 
  src/covermanager/CoverFoundDialog.cpp 5f5406a 
  src/dynamic/Bias.h 6ec60b6 
  src/dynamic/Bias.cpp 1708718 
  src/dynamic/BiasedPlaylist.h a178e93 
  src/dynamic/BiasedPlaylist.cpp 35946af 
  src/network/NetworkAccessManagerProxy.cpp d60eb4e 
  src/playlist/PlaylistDock.h ea13089 
  src/playlist/PlaylistDock.cpp 1f09769 
  src/playlist/layouts/LayoutEditDialog.h ef602f9 
  src/playlist/layouts/LayoutEditDialog.cpp 528bcc3 
  src/services/lastfm/LastFmTreeView.h 6e16000 
  src/services/lastfm/meta/LastFmMeta.cpp 3183521 
  src/widgets/MetaQueryWidget.h 4d544c7 
  src/widgets/MetaQueryWidget.cpp 5f9171a 
  src/widgets/TokenWithLayout.h bb71ac8 
  src/widgets/TokenWithLayout.cpp c5451d0 
  src/widgets/VolumeWidget.h 097cf6a 

Diff: http://git.reviewboard.kde.org/r/100011/diff


Testing
-------

Fixed error after error (lots of pointer dereferences needed changing), but got stuck at one particular compile error. Help appreciated.

foo->blah() must be changed to foo.data()->blah() to work with QWeakPointer.


Thanks,

Mark

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


More information about the Amarok-devel mailing list