D14437: Fix QFileDialog not remembering the last visited directory.

2018-08-20 Thread Nathaniel Graham
ngraham added a comment.


  FWIW this works fine for me on the 5.12 branch; might be nice to get it there 
too for LTS users.

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, 
arichardson, ngraham
Cc: ngraham, apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-08-20 Thread David Faure
dfaure closed this revision.

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, 
arichardson, ngraham
Cc: ngraham, apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-08-20 Thread Nathaniel Graham
ngraham accepted this revision.
ngraham added a comment.
This revision is now accepted and ready to land.


  +1, this fixes a really annoying issue I had in LibreOffice 
(https://bugs.documentfoundation.org/show_bug.cgi?id=104192) and doesn't seem 
to regress the location behavior at all.

REPOSITORY
  R135 Integration for Qt applications in Plasma

BRANCH
  directoryEntered

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, 
arichardson, ngraham
Cc: ngraham, apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-08-19 Thread Anthony Fieroni
anthonyfieroni added a comment.


  +1

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-08-19 Thread David Faure
dfaure added a comment.


  ping?

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-07-31 Thread David Faure
dfaure updated this revision to Diff 38826.
dfaure added a comment.


  Remove TODO comment. Although I can say it would have definitely helped me 
when investigating this bug...

REPOSITORY
  R135 Integration for Qt applications in Plasma

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14437?vs=38682=38826

BRANCH
  directoryEntered

REVISION DETAIL
  https://phabricator.kde.org/D14437

AFFECTED FILES
  autotests/kfiledialog_unittest.cpp
  src/platformtheme/kdeplatformfiledialoghelper.cpp

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-07-30 Thread Aleix Pol Gonzalez
apol added a comment.


  +1 from me on the patch.
  I'd prefer without the comment and just have it investigated, I'm not sure 
the comment will help.

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-07-30 Thread David Faure
dfaure added inline comments.

INLINE COMMENTS

> anthonyfieroni wrote in kdeplatformfiledialoghelper.cpp:118
> It works without comment, i think these connections are not needed.

Yes for this problem my patch is enough, but I was surprised to find that those 
signals were not connected. Yes it's a TODO, but unrelated to this bug.

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-07-29 Thread Anthony Fieroni
anthonyfieroni added inline comments.

INLINE COMMENTS

> apol wrote in kdeplatformfiledialoghelper.cpp:118
> I'm not sure I understand the comment. Is it like a TODO?

It works without comment, i think these connections are not needed.

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-07-29 Thread Aleix Pol Gonzalez
apol added inline comments.

INLINE COMMENTS

> kdeplatformfiledialoghelper.cpp:118
> +connect(m_fileWidget->dirOperator(), ::urlEntered, this, 
> ::directoryEntered);
> +// ## no connect to fileSelected, filesSelected, fileHighlighted, 
> currentChanged?
>  layout()->addWidget(m_buttons);

I'm not sure I understand the comment. Is it like a TODO?

REPOSITORY
  R135 Integration for Qt applications in Plasma

REVISION DETAIL
  https://phabricator.kde.org/D14437

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: apol, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, 
abetts, sebas, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-07-28 Thread David Faure
dfaure updated this revision to Diff 38682.
dfaure added a comment.


  Add unittest (which fails without this fix)

REPOSITORY
  R135 Integration for Qt applications in Plasma

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14437?vs=38648=38682

BRANCH
  directoryEntered

REVISION DETAIL
  https://phabricator.kde.org/D14437

AFFECTED FILES
  autotests/kfiledialog_unittest.cpp
  src/platformtheme/kdeplatformfiledialoghelper.cpp

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart


D14437: Fix QFileDialog not remembering the last visited directory.

2018-07-28 Thread David Faure
dfaure created this revision.
dfaure added reviewers: anthonyfieroni, elvisangelaccio, plasma-devel, broulik, 
arichardson.
Restricted Application added a project: Plasma.
dfaure requested review of this revision.

REVISION 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.

REPOSITORY
  R135 Integration for Qt applications in Plasma

BRANCH
  Plasma/5.13

REVISION DETAIL
  https://phabricator.kde.org/D14437

AFFECTED FILES
  src/platformtheme/kdeplatformfiledialoghelper.cpp

To: dfaure, anthonyfieroni, elvisangelaccio, plasma-devel, broulik, arichardson
Cc: ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, 
sebas, apol, mart