[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-25 Thread noreply
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into 
lp:ubuntu-filemanager-app has been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
-- 
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-25 Thread Arto Jalkanen
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into 
lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
-- 
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-25 Thread Arto Jalkanen
Review: Approve


-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-25 Thread Ubuntu Phone Apps Jenkins Bot
Review: Approve continuous-integration

PASSED: Continuous integration, rev:447
http://91.189.93.70:8080/job/ubuntu-filemanager-app-ci/536/
Executed test runs:
SUCCESS: http://91.189.93.70:8080/job/generic-mediumtests-utopic/3183
deb: 
http://91.189.93.70:8080/job/generic-mediumtests-utopic/3183/artifact/work/output/*zip*/output.zip
SUCCESS: 
http://91.189.93.70:8080/job/ubuntu-filemanager-app-utopic-amd64-ci/252
SUCCESS: 
http://91.189.93.70:8080/job/ubuntu-filemanager-app-vivid-amd64-ci/158

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/ubuntu-filemanager-app-ci/536/rebuild

-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-25 Thread Ubuntu Phone Apps Jenkins Bot
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into 
lp:ubuntu-filemanager-app has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
-- 
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-25 Thread Ubuntu Phone Apps Jenkins Bot
Review: Needs Fixing continuous-integration

FAILED: Autolanding.
Unapproved changes made after approval.
http://91.189.93.70:8080/job/ubuntu-filemanager-app-autolanding/228/
Executed test runs:
SUCCESS: http://91.189.93.70:8080/job/generic-mediumtests-utopic/3182
deb: 
http://91.189.93.70:8080/job/generic-mediumtests-utopic/3182/artifact/work/output/*zip*/output.zip
SUCCESS: 
http://91.189.93.70:8080/job/ubuntu-filemanager-app-utopic-amd64-autolanding/130
SUCCESS: 
http://91.189.93.70:8080/job/ubuntu-filemanager-app-vivid-amd64-autolanding/71

-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-16 Thread Carlos Jose Mazieri
I was using QScopedPointer where it was really necessary, some new/delete were 
kept due to performance. I will change both dirmodel.cpp and 
filesystemaction.cpp to use only QScopedPointer instead of new/delete.
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-11 Thread Arto Jalkanen
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into 
lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
-- 
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-08-11 Thread Arto Jalkanen
Review: Approve

One diff comment

Diff comments:

> === modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
> --- src/plugin/folderlistmodel/dirmodel.cpp   2015-07-19 16:40:43 +
> +++ src/plugin/folderlistmodel/dirmodel.cpp   2015-07-19 16:40:43 +
> @@ -642,22 +644,26 @@
>  return retval;
>  }
>  
> -void DirModel::mkdir(const QString &newDir)
> +
> +bool DirModel::mkdir(const QString &newDir)
>  {
> -if (!allowAccess(mCurrentDir)) {
> -qDebug() << Q_FUNC_INFO << "Access denied in current path" << 
> mCurrentDir;
> -return;
> -}
> -
> -QDir dir(mCurrentDir);
> -bool retval = dir.mkdir(newDir);
> +LocationItemDir *dir = mCurLocation->newDir(mCurrentDir);

Would be better to use QScopedPointer to ensure the object is deleted without 
having to manually call delete

> +bool retval = dir->mkdir(newDir);
>  if (!retval) {
>  const char *errorStr = strerror(errno);
>  qDebug() << Q_FUNC_INFO << this << "Error creating new directory: " 
> << errno << " (" << errorStr << ")";
>  emit error(QObject::tr("Error creating new folder"), errorStr);
>  } else {
> -onItemAdded(dir.filePath(newDir));
> +DirItemInfo *subItem = mCurLocation->newItemInfo(newDir);
> +if (subItem->isRelative())
> +{
> +subItem->setFile(mCurrentDir, newDir);
> +}
> +onItemAdded(*subItem);
> +delete subItem;
>  }
> +delete dir;
> +return retval;
>  }
>  
>  bool DirModel::showDirectories() const


-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-07-19 Thread Ubuntu Phone Apps Jenkins Bot
Review: Approve continuous-integration

PASSED: Continuous integration, rev:446
http://91.189.93.70:8080/job/ubuntu-filemanager-app-ci/520/
Executed test runs:
SUCCESS: http://91.189.93.70:8080/job/generic-mediumtests-utopic/3105
deb: 
http://91.189.93.70:8080/job/generic-mediumtests-utopic/3105/artifact/work/output/*zip*/output.zip
SUCCESS: 
http://91.189.93.70:8080/job/ubuntu-filemanager-app-utopic-amd64-ci/236
SUCCESS: 
http://91.189.93.70:8080/job/ubuntu-filemanager-app-vivid-amd64-ci/142

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/ubuntu-filemanager-app-ci/520/rebuild

-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15/+merge/265214
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into 
lp:ubuntu-filemanager-app.

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers
More help   : https://help.launchpad.net/ListHelp


