> On Feb. 14, 2016, 11:12 p.m., Aleix Pol Gonzalez wrote: > > src/platformtheme/kdeplatformfiledialoghelper.cpp, line 198 > > <https://git.reviewboard.kde.org/r/126876/diff/2/?file=444275#file444275line198> > > > > We shouldn't be calling sync API there.
That is true :( I have been debugging this a bit and it is not very straight forward... When we open the QFileDialog we actually get 3 calls to setDirectory() I have been thinking about figuring out why it is called so many times but I have not been able to pinpoint what would be needed to get it to only set the directory and file once. KDirSelectDialog is using job->exec() in 4 places and the KDirOperator::setUrl() would also use job->exec().... but maybe that is the place it should be fixed? in KDirOperator::setUrl() (kio/src/filewidgets/kdiroperator.cpp line 1005) we have: if (!Private::isReadable(newurl)) { // maybe newurl is a file? check its parent directory And here we go on to use job->exec() and friends to check if the URL is readable and a directory. Except that Private::isReadable() always returns true for remote URLs... What is the proper solution here? - Kåre ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/126876/#review92369 ----------------------------------------------------------- On Feb. 14, 2016, 6:25 a.m., Kåre Särs wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/126876/ > ----------------------------------------------------------- > > (Updated Feb. 14, 2016, 6:25 a.m.) > > > Review request for KDE Frameworks, Alex Richardson and David Faure. > > > Repository: frameworkintegration > > > Description > ------- > > Qt does not know if the remote URL points to a file or directory. that is why > options()->initialDirectory() returns the full URL even if it is a file. > > > This fix is a bit like Alex Richardson workaround in KIO > (https://git.reviewboard.kde.org/r/126831/), but in frameworkintegration in > stead (I did not see his/Your KIO fix before now...) > > I check the remote url in setDirectory() because setDirectoy() is called from > two places. > > > Diffs > ----- > > src/platformtheme/kdeplatformfiledialoghelper.cpp 11e7efb > > Diff: https://git.reviewboard.kde.org/r/126876/diff/ > > > Testing > ------- > > Kate now happily opens local and remote folders :) > > > File Attachments > ---------------- > > firefox.desktop > > https://git.reviewboard.kde.org/media/uploaded/files/2016/01/25/60c21962-396e-468e-add9-e7112c49d7ba__firefox.desktop > > > Thanks, > > Kåre Särs > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel