[Kde-pim] Review Request 113198: Execute autostart migrations using a MigrationExecutor that can suspend jobs using KUiServer.

Christian Mollekopf chrigi_1 at fastmail.fm
Fri Oct 11 12:08:28 BST 2013



> On Oct. 11, 2013, 10:40 a.m., Kevin Krammer wrote:
> > agents/migration/migrationexecutor.cpp, line 55
> > <http://git.reviewboard.kde.org/r/113198/diff/1/?file=200669#file200669line55>
> >
> >     what do you need the strong ref for?
> >
> 
> Christian Mollekopf wrote:
>     You cannot access the pointer without a strong ref (the object may have been deleted meanwhile), and I'm accessing the object below.
> 
> Kevin Krammer wrote:
>     I see. What is the purpose of the weak references then? My interpretation of your other comment seems to suggest that the queue will never be the owner of the only reference anyway

The executors queue semantically holds only references to the migrators, but I didn't want to have to guarantee that the lifetime of migrators always exceeds the one of the executor (i.e. in case we want to dynamically unload a migrator). So a WeakReference allows to express this nicely. I could switch to references though, it's indeed a bit pointless to use WeakReferences here. Is that what you meant? 


- Christian


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


On Oct. 11, 2013, 10:56 a.m., Christian Mollekopf wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/113198/
> -----------------------------------------------------------
> 
> (Updated Oct. 11, 2013, 10:56 a.m.)
> 
> 
> Review request for KDEPIM.
> 
> 
> Repository: kdepim-runtime
> 
> 
> Description
> -------
> 
> This patch wraps the execution of all autostart migrators with a MigrationExecutor (which is a KJob). The MigrationExecutor is responsible for controlling the execution of its migrators, and exposes control for suspension to the user via KUiServerJobTracker.
> This should result in the same UI as used for copy jobs by KIO.
> 
> 
> Diffs
> -----
> 
>   migration/migratorbase.cpp 582cf55364aee33a7c301a120d875d2c5a99e3a2 
>   migration/migratorbase.h 47811230d41d501b16c460ec8cd45f1acf6efa4a 
>   agents/migration/tests/schedulertest.cpp 2b5518329f8396bfef0f2e204c8d87420debb9c6 
>   agents/migration/tests/dummymigrator.cpp PRE-CREATION 
>   agents/migration/tests/dummymigrator.h PRE-CREATION 
>   agents/migration/tests/CMakeLists.txt 69663ee9bfa53a83a30055612a25ac7a377050ab 
>   agents/migration/migrationscheduler.cpp 6fbb7bd9dbcaad34563ff73490dd281174d6866b 
>   agents/migration/migrationscheduler.h 3e0afb2266dece8da58c0f74191b1c1914c40ef3 
>   agents/migration/migrationexecutor.h PRE-CREATION 
>   agents/migration/migrationexecutor.cpp PRE-CREATION 
>   agents/migration/migrationagent.cpp eea66c517cd6c99efe8280adf17fe7d0f9dae6d3 
>   agents/migration/CMakeLists.txt 06ac3328194960563c7f91b89131e9667a0c24fd 
> 
> Diff: http://git.reviewboard.kde.org/r/113198/diff/
> 
> 
> Testing
> -------
> 
> I tested it using KWidgetJobTracker (because I couldn't get a notification plasmoid to work in my devel session), and extended the unit-tests accordingly.
> 
> 
> Thanks,
> 
> Christian Mollekopf
> 
>

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list