[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into lp:ubuntu-filemanager-app

2015-07-19 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-14 as a prerequisite.

Commit message:
Qt QDir object is no longer used in Actions nor in DirModel class, instead 
inherited LocationItemDir classes are used

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

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

Qt QDir object is no longer used in Actions nor in DirModel class, instead 
inherited LocationItemDir classes are used
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-15 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
--- src/plugin/folderlistmodel/dirmodel.cpp	2015-07-19 16:40:43 +
+++ src/plugin/folderlistmodel/dirmodel.cpp	2015-07-19 16:40:43 +
@@ -40,6 +40,7 @@
 #include "disklocation.h"
 #include "trashlocation.h"
 #include "netauthenticationdata.h"
+#include "locationitemdir.h"
 
 
 #ifndef DO_NOT_USE_TAG_LIB
@@ -64,6 +65,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #if defined(REGRESSION_TEST_FOLDERLISTMODEL)
 # include 
@@ -642,22 +644,26 @@
 return retval;
 }
 
-void DirModel::mkdir(const QString &newDir)
+
+bool DirModel::mkdir(const QString &newDir)
 {
-if (!allowAccess(mCurrentDir)) {
-qDebug() << Q_FUNC_INFO << "Access denied in current path" << mCurrentDir;
-return;
-}
-
-QDir dir(mCurrentDir);
-bool retval = dir.mkdir(newDir);
+LocationItemDir *dir = mCurLocation->newDir(mCurrentDir);
+bool retval = dir->mkdir(newDir);
 if (!retval) {
 const char *errorStr = strerror(errno);
 qDebug() << Q_FUNC_INFO << this << "Error creating new directory: " << errno << " (" << errorStr << ")";
 emit error(QObject::tr("Error creating new folder"), errorStr);
 } else {
-onItemAdded(dir.filePath(newDir));
+DirItemInfo *subItem = mCurLocation->newItemInfo(newDir);
+if (subItem->isRelative())
+{
+subItem->setFile(mCurrentDir, newDir);
+}
+onItemAdded(*subItem);
+delete subItem;
 }
+delete dir;
+return retval;
 }
 
 bool DirModel::showDirectories() const
@@ -728,19 +734,18 @@
 
 QString DirModel::parentPath() const
 {
-QDir dir(mCurrentDir);
-if (dir.isRoot()) {
+const DirItemInfo *dir = mCurLocation->info();
+if (dir->isRoot()) {
 qDebug() << Q_FUNC_INFO << this << "already at root";
 return mCurrentDir;
 }
 
-bool success = dir.cdUp();
-if (!success) {
+if (!canReadDir(dir->absolutePath())) {
 qWarning() << Q_FUNC_INFO << this << "Failed to to go to parent of " << mCurrentDir;
 return mCurrentDir;
 }
-qDebug() << Q_FUNC_INFO << this << "returning" << dir.absolutePath();
-return dir.absolutePath();
+qDebug() << Q_FUNC_INFO << this << "returning" << dir->absolutePath();
+return dir->absolutePath();
 }
 
 QString DirModel::homePath() const
@@ -1259,6 +1264,14 @@
 return dirFilter;
 }
 
+/*!
+ * \brief DirModel::dirItems() Gets a Dir number of Items, used only for Local Disk
+ *
+ *For remote Locations this function is not used
+ *
+ * \param fi
+ * \return A string saying how many items a directory has
+ */
 QString DirModel::dirItems(const DirItemInfo& fi) const
 {
 int counter = 0;

=== modified file 'src/plugin/folderlistmodel/dirmodel.h'
--- src/plugin/folderlistmodel/dirmodel.h	2015-07-19 16:40:43 +
+++ src/plugin/folderlistmodel/dirmodel.h	2015-07-19 16:40:43 +
@@ -132,7 +132,7 @@
 Q_INVOKABLE bool rename(const QString& oldName, const QString& newName);
 Q_INVOKABLE bool rename(int row, const QString &newName);
 
-Q_INVOKABLE void mkdir(const QString &newdir);
+Q_INVOKABLE bool mkdir(const QString &newdir);
 
 Q_PROPERTY(bool filterDirectories READ filterDirectories WRITE setFilterDirectories NOTIFY filterDirectoriesChanged)
 bool filterDirectories() const;
@@ -436,14 +436,15 @@
 void needsAuthentication(const QString& user, const QString& urlPath);
 
 /*!
- * \brief insertedItem()
+ * \brief insertedRow()
  *
  *  It happens when a new file is inserted in an existent view,
  *  for example from  \ref mkdir() or \ref paste()
  *
  *  It can be used to make the new row visible to the user doing a scroll to
- */
+ */
 void  insertedRow(int row);
+
 /*!
  * \brief progress()
  *  Sends status about recursive and multi-items remove/move/copy

=== modified file 'src/plugin/folderlistmodel/filesystemaction.cpp'
--- src/plugin/folderlistmodel/filesystemaction.cpp	2015-07-19 16:40:43 +
+++ src/plugin/folderlistmodel/filesystemaction.cpp	2015-07-19 16:40:43 +
@