← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-10 into lp:ubuntu-filemanager-app

 

Carlos Jose Mazieri has proposed merging lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-10 into lp:ubuntu-filemanager-app with lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-09 as a prerequisite.

Commit message:
provided TrashLocation::urlBelongsToLocation()

Requested reviews:
  Ubuntu File Manager Developers (ubuntu-filemanager-dev)

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-10/+merge/265209

TrashLocation::urlBelongsToLocation() should have been present in the previous MPs.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-10 into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/trash/trashlocation.cpp'
--- src/plugin/folderlistmodel/trash/trashlocation.cpp	2015-03-01 15:32:42 +0000
+++ src/plugin/folderlistmodel/trash/trashlocation.cpp	2015-07-19 15:32:02 +0000
@@ -314,3 +314,16 @@
     }
     return new TrashListWorker(trashDir, urlPath, filter);
 }
+
+
+QString TrashLocation::urlBelongsToLocation(const QString &urlPath, int indexOfColonAndSlashe)
+{
+    QString ret;
+#if defined(Q_OS_UNIX)
+    if (urlPath.startsWith(LocationUrl::TrashRootURL.midRef(0,6)))
+    {
+        ret  = LocationUrl::TrashRootURL + DirItemInfo::removeExtraSlashes(urlPath, indexOfColonAndSlashe+1);
+    }
+#endif
+    return ret;
+}

=== modified file 'src/plugin/folderlistmodel/trash/trashlocation.h'
--- src/plugin/folderlistmodel/trash/trashlocation.h	2015-03-01 15:32:42 +0000
+++ src/plugin/folderlistmodel/trash/trashlocation.h	2015-07-19 15:32:02 +0000
@@ -49,6 +49,7 @@
     virtual DirListWorker * newListWorker(const QString &urlPath,
                                           QDir::Filter filter,
                                           const bool isRecursive);
+    virtual QString     urlBelongsToLocation(const QString& urlPath, int indexOfColonAndSlashe);
 
     /*!
      * \brief getMovePairPaths() Get: original path and destination trash path


Follow ups