D28647: Fix KIO::Scheduler::emitReparseSlaveConfiguration() to work if called twice in same process
    Jonathan Marten 
    noreply at phabricator.kde.org
       
    Thu Apr 16 11:27:41 BST 2020
    
    
  
marten added a comment.
  I'm happy to work on the refactoring if you think it's the right thing to do.
  
  Do you mean splitting SchedulerPrivate::slotReparseSlaveConfiguration() up into two halves, the first part (KProtocolManager::reparseConfiguration through to NetRC::self()->reload - reparsing the configuration in the current process) being called directly and by the DBus signal, while the second half (check that 'proto' is applicable then iterate through the allSlaves() list) being called only from emitReparseSlaveConfiguration?  Something like:
  
    void Scheduler::emitReparseSlaveConfiguration()
    {
      schedulerPrivate()->slotReparseSlaveConfiguration(...);
      schedulerPrivate()->reparseOtherSlaves();
    }
    
    void SchedulerPrivate::slotReparseSlaveConfiguration(...)
    {
      KProtocolManager::reparseConfiguration();
      ,,,
      NetRC::self()->reload();
    }
    
    void SchedulerPrivate::reparseOtherSlaves()
    {
      check protocol, return if not applicable
      iterate over allSlaves()
      {
        slave->send(CMD_REPARSECONFIGURATION); slave->resetHost();
      }
    }
REPOSITORY
  R241 KIO
REVISION DETAIL
  https://phabricator.kde.org/D28647
To: marten, #frameworks, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200416/c4081c9c/attachment.html>
    
    
More information about the Kde-frameworks-devel
mailing list