1. 25 Feb, 2018 9 commits
    • Elvis Angelaccio's avatar
      Rework kill logic · b1a251eb
      Elvis Angelaccio authored
      The libzip plugin sometimes cannot react to `QThread::requestInterruption()`
      because there is a blocking `zip_close()` which writes to disk (e.g. with AddJobs).
      
      This means we have to manually abort the thread (by passing a timeout to
      `QThread::wait()` in `Job::doKill()`. We cannot do this uconditionally
      because we would end up with crashes in libarchive. Since the libarchive
      plugin is not affected by this problem, we rework the logic in
      `Job::doKill()` by assuming that the interface will tell us whether it
      needs to be brutally killed. This way we can distinguish between the
      libarchive and the libzip plugins (the ones that use a worker thread).
      
      The mutex in this patch is needed because in theory `m_operationMode` could be
      read and written by different threads at the same time, even though that's unlikely.
      
      BUG: 389290
      FIXED-IN: 18.03.80
      Task: T7824
      b1a251eb
    • Elvis Angelaccio's avatar
      libzip: implement killing TestJob · 0fba00d0
      Elvis Angelaccio authored
      Depends on fa3865693c, otherwise we would get two messageboxes after
      stopping the TestJob from the Plasma systray.
      0fba00d0
    • Elvis Angelaccio's avatar
      Stop emitting result() after doKill() · 79219339
      Elvis Angelaccio authored
      Whether the job emits the `result()` signal should depend on the
      argument passed to `KJob::killed()`. From the Ark side we always call
      `kill()` which uses the default argument `Quietly`.
      
      However, KUiServerJobTracker (called from the plasma systrat applet)
      calls `kill(KJob::EmitResult)`. This means that the result signal will
      be emitted twice: one from `KJob::finishJob()` and another one when the
      Ark jobs return and we go to `Job::onFinished()`.
      
      This means that from the Ark side we need to emit `result()` only when
      we didn't kill the job quietly, i.e. when we didn't call `doKill()`
      (which sends the request interruption to the secondary threads).
      
      This patch does that but it's quite an hack. A better long-term solution
      would be to refactor the interface functions so that they return an enum
      rather than a boolean (see T8084).
      
      Task: T8081
      79219339
    • Elvis Angelaccio's avatar
      Add apidox to cancelled() signal · 0f02f13e
      Elvis Angelaccio authored
      0f02f13e
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/17.12' · 92c2684c
      Elvis Angelaccio authored
      * Applications/17.12:
        Mark canceled extractions as killed jobs
      92c2684c
    • Elvis Angelaccio's avatar
      Mark canceled extractions as killed jobs · 92fe1c13
      Elvis Angelaccio authored
      If the user canceled an OverwriteQuery dialog, we should not claim the
      extraction finished. By emitting the canceled() signal, the extraction
      jobs will set the KilledJobError error and the plasma applet will not
      show the "Finished" string in the notification.
      
      BUG: 382601
      FIXED-IN: 17.12.3
      
      Task: T6707
      92fe1c13
    • Elvis Angelaccio's avatar
      Fix apidox copy-paste bug · 5e2f3163
      Elvis Angelaccio authored
      5e2f3163
    • Elvis Angelaccio's avatar
      Fix valgrind uninitialised warnings · d36f3880
      Elvis Angelaccio authored
      d36f3880
    • Elvis Angelaccio's avatar
      Fix mismatched new[] / delete[] valgrind warning · 910d2872
      Elvis Angelaccio authored
      QScopedPointer by default uses `delete`, even if we used `new []`.
      We would have to use the following verbose syntax:
      
          QScopedPointer<uchar, QScopedPointerArrayDeleter<uchar>> buf(new uchar[...]);
      
      But `std::unique_ptr` can do the right thing by just looking at the template
      parameter, so let's use that.
      910d2872
  2. 24 Feb, 2018 2 commits
  3. 18 Feb, 2018 2 commits
    • Elvis Angelaccio's avatar
      Merge branch 'Applications/17.12' · 2610eebc
      Elvis Angelaccio authored
      * Applications/17.12:
        Stop crashing when all read-write plugins are disabled
      2610eebc
    • Elvis Angelaccio's avatar
      Stop crashing when all read-write plugins are disabled · 2af8d35e
      Elvis Angelaccio authored
      CreateDialog assumes that `m_supportedMimeTypes` is never empty, it will crash otherwise.
      
      If that's the case (i.e. when all the read-write plugins have been disabled),
      we just disable the Compress menu item and the New action (as the
      CreateDialog would just be useless).
      
      For the New action, we also need to check whether the settings have been
      changed and update its enabled status accordingly.
      
      BUG: 390690
      FIXED-IN: 17.12.3
      2af8d35e
  4. 04 Feb, 2018 3 commits
  5. 02 Feb, 2018 1 commit
  6. 08 Jan, 2018 2 commits
  7. 05 Jan, 2018 1 commit
  8. 04 Jan, 2018 3 commits
  9. 03 Jan, 2018 4 commits
  10. 13 Dec, 2017 2 commits
  11. 04 Dec, 2017 3 commits
  12. 03 Dec, 2017 2 commits
  13. 30 Nov, 2017 1 commit
  14. 27 Nov, 2017 2 commits
  15. 20 Nov, 2017 2 commits
  16. 18 Nov, 2017 1 commit