D27181: Rename dialog displays also source file information

Méven Car noreply at phabricator.kde.org
Mon Apr 13 08:42:59 BST 2020


meven added a comment.


  In D27181#646523 <https://phabricator.kde.org/D27181#646523>, @papoteur wrote:
  
  > This new patch provides data from source by calling setSourceData.
  
  
  This looks nice.
  
  > However, from my tests, it is never called.
  
  You might need to edit the other plugins. You could be using another plugin than cliinterface and libarchive without knowing.
  
  The other other code path concerned :
  
    plugins/libzipplugin/libzipplugin.cpp
    650:                Kerfuffle::OverwriteQuery query(renamedEntry);
    
    plugins/libsinglefileplugin/singlefileplugin.cpp
    121:        Kerfuffle::OverwriteQuery query(newFileName);
  
  Other than that, I can recommend you some good old debugging, to see where the calls stops.

INLINE COMMENTS

> queries.cpp:39
>  #include <QDir>
> +#include <QFile>
>  #include <QMessageBox>

Can remove

> queries.cpp:104
> +    if (m_from_archive)
> +    {
> +        QUrl sourceUrl = QUrl::fromLocalFile(QDir::cleanPath(m_data.value(QStringLiteral("filename")).toString()));

We use same line `{` for if and else (with preceeding space).

> queries.cpp:105
> +    {
> +        QUrl sourceUrl = QUrl::fromLocalFile(QDir::cleanPath(m_data.value(QStringLiteral("filename")).toString()));
> +        dialog = new KIO::RenameDialog(

`sourceUrl` can stay out of if/else

> queries.cpp:120
> +    }
> +    else
> +    {

We prefer `} else {`

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

To: papoteur, #ark, elvisangelaccio
Cc: meven, kde-utils-devel, fbampaloukas, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20200413/8a6a8c25/attachment.html>


More information about the Kde-utils-devel mailing list