1. 24 Feb, 2022 1 commit
  2. 29 Aug, 2021 1 commit
    • Alexander Lohnau's avatar
      Run clang-format · 7643aaf2
      Alexander Lohnau authored
      If you want git blame to ignore formatting revisions run:
      git config blame.ignoreRevsFile .git-blame-ignore-revs
      7643aaf2
  3. 29 Jul, 2021 1 commit
  4. 23 Oct, 2020 1 commit
  5. 22 Oct, 2020 1 commit
  6. 13 Jul, 2020 1 commit
  7. 13 Apr, 2020 1 commit
    • Nate Graham's avatar
      Fix build · 6d7fe9e5
      Nate Graham authored
      Summary:
      Though for some reason it's not failing on the CI, plasma-integration is failing to build
      for me with the following error:
      
      ```
      /home/nate/kde/src/plasma-integration/src/platformtheme/kdeplatformfiledialoghelper.cpp:342:78: error: cannot bind non-const lvalue reference of type ‘QStringList&’ to an rvalue of type ‘QStringList’
        342 |         dialog->m_fileWidget->setSupportedSchemes(options()->supportedSchemes());
            |                                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
      ```
      
      `options()->supportedSchemes()` returns a const reference but `dialog->m_fileWidget->setSupportedSchemes`
      wants a non-const reference, so this patch has it make a local copy to keep it happy. This
      is kind of weird since the code here hasn't been touched in years and
      `options()->supportedSchemes() has returned a const reference for a long time too, yet
      this code only now started failing for me yesterday.
      
      Test Plan: It builds for me now
      
      Reviewers: davidre, #plasma, apol
      
      Reviewed By: apol
      
      Subscribers: apol, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D28724
      6d7fe9e5
  8. 30 Jan, 2020 2 commits
  9. 14 Dec, 2019 1 commit
    • David Edmundson's avatar
      Resize file dialog window before size restore · 2e9f9684
      David Edmundson authored
      Summary:
      KDEPlatformDialogHelper explicitly resizes the window contents to the
      window as part of a bug fix. This means we lose the common path where
      the window resizes to the content's size hints that happens later.
      
      If we resize the window to the size hint in advance we keep our size
      hint.
      
      (alternatively it seems to be me we can remove that old hack...but it
      needs testing by people with Qt5.12)
      
      Test Plan:
      KWrite -> open
      
      Size is 900x600, the size hint
      not 640x480 the QPA default
      
      Reviewers: #plasma, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D25986
      2e9f9684
  10. 05 Nov, 2019 1 commit
  11. 15 Jul, 2019 1 commit
  12. 27 Jun, 2019 1 commit
    • Robert Hoffmann's avatar
      Fix selectedNameFilter() multiple matches · 0f529bca
      Robert Hoffmann authored and David Faure's avatar David Faure committed
      Summary:
      If your filter list has two matching filters for an extension, KFileWidget
      will return the name of the first filter when calling
      QFileDialog::selectedNameFilter(), even if the second filter was selected
      in the dialog.
      
      This is a follow-up for https://phabricator.kde.org/D21249
      
      Test Plan:
      1. Compile and run the attached program to the bug report 407819
      2. Make sure that "auto extension" checkbox is enabled
      3. Select the last file filter (DocBook (.xml)) via dropdown list
      4. Click "Save"
      5. Check program output
      
      Result without this patch:
      The output is "Word 2003 XML (.xml) (*.xml)"
      
      Result with this patch applied:
      The output should be "DocBook (.xml) (*.xml)", since this was selected in the file dialog.
      
      BUG: 407819
      
      Reviewers: #frameworks, apol, dfaure
      
      Reviewed By: dfaure
      
      Subscribers: michaelweghorn, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D21959
      0f529bca
  13. 25 Oct, 2018 1 commit
  14. 20 Aug, 2018 1 commit
    • David Faure's avatar
      Fix QFileDialog not remembering the last visited directory. · 4848bec1
      David Faure authored
      Summary:
      This regression (compared to kdelibs4's direct KFileDialog usage) came
      from the fact that QFileDialog's lastVisited() only gets updated if
      the helper emits directoryEntered.
      
      So QFileDialog was setting the current dir as startDir every single
      time, overriding's KFileWidget's own logic for reusing the last dir
      initially.
      
      Test Plan:
      QFileDialog::getOpenFileName(this, i18n("Select file"));
      twice in a row, from the same process.
      
      Reviewers: anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson, ngraham
      
      Reviewed By: ngraham
      
      Subscribers: ngraham, apol
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D14437
      
      (cherry picked from commit b269980d)
      4848bec1
  15. 19 Aug, 2018 1 commit
  16. 17 Apr, 2018 1 commit
  17. 08 Apr, 2018 2 commits
    • Alex Richardson's avatar
      KDEPlatformFileDialog: Fix initial directory selection for remote files · cc064e81
      Alex Richardson authored and Alex Richardson's avatar Alex Richardson committed
      Summary:
      Previously KDEPlatformFileDialogHelper::selectFile() would change
      options()->initialDirectory() unconditionally even if it was already
      set by the QFileDialog code. Since Qt 5.7.1 it is no longer necessary
      to derive initialDirectory from the selectFile() call. In fact it is
      actuall harmful since it will now override the correct initial directory
      that was set by Qt. Without this patch I got the following debug output:
      
      ```
      KDEPlatformFileDialogHelper::setDirectory QUrl("sftp://server/home/alr48/cheri/build_sdk.sh")
      KDEPlatformFileDialogHelper::setDirectory QUrl("sftp://server/home/alr48/cheri/build_sdk.sh")
      KDEPlatformFileDialogHelper::selectFile QUrl("file:///home/alex/build_sdk.sh")
      KDEPlatformFileDialogHelper::setDirectory QUrl("file:///home/alex/)
      ```
      The final setDirectory() call is actually a call to
      `setDirectory(options->initialDirectory())` which was set in `selectFile()`.
      
      We now depend on Qt 5.9 so we can remove this code without a check for
      version >= 5.7.1.
      
      BUG: 374913
      
      Test Plan: Remote directory is now opened correctly (tested with Qt 5.10.0)
      
      Reviewers: #plasma, elvisangelaccio
      
      Reviewed By: elvisangelaccio
      
      Subscribers: ngraham, krzyc, anthonyfieroni, elvisangelaccio, graesslin, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D4193
      cc064e81
    • Alex Richardson's avatar
      KDEPlatformFileDialog: Fix initial directory selection for remote files · bfd41a95
      Alex Richardson authored and Alex Richardson's avatar Alex Richardson committed
      Summary:
      Previously KDEPlatformFileDialogHelper::selectFile() would change
      options()->initialDirectory() unconditionally even if it was already
      set by the QFileDialog code. Since Qt 5.7.1 it is no longer necessary
      to derive initialDirectory from the selectFile() call. In fact it is
      actuall harmful since it will now override the correct initial directory
      that was set by Qt. Without this patch I got the following debug output:
      
      ```
      KDEPlatformFileDialogHelper::setDirectory QUrl("sftp://server/home/alr48/cheri/build_sdk.sh")
      KDEPlatformFileDialogHelper::setDirectory QUrl("sftp://server/home/alr48/cheri/build_sdk.sh")
      KDEPlatformFileDialogHelper::selectFile QUrl("file:///home/alex/build_sdk.sh")
      KDEPlatformFileDialogHelper::setDirectory QUrl("file:///home/alex/)
      ```
      The final setDirectory() call is actually a call to
      `setDirectory(options->initialDirectory())` which was set in `selectFile()`.
      
      We now depend on Qt 5.9 so we can remove this code without a check for
      version >= 5.7.1.
      
      BUG: 374913
      
      Test Plan: Remote directory is now opened correctly (tested with Qt 5.10.0)
      
      Reviewers: #plasma, elvisangelaccio
      
      Reviewed By: elvisangelaccio
      
      Subscribers: ngraham, krzyc, anthonyfieroni, elvisangelaccio, graesslin, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D4193
      bfd41a95
  18. 30 Jan, 2018 1 commit
  19. 04 Jan, 2018 1 commit
    • Alexander Volkov's avatar
      Require Qt 5.9 · de7c99bd
      Alexander Volkov authored
      Summary:
      Plasma 5.12 requires Qt 5.9, so also plasma-integration can require Qt 5.9
      which removes quite some ifdefs.
      
      Reviewers: #plasma, graesslin
      
      Reviewed By: #plasma, graesslin
      
      Subscribers: graesslin, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D9625
      de7c99bd
  20. 05 Jun, 2017 1 commit
    • Elvis Angelaccio's avatar
      Don't ignore initially selected mime type filter · 267e7c63
      Elvis Angelaccio authored
      Otherwise QFileDialog::selectMimeTypeFilter() has no effect
      if called before show()/initializeDialog() (because the mime
      filters are set only in initializeDialog()).
      
      We also need to ignore the initiallySelectedNameFilter() (which is
      implicitly set) if we have an initiallySelectedMimeTypeFilter().
      
      Test Plan:
      tests/qfiledialogtest --mimeTypeFilter application/json --mimeTypeFilter application/zip --selectMimeTypeFilter application/zip
      
      Moved the show() call in the existing unit test, now it passes.
      
      Reviewers: #plasma, dfaure
      
      Differential Revision: https://phabricator.kde.org/D5957
      267e7c63
  21. 27 May, 2017 1 commit
    • Elvis Angelaccio's avatar
      Make sure we always set a default mime filter in save mode · 0dafb940
      Elvis Angelaccio authored
      KFileWidget::setMimeFilter() documentation says a default mime filter
      should be set if the dialog is being open in save mode.
      
      Without a default filter, the dialog uses a custom item (created by
      concatenating all the mime type filters) as default. This is not useful
      because it means an additional click for the user to select a filter that can
      actually be useful.
      
      If the initiallySelectedMimeTypeFilter() is empty, we use the first mime
      filter as fallback.
      
      Test Plan:
      tests/qfiledialogtest --mimeTypeFilter application/json --mimeTypeFilter application/zip --acceptMode save
      
      New unit test passes.
      
      Reviewers: #plasma, dfaure
      
      Differential Revision: https://phabricator.kde.org/D5956
      0dafb940
  22. 15 May, 2017 1 commit
  23. 22 Apr, 2017 1 commit
  24. 13 Feb, 2017 1 commit
  25. 20 Jan, 2017 1 commit
  26. 31 Dec, 2016 1 commit
  27. 23 Dec, 2016 3 commits
    • David Faure's avatar
      Fix compilation with Qt 5.8. · 6b405fea
      David Faure authored and Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau committed
      6b405fea
    • David Faure's avatar
      Fix compilation with Qt 5.8. · 8fefab22
      David Faure authored
      8fefab22
    • Friedrich W. H. Kossebau's avatar
      Fix Plasma-QPA filedialog to show wrong directory with QFileDialog::selectUrl() · 7bbbd93c
      Friedrich W. H. Kossebau authored
      Summary:
      QFileDialog does not set the initialDirectory option in codepaths from
      QFileDialog::selectUrl(...) or QFileDialog::selectFile(...) when passing
      the task on to the native widget. So KDEPlatformFileDialogHelper has to
      make sure itself that info is kept.
      Because KDEPlatformFileDialogHelper::initializeDialog() calls
      setDirectory(options()->initialDirectory()); as intended, usually during
      the show event. And by that it resets any otherwise wanted state of the
      filewidget it had from previous setup calls via QFileDialog, and instead
      to whatever value the initialDirectory option had before, usually the
      working directory as set during initialization.
      
      Test Plan:
      New unit test kfiledialog_unittest testSelectUrl no longer fails with added
      code, also behaves now as expected with code e.g. from KUrlRequester.
      
      Reviewers: #plasma, #frameworks, dfaure
      
      Reviewed By: #plasma, graesslin, dfaure
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D3796
      7bbbd93c
  28. 31 Aug, 2016 1 commit
  29. 05 Jun, 2016 1 commit
  30. 08 Apr, 2016 1 commit
  31. 07 Apr, 2016 1 commit
  32. 29 Mar, 2016 2 commits
  33. 14 Jan, 2016 1 commit
  34. 30 Sep, 2015 1 commit
    • Xuetian Weng's avatar
      Fix random file dialog not showing up problem. · 5d7e29c3
      Xuetian Weng authored
      When using QDialog to implement QPlatformDialog there will be a issue,
      that QDialog will use a dummy invisible to make Qt aware that a modal
      dialog exists. But for our usecase, this invisible dialog will show up
      after our own qdialog and cause our dialog not accept any input.
      
      The original workaround is to hide our dialog and show it again, but
      this will hit QTBUG-48248 and our dialog will not show up at all
      randomly. To avoid this, we delegate the call to show() on our
      QDialog with a timer.
      
      BUG: 350758
      REVIEW: 125208
      5d7e29c3
  35. 24 Aug, 2015 1 commit