Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~renatofilho/ubuntu-filemanager-app/snap-mir-libs into lp:ubuntu-filemanager-app

2017-03-24 Thread Carlos Jose Mazieri
Review: Approve

That is OK.
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/snap-mir-libs/+merge/320882
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:~renatofilho/ubuntu-filemanager-app/snap-mir into lp:ubuntu-filemanager-app

2017-02-14 Thread Carlos Jose Mazieri
Review: Approve

That is OK, thank you.
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/snap-mir/+merge/316877
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/fix-network-crash-1609051 into lp:ubuntu-filemanager-app

2017-01-27 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/fix-network-crash-1609051 into 
lp:ubuntu-filemanager-app.

Commit message:
FIX the netwotk crash when Localtion::m_info is deleted in the main thread

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/fix-network-crash-1609051/+merge/315772

FIX the netwotk crash when Localtion::m_info is deleted in the main thread 
because it is used in the worker thread, NetworkListWorker creates its own 
DirItemInfo instance and copies the data from Localtion::m_info to avoid that 
problem.

Location and descendant classes should be checked further to avoid deleting 
Localtion::m_info
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/fix-network-crash-1609051 
into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/networklistworker.cpp'
--- src/plugin/folderlistmodel/networklistworker.cpp	2015-12-12 14:32:18 +
+++ src/plugin/folderlistmodel/networklistworker.cpp	2017-01-27 13:13:23 +
@@ -24,15 +24,22 @@
 #include "locationurl.h"
 
 NetworkListWorker::NetworkListWorker(LocationItemDirIterator * dirIterator,
- DirItemInfo * mainItemInfo, const DirItemInfo *parent) :
+ DirItemInfo * mainItemInfo,
+ const DirItemInfo   * parentItemInfo) :
 DirListWorker(dirIterator->path(),
   dirIterator->filters(),
   dirIterator->flags() == QDirIterator::Subdirectories ? true : false),
 m_dirIterator(dirIterator),
-m_mainItemInfo(mainItemInfo),
-m_parent(parent)
+m_mainItemInfo(mainItemInfo),  // m_mainItemInfo takes ownership of mainItemInfo
+m_parentItemInfo(0)
 {
  mLoaderType =  NetworkLoader;
+ // create its own instance by doing a copy from parentItemInfo
+ if (parentItemInfo != 0)
+ {
+ m_parentItemInfo = new DirItemInfo();
+ *m_parentItemInfo = *parentItemInfo;
+ }
 }
 
 
@@ -40,6 +47,10 @@
 {
 delete m_dirIterator;
 delete m_mainItemInfo;
+if (m_parentItemInfo != 0)
+{
+delete m_parentItemInfo;
+}
 }
 
 
@@ -47,7 +58,7 @@
 {
  DirItemInfoList netContent;
  m_dirIterator->load();
- bool is_parent_of_smb_url = m_parent != 0 && m_parent->urlPath().startsWith(LocationUrl::SmbURL);
+ bool is_parent_of_smb_url = m_parentItemInfo != 0 && m_parentItemInfo->urlPath().startsWith(LocationUrl::SmbURL);
  while (m_dirIterator->hasNext())
  {
  m_mainItemInfo->setFile(m_dirIterator->next());
@@ -68,7 +79,7 @@
  */
 void NetworkListWorker::setSmbItemAttributes()
 {
-if (m_parent->isHost())  { m_mainItemInfo->setAsShare(); }
+if (m_parentItemInfo->isHost())  { m_mainItemInfo->setAsShare(); }
 else
-if (m_parent->isWorkGroup()) { m_mainItemInfo->setAsHost(); }
+if (m_parentItemInfo->isWorkGroup()) { m_mainItemInfo->setAsHost(); }
 }

=== modified file 'src/plugin/folderlistmodel/networklistworker.h'
--- src/plugin/folderlistmodel/networklistworker.h	2015-12-12 14:32:18 +
+++ src/plugin/folderlistmodel/networklistworker.h	2017-01-27 13:13:23 +
@@ -40,15 +40,15 @@
 public:
 NetworkListWorker(LocationItemDirIterator * dirIterator,
   DirItemInfo * mainItemInfo,
-  const DirItemInfo   * parent = 0);
+  const DirItemInfo   * parentItemInfo = 0);
 ~NetworkListWorker();
 protected:
 virtual DirItemInfoList getNetworkContent();
 voidsetSmbItemAttributes();
 protected:
  LocationItemDirIterator * m_dirIterator;
- DirItemInfo * m_mainItemInfo;
- const DirItemInfo   * m_parent;
+ DirItemInfo * m_mainItemInfo;   //takes ownership from mainItemInfo
+ DirItemInfo * m_parentItemInfo; //create its own instance by doing a copy from parentItemInfo
 };
 
 #endif // NETWORKLISTWORKER_H

=== modified file 'src/plugin/folderlistmodel/networklocation.cpp'
--- src/plugin/folderlistmodel/networklocation.cpp	2015-12-12 14:32:18 +
+++ src/plugin/folderlistmodel/networklocation.cpp	2017-01-27 13:13:23 +
@@ -36,6 +36,6 @@
 
 LocationItemDirIterator *dirIterator  = newDirIterator(urlPath,filter,flags,LocationItemDirIterator::LoadLater);
 DirItemInfo *baseitemInfo = newItemInfo(QLatin1String(0));
-
+// the NetworkListWorker object takes ownership of baseitemInfo and also creates its own copy of m_info
 return new NetworkListWorker(dirIterator, baseitemInfo, m_info);
 }

-- 
Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers
Post to 

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/fix-network-crash-1609051 into lp:ubuntu-filemanager-app

2017-01-27 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/fix-network-crash-1609051 into 
lp:ubuntu-filemanager-app.

Commit message:
It fixes a network crash bug #1609051 when Localtion::m_info is deleted in the 
main thread.

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/fix-network-crash-1609051/+merge/315768

It fixes a network crash bug #1609051 when Localtion::m_info is deleted in the 
main thread.

It happens because Localtion::m_info is used in the worker thread as 'parent' 
item information.

Solution: NetworkListWorker creates its own DirItemInfo instance and copies the 
data from Localtion::m_info to avoid that problem.

Location and descendant classes should be checked further to avoid deleting 
Localtion::m_info, methods such as Location::refreshInfo() and  
Location::becomeParent(), Location::setInfoItem(), 
TrashLocation::becomeParent() can be changed to copy data from a temporary 
DirItemInfo  object.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/fix-network-crash-1609051 
into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/networklistworker.cpp'
--- src/plugin/folderlistmodel/networklistworker.cpp	2015-12-12 14:32:18 +
+++ src/plugin/folderlistmodel/networklistworker.cpp	2017-01-27 12:57:59 +
@@ -24,15 +24,22 @@
 #include "locationurl.h"
 
 NetworkListWorker::NetworkListWorker(LocationItemDirIterator * dirIterator,
- DirItemInfo * mainItemInfo, const DirItemInfo *parent) :
+ DirItemInfo * mainItemInfo,
+ const DirItemInfo   * parentItemInfo) :
 DirListWorker(dirIterator->path(),
   dirIterator->filters(),
   dirIterator->flags() == QDirIterator::Subdirectories ? true : false),
 m_dirIterator(dirIterator),
-m_mainItemInfo(mainItemInfo),
-m_parent(parent)
+m_mainItemInfo(mainItemInfo),  // m_mainItemInfo takes ownership of mainItemInfo
+m_parentItemInfo(0)
 {
  mLoaderType =  NetworkLoader;
+ // create its own instance by doing a copy from parentItemInfo
+ if (parentItemInfo != 0)
+ {
+ m_parentItemInfo = new DirItemInfo();
+ *m_parentItemInfo = *parentItemInfo;
+ }
 }
 
 
@@ -40,6 +47,10 @@
 {
 delete m_dirIterator;
 delete m_mainItemInfo;
+if (m_parentItemInfo != 0)
+{
+delete m_parentItemInfo;
+}
 }
 
 
@@ -47,7 +58,7 @@
 {
  DirItemInfoList netContent;
  m_dirIterator->load();
- bool is_parent_of_smb_url = m_parent != 0 && m_parent->urlPath().startsWith(LocationUrl::SmbURL);
+ bool is_parent_of_smb_url = m_parentItemInfo != 0 && m_parentItemInfo->urlPath().startsWith(LocationUrl::SmbURL);
  while (m_dirIterator->hasNext())
  {
  m_mainItemInfo->setFile(m_dirIterator->next());
@@ -68,7 +79,7 @@
  */
 void NetworkListWorker::setSmbItemAttributes()
 {
-if (m_parent->isHost())  { m_mainItemInfo->setAsShare(); }
+if (m_parentItemInfo->isHost())  { m_mainItemInfo->setAsShare(); }
 else
-if (m_parent->isWorkGroup()) { m_mainItemInfo->setAsHost(); }
+if (m_parentItemInfo->isWorkGroup()) { m_mainItemInfo->setAsHost(); }
 }

=== modified file 'src/plugin/folderlistmodel/networklistworker.h'
--- src/plugin/folderlistmodel/networklistworker.h	2015-12-12 14:32:18 +
+++ src/plugin/folderlistmodel/networklistworker.h	2017-01-27 12:57:59 +
@@ -40,15 +40,15 @@
 public:
 NetworkListWorker(LocationItemDirIterator * dirIterator,
   DirItemInfo * mainItemInfo,
-  const DirItemInfo   * parent = 0);
+  const DirItemInfo   * parentItemInfo = 0);
 ~NetworkListWorker();
 protected:
 virtual DirItemInfoList getNetworkContent();
 voidsetSmbItemAttributes();
 protected:
  LocationItemDirIterator * m_dirIterator;
- DirItemInfo * m_mainItemInfo;
- const DirItemInfo   * m_parent;
+ DirItemInfo * m_mainItemInfo;   //takes ownership from mainItemInfo
+ DirItemInfo * m_parentItemInfo; //create its own instance by doing a copy from parentItemInfo
 };
 
 #endif // NETWORKLISTWORKER_H

=== modified file 'src/plugin/folderlistmodel/networklocation.cpp'
--- src/plugin/folderlistmodel/networklocation.cpp	2015-12-12 14:32:18 +
+++ src/plugin/folderlistmodel/networklocation.cpp	2017-01-27 12:57:59 +
@@ -36,6 +36,6 @@
 
 LocationItemDirIterator *dirIterator  = newDirIterator(urlPath,filter,flags,LocationItemDirIterator::LoadLater);
 DirItemInfo *baseitemInfo 

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-26 Thread Carlos Jose Mazieri
Renato,

The check in line 61 is necessary. 

The 'parentItemInfo' keeps the information from the parent, which can be: 
directory/share/host/workgroup.

When the 'mainItemInfo' is root like "smb://"  there is no 'parentItemInfo', it 
can be null.

Another reason it might be used in my regression tests (I am not sure if it 
is), you can use if you want its in 
"src/plugin/test_folderlistmodel/regression/regression_folderlilstmodel.pro"
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-26 Thread Carlos Jose Mazieri
Renato,  

Can you please test that proposal of that NetworkListWorker creating its own 
instance of the parent item? 

There is a proposal 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app//fix-network-crash-1609051

Also renamed "parent" to "parentItemInfo".


-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-26 Thread Carlos Jose Mazieri
I would remove all the Qt metaprogramming as it is not necessary, 

Only a small change in the NetworkListWorker as exposed above should solve the 
problem, NetworkListWorker class can create its own instance by doing a copy.


-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-25 Thread Carlos Jose Mazieri
Another and easy approach would be if the class NetworkListWorker receive again 
a const DirItemInfo *parent, but sets m_parent as its own instance using the 
operator '=', in this case it never gets deleted outside the worker thread.

Suppose the code changed:


NetworkListWorker::NetworkListWorker(LocationItemDirIterator * dirIterator,
 DirItemInfo * mainItemInfo, 
 const DirItemInfo *parent) :
DirListWorker(dirIterator->path(),
  dirIterator->filters(),
  dirIterator->flags() == QDirIterator::Subdirectories ? true : 
false),
m_dirIterator(dirIterator),
m_mainItemInfo(mainItemInfo),
m_parent(0)
{
 if (parent != 0)
 {
m_parent = new UrlItemInfo();  // UrlItemInfo is for remote
*m_parent = *parent;   // not sure it works, needs be reviewed
 }
 mLoaderType =  NetworkLoader;
 
 // this would not be necessary and can be removed
 parent->connectDestructionSignal(this, SLOT(onParentDestroyed()));
}


NetworkListWorker::~NetworkListWorker()
{
delete m_dirIterator;
delete m_mainItemInfo;
if (m_parent != 0)
{
   delete  m_parent;
}
}
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-25 Thread Carlos Jose Mazieri
Renato,

by temporary objects I mean a temporary DirItemInfo created in Location?? 
classes, example:

void Location::refreshInfo()
{
if (m_info)
{
DirItemInfo *item = newItemInfo(m_info->absoluteFilePath());
delete m_info;
m_info = item;
}
}


Would be changed by:


void Location::refreshInfo()
{
if (m_info)
{
DirItemInfo *item = newItemInfo(m_info->absoluteFilePath()); 
*m_info = *item; // current m_info item receives current information 
delete item;
}
}

I am not sure the operator "=" works properly for all DirItemInfo descendant 
classes.
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-25 Thread Carlos Jose Mazieri
Review: Needs Information

OK, Let's have a review on it,

1. perhaps the slot onParentDestroyed() on location.h lines 94-96 is not being 
used.

2. on line 38 from networklistworker.cpp we should check if m_parent != 0, 
   the default value for 'parent' is 0 on networklistworker.h

   38: parent->connectDestructionSignal(this, SLOT(onParentDestroyed()));

3. are you sure the code from networklistworker.cpp lines 57-58 are really 
necessary?
   the default value for 'parent' is 0 on networklistworker.h, and, if 
onParentDestroyed() is called  
   m_parent is set to 0 and the "m_parent != 0" is checked on line 61.

   57: if (!m_parent)
   58:   return netContent;
  
   61: bool is_parent_of_smb_url = m_parent != 0 && 
m_parent->urlPath().startsWith(LocationUrl::SmbURL);
   
   if you want keep lines 57-58, please change to "if (m_parent != 0)" as 
m_parent is not a boolean type.

4. can you explain why you removed the call to "refreshInfo()" from 
Location::currentInfo()
   on location.cpp line 329? 

   I see that both Location::refreshInfo() and Location::becomeParent() delete 
the 'm_info', 
   this is the 'parent' used in NetworkListWorker class on the second thread. 
   That may be the real problem, perhaps just making an attribution into 
'm_info' 
   from the temporary item could solve the entire problem, see a grep output:

 ./src/plugin/folderlistmodel/trash/trashlocation.cpp:57:
delete m_info;
 ./src/plugin/folderlistmodel/trash/trashlocation.cpp:176:delete 
m_info;
 ./src/plugin/folderlistmodel/location.cpp:64:delete m_info;
 ./src/plugin/folderlistmodel/location.cpp:96:delete m_info;
 ./src/plugin/folderlistmodel/location.cpp:238:delete m_info;
 ./src/plugin/folderlistmodel/location.cpp:252:delete m_info;

   Would you consider (adding this) or reconsider  for this item #4 only? 

-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-25 Thread Carlos Jose Mazieri
Review: Needs Information

Does it crash on both phone and desktop or just phone?


-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/fix-network-crash into lp:ubuntu-filemanager-app

2017-01-25 Thread Carlos Jose Mazieri
Review: Needs Information

Renato,

The bug description appears to say that it always crashes.

Can you confirm that it always crashes or it happens under some special 
condition?

If it happens under special condition can you describe that scenario? 
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/fix-network-crash/+merge/314870
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:~renatofilho/ubuntu-filemanager-app/ubuntu-app-platform into lp:ubuntu-filemanager-app

2016-11-19 Thread Carlos Jose Mazieri
Review: Needs Information

Hello Renato,

I am sorry for my lack of knowledge about this,
   
 Can you explain what is it for?  
 
 What does it improve the app?

 Is it required for others/all core apps?

 What is/does ubuntu-app-plataform plugin?


 
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/ubuntu-app-platform/+merge/311318
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:~ken-vandine/ubuntu-filemanager-app/deb_content-hub_peer_registration into lp:ubuntu-filemanager-app

2016-10-13 Thread Carlos Jose Mazieri
Review: Approve

I am OK with this. Thanks.
-- 
https://code.launchpad.net/~ken-vandine/ubuntu-filemanager-app/deb_content-hub_peer_registration/+merge/307223
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:~sam-sgrs/ubuntu-filemanager-app/fix-1579487 into lp:ubuntu-filemanager-app

2016-08-26 Thread Carlos Jose Mazieri
Hello Arto and Sam,

The "apt-get install libsmbclient-dev" used to fail on any armf kit, so it was 
impossible to generate the click package in the qtcreator.

The build on device used to work because "apt-get install libsmbclient-dev" on 
device used to work.

That is the reason why Alan Pope and Stefano Verzegnassi came with solution of 
archiving samba libraries in the project.

-- 
https://code.launchpad.net/~sam-sgrs/ubuntu-filemanager-app/fix-1579487/+merge/303622
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:~sam-sgrs/ubuntu-filemanager-app/fix-1579487 into lp:ubuntu-filemanager-app

2016-08-23 Thread Carlos Jose Mazieri
Review: Needs Information

Hello Sam,

It is OK to me, just a question:

   Have you tested building for armf on device and building for armf on 
qtcreator using a sdk like click-ubuntu-sdk-13.10-armhf?

This build was done by Alan Pope and Stefano Verzegnassi to prevent a bug that 
did not allow to install libsmbclien-dev in armf sdk, see 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287.
-- 
https://code.launchpad.net/~sam-sgrs/ubuntu-filemanager-app/fix-1579487/+merge/303622
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:~mzanetti/ubuntu-filemanager-app/share-files into lp:ubuntu-filemanager-app

2016-07-16 Thread Carlos Jose Mazieri
Review: Approve

Nice, Thanks.
-- 
https://code.launchpad.net/~mzanetti/ubuntu-filemanager-app/share-files/+merge/299821
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:~renatofilho/ubuntu-filemanager-app/import-contact into lp:ubuntu-filemanager-app

2016-07-16 Thread Carlos Jose Mazieri
Review: Approve

The code looks OK to me. Thanks.
-- 
https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/import-contact/+merge/300087
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/new-protocols-support-02 into lp:ubuntu-filemanager-app

2016-01-15 Thread Carlos Jose Mazieri
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-02 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/new-protocols-support-02/+merge/280388
-- 
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/new-protocols-support-01 into lp:ubuntu-filemanager-app

2016-01-14 Thread Carlos Jose Mazieri
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-01 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/new-protocols-support-01/+merge/280387
-- 
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/new-protocols-support-02 into lp:ubuntu-filemanager-app

2016-01-11 Thread Carlos Jose Mazieri
I will fix that, thanks.
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-02/+merge/280388
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/new-protocols-support-04 into lp:ubuntu-filemanager-app

2015-12-12 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-03 as a 
prerequisite.

Commit message:
* Created new and generic classes: NetworkLocation and NetworkListWorker
* SmbLocation now inherits from the generic NetworkLocation instead of Location
* SmbListWorker class is no longer used and it will be removed
* NetworkListWorker really performs the loading on a secondary thread

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04/+merge/280390

* Created new and generic classes: NetworkLocation and NetworkListWorker
* SmbLocation now inherits from the generic NetworkLocation instead of Location
* SmbListWorker class is no longer used and it will be removed
* NetworkListWorker really performs the loading on a secondary thread
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04 
into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/CMakeLists.txt'
--- src/plugin/folderlistmodel/CMakeLists.txt	2015-08-25 15:42:01 +
+++ src/plugin/folderlistmodel/CMakeLists.txt	2015-12-12 15:47:20 +
@@ -35,6 +35,8 @@
 iorequestworker.h
 ioworkerthread.cpp
 ioworkerthread.h
+networklistworker.cpp
+networklistworker.h
 plugin.cpp
 plugin.h
 location.cpp
@@ -43,6 +45,8 @@
 locationsfactory.h
 locationurl.cpp
 locationurl.h
+networklocation.cpp
+networklocation.h
 locationitemdir.cpp
 locationitemdir.h
 locationitemdiriterator.cpp

=== modified file 'src/plugin/folderlistmodel/folderlistmodel.pri'
--- src/plugin/folderlistmodel/folderlistmodel.pri	2015-07-15 17:42:37 +
+++ src/plugin/folderlistmodel/folderlistmodel.pri	2015-12-12 15:47:20 +
@@ -16,8 +16,9 @@
$$PWD/locationitemdiriterator.cpp \
$$PWD/cleanurl.cpp \   
$$PWD/locationitemfile.cpp \
-   $$PWD/locationitemdir.cpp
-
+   $$PWD/locationitemdir.cpp \
+   $$PWD/networklocation.cpp \
+   $$PWD/networklistworker.cpp
 
 HEADERS += $$PWD/dirmodel.h \
$$PWD/iorequest.h \
@@ -38,7 +39,9 @@
$$PWD/locationitemdiriterator.h \
$$PWD/cleanurl.h \   
$$PWD/locationitemfile.h \
-   $$PWD/locationitemdir.h
+   $$PWD/locationitemdir.h \
+   $$PWD/networklocation.h \
+   $$PWD/networklistworker.h
 
 
 SOURCES += $$PWD/disk/disklocation.cpp \

=== added file 'src/plugin/folderlistmodel/networklistworker.cpp'
--- src/plugin/folderlistmodel/networklistworker.cpp	1970-01-01 00:00:00 +
+++ src/plugin/folderlistmodel/networklistworker.cpp	2015-12-12 15:47:20 +
@@ -0,0 +1,74 @@
+/**
+ *
+ * Copyright 2015 Canonical Ltd.
+ * Copyright 2015 Carlos J Mazieri <carlos.mazi...@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * File: networklistworker.cpp
+ * Date: 06/12/2015
+ */
+
+#include "networklistworker.h"
+#include "locationitemdiriterator.h"
+#include "locationurl.h"
+
+NetworkListWorker::NetworkListWorker(LocationItemDirIterator * dirIterator,
+ DirItemInfo * mainItemInfo, const DirItemInfo *parent) :
+DirListWorker(dirIterator->path(),
+  dirIterator->filters(),
+  dirIterator->flags() == QDirIterator::Subdirectories ? true : false),
+m_dirIterator(dirIterator),
+m_mainItemInfo(mainItemInfo),
+m_parent(parent)
+{
+ mLoaderType =  NetworkLoader;
+}
+
+
+NetworkListWorker::~NetworkListWorker()
+{
+delete m_dirIterator;
+delete m_mainItemInfo;
+}
+
+
+DirItemInfoList NetworkListWorker::getNetworkContent()
+{
+ DirItemInfoList netContent;
+ m_dirIterator->load();
+ bool is_parent_of_smb_url = m_parent != 0 && m_parent->urlPath().startsWith(LocationUrl::SmbURL);
+ while (m_dirIterator->hasNext())
+ {
+ m_mainItemInfo->setFile(m_dirIterator->next());
+   

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-01 into lp:ubuntu-filemanager-app

2015-12-12 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-01 into 
lp:ubuntu-filemanager-app.

Commit message:
Improved DirItemInfo and descendant classes:
* added DirItemInfo::setFile(const QString& newUrl) to change the current Item 
information
* fixed operator =

Requested reviews:
  Jenkins Bot (ubuntu-core-apps-jenkins-bot): continuous-integration
  Ubuntu File Manager Developers (ubuntu-filemanager-dev)

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-01/+merge/280387

This MP is compound of 5 parts.

Summary:
 Reduces the complexity to add support to new protocols in the File Manager.
 Improves the current Samba browsing by moving it into the secondary thread 
which makes it a little faster.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-01 
into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/diriteminfo.cpp'
--- src/plugin/folderlistmodel/diriteminfo.cpp	2015-09-20 20:44:29 +
+++ src/plugin/folderlistmodel/diriteminfo.cpp	2015-12-12 15:40:26 +
@@ -71,9 +71,9 @@
   ,_isExecutable(other._isExecutable)
   ,_isLocalSharedDir(other._isLocalSharedDir)
   ,_isHost(other._isHost)
-  ,_isWorkGroup(false)
-  ,_isNetworkShare(false)
-  ,_needsAuthentication(false)
+  ,_isWorkGroup(other._isWorkGroup)
+  ,_isNetworkShare(other._isNetworkShare)
+  ,_needsAuthentication(other._needsAuthentication)
   ,_permissions(other._permissions)
   ,_size(other._size)
   ,_created(other._created)
@@ -82,6 +82,7 @@
   ,_path(other._path)
   ,_fileName(other._fileName) 
   ,_normalizedPath(other._normalizedPath)
+  ,_authenticationPath(other._authenticationPath)
 {
 
 }
@@ -107,6 +108,7 @@
   ,_isNetworkShare(false)
   ,_needsAuthentication(false)
   ,_permissions(0)
+  ,_size(0)
 {
 setFileInfo(fi);
 }
@@ -326,6 +328,13 @@
d_ptr->setFileInfo(f);
 }
 
+void DirItemInfo::setFile(const QString )
+{
+   QFileInfo f;
+   f.setFile(fullname);
+   d_ptr->setFileInfo(f);
+}
+
 QFileInfo DirItemInfo::diskFileInfo() const
 {
 QFileInfo fi(absoluteFilePath());
@@ -588,3 +597,8 @@
 d_ptr->_isReadable   = true;
 d_ptr->_isExecutable = true;
 }
+
+void DirItemInfo::setAsShare()
+{
+d_ptr->_isNetworkShare = true;
+}

=== modified file 'src/plugin/folderlistmodel/diriteminfo.h'
--- src/plugin/folderlistmodel/diriteminfo.h	2015-09-13 14:20:30 +
+++ src/plugin/folderlistmodel/diriteminfo.h	2015-12-12 15:40:26 +
@@ -108,10 +108,12 @@
 virtual bool  isBrowsable() const;
 virtual bool  needsAuthentication() const;
 virtual QString   authenticationPath() const;
-virtual void  setFile(const QString , const QString & file);
+virtual void  setFile(const QString , const QString & file);
+virtual void  setFile(const QString );
 virtual bool  permission(QFile::Permissions permissions) const;
 void  fillFromStatBuf(const struct stat& statBuffer);
 void  setAsHost();
+void  setAsShare();
 
 public:
 static QStringremoveExtraSlashes(const QString , int firstSlashIndex = -1);

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-10-03 15:28:25 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-12-12 15:40:26 +
@@ -136,21 +136,22 @@
 url.setPath(f.canonicalFilePath());
 smb_path = url.toString();
 }
-smb_path += QDir::separator() + file;
+if (!file.isEmpty())
+{
+smb_path += QDir::separator() + file;
+}
 SmbItemInfo *other  = new SmbItemInfo( LocationUrl::SmbURL + DirItemInfo::removeExtraSlashes(smb_path),
m_smb);
 if (other->isValid())
 {
 *this = *other;
 }
-else
-{
-delete other;
-}
+
+delete other; //always delete
 }
 
-
-void SmbItemInfo::setAsShare()
+void SmbItemInfo::setFile(const QString _path)
 {
-d_ptr->_isNetworkShare = true;
+return setFile(smb_path, QLatin1String(0));
 }
+

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.h'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.h	2015-09-13 14:20:30 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.h	2015-12-12 15:40:26 +
@@ -40,9 +40,9 @@
 ~SmbItemInfo();
 
 public:
-QString  sharePath() const;
-void setAsShare();  
+QString  sharePath() const;   
 virtual void setFile(const QString , const QString & file);
+virtual void setFile(const QString _path);
 
 protected:
  voidsetInfo(const QString _path);

=== modified file 'src/plugin/folder

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-02 into lp:ubuntu-filemanager-app

2015-12-12 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-02 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-01 as a 
prerequisite.

Commit message:
LocationItemDirIterator descendants classes now perform the loading inside the 
constructor according to the new constructor flag 
LocationItemDirIterator::LoadMode.
LocationItemDirIterator::LoadLater allows LocationItemDirIterator::load() be 
called later, that is how Network Locations should put the loading inside the 
secondary thread specific for loading.
For Disk loading, that means in DiskLocationItemDirIterator class it was not 
implemented because QDir is used directly inside the secondary thread.

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-02/+merge/280388

LocationItemDirIterator descendants classes now perform the loading inside the 
constructor according to the new constructor flag 
LocationItemDirIterator::LoadMode.
LocationItemDirIterator::LoadLater allows LocationItemDirIterator::load() be 
called later, that is how Network Locations should put the loading inside the 
secondary thread specific for loading.
For Disk loading, that means in DiskLocationItemDirIterator class it was not 
implemented because QDir is used directly inside the secondary thread.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-02 
into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/disk/disklocation.cpp'
--- src/plugin/folderlistmodel/disk/disklocation.cpp	2015-12-08 16:55:41 +
+++ src/plugin/folderlistmodel/disk/disklocation.cpp	2015-12-12 15:44:23 +
@@ -192,8 +192,10 @@
 LocationItemDirIterator *
 DiskLocation::newDirIterator(const QString ,
  QDir::Filters filters,
- QDirIterator::IteratorFlags flags)
+ QDirIterator::IteratorFlags flags,
+ LocationItemDirIterator::LoadMode loadmode)
 {
+Q_UNUSED(loadmode);
 return  new DiskLocationItemDirIterator(path, filters, flags);
 }
 

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.h'
--- src/plugin/folderlistmodel/disk/disklocation.h	2015-12-08 16:55:41 +
+++ src/plugin/folderlistmodel/disk/disklocation.h	2015-12-12 15:44:23 +
@@ -65,7 +65,8 @@
   const bool isRecursive);
 virtual LocationItemDirIterator * newDirIterator(const QString & path,
  QDir::Filters filters,
- QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags);
+ QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags,
+ LocationItemDirIterator::LoadMode loadmode = LocationItemDirIterator::LoadOnConstructor);
 virtual LocationItemFile   * newFile(const QString & path);
 virtual LocationItemDir* newDir(const QString & dir = QLatin1String(0));
 virtual boolisThereDiskSpace(const QString& pathname, qint64 requiredSize);

=== modified file 'src/plugin/folderlistmodel/location.h'
--- src/plugin/folderlistmodel/location.h	2015-12-08 16:55:41 +
+++ src/plugin/folderlistmodel/location.h	2015-12-12 15:44:23 +
@@ -23,6 +23,7 @@
 #define LOCATION_H
 
 #include "diriteminfo.h"
+#include "locationitemdiriterator.h"
 
 #include 
 #include 
@@ -124,7 +125,8 @@
  */
  virtual LocationItemDirIterator * newDirIterator(const QString & path,
  QDir::Filters filters,
- QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags)  = 0;
+ QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags,
+ LocationItemDirIterator::LoadMode loadmode = LocationItemDirIterator::LoadOnConstructor)  = 0;
 /*!
   * \brief newFile() creates a LocationItemFile object which is similar to Qt QFile object
   *

=== modified file 'src/plugin/folderlistmodel/locationitemdiriterator.cpp'
--- src/plugin/folderlistmodel/locationitemdiriterator.cpp	2015-03-01 15:32:42 +
+++ src/plugin/folderlistmodel/locationitemdiriterator.cpp	2015-12-12 15:44:23 +
@@ -21,19 +21,40 @@
 
 #include "locationitemdiriterator.h"
 
-LocationItemDirIterator::LocationItemDirIterator(const QString &, const QStringList &, QDir::Filters, QDirIterator::IteratorFlags )
-{
-}
-
-
-LocationItemDirIterator::LocationIte

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-03 into lp:ubuntu-filemanager-app

2015-12-12 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-03 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-02 as a 
prerequisite.

Commit message:
ust fixed a typo in some files 'indexOfColonAndSlashe' should not have the 
final 'e' as it refers to ':/'

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-03/+merge/280389

ust fixed a typo in some files 'indexOfColonAndSlashe' should not have the 
final 'e' as it refers to ':/'
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-03 
into lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/disk/disklocation.cpp'
--- src/plugin/folderlistmodel/disk/disklocation.cpp	2015-12-12 15:45:39 +
+++ src/plugin/folderlistmodel/disk/disklocation.cpp	2015-12-12 15:45:39 +
@@ -178,12 +178,12 @@
 }
 
 
-QString DiskLocation::urlBelongsToLocation(const QString , int indexOfColonAndSlashe)
+QString DiskLocation::urlBelongsToLocation(const QString , int indexOfColonAndSlash)
 {
 QString ret;
 if (urlPath.startsWith(LocationUrl::DiskRootURL.midRef(0,5)))
 {
-ret  = QDir::rootPath() + DirItemInfo::removeExtraSlashes(urlPath, indexOfColonAndSlashe+1);
+ret  = QDir::rootPath() + DirItemInfo::removeExtraSlashes(urlPath, indexOfColonAndSlash+1);
 }
 return ret;
 }

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.h'
--- src/plugin/folderlistmodel/disk/disklocation.h	2015-12-12 15:45:39 +
+++ src/plugin/folderlistmodel/disk/disklocation.h	2015-12-12 15:45:39 +
@@ -70,7 +70,7 @@
 virtual LocationItemFile   * newFile(const QString & path);
 virtual LocationItemDir* newDir(const QString & dir = QLatin1String(0));
 virtual boolisThereDiskSpace(const QString& pathname, qint64 requiredSize);
-virtual QString urlBelongsToLocation(const QString& urlPath, int indexOfColonAndSlashe);
+virtual QString urlBelongsToLocation(const QString& urlPath, int indexOfColonAndSlash);
 
 protected:
 voidaddExternalFsWorkerRequest(ExternalFileSystemChangesWorker *);

=== modified file 'src/plugin/folderlistmodel/location.h'
--- src/plugin/folderlistmodel/location.h	2015-12-12 15:45:39 +
+++ src/plugin/folderlistmodel/location.h	2015-12-12 15:45:39 +
@@ -153,7 +153,7 @@
   *  If the URL or Path in \a urlPath is valid and belongs to its location
   *
   * \param urlPath  The input URL that is going to be parsed
-  * \param indexOfColonAndSlasheThe index of ":/"
+  * \param indexOfColonAndSlash The index of ":/"
   * \return The good URL (parsed with extra slashes removed)
   * or an empty string if \a urlPath does not belong to its location
   *
@@ -166,7 +166,7 @@
   *The return will be: an empty string meaning that this URL is not related to Samba
   *\endcode
   */
- virtual QString urlBelongsToLocation(const QString& urlPath, int indexOfColonAndSlashe) = 0;
+ virtual QString urlBelongsToLocation(const QString& urlPath, int indexOfColonAndSlash) = 0;
 
 public:
 /*!

=== modified file 'src/plugin/folderlistmodel/smb/smblocation.cpp'
--- src/plugin/folderlistmodel/smb/smblocation.cpp	2015-12-12 15:45:39 +
+++ src/plugin/folderlistmodel/smb/smblocation.cpp	2015-12-12 15:45:39 +
@@ -95,14 +95,14 @@
 }
 
 
-QString SmbLocation::urlBelongsToLocation(const QString , int indexOfColonAndSlashe)
+QString SmbLocation::urlBelongsToLocation(const QString , int indexOfColonAndSlash)
 {
 QString ret;
 if ( urlPath.startsWith(LocationUrl::SmbURL.midRef(0,4)) ||
  urlPath.startsWith(LocationUrl::CifsURL.midRef(0,5))
)
 {
-ret  = LocationUrl::SmbURL + DirItemInfo::removeExtraSlashes(urlPath, indexOfColonAndSlashe+1);
+ret  = LocationUrl::SmbURL + DirItemInfo::removeExtraSlashes(urlPath, indexOfColonAndSlash+1);
 }
 return ret;
 }

=== modified file 'src/plugin/folderlistmodel/smb/smblocation.h'
--- src/plugin/folderlistmodel/smb/smblocation.h	2015-12-12 15:45:39 +
+++ src/plugin/folderlistmodel/smb/smblocation.h	2015-12-12 15:45:39 +
@@ -45,8 +45,8 @@
   LocationItemDirIterator::LoadMode loadmode = LocationItemDirIterator::LoadOnConstructor);
 virtual LocationItemFile   * newFile(const QString & path);   
 virtual LocationItemDir* newDir(const QString & dir = QLatin1String(0));
- virtual bool   isThereDiskSpace(const QString& pathname, qint64 requiredSize);
-virtual QString urlBelongs

[Ubuntu-touch-coreapps-reviewers] [Bug 1520959] Re: Impossible to empty clipboard

2015-12-01 Thread Carlos Jose Mazieri
Hello,

if you copy a text using another app to the clipboard  the filemanager
will recognize it as non file url and then understands the clipboard is
empty even it is not.  Does it help?

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1520959

Title:
  Impossible to empty clipboard

Status in Ubuntu File Manager App:
  New

Bug description:
  If you copy something, it's impossible to empty clipboard. You have to
  restart the phone.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1520959/+subscriptions

-- 
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] [Bug 1508504] Re: Network doesn't work

2015-11-10 Thread Carlos Jose Mazieri
Hi Tony,

The new version will be available soon,  when you get that, please test
it without your work around.

Thank you very much.

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1508504

Title:
  Network doesn't work

Status in Ubuntu File Manager App:
  Fix Committed

Bug description:
  Using recently updated File Manager on Aquarius E4.5 which now
  includes 'Network' when 'Places' selected.

  What happens:

  1. Select 'Places'
  2. Select 'Network' - shows smb:// (1 file)
  3. Select WORKGROUP - shows smb://WORKGROUP (2 files) - listed as
  ee
  nasbox
  3 Select 'nasbox' - shows smb://nasbox (0 files)

  Devices are listed by 'description', not their device/server names, which are
     BRIGHTBOX2 (my router)
     DYLAN (my NAS)

  What is expected:

  1. selecting 'nasbox' (aka DYLAN) should show 8 folders.

  (by comparison with what is shown in Nautilus)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1508504/+subscriptions

-- 
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-hostname-bug into lp:ubuntu-filemanager-app

2015-11-08 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-hostname-bug into 
lp:ubuntu-filemanager-app.

Commit message:
Fixed a bug #1508504 related to get the Samba hostname.
It used to get the description instead of the name.
For some cases the name is the first word in the description, so it worked in 
some cases.

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-hostname-bug/+merge/276932

Fixed a bug #1508504 related to get the Samba hostname.
It used to get the description instead of the name.
For some cases the name is the first word in the description, so it worked in 
some cases.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-hostname-bug into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-11-02 20:30:00 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-11-08 12:30:55 +
@@ -363,8 +363,11 @@
 }
 else if (errno != EACCES && errno != ECONNREFUSED && slashes >= URL_SLASHES_NUMBER_FOR_SHARES) // perhaps is a file
 {
-errno = 0;
-ret = static_cast (getStat(context, smb_path,st));
+errno = 0;
+if (getStat(context,smb_path,st) == 0)
+{
+ret = StatDone;
+}
 }
 
 if (errno != 0)
@@ -722,13 +725,16 @@
 QString name(dirent.name);
 host = name;
 }
-QString comment(dirent.comment);
-if (!comment.isEmpty())
+if (host.isEmpty())
 {
-QString fullName = comment.split(QLatin1Char(' '), QString::SkipEmptyParts).first();
-if (!fullName.isEmpty())
+QString comment(dirent.comment);
+if (!comment.isEmpty())
 {
-host = fullName;
+QString fullName = comment.split(QLatin1Char(' '), QString::SkipEmptyParts).first();
+if (!fullName.isEmpty())
+{
+host = fullName;
+}
 }
 }
 if (host.isEmpty())

-- 
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-improvements-09 into lp:ubuntu-filemanager-app

2015-11-08 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-09 into 
lp:ubuntu-filemanager-app.

Commit message:
Removed unnecessary variable pathExists from DiskLocation::isThereDiskSpace()
Improved log for authenticateCallBacks.

Requested reviews:
  Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot): 
continuous-integration
  Ubuntu File Manager Developers (ubuntu-filemanager-dev)

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-09/+merge/276933

Removed unnecessary variable pathExists from DiskLocation::isThereDiskSpace()
Improved log for authenticateCallBacks.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-09 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/disk/disklocation.cpp'
--- src/plugin/folderlistmodel/disk/disklocation.cpp	2015-11-02 15:58:50 +
+++ src/plugin/folderlistmodel/disk/disklocation.cpp	2015-11-08 12:33:22 +
@@ -216,12 +216,10 @@
 {
 bool ret = true;
 #if defined(Q_OS_UNIX)
-QFileInfo info(pathname);
-bool   pathExists = info.exists();
-while (!pathExists && info.absoluteFilePath() != QDir::rootPath())
+QFileInfo info(pathname);
+while (!info.exists() && info.absoluteFilePath() != QDir::rootPath())
 {
-info.setFile(info.absolutePath());
-pathExists = info.exists();
+info.setFile(info.absolutePath());   
 }
 struct statvfs  vfs;
 if ( ::statvfs( QFile::encodeName(info.absoluteFilePath()).constData(), ) == 0 )

=== modified file 'src/plugin/folderlistmodel/smb/smblocationauthentication.cpp'
--- src/plugin/folderlistmodel/smb/smblocationauthentication.cpp	2015-07-15 13:00:56 +
+++ src/plugin/folderlistmodel/smb/smblocationauthentication.cpp	2015-11-08 12:33:22 +
@@ -25,7 +25,7 @@
 #define  GOOD_INDEX()  (m_infoIndex >= 0 && m_infoIndex < MAX_AUTH_INSTANCES)
 
 #if defined(REGRESSION_TEST_FOLDERLISTMODEL) && defined(SIMPLE_UI)
-# define DEBUG_AUTHENTICATION()  qDebug() << Q_FUNC_INFO << user << passwd
+# define DEBUG_AUTHENTICATION()  qDebug() << Q_FUNC_INFO << "user:" << user << "passwd:" << passwd << "server:" << server << "share:" << share
 #else
 # define DEBUG_AUTHENTICATION() /**/
 #endif

-- 
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] [Bug 1508504] Re: Network doesn't work

2015-11-06 Thread Carlos Jose Mazieri
** Changed in: ubuntu-filemanager-app
   Status: New => In Progress

** Changed in: ubuntu-filemanager-app
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1508504

Title:
  Network doesn't work

Status in Ubuntu File Manager App:
  In Progress

Bug description:
  Using recently updated File Manager on Aquarius E4.5 which now
  includes 'Network' when 'Places' selected.

  What happens:

  1. Select 'Places'
  2. Select 'Network' - shows smb:// (1 file)
  3. Select WORKGROUP - shows smb://WORKGROUP (2 files) - listed as
  ee
  nasbox
  3 Select 'nasbox' - shows smb://nasbox (0 files)

  Devices are listed by 'description', not their device/server names, which are
     BRIGHTBOX2 (my router)
     DYLAN (my NAS)

  What is expected:

  1. selecting 'nasbox' (aka DYLAN) should show 8 folders.

  (by comparison with what is shown in Nautilus)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1508504/+subscriptions

-- 
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] [Bug 1508504] Re: Network doesn't work

2015-11-05 Thread Carlos Jose Mazieri
Tony,

I will work next weekend to fix the problem related to the "name" of the
servers.

Regarding to private folders, it should show all folders if you "unlock
full access", then when you try to access private folders it should ask
for user/password, this behavior was  a design decision.

Many Thanks,
Carlos

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1508504

Title:
  Network doesn't work

Status in Ubuntu File Manager App:
  New

Bug description:
  Using recently updated File Manager on Aquarius E4.5 which now
  includes 'Network' when 'Places' selected.

  What happens:

  1. Select 'Places'
  2. Select 'Network' - shows smb:// (1 file)
  3. Select WORKGROUP - shows smb://WORKGROUP (2 files) - listed as
  ee
  nasbox
  3 Select 'nasbox' - shows smb://nasbox (0 files)

  Devices are listed by 'description', not their device/server names, which are
     BRIGHTBOX2 (my router)
     DYLAN (my NAS)

  What is expected:

  1. selecting 'nasbox' (aka DYLAN) should show 8 folders.

  (by comparison with what is shown in Nautilus)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1508504/+subscriptions

-- 
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] [Bug 1508504] Re: Network doesn't work

2015-11-04 Thread Carlos Jose Mazieri
Hello Tony,

I am looking for "console ouput" not for screen shots.  Are you able to
get it? (maybe using logcat)

Do you need password to access those servers content?

Thanks,
Carlos

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1508504

Title:
  Network doesn't work

Status in Ubuntu File Manager App:
  New

Bug description:
  Using recently updated File Manager on Aquarius E4.5 which now
  includes 'Network' when 'Places' selected.

  What happens:

  1. Select 'Places'
  2. Select 'Network' - shows smb:// (1 file)
  3. Select WORKGROUP - shows smb://WORKGROUP (2 files) - listed as
  ee
  nasbox
  3 Select 'nasbox' - shows smb://nasbox (0 files)

  Devices are listed by 'description', not their device/server names, which are
     BRIGHTBOX2 (my router)
     DYLAN (my NAS)

  What is expected:

  1. selecting 'nasbox' (aka DYLAN) should show 8 folders.

  (by comparison with what is shown in Nautilus)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1508504/+subscriptions

-- 
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] [Bug 1508504] Re: Network doesn't work

2015-11-04 Thread Carlos Jose Mazieri
** Changed in: ubuntu-filemanager-app
 Assignee: (unassigned) => Carlos Jose Mazieri (carlos-mazieri)

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1508504

Title:
  Network doesn't work

Status in Ubuntu File Manager App:
  New

Bug description:
  Using recently updated File Manager on Aquarius E4.5 which now
  includes 'Network' when 'Places' selected.

  What happens:

  1. Select 'Places'
  2. Select 'Network' - shows smb:// (1 file)
  3. Select WORKGROUP - shows smb://WORKGROUP (2 files) - listed as
  ee
  nasbox
  3 Select 'nasbox' - shows smb://nasbox (0 files)

  Devices are listed by 'description', not their device/server names, which are
     BRIGHTBOX2 (my router)
     DYLAN (my NAS)

  What is expected:

  1. selecting 'nasbox' (aka DYLAN) should show 8 folders.

  (by comparison with what is shown in Nautilus)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1508504/+subscriptions

-- 
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] [Bug 1508504] Re: Network doesn't work

2015-11-04 Thread Carlos Jose Mazieri
Hello,

Regarding to "Devices are listed by 'description'"  it can be easily
fixed.

Regarding to it does not show the content of "nasbox", have you first
checked "unlock full access" option first?

if not, please try do it and try it again.
if so or if it does not work after doing it, can you capture the filemanager 
output and post it here (I am not sure logcat works for that)?

Thanks,
Carlos

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1508504

Title:
  Network doesn't work

Status in Ubuntu File Manager App:
  New

Bug description:
  Using recently updated File Manager on Aquarius E4.5 which now
  includes 'Network' when 'Places' selected.

  What happens:

  1. Select 'Places'
  2. Select 'Network' - shows smb:// (1 file)
  3. Select WORKGROUP - shows smb://WORKGROUP (2 files) - listed as
  ee
  nasbox
  3 Select 'nasbox' - shows smb://nasbox (0 files)

  Devices are listed by 'description', not their device/server names, which are
     BRIGHTBOX2 (my router)
     DYLAN (my NAS)

  What is expected:

  1. selecting 'nasbox' (aka DYLAN) should show 8 folders.

  (by comparison with what is shown in Nautilus)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1508504/+subscriptions

-- 
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] [Bug 1513032] [NEW] downloaded temporary files should be removed after open/close

2015-11-04 Thread Carlos Jose Mazieri
Public bug reported:

In order to open remote files, they are first downloaded into a
temporary file in "/tmp" directory.

They should be removed when the user closes the file in order to save
space.

** Affects: ubuntu-filemanager-app
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1513032

Title:
  downloaded temporary files should be removed after open/close

Status in Ubuntu File Manager App:
  New

Bug description:
  In order to open remote files, they are first downloaded into a
  temporary file in "/tmp" directory.

  They should be removed when the user closes the file in order to save
  space.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1513032/+subscriptions

-- 
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/open-remote-files-03 into lp:ubuntu-filemanager-app

2015-11-02 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-03 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-02 as a 
prerequisite.

Commit message:
implemented a set of high level download functions.

Requested reviews:
  Jenkins Bot (ubuntu-core-apps-jenkins-bot): continuous-integration
  Ubuntu File Manager Developers (ubuntu-filemanager-dev)

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-03/+merge/276446

implemented a set of high level download functions.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-03 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
--- src/plugin/folderlistmodel/dirmodel.cpp	2015-10-01 00:04:00 +
+++ src/plugin/folderlistmodel/dirmodel.cpp	2015-11-02 19:19:16 +
@@ -149,6 +149,9 @@
 connect(m_fsAction, SIGNAL(recopy(QStringList,QString)),
 mClipboard, SLOT(copy(QStringList,QString)));
 
+connect(m_fsAction, SIGNAL(downloadTemporaryComplete(QString)),
+this,   SIGNAL(downloadTemporaryComplete(QString)));
+
 setCompareAndReorder();
 
 if (QIcon::themeName().isEmpty() && !FMUtil::hasTriedThemeName())
@@ -1825,6 +1828,43 @@
 }
 
 
+
+bool DirModel::download(int index)
+{
+bool ret = false;
+if (IS_VALID_ROW(index))
+{
+QString outputFile(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) +
+QDir::separator() + mDirectoryContents.at(index).fileName());
+ret = downloadAndSaveAs(index, outputFile);
+}
+return ret;
+}
+
+
+bool DirModel::downloadAndSaveAs(int index, const QString )
+{
+bool ret = false;
+if (IS_VALID_ROW(index))
+{
+ret = m_fsAction->downloadAndSaveAs(mDirectoryContents.at(index),
+filename);
+}
+return ret;
+}
+
+
+bool DirModel::downloadAsTemporaryFile(int index)
+{
+bool ret = false;
+if (IS_VALID_ROW(index))
+{
+ret = m_fsAction->downloadAsTemporaryFile(mDirectoryContents.at(index));
+}
+return ret;
+}
+
+
 #ifndef DO_NOT_USE_TAG_LIB
 QVariant DirModel::getAudioMetaData(const QFileInfo& fi, int role) const
 {

=== modified file 'src/plugin/folderlistmodel/dirmodel.h'
--- src/plugin/folderlistmodel/dirmodel.h	2015-09-20 20:28:26 +
+++ src/plugin/folderlistmodel/dirmodel.h	2015-11-02 19:19:16 +
@@ -317,6 +317,31 @@
  const QString& password,
  bool  savePassword);
 
+//download functions
+//
+/*! \brief download(int index) download file pointed by \a index into standard Download location
+ *
+ * \return true if the download could be started, othewise false
+ */
+Q_INVOKABLE  bool download(int index);
+
+/*! \brief downloadAndSaveAs(int index, const QString& filename) download file pointed by \a index and save it as \a filename
+ *
+ * \return true if the download could be started, othewise false
+ *
+ */
+Q_INVOKABLE  bool downloadAndSaveAs(int index, const QString& filename);
+
+/*! \brief downloadAsTemporaryFile(int index)  save download as temporary, useful to open remote files
+ *
+ *  At the end if download is OK the signal downloadTemporaryComplete(const QString& fullpathname) is emitted
+ *
+ * \return true if the download could be started, othewise false
+ *
+ */
+Q_INVOKABLE  bool downloadAsTemporaryFile(int index);
+
+
 public slots:
   /*!
  * \brief copySelection() copy selected items to the clipboard
@@ -470,6 +495,12 @@
 void clipboardChanged();
 void enabledExternalFSWatcherChanged(bool);
 
+/*!
+ * \brief downloadTemporaryComplete() says that download has been completed and
+ *the \a filename is ready to be used, filename is a full pathname
+ */
+void downloadTemporaryComplete(const QString& filename);
+
 private slots:
 void onItemRemoved(const DirItemInfo&);  
 void onItemAdded(const DirItemInfo&);

-- 
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-improvements-08 into lp:ubuntu-filemanager-app

2015-11-02 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-08 into 
lp:ubuntu-filemanager-app.

Commit message:
Removed static_cast from SmbLocationItemFile::size()
Fixed SmbUtil::getStatInfo() to set "Not exist" for items such as 
smb://host_does_not_exist

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-08/+merge/276460

Removed static_cast from SmbLocationItemFile::size() when using 
SmbUtil::getStat() and SmbUtil::getFstat() as stated in 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05/+merge/275164

Fixed SmbUtil::getStatInfo() to set "Not exist" for items such as 
smb://host_does_not_exist
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-08 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-28 01:07:56 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-11-02 20:37:11 +
@@ -229,21 +229,13 @@
 {
 qint64 size = 0;
 struct stat  st;
-SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
-if (isOpen())
-{   
-ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
-}
-else
+bool ok = isOpen() ? smbObj()->getFstat(m_context,m_fd,) == 0 : false;
+if (!isOpen())
 {
-if (m_context != 0) {
-ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
-}
-else {
-ret = smbObj()->getStatInfo(cleanUrl(),);
-}
+ok = m_context != 0 ? smbObj()->getStat(m_context,cleanUrl(),) == 0 :
+  smbObj()->getStatInfo(cleanUrl(),) == SmbUtil::StatDone;
 }
-if(ret == SmbUtil::StatDone)
+if(ok)
 {
 size = static_cast (st.st_size);
 }

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-28 01:23:07 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-11-02 20:37:11 +
@@ -361,7 +361,7 @@
 (void)getStat(context,smb_path,st);
 }
 }
-else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
+else if (errno != EACCES && errno != ECONNREFUSED && slashes >= URL_SLASHES_NUMBER_FOR_SHARES) // perhaps is a file
 {
 errno = 0;
 ret = static_cast (getStat(context, smb_path,st));

-- 
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/open-remote-files-05 into lp:ubuntu-filemanager-app

2015-11-02 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-05 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-04 as a 
prerequisite.

Commit message:
UI changed to open remote files

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-05/+merge/276448

UI changed to open remote files
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-05 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/app/qml/filemanager.qml'
--- src/app/qml/filemanager.qml	2015-01-03 17:12:34 +
+++ src/app/qml/filemanager.qml	2015-11-02 19:23:17 +
@@ -128,7 +128,7 @@
 }
 }
 
-function openFile(filePath) {
+function openLocalFile(filePath) {
 pageStack.push(Qt.resolvedUrl("content-hub/FileOpener.qml"), { fileUrl: "file://" + filePath} )
 }
 

=== modified file 'src/app/qml/ui/FileActionDialog.qml'
--- src/app/qml/ui/FileActionDialog.qml	2014-09-20 10:49:51 +
+++ src/app/qml/ui/FileActionDialog.qml	2015-11-02 19:23:17 +
@@ -35,7 +35,7 @@
 text: i18n.tr("Open")
 onClicked: {
 console.log("Opening file", filePath)
-openFile(model.filePath)
+openLocalFile(model.filePath)
 onClicked: PopupUtils.close(root)
 }
 }

=== modified file 'src/app/qml/ui/FolderListPage.qml'
--- src/app/qml/ui/FolderListPage.qml	2015-10-01 00:04:00 +
+++ src/app/qml/ui/FolderListPage.qml	2015-11-02 19:23:17 +
@@ -223,6 +223,12 @@
 console.log("FolderListModel needsAuthentication() signal arrived")
 authenticationHandler.showDialog(urlPath,user)
 }
+onDownloadTemporaryComplete: {
+var paths = filename.split("/")
+var nameOnly = paths[paths.length -1]
+console.log("onDownloadTemporaryComplete received filename="+filename + "name="+nameOnly)
+openFromDisk(filename, nameOnly)
+}
 }
 
 FolderListModel {
@@ -722,7 +728,7 @@
 color: UbuntuColors.red
 onClicked: {
 PopupUtils.close(dialog)
-openFile(filePath)
+openLocalFile(filePath)
 }
 }
 
@@ -898,6 +904,34 @@
 }
 }
 
+function openFromDisk(fullpathname, name) {
+console.log("openFromDisk():"+ fullpathname)
+// Check if file is an archive. If yes, ask the user whether he wants to extract it
+var archiveType = getArchiveType(name)
+if (archiveType === "") {
+openLocalFile(fullpathname)
+} else {
+PopupUtils.open(openArchiveDialog, folderListView,
+{   "filePath" : fullpathname,
+"fileName" : name,
+"archiveType" : archiveType
+})
+}
+
+}
+
+//High Level openFile() function
+//remote files are saved as temporary files and then opened
+function openFile(model) {
+if (model.isRemote) {
+//download and open later when the signal downloadTemporaryComplete() arrives
+pageModel.downloadAsTemporaryFile(model.index)
+}
+else {
+openFromDisk(model.filePath, model.fileName)
+}
+}
+
 function itemClicked(model) {  
 if (model.isBrowsable) {
 console.log("browsable path="+model.filePath+" isRemote="+model.isRemote+" needsAuthentication="+model.needsAuthentication)
@@ -920,29 +954,10 @@
 } else {
 console.log("Non dir clicked")
 if (fileSelectorMode) {
-selectionManager.select(model.index,
-false,
-true);
+selectionManager.select(model.index,false,true)
 } else {
-// Check if file is an archive. If yes, ask the user whether he wants to extract it
-var archiveType = getArchiveType(model.fileName)
-if (archiveType === "") {
-openFile(model.filePath)
-} else {
-PopupUtils.open(openArchiveDialog, folderListView,
-{ "filePath" : model.filePath,
-"fileName" : model.fileName,
-"archiveType"

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-04 into lp:ubuntu-filemanager-app

2015-11-02 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-04 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-03 as a 
prerequisite.

Commit message:
implemented tests for downloading files

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-04/+merge/276447

implemented tests for downloading files
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/open-remote-files-04 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/test_folderlistmodel/regression/tst_folderlistmodel.cpp'
--- src/plugin/test_folderlistmodel/regression/tst_folderlistmodel.cpp	2015-07-18 20:29:46 +
+++ src/plugin/test_folderlistmodel/regression/tst_folderlistmodel.cpp	2015-11-02 19:21:55 +
@@ -67,6 +67,17 @@
 #define  CHECK_IF_CAN_CREATE_SHARES()   if (!SmbUserShare::canCreateShares()) \
{  qWarning() << Q_FUNC_INFO << "cannot be performed, it requires a Samba Server to create user shares"; return;}
 
+
+class FakeDirItemInfoBigSize:  public DirItemInfo
+{
+public:
+ FakeDirItemInfoBigSize(const DirItemInfo& original): DirItemInfo(original)
+ {
+d_ptr->_size = 0x7fff; // higher qint64, 64 bits with huge size
+ }
+};
+
+
 QByteArray md5FromIcon(const QIcon& icon);
 QString createFileInTempDir(const QString& name, const char *content, qint64 size);
 
@@ -90,6 +101,7 @@
 void slotExtFsWatcherPathModified(const QString&) { ++m_extFSWatcherPathModifiedCounter; }
 void slotSelectionChanged(int counter)  { m_selectedItemsCounter = counter; }
 void slotSelectionModeChanged(int m){ m_selectionMode = m;}
+void onDownloadTemporaryComplete(const QString& name) {m_temporaryDownloadName = name;}
 
 private Q_SLOTS:
 void initTestCase();   //before all tests
@@ -183,6 +195,14 @@
 void  smbCutFromSmb2LocalDisk();
 void  smbCutFromLocalDisk2Smb();
 
+private Q_SLOTS: // remote donwnload tests using samba
+void  smbDownloadEmptyFile();
+void  smbDownloadBigFileWithNoSpace();
+void  smbDownloadFile();
+void  smbDownloadAsTemporary();
+void  smbDownloadIntoStandardDownloadLocation();
+
+
 private:
 bool createTempHomeTrashDir(const QString& existentDir);
 void initDeepDirs();
@@ -228,6 +248,7 @@
 intm_extFSWatcherPathModifiedCounter;
 intm_selectedItemsCounter;
 intm_selectionMode;
+QStringm_temporaryDownloadName;
 
 };
 
@@ -3442,7 +3463,7 @@
  * set file mananer to browse the source in the Samba share
  */
 m_dirModel_01->setPath(sourceFolder.smbUrl);
-QTest::qWait(TIME_TO_REFRESH_DIR);
+QTest::qWait(TIME_TO_REFRESH_REMOTE_DIR);
 QVERIFY(m_dirModel_01->rowCount() != 0);
 DirSelection  *selection = m_dirModel_01->selectionObject();
 QVERIFY(selection != 0);
@@ -3600,6 +3621,184 @@
 }
 
 
+void TestDirModel::smbDownloadEmptyFile()
+{
+CHECK_IF_CAN_CREATE_SHARES();
+
+QString shareName("smbDownloadEmptyFile");
+TestQSambaSuite smbTest(this);
+ShareCreationStatus tmpShare(smbTest.createTempShare(shareName));
+if (tmpShare.tempDir)
+{
+tmpShare.tempDir->setAutoRemove(true);
+}
+QCOMPARE(tmpShare.status, true);
+
+ // temp shares are created with a unique file there with some content
+// this test just rewrite this file with no content
+QFile empty (tmpShare.fileContent.diskPathname) ;
+QCOMPARE(empty.open(QFile::WriteOnly | QFile::Truncate), true);
+empty.close();
+//make sure the file is empty
+QFileInfo sourceInfo(tmpShare.fileContent.diskPathname);
+QCOMPARE(sourceInfo.size(),  (qint64)0);
+
+m_dirModel_01->setPath(tmpShare.url);
+QTest::qWait(TIME_TO_REFRESH_REMOTE_DIR);
+QVERIFY(m_dirModel_01->rowCount() != 0);
+
+const DirItemInfo & item = m_dirModel_01->mDirectoryContents.at(0);
+QCOMPARE(item.isFile(),  true);
+QVERIFY(item.size() == 0);
+
+QString tmpFile(QDir::tempPath() + QDir::separator() + "_empty_file.ttt");
+
+QCOMPARE(m_dirModel_01->downloadAndSaveAs(0, tmpFile), true);
+QTest::qWait(TIME_TO_PROCESS);
+
+QFileInfo targetInfo(tmpFile);
+QCOMPARE(targetInfo.exists(),  true);
+QCOMPARE(targetInfo.size(), (qint64)0);
+}
+
+
+void TestDirModel::smbDownloadBigFileWithNoSpace()
+{
+CHECK_IF_CAN_CREATE_SHARES();
+
+QString shareName("smbDownloadBigFileWithNoSpace");
+TestQSambaSuite smbTest(this);
+ShareCreationStatus tmpShare(smbTest.createTempShare(shareName));
+if (tmpShare.tempDir)
+{
+tmpShare.tempDir->setAutoRemove(true

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

2015-10-27 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-07 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-06 as a 
prerequisite.

Commit message:
improved SmbUtil::findSmBServer()

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-07/+merge/275832

improved SmbUtil::findSmBServer()
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-07 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-27 11:09:54 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-27 11:09:54 +
@@ -716,21 +716,25 @@
  */
 QString SmbUtil::findSmBServer(const smbc_dirent & dirent)
 {
-QString host("localhost");
+QString host;
 if (dirent.name[0] != 0)
 {
 QString name(dirent.name);
 host = name;
-QString comment(dirent.comment);
-if (!comment.isEmpty())
+}
+QString comment(dirent.comment);
+if (!comment.isEmpty())
+{
+QString fullName = comment.split(QLatin1Char(' '), QString::SkipEmptyParts).first();
+if (!fullName.isEmpty())
 {
-QString fullName = comment.split(QLatin1Char(' '), QString::SkipEmptyParts).first();
-if (!fullName.isEmpty() &&  fullName.startsWith(name), Qt::CaseSensitive)
-{
-host = fullName;
-}
+host = fullName;
 }
 }
+if (host.isEmpty())
+{
+host = QLatin1String("localhost");
+}
 return host.toLower();
 }
 

-- 
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-improvements-05 into lp:ubuntu-filemanager-app

2015-10-21 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app.

Commit message:
changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05/+merge/275164

changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-08-15 18:38:28 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-21 11:04:00 +
@@ -232,13 +232,16 @@
 SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
 if (isOpen())
 {   
-ret = smbObj()->getFstat(m_context,m_fd, );
+ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
 }
 else
 {
-SmbLocationItemFile *mySelf = const_cast<SmbLocationItemFile*> (this);
-mySelf->createContext();
-ret = smbObj()->getStat(m_context,cleanUrl(), );
+if (m_context != 0) {
+ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
+}
+else {
+ret = smbObj()->getStatInfo(cleanUrl(),);
+}
 }
 if(ret == SmbUtil::StatDone)
 {

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:02:27 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-21 11:04:00 +
@@ -38,11 +38,17 @@
 
 #if defined(SHOW_MESSAGES)
 #  define DBG(more_items) qDebug() << Q_FUNC_INFO  more_items
+#  define DBG_STAT(ret) qDebug() << Q_FUNC_INFO \
+ << "return:" << ret \
+ << "mode:"   << st->st_mode \
+ << "mtime:"  << st->st_mtime \
+ << "size:"   << st->st_size
 #else
 #define DBG(none)
+#define DBG_STAT(ret)
 #endif
 
-#define SHOW_ERRNO(path)if (errno != 0 && errno != ENOENT) \
+#define SHOW_ERRNO(path)if (errno != 0) \
 { \
 qWarning() << Q_FUNC_INFO << "path:" << path << "errno:" << errno << strerror(errno); \
 }
@@ -358,7 +364,7 @@
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
 {
 errno = 0;
-ret = getStat(context, smb_path,st);
+ret = static_cast (getStat(context, smb_path,st));
 }
 
 if (errno != 0)
@@ -740,19 +746,22 @@
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getFstat(Smb::Context context, Smb::FileHandler fd, struct stat*  st)
 {
  ::memset(st,0,sizeof(struct stat));
  int ret = ::smbc_getFunctionFstat(context)(context,fd, st);
- return static_cast (ret);
+ DBG_STAT(ret);
+ return ret;
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getStat(Smb::Context context, const QString& smb_path, struct stat*  st)
 {
 ::memset(st,0,sizeof(struct stat));
+DBG(<< smb_path);
 int ret = ::smbc_getFunctionStat(context)(context,smb_path.toLocal8Bit().constData(), st);
-return static_cast (ret);
+DBG_STAT(ret);
+return ret;
 }

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.h'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.h	2015-07-15 13:00:56 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.h	2015-10-21 11:04:00 +
@@ -94,8 +94,8 @@
  bool recursive = false,
  QDir::Filters filters = QDir::AllEntries | QDir::NoDotAndDotDot,
  const QStringList& filterNames = QStringList());
-StatReturn   getFstat(Smb::Context context, Smb::FileHandler fd, struct stat*  st);
-StatReturn   getStat(Smb::Context context, const QString& smb_path, struct stat*  st);
+int  getFstat(Smb::Context context, Smb::FileHandler fd, struct st

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

2015-10-21 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-06 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 as a 
prerequisite.

Commit message:
some cleanup in SmbItemInfo::setInfo(), work around for directories is not 
necessary after fixing stat problem on device

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-06/+merge/275165

some cleanup in SmbItemInfo::setInfo(), work around for directories is not 
necessary after fixing stat problem on device
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-06 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-09-13 14:20:30 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-10-21 11:06:53 +
@@ -50,9 +50,8 @@
 void SmbItemInfo::setInfo(const QString& smb_path)
 {   
 SmbUtil *smb = const_cast<SmbUtil*> (m_smb);
-//getStatInfo() is supposed to clear the struct stat unless the item does not exist
+//getStatInfo() is supposed to clear the struct stat
 struct stat st;
-::memset(, 0, sizeof(struct stat));
 int ret  = smb->getStatInfo(smb_path, );
 //lets start with true
 d_ptr->_exists  = d_ptr->_isReadable = true;
@@ -64,16 +63,7 @@
  d_ptr->_isHost = false;
  d_ptr->_exists  = d_ptr->_isReadable = false;
  break;
-case SmbUtil::StatDir:  
-//if directories does not have permissions lets set default
-//some smb stat functions does not work, this code will not hurt
-if ((st.st_mode & S_IFMT) == 0)
-{
-st.st_mode |= S_IRUSR | S_IWUSR | S_IXUSR |
-  S_IRGRP | S_IWGRP | S_IXGRP |
-  S_IROTH | S_IXOTH;
-}
-st.st_mode |= S_IFDIR;
+case SmbUtil::StatDir: 
 break;
 case SmbUtil::StatHost:
 d_ptr->_isHost = true;

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-08-15 18:38:28 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-21 11:06:53 +
@@ -232,13 +232,16 @@
 SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
 if (isOpen())
 {   
-ret = smbObj()->getFstat(m_context,m_fd, );
+ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
 }
 else
 {
-SmbLocationItemFile *mySelf = const_cast<SmbLocationItemFile*> (this);
-mySelf->createContext();
-ret = smbObj()->getStat(m_context,cleanUrl(), );
+if (m_context != 0) {
+ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
+}
+else {
+ret = smbObj()->getStatInfo(cleanUrl(),);
+}
 }
 if(ret == SmbUtil::StatDone)
 {

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-21 11:06:53 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-21 11:06:53 +
@@ -38,11 +38,17 @@
 
 #if defined(SHOW_MESSAGES)
 #  define DBG(more_items) qDebug() << Q_FUNC_INFO  more_items
+#  define DBG_STAT(ret) qDebug() << Q_FUNC_INFO \
+ << "return:" << ret \
+ << "mode:"   << st->st_mode \
+ << "mtime:"  << st->st_mtime \
+ << "size:"   << st->st_size
 #else
 #define DBG(none)
+#define DBG_STAT(ret)
 #endif
 
-#define SHOW_ERRNO(path)if (errno != 0 && errno != ENOENT) \
+#define SHOW_ERRNO(path)if (errno != 0) \
 { \
 qWarning() << Q_FUNC_INFO << "path:" << path << "errno:" << errno << strerror(errno); \
 }
@@ -358,7 +364,7 @@
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
 {
 errno = 0;
-ret = getStat(context, smb_path,st);
+ret = static_cast (getStat(context, smb_path,st));
 }
 
 if (errno != 0)
@@ -740,19 +746,22 @@
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getFstat(Smb::Context context, Smb::FileHandler fd, struct stat*  st)
 {
  ::memset(st,0,sizeof(struct s

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~popey/ubuntu-filemanager-app/set-bzr-revno into lp:ubuntu-filemanager-app

2015-10-20 Thread Carlos Jose Mazieri
Review: Approve

Nice, Thanks.
-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/set-bzr-revno/+merge/274957
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:~popey/ubuntu-filemanager-app/suppress-predictive-text into lp:ubuntu-filemanager-app

2015-10-20 Thread Carlos Jose Mazieri
Review: Approve

OK, Thanks.
-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/suppress-predictive-text/+merge/274995
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] [Bug 1472677] Re: Network shares are inaccessable by the application

2015-10-20 Thread Carlos Jose Mazieri
It has been released.

** Changed in: ubuntu-filemanager-app
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1472677

Title:
  Network shares are inaccessable by the application

Status in Ubuntu File Manager App:
  Fix Released

Bug description:
  In it's current form, the File Manager application is unable to see or
  access AFP network shares. I don't have any SAMBA shares on my home
  network, so I am unable to confirm whether or not the same would also
  be true for this type of network share. I suspect it would as there
  are no options in any of menus or settings to connect to a network
  share. "Places" within the app would seem like a logical place to find
  the "Network" as a place.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1472677/+subscriptions

-- 
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:~popey/ubuntu-filemanager-app/suppress-predictive-text into lp:ubuntu-filemanager-app

2015-10-20 Thread Carlos Jose Mazieri
The proposal to merge lp:~popey/ubuntu-filemanager-app/suppress-predictive-text 
into lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~popey/ubuntu-filemanager-app/suppress-predictive-text/+merge/274995
-- 
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] [Bug 1505594] Re: Wrong time of accessed files

2015-10-20 Thread Carlos Jose Mazieri
There was related bug that was fixed some time ago,  all items used show
the time of the current folder.

I think that it is OK now,  can you check it again?

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1505594

Title:
  Wrong time of accessed files

Status in Ubuntu File Manager App:
  New

Bug description:
  Hello,
  In example I'm looking at Properties of one of my files (video taken by 
Camera app) and I see:
  Accessed: 23.09.2015 16:03
  Modified: 12.10.2015 13:55

  But file was created at 26.09.2015 14:16

  I think maybe Properties option of the file in real is showing
  Properties of directory that contain that file (because I've checked
  all files in folder com.ubuntu.camera - all have the same Accessed and
  Modified date and time).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1505594/+subscriptions

-- 
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-improvements-04 into lp:ubuntu-filemanager-app

2015-10-20 Thread Carlos Jose Mazieri
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into 
lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04/+merge/273337
-- 
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-improvements-04 into lp:ubuntu-filemanager-app

2015-10-20 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 as a 
prerequisite.

Commit message:
ixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()

Requested reviews:
  Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot): 
continuous-integration
  Arto Jalkanen (ajalkane)

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04/+merge/275083

Fixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()
-- 
Your team Ubuntu File Manager Developers is subscribed to branch 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-20 18:31:25 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-20 18:31:25 +
@@ -342,7 +342,7 @@
 Smb::FileHandler fd = 0;
 ::memset(st, 0, sizeof(struct stat));
 if ((fd=openDir(context, smb_path)) )
-{
+{
 ret = guessDirType(context,fd);
 closeHandle(context, fd);
 if (ret == StatDir)
@@ -356,7 +356,7 @@
 }
 }
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
-{
+{
 errno = 0;
 ret = getStat(context, smb_path,st);
 }
@@ -636,6 +636,10 @@
 {
   return false;
 }
+if (::strcmp(shareName, "ADMIN$") == 0)
+{
+  return false;
+}
 
 return true;
 }
@@ -727,7 +731,7 @@
 
 bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
 {
-int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
+int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
 if (ret < 0)
 {
 SHOW_ERRNO(smb_path);

-- 
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:~popey/ubuntu-filemanager-app/set-bzr-revno into lp:ubuntu-filemanager-app

2015-10-20 Thread Carlos Jose Mazieri
The proposal to merge lp:~popey/ubuntu-filemanager-app/set-bzr-revno into 
lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~popey/ubuntu-filemanager-app/set-bzr-revno/+merge/274957
-- 
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-improvements-04 into lp:ubuntu-filemanager-app

2015-10-20 Thread Carlos Jose Mazieri
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into 
lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04/+merge/275083
-- 
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:~popey/ubuntu-filemanager-app/add-click-deps into lp:ubuntu-filemanager-app

2015-10-19 Thread Carlos Jose Mazieri
Review: Approve

Thanks,

I am looking forward to getting the entire Samba stuff in the next release.


-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
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:~popey/ubuntu-filemanager-app/fix-1507566 into lp:ubuntu-filemanager-app

2015-10-19 Thread Carlos Jose Mazieri
Review: Approve

That is OK

Thanks.
-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/fix-1507566/+merge/274884
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-improvements-05 into lp:ubuntu-filemanager-app

2015-10-06 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 as a 
prerequisite.

Commit message:
changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05/+merge/273514

changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-08-15 18:38:28 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-06 10:52:01 +
@@ -232,13 +232,16 @@
 SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
 if (isOpen())
 {   
-ret = smbObj()->getFstat(m_context,m_fd, );
+ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
 }
 else
 {
-SmbLocationItemFile *mySelf = const_cast<SmbLocationItemFile*> (this);
-mySelf->createContext();
-ret = smbObj()->getStat(m_context,cleanUrl(), );
+if (m_context != 0) {
+ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
+}
+else {
+ret = smbObj()->getStatInfo(cleanUrl(),);
+}
 }
 if(ret == SmbUtil::StatDone)
 {

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-06 10:52:01 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-06 10:52:01 +
@@ -38,11 +38,17 @@
 
 #if defined(SHOW_MESSAGES)
 #  define DBG(more_items) qDebug() << Q_FUNC_INFO  more_items
+#  define DBG_STAT(ret) qDebug() << Q_FUNC_INFO \
+ << "return:" << ret \
+ << "mode:"   << st->st_mode \
+ << "mtime:"  << st->st_mtime \
+ << "size:"   << st->st_size
 #else
 #define DBG(none)
+#define DBG_STAT(ret)
 #endif
 
-#define SHOW_ERRNO(path)if (errno != 0 && errno != ENOENT) \
+#define SHOW_ERRNO(path)if (errno != 0) \
 { \
 qWarning() << Q_FUNC_INFO << "path:" << path << "errno:" << errno << strerror(errno); \
 }
@@ -342,7 +348,7 @@
 Smb::FileHandler fd = 0;
 ::memset(st, 0, sizeof(struct stat));
 if ((fd=openDir(context, smb_path)) )
-{
+{
 ret = guessDirType(context,fd);
 closeHandle(context, fd);
 if (ret == StatDir)
@@ -356,9 +362,9 @@
 }
 }
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
-{
+{
 errno = 0;
-ret = getStat(context, smb_path,st);
+ret = static_cast (getStat(context, smb_path,st));
 }
 
 if (errno != 0)
@@ -636,6 +642,10 @@
 {
   return false;
 }
+if (::strcmp(shareName, "ADMIN$") == 0)
+{
+  return false;
+}
 
 return true;
 }
@@ -727,7 +737,7 @@
 
 bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
 {
-int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
+int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
 if (ret < 0)
 {
 SHOW_ERRNO(smb_path);
@@ -736,19 +746,22 @@
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getFstat(Smb::Context context, Smb::FileHandler fd, struct stat*  st)
 {
  ::memset(st,0,sizeof(struct stat));
  int ret = ::smbc_getFunctionFstat(context)(context,fd, st);
- return static_cast (ret);
+ DBG_STAT(ret);
+ return ret;
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getStat(Smb::Context context, const QString& smb_path, struct stat*  st)
 {
 ::memset(st,0,sizeof(struct stat));
+DBG(<< smb_path);
 int ret = ::smbc_getFun

Re: [Ubuntu-touch-coreapps-reviewers] [Merge] lp:~popey/ubuntu-filemanager-app/add-click-deps into lp:ubuntu-filemanager-app

2015-10-05 Thread Carlos Jose Mazieri
Hello Alan,

My attempt was done using the SDK armhf 15-04.

I see that you did install 'libsmbclient-dev' (it installs all the samba 
libraries) which I thought it was going to be downloaded by the proposed 
solution.

I thought that solution would bring all the necessary resources to compile and 
deploy on device. Any new developer will try to create the click package using 
SDK.

Am I wrong? 

Can you try it again after removing all the samba libraries? 

If so, I would suggest a sequence of commands:
sudo apt-get remove libsmbclient-dev 
sudo apt-get autoremove # I hope this will uninstall all other samba 
libraries
click-buddy --dir add-click-deps/

If you want, can you also try it using armhf SDK? 

Thanks,
Carlos

-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
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-improvements-02 into lp:ubuntu-filemanager-app

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-02 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-01 as a 
prerequisite.

Commit message:
After using a such user/password for authentication in a remote location it 
is necessary to reset that values for other items, without this items which do 
not require authentication may fail to get data.

That means if a remote location does not need authentication the 
user/password is reset to initial value.


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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-02/+merge/273334

After using a such user/password for authentication in a remote location it 
is necessary to reset that values for other items, without this items which do 
not require authentication may fail to get data.

That means if a remote location does not need authentication the 
user/password is reset to initial value.

-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-02 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/location.cpp'
--- src/plugin/folderlistmodel/location.cpp	2015-07-11 21:21:16 +
+++ src/plugin/folderlistmodel/location.cpp	2015-10-04 15:45:50 +
@@ -173,7 +173,7 @@
  */
 QString Location::currentAuthenticationUser()
 {
-return QString(::qgetenv("USER"));
+return NetAuthenticationData::currentUser();
 }
 
 /*!

=== modified file 'src/plugin/folderlistmodel/locationsfactory.cpp'
--- src/plugin/folderlistmodel/locationsfactory.cpp	2015-07-13 20:41:48 +
+++ src/plugin/folderlistmodel/locationsfactory.cpp	2015-10-04 15:45:50 +
@@ -194,31 +194,44 @@
 
 
 DirItemInfo * LocationsFactory::validateCurrentUrl(Location *location, const NetAuthenticationData )
-{
+{   
 //when there is authentication data, set the authentication before validating an item
-if (!authData.isEmpty())
+if (location->isRemote())
 {
-location->setAuthentication(authData.user, authData.password);
+if (!authData.isEmpty())
+{
+location->setAuthentication(authData.user, authData.password);
+}
+else
+{
+//reset the password even it was set before, it is necessary to browse other items
+location->setAuthentication(NetAuthenticationData::currentUser(),
+NetAuthenticationData::noPassword());
+}
 }
 
 DirItemInfo *item = location->validateUrlPath(m_tmpPath);
 
 //for remote loacations, authentication might have failed
-//if so try to use a stored authentication data and autenticate again
-if (   item && item->needsAuthentication()
-&& location->useAuthenticationDataIfExists(*item))
-{
-delete item;
-item = location->validateUrlPath(m_tmpPath);
-}
-//if failed it is necessary to ask the user to provide user/password
-if ( item && item->needsAuthentication() )
-{
-location->notifyItemNeedsAuthentication(item);
-delete item;
-item = 0;
-}
-if (item && !item->isContentReadable())
+//if so try to use a stored authentication data and authenticate it again
+if (location->isRemote() && item != 0)
+{
+if (item->needsAuthentication()
+ && location->useAuthenticationDataIfExists(*item))
+{
+delete item;
+item = location->validateUrlPath(m_tmpPath);
+}
+//if failed it is necessary to ask the user to provide user/password
+if ( item != 0 && item->needsAuthentication() )
+{
+location->notifyItemNeedsAuthentication(item);
+delete item;
+item = 0;
+}
+}
+//now just see if the item is readable
+if (item != 0 && !item->isContentReadable())
 {
 delete item;
 item = 0;

=== modified file 'src/plugin/folderlistmodel/net/netauthenticationdata.cpp'
--- src/plugin/folderlistmodel/net/netauthenticationdata.cpp	2015-10-04 15:45:50 +
+++ src/plugin/folderlistmodel/net/netauthenticationdata.cpp	2015-10-04 15:45:50 +
@@ -33,6 +33,18 @@
 void *   NetAuthenticationDataList::m_parent   = 0;
 
 
+const QString& NetAuthenticationData::currentUser()
+{
+static QString curUser(::qgetenv("USER"));
+return curUser;
+}
+
+const QString& NetAuthenticationData::noPassword()
+{
+static QString emptyPassword;
+return emptyPassword;
+}
+
 NetAuthenticationDataList::NetAuthenticationDataList(): m_savedAuths(0)
 {   
 //settings file does not need to open  all th

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

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-02 as a 
prerequisite.

Commit message:
Improved SmbUtil::getStatInfo() to not always open Directories and Files, 
Directories are always attempted but Files are not necessary, Files are tried 
just attempted with SmbUtil:getStat().

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03/+merge/273335

Improved SmbUtil::getStatInfo() to not always open Directories and Files, 
Directories are always attempted but Files are not necessary, Files are tried 
just attempted with SmbUtil:getStat().
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-08-15 17:47:55 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 15:47:50 +
@@ -340,45 +340,28 @@
 StatReturn ret = StatInvalid;
 int slashes = smb_path.count(QDir::separator());
 Smb::FileHandler fd = 0;
-//  smb:// -> slahes=2   smb://workgroup -> slahes=2   smb://host/share -> slashes=3=URL_SLASHES_NUMBER_FOR_SHARES
-if ((fd=openDir(context, smb_path)))
-{   
-if ((ret = guessDirType(context,fd)) == StatDir && slashes == URL_SLASHES_NUMBER_FOR_SHARES)
-{
-ret  = StatShare;
-}
-if (slashes >= URL_SLASHES_NUMBER_FOR_SHARES  && (ret == StatShare || ret == StatDir))
-{
-  /* smbc_getFunctionFstatdir does not work
-ret = static_cast(::smbc_getFunctionFstatdir(context)(context,fd, st));
-  */
-QString ipUrl = NetUtil::urlConvertHostnameToIP(smb_path);
-if (ipUrl.isEmpty())
+::memset(st, 0, sizeof(struct stat));
+if ((fd=openDir(context, smb_path)) )
+{
+ret = guessDirType(context,fd);
+closeHandle(context, fd);
+if (ret == StatDir)
+{
+//  smb:// -> slahes=2   smb://workgroup -> slahes=2   smb://host/share -> slashes=3=URL_SLASHES_NUMBER_FOR_SHARES
+if (slashes == URL_SLASHES_NUMBER_FOR_SHARES)
 {
-ipUrl = smb_path;
+ret = StatShare;
 }
-(void)getStat(context,ipUrl, st);
+(void)getStat(context,smb_path,st);
 }
 }
-else
-{
-// there is no indication of what the item is,  directory or file
-// if openDir() failed it may be a file, try openFile()
-// do not try openFile() when: EACCES means it needs authentication, ECONNREFUSED means path does not exist
-if (errno != EACCES && errno != ECONNREFUSED )
-{
-if ((fd = openFile(context,smb_path)))
+else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
 {
-ret =  getFstat(context,fd, st);
-}
-}
+errno = 0;
+ret = getStat(context, smb_path,st);
 }
 
-if (fd)
-{
-closeHandle(context, fd);
-}
-else
+if (errno != 0)
 {
 SHOW_ERRNO(smb_path);
 switch(errno)

-- 
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-improvements-05 into lp:ubuntu-filemanager-app

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 as a 
prerequisite.

Commit message:
changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05/+merge/273338

changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-08-15 18:38:28 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-04 16:06:06 +
@@ -232,13 +232,16 @@
 SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
 if (isOpen())
 {   
-ret = smbObj()->getFstat(m_context,m_fd, );
+ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
 }
 else
 {
-SmbLocationItemFile *mySelf = const_cast<SmbLocationItemFile*> (this);
-mySelf->createContext();
-ret = smbObj()->getStat(m_context,cleanUrl(), );
+if (m_context != 0) {
+ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
+}
+else {
+ret = smbObj()->getStatInfo(cleanUrl(),);
+}
 }
 if(ret == SmbUtil::StatDone)
 {

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:06:06 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:06:06 +
@@ -38,11 +38,17 @@
 
 #if defined(SHOW_MESSAGES)
 #  define DBG(more_items) qDebug() << Q_FUNC_INFO  more_items
+#  define DBG_STAT(ret) qDebug() << Q_FUNC_INFO \
+ << "return:" << ret \
+ << "mode:"   << st->st_mode \
+ << "mtime:"  << st->st_mtime \
+ << "size:"   << st->st_size
 #else
 #define DBG(none)
+#define DBG_STAT(ret)
 #endif
 
-#define SHOW_ERRNO(path)if (errno != 0 && errno != ENOENT) \
+#define SHOW_ERRNO(path)if (errno != 0) \
 { \
 qWarning() << Q_FUNC_INFO << "path:" << path << "errno:" << errno << strerror(errno); \
 }
@@ -342,7 +348,7 @@
 Smb::FileHandler fd = 0;
 ::memset(st, 0, sizeof(struct stat));
 if ((fd=openDir(context, smb_path)) )
-{
+{
 ret = guessDirType(context,fd);
 closeHandle(context, fd);
 if (ret == StatDir)
@@ -356,9 +362,9 @@
 }
 }
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
-{
+{
 errno = 0;
-ret = getStat(context, smb_path,st);
+ret = static_cast (getStat(context, smb_path,st));
 }
 
 if (errno != 0)
@@ -366,21 +372,21 @@
 SHOW_ERRNO(smb_path);
 switch(errno)
 {
-   case EACCES:
-//force shares to have Directory attribute
+case EACCES:
+//force shares to have Directory attribute
 if (slashes == URL_SLASHES_NUMBER_FOR_SHARES)
-{
- st->st_mode |= S_IFDIR;
-}
-ret = StatNoAccess; //authentication should have failed
-break;
-   case ENOENT:
-   case ENODEV:
-   case ECONNREFUSED:
-ret = StatDoesNotExist; //item does not exist
-break;
-   default:
-break;
+{
+st->st_mode |= S_IFDIR;
+}
+ret = StatNoAccess; //authentication should have failed
+break;
+case ENOENT:
+case ENODEV:
+case ECONNREFUSED:
+ret = StatDoesNotExist; //item does not exist
+break;
+default:
+break;
 }
 }
 deleteC

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

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 as a 
prerequisite.

Commit message:
ixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04/+merge/273337

ixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:04:23 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:04:23 +
@@ -342,7 +342,7 @@
 Smb::FileHandler fd = 0;
 ::memset(st, 0, sizeof(struct stat));
 if ((fd=openDir(context, smb_path)) )
-{
+{
 ret = guessDirType(context,fd);
 closeHandle(context, fd);
 if (ret == StatDir)
@@ -356,7 +356,7 @@
 }
 }
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
-{
+{
 errno = 0;
 ret = getStat(context, smb_path,st);
 }
@@ -636,6 +636,10 @@
 {
   return false;
 }
+if (::strcmp(shareName, "ADMIN$") == 0)
+{
+  return false;
+}
 
 return true;
 }
@@ -727,7 +731,7 @@
 
 bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
 {
-int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
+int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
 if (ret < 0)
 {
 SHOW_ERRNO(smb_path);

-- 
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-improvements-01 into lp:ubuntu-filemanager-app

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-01 into 
lp:ubuntu-filemanager-app.

Commit message:
Improved Authentication saving/using by trying the host only when there is no 
user/password for a such URL which has path

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-01/+merge/27

Improved Authentication saving/using by trying the host only when there is no 
user/password for a such URL which has path
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-01 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/net/netauthenticationdata.cpp'
--- src/plugin/folderlistmodel/net/netauthenticationdata.cpp	2015-03-01 15:32:42 +
+++ src/plugin/folderlistmodel/net/netauthenticationdata.cpp	2015-10-04 15:43:35 +
@@ -78,6 +78,13 @@
 if (!url.isEmpty())
 {
 ret = m_urlEntries.value(url);
+if (ret == 0)
+{
+//try to match cases where a more complete URL like smb://host/share/directory was entered and smb://host had been saved before
+QUrl hostUrl(url);
+hostUrl.setPath(QLatin1String(0));
+ret =  m_urlEntries.value(hostUrl.toString());
+}
 }
 return ret;
 }

-- 
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-improvements-05 into lp:ubuntu-filemanager-app

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 as a 
prerequisite.

Commit message:
changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05/+merge/273339

changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-08-15 18:38:28 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-04 16:15:09 +
@@ -232,13 +232,16 @@
 SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
 if (isOpen())
 {   
-ret = smbObj()->getFstat(m_context,m_fd, );
+ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
 }
 else
 {
-SmbLocationItemFile *mySelf = const_cast<SmbLocationItemFile*> (this);
-mySelf->createContext();
-ret = smbObj()->getStat(m_context,cleanUrl(), );
+if (m_context != 0) {
+ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
+}
+else {
+ret = smbObj()->getStatInfo(cleanUrl(),);
+}
 }
 if(ret == SmbUtil::StatDone)
 {

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:15:09 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:15:09 +
@@ -38,11 +38,17 @@
 
 #if defined(SHOW_MESSAGES)
 #  define DBG(more_items) qDebug() << Q_FUNC_INFO  more_items
+#  define DBG_STAT(ret) qDebug() << Q_FUNC_INFO \
+ << "return:" << ret \
+ << "mode:"   << st->st_mode \
+ << "mtime:"  << st->st_mtime \
+ << "size:"   << st->st_size
 #else
 #define DBG(none)
+#define DBG_STAT(ret)
 #endif
 
-#define SHOW_ERRNO(path)if (errno != 0 && errno != ENOENT) \
+#define SHOW_ERRNO(path)if (errno != 0) \
 { \
 qWarning() << Q_FUNC_INFO << "path:" << path << "errno:" << errno << strerror(errno); \
 }
@@ -342,7 +348,7 @@
 Smb::FileHandler fd = 0;
 ::memset(st, 0, sizeof(struct stat));
 if ((fd=openDir(context, smb_path)) )
-{
+{
 ret = guessDirType(context,fd);
 closeHandle(context, fd);
 if (ret == StatDir)
@@ -356,9 +362,9 @@
 }
 }
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
-{
+{
 errno = 0;
-ret = getStat(context, smb_path,st);
+ret = static_cast (getStat(context, smb_path,st));
 }
 
 if (errno != 0)
@@ -636,6 +642,10 @@
 {
   return false;
 }
+if (::strcmp(shareName, "ADMIN$") == 0)
+{
+  return false;
+}
 
 return true;
 }
@@ -727,7 +737,7 @@
 
 bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
 {
-int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
+int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
 if (ret < 0)
 {
 SHOW_ERRNO(smb_path);
@@ -736,19 +746,22 @@
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getFstat(Smb::Context context, Smb::FileHandler fd, struct stat*  st)
 {
  ::memset(st,0,sizeof(struct stat));
  int ret = ::smbc_getFunctionFstat(context)(context,fd, st);
- return static_cast (ret);
+ DBG_STAT(ret);
+ return ret;
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getStat(Smb::Context context, const QString& smb_path, struct stat*  st)
 {
 ::memset(st,0,sizeof(struct stat));
+DBG(<< smb_path);
 int ret = ::smbc_getFun

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

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 as a 
prerequisite.

Commit message:
changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05/+merge/273340

changed SmbUtil::getStat() and SmbUtil::getFstat() to return int as they do not 
handle items from SmbUtil::StatReturn, they are just a wrapper to libsmbclient 
stat functions, is SmbUtil::getStatInfo() which does handle SmbUtil::StatReturn
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-08-15 18:38:28 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-04 16:21:05 +
@@ -232,13 +232,16 @@
 SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
 if (isOpen())
 {   
-ret = smbObj()->getFstat(m_context,m_fd, );
+ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
 }
 else
 {
-SmbLocationItemFile *mySelf = const_cast<SmbLocationItemFile*> (this);
-mySelf->createContext();
-ret = smbObj()->getStat(m_context,cleanUrl(), );
+if (m_context != 0) {
+ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
+}
+else {
+ret = smbObj()->getStatInfo(cleanUrl(),);
+}
 }
 if(ret == SmbUtil::StatDone)
 {

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:21:05 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:21:05 +
@@ -38,11 +38,17 @@
 
 #if defined(SHOW_MESSAGES)
 #  define DBG(more_items) qDebug() << Q_FUNC_INFO  more_items
+#  define DBG_STAT(ret) qDebug() << Q_FUNC_INFO \
+ << "return:" << ret \
+ << "mode:"   << st->st_mode \
+ << "mtime:"  << st->st_mtime \
+ << "size:"   << st->st_size
 #else
 #define DBG(none)
+#define DBG_STAT(ret)
 #endif
 
-#define SHOW_ERRNO(path)if (errno != 0 && errno != ENOENT) \
+#define SHOW_ERRNO(path)if (errno != 0) \
 { \
 qWarning() << Q_FUNC_INFO << "path:" << path << "errno:" << errno << strerror(errno); \
 }
@@ -342,7 +348,7 @@
 Smb::FileHandler fd = 0;
 ::memset(st, 0, sizeof(struct stat));
 if ((fd=openDir(context, smb_path)) )
-{
+{
 ret = guessDirType(context,fd);
 closeHandle(context, fd);
 if (ret == StatDir)
@@ -356,9 +362,9 @@
 }
 }
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
-{
+{
 errno = 0;
-ret = getStat(context, smb_path,st);
+ret = static_cast (getStat(context, smb_path,st));
 }
 
 if (errno != 0)
@@ -636,6 +642,10 @@
 {
   return false;
 }
+if (::strcmp(shareName, "ADMIN$") == 0)
+{
+  return false;
+}
 
 return true;
 }
@@ -727,7 +737,7 @@
 
 bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
 {
-int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
+int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
 if (ret < 0)
 {
 SHOW_ERRNO(smb_path);
@@ -736,19 +746,22 @@
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getFstat(Smb::Context context, Smb::FileHandler fd, struct stat*  st)
 {
  ::memset(st,0,sizeof(struct stat));
  int ret = ::smbc_getFunctionFstat(context)(context,fd, st);
- return static_cast (ret);
+ DBG_STAT(ret);
+ return ret;
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getStat(Smb::Context context, const QString& smb_path, struct stat*  st)
 {
 ::memset(st,0,sizeof(struct stat));
+DBG(<< smb_path);
 int ret = ::smbc_getFun

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

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-03 as a 
prerequisite.

Commit message:
fixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04/+merge/273336

fixed SmbUtil::changePermissions()
improved SmbUtil::checkValidShareName()
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-04 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 15:50:08 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 15:50:08 +
@@ -342,7 +342,7 @@
 Smb::FileHandler fd = 0;
 ::memset(st, 0, sizeof(struct stat));
 if ((fd=openDir(context, smb_path)) )
-{
+{
 ret = guessDirType(context,fd);
 closeHandle(context, fd);
 if (ret == StatDir)
@@ -356,7 +356,7 @@
 }
 }
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
-{
+{
 errno = 0;
 ret = getStat(context, smb_path,st);
 }
@@ -366,21 +366,21 @@
 SHOW_ERRNO(smb_path);
 switch(errno)
 {
-   case EACCES:
-//force shares to have Directory attribute
+case EACCES:
+//force shares to have Directory attribute
 if (slashes == URL_SLASHES_NUMBER_FOR_SHARES)
-{
- st->st_mode |= S_IFDIR;
-}
-ret = StatNoAccess; //authentication should have failed
-break;
-   case ENOENT:
-   case ENODEV:
-   case ECONNREFUSED:
-ret = StatDoesNotExist; //item does not exist
-break;
-   default:
-break;
+{
+st->st_mode |= S_IFDIR;
+}
+ret = StatNoAccess; //authentication should have failed
+break;
+case ENOENT:
+case ENODEV:
+case ECONNREFUSED:
+ret = StatDoesNotExist; //item does not exist
+break;
+default:
+break;
 }
 }
 deleteContext(context);
@@ -636,6 +636,10 @@
 {
   return false;
 }
+if (::strcmp(shareName, "ADMIN$") == 0)
+{
+  return false;
+}
 
 return true;
 }
@@ -727,7 +731,7 @@
 
 bool SmbUtil::changePermissions(Smb::Context context, const QString& smb_path, mode_t mode)
 {
-int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constBegin(), mode);
+int ret = ::smbc_getFunctionChmod(context)(context, smb_path.toLocal8Bit().constData(), mode);
 if (ret < 0)
 {
 SHOW_ERRNO(smb_path);

-- 
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-improvements-06 into lp:ubuntu-filemanager-app

2015-10-04 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-06 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-05 as a 
prerequisite.

Commit message:
some cleanup in SmbItemInfo::setInfo(), work around for directories is not 
necessary after fixing stat problem on device

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-06/+merge/273341

some cleanup in SmbItemInfo::setInfo(), work around for directories is not 
necessary after fixing stat problem on device
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-improvements-06 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-09-13 14:20:30 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-10-04 16:31:05 +
@@ -50,9 +50,8 @@
 void SmbItemInfo::setInfo(const QString& smb_path)
 {   
 SmbUtil *smb = const_cast<SmbUtil*> (m_smb);
-//getStatInfo() is supposed to clear the struct stat unless the item does not exist
+//getStatInfo() is supposed to clear the struct stat
 struct stat st;
-::memset(, 0, sizeof(struct stat));
 int ret  = smb->getStatInfo(smb_path, );
 //lets start with true
 d_ptr->_exists  = d_ptr->_isReadable = true;
@@ -64,16 +63,7 @@
  d_ptr->_isHost = false;
  d_ptr->_exists  = d_ptr->_isReadable = false;
  break;
-case SmbUtil::StatDir:  
-//if directories does not have permissions lets set default
-//some smb stat functions does not work, this code will not hurt
-if ((st.st_mode & S_IFMT) == 0)
-{
-st.st_mode |= S_IRUSR | S_IWUSR | S_IXUSR |
-  S_IRGRP | S_IWGRP | S_IXGRP |
-  S_IROTH | S_IXOTH;
-}
-st.st_mode |= S_IFDIR;
+case SmbUtil::StatDir: 
 break;
 case SmbUtil::StatHost:
 d_ptr->_isHost = true;

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-08-15 18:38:28 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smblocationitemfile.cpp	2015-10-04 16:31:05 +
@@ -232,13 +232,16 @@
 SmbUtil::StatReturn  ret  = SmbUtil::StatInvalid;
 if (isOpen())
 {   
-ret = smbObj()->getFstat(m_context,m_fd, );
+ret = static_cast (smbObj()->getFstat(m_context,m_fd,));
 }
 else
 {
-SmbLocationItemFile *mySelf = const_cast<SmbLocationItemFile*> (this);
-mySelf->createContext();
-ret = smbObj()->getStat(m_context,cleanUrl(), );
+if (m_context != 0) {
+ret = static_cast (smbObj()->getStat(m_context,cleanUrl(),));
+}
+else {
+ret = smbObj()->getStatInfo(cleanUrl(),);
+}
 }
 if(ret == SmbUtil::StatDone)
 {

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:31:05 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp	2015-10-04 16:31:05 +
@@ -38,11 +38,17 @@
 
 #if defined(SHOW_MESSAGES)
 #  define DBG(more_items) qDebug() << Q_FUNC_INFO  more_items
+#  define DBG_STAT(ret) qDebug() << Q_FUNC_INFO \
+ << "return:" << ret \
+ << "mode:"   << st->st_mode \
+ << "mtime:"  << st->st_mtime \
+ << "size:"   << st->st_size
 #else
 #define DBG(none)
+#define DBG_STAT(ret)
 #endif
 
-#define SHOW_ERRNO(path)if (errno != 0 && errno != ENOENT) \
+#define SHOW_ERRNO(path)if (errno != 0) \
 { \
 qWarning() << Q_FUNC_INFO << "path:" << path << "errno:" << errno << strerror(errno); \
 }
@@ -358,7 +364,7 @@
 else if (errno != EACCES && errno != ECONNREFUSED) // perhaps is a file
 {
 errno = 0;
-ret = getStat(context, smb_path,st);
+ret = static_cast (getStat(context, smb_path,st));
 }
 
 if (errno != 0)
@@ -740,19 +746,22 @@
 }
 
 
-SmbUtil::StatReturn
+int
 SmbUtil::getFstat(Smb::Context context, Smb::FileHandler fd, struct stat*  st)
 {
  ::memset(st,0,sizeof(struct s

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/directory-browsing-info into lp:ubuntu-filemanager-app

2015-09-30 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/directory-browsing-info into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-crash-fix as a prerequisite.

Commit message:
Show the size of directories: (it is the number of items) for local file 
systems and "Unknown" for remote locations
Show nothing if the last modified date is not available

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/directory-browsing-info/+merge/273001

Show the size of directories: (it is the number of items) for local file 
systems and "Unknown" for remote locations
Show nothing if the last modified date is not available
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/directory-browsing-info into 
lp:ubuntu-filemanager-app.
=== modified file 'src/app/qml/components/FolderIconDelegate.qml'
--- src/app/qml/components/FolderIconDelegate.qml	2015-09-06 00:11:02 +
+++ src/app/qml/components/FolderIconDelegate.qml	2015-10-01 00:11:58 +
@@ -49,8 +49,8 @@
 property string fileName: model.fileName
 property string filePath: fileView.folder + '/' + fileName
 
-property string text: fileName
-property string subText: Qt.formatDateTime(model.modifiedDate, Qt.DefaultLocaleShortDate) + (!model.isDir ? ", " + fileSize : "")
+property string text: fileName   
+property string subText: itemDateAndSize(model)
 
 property var icon:   fileIcon(filePath, model)
 

=== modified file 'src/app/qml/components/FolderListDelegate.qml'
--- src/app/qml/components/FolderListDelegate.qml	2015-09-06 00:11:02 +
+++ src/app/qml/components/FolderListDelegate.qml	2015-10-01 00:11:58 +
@@ -27,7 +27,7 @@
 property string filePath: path
 
 text: model.fileName
-subText: Qt.formatDateTime(model.modifiedDate, Qt.DefaultLocaleShortDate) + (!model.isDir ? ", " + fileSize : "")
+subText: itemDateAndSize(model)
 
 property string path: fileView.folder + '/' + model.fileName
 iconSource: fileIcon(path, model)

=== modified file 'src/app/qml/ui/FolderListPage.qml'
--- src/app/qml/ui/FolderListPage.qml	2015-09-20 20:28:26 +
+++ src/app/qml/ui/FolderListPage.qml	2015-10-01 00:11:58 +
@@ -774,6 +774,16 @@
 return pageModel.curPathIsWritable()
 }
 
+function itemDateAndSize(model) {
+var strDate = Qt.formatDateTime(model.modifiedDate, Qt.DefaultLocaleShortDate);   
+//local file systems always have date and size for both files and directories
+//remote file systems may have not size for directories, it comes as "Unknown"
+if (strDate) {
+strDate += ", " + model.fileSize //show the size even it is "Unknown"
+}
+return strDate;
+}
+
 // FIXME: hard coded path for icon, assumes Ubuntu desktop icon available.
 // Nemo mobile has icon provider. Have to figure out what's the proper way
 // to get "system wide" icons in Ubuntu Touch, or if we have to use

=== modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
--- src/plugin/folderlistmodel/dirmodel.cpp	2015-09-20 20:44:29 +
+++ src/plugin/folderlistmodel/dirmodel.cpp	2015-10-01 00:11:58 +
@@ -370,7 +370,7 @@
  }
  //it is possible to browse network folders and get its
  //number of items, but it may take longer
- return tr("unkown");
+ return tr("Unknown");
  }
  return fileSize(fi.size());
 }

-- 
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:~popey/ubuntu-filemanager-app/add-click-deps into lp:ubuntu-filemanager-app

2015-09-26 Thread Carlos Jose Mazieri
Review: Needs Information

Hello,

I did a first test without removing my Samba libraries.

On desktop it downloaded the libraries but on armhf it did not.

See some output:
-- Setting BZR_SOURCE to lp:ubuntu-filemanager-app
Grabbing upstream libs to 
/home/carlos/ubuntu_work/build-add-click-deps-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_15_04_vivid-Default/upstream-libs
Installing upstream libs from 
/home/carlos/ubuntu_work/build-add-click-deps-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_15_04_vivid-Default/upstream-libs/usr/lib/arm-linux-gnueabihf/
 to /lib/arm-linux-gnueabihf
Following files to install:-

-- Found PkgConfig: arm-linux-gnueabihf-pkg-config (found version "0.28")
-- samba include=/usr/include/samba-4.0
-- samba 
lib=/usr/lib/arm-linux-gnueabihf/libsmbclient.so=/usr/lib/arm-linux-gnueabihf/libsmbclient.so
-- Found samba: include=/usr/include/samba-4.0  
library=/usr/lib/arm-linux-gnueabihf/libsmbclient.so


Questions:
   1. Did I do something wrong?
   2. Cmake still found my installed samba libraries, should not it be changed 
to find downloaded stuff including libsmbclient.h which I think is missed from 
download script?
   3. I am wondering how is the mechanism used to load local libraries in the 
click package, can anyone tell how it works?



-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
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-ui-06 into lp:ubuntu-filemanager-app

2015-09-19 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-06 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-05 as a prerequisite.

Commit message:
Fixed problems in the Authentication and using saved Password

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-06/+merge/271738

Fixed problems in the Authentication and using saved Password
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-06 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/diriteminfo.cpp'
--- src/plugin/folderlistmodel/diriteminfo.cpp	2015-09-19 16:16:16 +
+++ src/plugin/folderlistmodel/diriteminfo.cpp	2015-09-19 16:16:16 +
@@ -407,7 +407,7 @@
 
 QString DirItemInfo::authenticationPath() const
 {
-return QLatin1String(0);
+return  d_ptr->_authenticationPath;
 }
 
 

=== modified file 'src/plugin/folderlistmodel/diriteminfo.h'
--- src/plugin/folderlistmodel/diriteminfo.h	2015-09-19 16:16:16 +
+++ src/plugin/folderlistmodel/diriteminfo.h	2015-09-19 16:16:16 +
@@ -176,6 +176,7 @@
 QString   _path;
 QString   _fileName;
 QString   _normalizedPath;
+QString   _authenticationPath;
 
 static QMimeDatabase mimeDatabase;
 };

=== modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
--- src/plugin/folderlistmodel/dirmodel.cpp	2015-09-19 16:16:16 +
+++ src/plugin/folderlistmodel/dirmodel.cpp	2015-09-19 16:16:16 +
@@ -978,11 +978,24 @@
 bool  DirModel::cdIntoItem(const DirItemInfo )
 {
 bool ret = false;
+const DirItemInfo *item = 
+DirItemInfo *created_itemInfo = 0;
 if (fi.isBrowsable())
-{
-bool authentication = fi.needsAuthentication() &&
-  !mCurLocation->useAuthenticationDataIfExists(fi);
-if (authentication)
+{  
+bool needs_authentication = fi.needsAuthentication();
+if (needs_authentication)
+{
+   if (mCurLocation->useAuthenticationDataIfExists(fi))
+   {
+   //there is a password stored to try
+   created_itemInfo = mCurLocation->newItemInfo(fi.urlPath());
+   item = created_itemInfo;
+   needs_authentication = item->needsAuthentication();
+   }
+}
+//item needs authentication and there is no user/password to try
+// or there is a user/password already used but failed
+if (needs_authentication)
 {
 mCurLocation->notifyItemNeedsAuthentication();
 //return true to avoid any error message to appear
@@ -990,15 +1003,23 @@
 ret = true;
 }
 else
-{
-if (fi.isContentReadable())
+{  
+if (item->isContentReadable())
 {
-mCurLocation->setInfoItem(fi);
+mCurLocation->setInfoItem(*item);
 setPathFromCurrentLocation();
 ret = true;
 }
+else
+{
+//some other error
+}
 }
 }
+if (created_itemInfo != 0)
+{
+delete created_itemInfo;
+}
 return ret;
 }
 

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-07-13 20:41:48 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.cpp	2015-09-19 16:16:16 +
@@ -92,14 +92,11 @@
 break;
 }
 //all the information should be in place now
-fillFromStatBuf(st);
-}
-
-
-QString SmbItemInfo::authenticationPath() const
-{
-return sharePath();
-}
+fillFromStatBuf(st);
+//set the field here to use on any DirItemInfo object
+d_ptr->_authenticationPath = sharePath();
+}
+
 
 /*!
  * \brief SmbItemInfo::sharePath() returns the share part of the item

=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.h'
--- src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.h	2015-03-14 17:38:50 +
+++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbiteminfo.h	2015-09-19 16:16:16 +
@@ -41,8 +41,7 @@
 
 public:
 QString  sharePath() const;
-void setAsShare();
-virtual QString  authenticationPath() const;
+void setAsShare();  
 virtual void setFile(const QString , const QString & file);
 
 protected:

-- 
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:~popey/ubuntu-filemanager-app/add-click-deps into lp:ubuntu-filemanager-app

2015-09-14 Thread Carlos Jose Mazieri
> It is hard to say something about the crash, if you have the
> 'libsmbclient' installed in your phone you can try this click package
> which contains 'Network' in Places to start navigating in Samba.
> https://www.dropbox.com/s/f6gxiqbav3th8bx/com.ubuntu.filemanager_0.4.latest_ar
> mhf.click?dl=0
> 
> Have you tested on Desktop?
> 
> On 9/8/15, Alan Pope   wrote:
> > Well spotted. We should disable the keyboard helpers (which try to
> > autocorrect when you type in a location) and that will stop the space
> > getting added, and also stop smb being 'corrected' to sob.
> >
> > I tried again and this time the file manager crashes.
> >
> > http://termbin.com/d8x0
> >
> > The crash dump was uploaded, and processed. It's a secured page so I printed
> > it as a PDF, I hope that's readable.
> >
> > http://people.canonical.com/~alan/filemanager_crash.pdf
> > --
> > https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-
> deps/+merge/270287
> > Your team Ubuntu File Manager Developers is requested to review the proposed
> > merge of lp:~popey/ubuntu-filemanager-app/add-click-deps into
> > lp:ubuntu-filemanager-app.
> >


@popey, I do confirm the crash on Samba browsing, it happens on the phone, 
works on Desktop and works on the phone using the plugin/model as console 
application.

I am sorry for that, I did not test it properly, I worked on this on weekend 
and cannot solve it, I need the debug to work in order to find out the problem, 
 I am able to use the debug from qtCreator on device, but it does not work 
properly, it behaves as a non debug invocation, when the crash happens there is 
not information about it.

Also tried using "gdb" directly on the device without success, in this case I 
could generate a core file with no enough information either.

Also added some qDebug() lines but it did not give me the reason for the crash.

If you have any idea about the crash or about other way of debugging please 
share with me.




-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~popey/ubuntu-filemanager-app/add-click-deps 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-ui-05 into lp:ubuntu-filemanager-app

2015-09-14 Thread Carlos Jose Mazieri
The proposal to merge lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-05 
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-ui-05/+merge/270339
-- 
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:~popey/ubuntu-filemanager-app/add-click-deps into lp:ubuntu-filemanager-app

2015-09-08 Thread Carlos Jose Mazieri
Looking at the log you posted, it looks like there is an extra space
after "smb":
void DirModel::setPath(const QString&, const QString&, const QString&,
bool) DirModel_QML_137(0x12ff010) path or url may not exist or cannot
be read: "smb ://192.168.1.3/"

The correct url must be "smb://192.168.1.3".

BTW, I have had some hard time trying to type "smb" urls on the device.



On 9/8/15, Alan Pope   wrote:
> Just tried this click on my "retail" bq e4.5 (so it's still read only - not
> had any debian packages installed - is as a customer would find it). Not
> able to browse to my NAS.
>
> http://termbin.com/vdt4
>
> Is there a "known good" config that this should connect to?
> --
> https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
> Your team Ubuntu File Manager Developers is requested to review the proposed
> merge of lp:~popey/ubuntu-filemanager-app/add-click-deps into
> lp:ubuntu-filemanager-app.
>

-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~popey/ubuntu-filemanager-app/add-click-deps 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


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

2015-09-08 Thread Carlos Jose Mazieri
I agree with your comments and I will modify that according to that.

Thanks.

-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-02/+merge/270335
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:~popey/ubuntu-filemanager-app/add-click-deps into lp:ubuntu-filemanager-app

2015-09-08 Thread Carlos Jose Mazieri
It is hard to say something about the crash, if you have the
'libsmbclient' installed in your phone you can try this click package
which contains 'Network' in Places to start navigating in Samba.
https://www.dropbox.com/s/f6gxiqbav3th8bx/com.ubuntu.filemanager_0.4.latest_armhf.click?dl=0

Have you tested on Desktop?

On 9/8/15, Alan Pope   wrote:
> Well spotted. We should disable the keyboard helpers (which try to
> autocorrect when you type in a location) and that will stop the space
> getting added, and also stop smb being 'corrected' to sob.
>
> I tried again and this time the file manager crashes.
>
> http://termbin.com/d8x0
>
> The crash dump was uploaded, and processed. It's a secured page so I printed
> it as a PDF, I hope that's readable.
>
> http://people.canonical.com/~alan/filemanager_crash.pdf
> --
> https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
> Your team Ubuntu File Manager Developers is requested to review the proposed
> merge of lp:~popey/ubuntu-filemanager-app/add-click-deps into
> lp:ubuntu-filemanager-app.
>

-- 
https://code.launchpad.net/~popey/ubuntu-filemanager-app/add-click-deps/+merge/270287
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~popey/ubuntu-filemanager-app/add-click-deps 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-ui-01 into lp:ubuntu-filemanager-app

2015-09-07 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01 into 
lp:ubuntu-filemanager-app.

Commit message:
Improved "unlock full access" regarding remote locations

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01/+merge/270334

This is the first MP of a series of 5.

That set of MP contains changes in places, icons and provides a dialog to 
authenticate remote locations when they require authentication to access its 
data.

link to click package in case of testing (install libsmbclient first):
   
https://www.dropbox.com/s/f6gxiqbav3th8bx/com.ubuntu.filemanager_0.4.latest_armhf.click?dl=0

Other links:
   https://www.dropbox.com/s/gmaiadmr42ph2dj/screenshot_authentication.png?dl=0
   https://www.dropbox.com/s/wdstwscvs1wh9tx/screenshot_browsin_hosts.png?dl=0
   
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
--- src/plugin/folderlistmodel/dirmodel.cpp	2015-08-25 18:41:31 +
+++ src/plugin/folderlistmodel/dirmodel.cpp	2015-09-07 21:20:53 +
@@ -542,12 +542,20 @@
 }
 
 bool DirModel::allowAccess(const DirItemInfo ) const {
-return allowAccess(fi.absoluteFilePath());
+bool allowed = !mOnlyAllowedPaths; // !mOnlyAllowedPaths means any path is allowed
+if (!allowed)
+{
+// for remote locations items are visible if them do not require authentication
+allowed = mCurLocation->isRemote() ? !fi.needsAuthentication() :
+ isAllowedPath(fi.absoluteFilePath());
+}
+return allowed;
 }
 
 bool DirModel::allowAccess(const QString ) const {
-return !mOnlyAllowedPaths || isAllowedPath(absoluteFilePath);
-}
+return !mOnlyAllowedPaths || mCurLocation->isRemote() || isAllowedPath(absoluteFilePath);
+}// for remote locations access is allowed
+
 
 void DirModel::onItemsAdded(const DirItemInfoList )
 {
@@ -883,7 +891,7 @@
 void DirModel::paste()
 {
 // Restrict pasting if in restricted directory when pasting on a local file system
-if (!mCurLocation->isRemote() && !allowAccess(mCurrentDir)) {
+if (!allowAccess(mCurrentDir)) {
 qDebug() << Q_FUNC_INFO << "access not allowed, pasting not done" << mCurrentDir;
 return;
 }

-- 
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-ui-02 into lp:ubuntu-filemanager-app

2015-09-07 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-02 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-01 as a prerequisite.

Commit message:


1. Added Samba Location as Network
2. Removed default locations from setting files, it allows adding new 
default locations in source code
3. Kept user added and removed locations in settings file.
4. Created a regression test for PlacesModel.

User can remove a default Location and then add it again.


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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-02/+merge/270335

Added Samba location as Network

Improved settings file content to allow add/remove places without affecting 
default places which are handled in the source code.

Added a regression testing for PlacesModel.

Added "/media/" as watched directory because "/etc/mtab" was failing to 
fire changes.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-02 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/placesmodel/placesmodel.cpp'
--- src/plugin/placesmodel/placesmodel.cpp	2015-02-11 19:22:08 +
+++ src/plugin/placesmodel/placesmodel.cpp	2015-09-07 21:27:29 +
@@ -15,6 +15,7 @@
  *
  * Author : David Planella <david.plane...@ubuntu.com>
  *  Arto Jalkanen <ajalk...@gmail.com>
+ *  Carlos Mazieri <carlos.mazi...@gmail.com>
  */
 
 #include "placesmodel.h"
@@ -27,12 +28,14 @@
 
 PlacesModel::PlacesModel(QObject *parent) :
 QAbstractListModel(parent)
+  , m_userSavedLocationsName("userSavedLocations")
+  , m_userRemovedLocationsName("userRemovedLocations")
+  , m_going_to_rescanMtab(false)
 {
 m_userMountLocation = "/media/" + qgetenv("USER");
 // For example /run/user/1000
 m_runtimeLocations = QStandardPaths::standardLocations(QStandardPaths::RuntimeLocation);
 
-QStringList defaultLocations;
 // Set the storage location to a path that works well
 // with app isolation
 QString settingsLocation =
@@ -40,29 +43,43 @@
 + "/" + QCoreApplication::applicationName() + "/" + "places.conf";
 m_settings = new QSettings(settingsLocation, QSettings::IniFormat, this);
 
+m_userSavedLocations   = m_settings->value(m_userSavedLocationsName).toStringList();
+m_userRemovedLocations = m_settings->value(m_userRemovedLocationsName).toStringList();
+
+//remove old key "storedLocations" or others no longer used
+QStringList settingsKeys  = m_settings->allKeys();
+foreach (const QString& key, settingsKeys) {
+   if (key != m_userSavedLocationsName && key != m_userRemovedLocationsName) {
+   m_settings->remove(key);
+   }
+}
+
 // Prepopulate the model with the user locations
 // for the first time it's used
-defaultLocations.append(locationHome());
-defaultLocations.append(locationDocuments());
-defaultLocations.append(locationDownloads());
-defaultLocations.append(locationMusic());
-defaultLocations.append(locationPictures());
-defaultLocations.append(locationVideos());
-// Add root also
-defaultLocations.append("/");
-
-if (!m_settings->contains("storedLocations")) {
-m_locations.append(defaultLocations);
-} else {
-m_locations = m_settings->value("storedLocations").toStringList();
+addDefaultLocation(locationHome());
+addDefaultLocation(locationDocuments());
+addDefaultLocation(locationDownloads());
+addDefaultLocation(locationMusic());
+addDefaultLocation(locationPictures());
+addDefaultLocation(locationVideos());
+
+//Network locations
+addDefaultLocation(locationSamba());
+
+//mounted locations
+addDefaultLocation("/");
+initNewUserMountsWatcher();
+rescanMtab();
+
+//other user saved locations
+foreach (const QString& userLocation, m_userSavedLocations) {
+   addLocationWithoutStoring(userLocation);
 }
+m_settings->sync();
 
 foreach (const QString , m_locations) {
 qDebug() << "Location: " << location;
 }
-
-initNewUserMountsWatcher();
-rescanMtab();
 }
 
 PlacesModel::~PlacesModel() {
@@ -73,17 +90,29 @@
 PlacesModel::initNewUserMountsWatcher() {
 m_newUserMountsWatcher = new QFileSystemWatcher(this);
 
-qDebug() << Q_FUNC_INFO << "Start watching mtab file for new mounts" << m_mtabParser.path();
+connect(m_newUserMountsWatcher, SIGNAL(fileChanged(QString)), this, SLOT(mtabChanged(QString)));
+connect(m_newUserMountsWatcher, SIGNAL(directoryChanged(QString)), th

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

2015-09-07 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-03 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-02 as a prerequisite.

Commit message:
mproved icon chooser based on the model data
added icon for remote places

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-03/+merge/270337

Improved icon chooser based on the model data

Added icon for remote places and hosts
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-03 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/app/qml/components/FolderIconDelegate.qml'
--- src/app/qml/components/FolderIconDelegate.qml	2014-09-20 10:49:51 +
+++ src/app/qml/components/FolderIconDelegate.qml	2015-09-07 21:29:26 +
@@ -52,7 +52,7 @@
 property string text: fileName
 property string subText: Qt.formatDateTime(model.modifiedDate, Qt.DefaultLocaleShortDate) + (!model.isDir ? ", " + fileSize : "")
 
-property var icon: fileIcon(filePath, model.isDir)
+property var icon:   fileIcon(filePath, model)
 
 Item {
 anchors {

=== modified file 'src/app/qml/components/FolderListDelegate.qml'
--- src/app/qml/components/FolderListDelegate.qml	2014-09-20 10:49:51 +
+++ src/app/qml/components/FolderListDelegate.qml	2015-09-07 21:29:26 +
@@ -30,9 +30,9 @@
 subText: Qt.formatDateTime(model.modifiedDate, Qt.DefaultLocaleShortDate) + (!model.isDir ? ", " + fileSize : "")
 
 property string path: fileView.folder + '/' + model.fileName
-iconSource: fileIcon(path, model.isDir)
+iconSource: fileIcon(path, model)
 
-progression: model.isDir
+progression: model.isBrowsable
 iconFrame: false
 
 selected: model.isSelected

=== modified file 'src/app/qml/components/PlacesSidebar.qml'
--- src/app/qml/components/PlacesSidebar.qml	2015-01-01 20:43:56 +
+++ src/app/qml/components/PlacesSidebar.qml	2015-09-07 21:29:26 +
@@ -80,7 +80,7 @@
 }
 }
 
-iconSource: model.icon || fileIcon(model.path, true)
+iconSource: model.icon || fileIcon(model.path) //using only path, model is null
 
 onClicked: {
 goTo(model.path)

=== modified file 'src/app/qml/ui/FolderListPage.qml'
--- src/app/qml/ui/FolderListPage.qml	2015-08-28 10:37:28 +
+++ src/app/qml/ui/FolderListPage.qml	2015-09-07 21:29:26 +
@@ -771,12 +771,18 @@
 // to get "system wide" icons in Ubuntu Touch, or if we have to use
 // icons packaged into the application. Both folder and individual
 // files will need an icon.
-// TODO: Remove isDir parameter and use new model functions
-function fileIcon(file, isDir) {
-var iconPath = isDir ? "/usr/share/icons/Humanity/places/48/folder.svg"
- : "/usr/share/icons/Humanity/mimes/48/empty.svg"
-
-if (file === userplaces.locationHome) {
+
+function fileIcon(file, model) {
+var iconPath = model ? "/usr/share/icons/Humanity/mimes/48/empty.svg" :
+   "/usr/share/icons/Humanity/places/48/folder.svg"
+
+if (model && model.isSmbWorkgroup) {
+iconPath = "/usr/share/icons/Humanity/places/48/network_local.svg"
+} else if (model && model.isHost) {
+iconPath = "/usr/share/icons/Humanity/places/48/server.svg"
+} else if (model && model.isBrowsable) {
+iconPath = "/usr/share/icons/Humanity/places/48/folder.svg"
+} else if (file === userplaces.locationHome) {
 iconPath = "../icons/folder-home.svg"
 } else if (file === i18n.tr("~/Desktop")) {
 iconPath = "/usr/share/icons/Humanity/places/48/user-desktop.svg"
@@ -798,7 +804,9 @@
 iconPath = "/usr/share/icons/Humanity/places/48/folder-videos.svg"
 } else if (file === "/") {
 iconPath = "/usr/share/icons/Humanity/devices/48/drive-harddisk.svg"
-} else if (userplaces.isUserMountDirectory(file)) {
+} else if (file === userplaces.locationSamba) {
+  iconPath = "/usr/share/icons/Humanity/places/48/network_local.svg"
+}  else if (userplaces.isUserMountDirectory(file)) {
 // In context of Ubuntu Touch this means SDCard currently.
 iconPath = "/usr/share/icons/Humanity/devices/48/drive-removable-media.svg"
 }
@@ -811,6 +819,8 @@
 return i18n.tr("Home")
 } else if (folder === "/") {
 return i18n.tr("Device")
+}

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

2015-09-07 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-04 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-03 as a prerequisite.

Commit message:
forcing Executable/Readable for hosts, it will make them act as folder when 
they do not have access (needs authentication)

Requested reviews:
  Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot): 
continuous-integration
  Ubuntu File Manager Developers (ubuntu-filemanager-dev)

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-04/+merge/270338

forcing hosts to be visible even they require authentication
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-04 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/diriteminfo.cpp'
--- src/plugin/folderlistmodel/diriteminfo.cpp	2015-07-11 21:21:16 +
+++ src/plugin/folderlistmodel/diriteminfo.cpp	2015-09-07 21:32:15 +
@@ -579,3 +579,12 @@
 }
 return ret;
 }
+
+
+void DirItemInfo::setAsHost()
+{
+d_ptr->_isHost = true;
+d_ptr->_exists = true;
+d_ptr->_isReadable   = true;
+d_ptr->_isExecutable = true;
+}

=== modified file 'src/plugin/folderlistmodel/diriteminfo.h'
--- src/plugin/folderlistmodel/diriteminfo.h	2015-02-22 20:59:32 +
+++ src/plugin/folderlistmodel/diriteminfo.h	2015-09-07 21:32:15 +
@@ -111,6 +111,7 @@
 virtual void  setFile(const QString , const QString & file);
 virtual bool  permission(QFile::Permissions permissions) const;
 void  fillFromStatBuf(const struct stat& statBuffer);
+void  setAsHost();
 
 public:
 static QStringremoveExtraSlashes(const QString , int firstSlashIndex = -1);

=== modified file 'src/plugin/folderlistmodel/smb/smblistworker.cpp'
--- src/plugin/folderlistmodel/smb/smblistworker.cpp	2015-05-20 16:18:07 +
+++ src/plugin/folderlistmodel/smb/smblistworker.cpp	2015-09-07 21:32:15 +
@@ -25,11 +25,11 @@
 SmbListWorker::SmbListWorker(const QString ,
  QDir::Filter filter,
  const bool isRecursive,
- bool parentIsHost,
+ DirItemInfo * parentItem,
  Const_SmbUtil_Ptr smb)
: DirListWorker(pathName, filter, isRecursive)  
, SmbObject(pathName, smb)
-   , m_parentIsHost(parentIsHost)
+   , m_parent(parentItem)
 {
 mLoaderType =  NetworkLoader;
 }
@@ -51,9 +51,14 @@
 {
 QString next = dir.next();
 SmbItemInfo item (next, m_smb);
-if (m_parentIsHost)
+if (m_parent)
 {
-item.setAsShare();
+if (m_parent->isHost()) {
+item.setAsShare();
+}
+else if (m_parent->isWorkGroup()) {
+ item.setAsHost();
+}
 }
 smbContent.append(item);
 }

=== modified file 'src/plugin/folderlistmodel/smb/smblistworker.h'
--- src/plugin/folderlistmodel/smb/smblistworker.h	2015-05-20 16:18:07 +
+++ src/plugin/folderlistmodel/smb/smblistworker.h	2015-09-07 21:32:15 +
@@ -29,12 +29,12 @@
 {
 Q_OBJECT
 public:
-explicit SmbListWorker(const QString , QDir::Filter filter, const bool isRecursive, bool parentIsHost, Const_SmbUtil_Ptr smb);
+explicit SmbListWorker(const QString , QDir::Filter filter, const bool isRecursive, DirItemInfo * parentItem, Const_SmbUtil_Ptr smb);
 
 private:
 DirItemInfoList getNetworkContent();
 private:
-bool   m_parentIsHost;
+DirItemInfo* m_parent;
 };
 
 #endif // SMBLISTWORKER_H

=== modified file 'src/plugin/folderlistmodel/smb/smblocation.cpp'
--- src/plugin/folderlistmodel/smb/smblocation.cpp	2015-07-15 17:42:37 +
+++ src/plugin/folderlistmodel/smb/smblocation.cpp	2015-09-07 21:32:15 +
@@ -88,7 +88,7 @@
 
 DirListWorker * SmbLocation::newListWorker(const QString , QDir::Filter filter, const bool isRecursive)
 {
-return new SmbListWorker(urlPath,filter,isRecursive, m_info ? m_info->isHost() : false, m_smb);
+return new SmbListWorker(urlPath,filter,isRecursive, m_info, m_smb);
 }
 
 

=== modified file 'src/plugin/folderlistmodel/urliteminfo.cpp'
--- src/plugin/folderlistmodel/urliteminfo.cpp	2015-03-14 17:38:50 +
+++ src/plugin/folderlistmodel/urliteminfo.cpp	2015-09-07 21:32:15 +
@@ -105,11 +105,7 @@
 if (url.path().isEmpty())
 {
 //!< initial set is "host", Samba shares also have Workspace which will be handled in \ref SmbItemInfo
-d_ptr->_isHost = true;
-//set as it exists so far
-d_ptr->_exists = true;
-d_ptr->_isReadable   = true;
-d_ptr->_isExecutable = true;
+   setAsHost();
 }
 }
 }

-- 
Mailing list: 

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

2015-09-07 Thread Carlos Jose Mazieri
Carlos Jose Mazieri has proposed merging 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-05 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-04 as a prerequisite.

Commit message:
Implemented a dialog for Authentication when remote locations requires 
user/password to access them

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

For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-ui-05/+merge/270339

Implemented a dialog for Authentication when remote locations requires 
user/password to access them
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-ui-05 into 
lp:ubuntu-filemanager-app.
=== added file 'src/app/qml/components/NetAuthenticationHandler.qml'
--- src/app/qml/components/NetAuthenticationHandler.qml	1970-01-01 00:00:00 +
+++ src/app/qml/components/NetAuthenticationHandler.qml	2015-09-07 21:33:03 +
@@ -0,0 +1,41 @@
+import QtQuick 2.3
+import Ubuntu.Components 1.1
+import "../ui"
+
+Item  {
+   id: netAuthenticatinHandler
+   objectName: "netAuthenticatinHandler"
+
+   property bool savePassword: true
+   function showDialog(urlPath,user) {
+   console.log("needsAuthenticationHandler::showDialog()")
+   netAuthenticationDialog.showDialog(urlPath,user)
+   }
+
+   Timer {
+   id: authTimer
+   interval: 200
+   repeat: false
+   onTriggered:  {   
+   pageModel.setPathWithAuthentication(
+ netAuthenticationDialog.currentPath,
+ netAuthenticationDialog.currentUserName,
+ netAuthenticationDialog.currentPassword,
+ netAuthenticatinHandler.savePassword
+)
+   }
+   }
+
+   NetAuthenticationDialog {
+   id: netAuthenticationDialog
+   onSavePasswordChanged: {
+   savePassword = check
+   console.log("NetAuthenticationHandler savePassword="+savePassword)
+   }
+   onOk: {
+   if (!authTimer.running) {
+   authTimer.start()
+   }
+   }
+   }
+}

=== modified file 'src/app/qml/ui/FolderListPage.qml'
--- src/app/qml/ui/FolderListPage.qml	2015-09-07 21:33:03 +
+++ src/app/qml/ui/FolderListPage.qml	2015-09-07 21:33:03 +
@@ -194,6 +194,10 @@
 }
 }
 
+NetAuthenticationHandler {
+id: authenticationHandler
+}
+
 FolderListModel {
 id: pageModel
 path: folderListPage.folder
@@ -215,6 +219,10 @@
 addAllowedDirectory(userplaces.locationPictures)
 addAllowedDirectory(userplaces.locationVideos)
 }
+onNeedsAuthentication: {
+console.log("FolderListModel needsAuthentication() signal arrived")
+authenticationHandler.showDialog(urlPath,user)
+}
 }
 
 FolderListModel {
@@ -880,11 +888,13 @@
 }
 }
 
-function itemClicked(model) {
+function itemClicked(model) {  
 if (model.isBrowsable) {
 if (model.isReadable && model.isExecutable) {
 console.log("Changing to dir", model.filePath)
-goTo(model.filePath)
+//prefer pageModel.cdIntoIndex() because it is not necessary to parse the path
+//goTo(model.filePath)
+pageModel.cdIntoIndex(model.index)
 } else {
 PopupUtils.open(Qt.resolvedUrl("NotifyDialog.qml"), delegate,
 {

=== added file 'src/app/qml/ui/NetAuthenticationDialog.qml'
--- src/app/qml/ui/NetAuthenticationDialog.qml	1970-01-01 00:00:00 +
+++ src/app/qml/ui/NetAuthenticationDialog.qml	2015-09-07 21:33:03 +
@@ -0,0 +1,123 @@
+/*
+ * Copyright (C) 2015 Canonical Ltd
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authored by: Carlos Jose Mazieri <carlos.mazi...@gmail.com>
+ */
+import QtQuick 2.3
+import Ubuntu.Components 1.1
+import Ubuntu.Components.Popups 1.0
+import Ubuntu.Components.ListItems 1.0
+
+Dialog {
+id: authenticationDialog
+objectName: "authenticationDialog"
+title: i18n.tr("Authentication required")
+
+property alias  currentPath: authCurrentPath.text
+property alias  

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~verzegnassi-stefano/ubuntu-filemanager-app/fix-1490146-chdoctypes into lp:ubuntu-filemanager-app

2015-09-06 Thread Carlos Jose Mazieri
The proposal to merge 
lp:~verzegnassi-stefano/ubuntu-filemanager-app/fix-1490146-chdoctypes into 
lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-filemanager-app/fix-1490146-chdoctypes/+merge/269565
-- 
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:~mterry/ubuntu-filemanager-app/ok into lp:ubuntu-filemanager-app

2015-09-06 Thread Carlos Jose Mazieri
The proposal to merge lp:~mterry/ubuntu-filemanager-app/ok into 
lp:ubuntu-filemanager-app has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~mterry/ubuntu-filemanager-app/ok/+merge/269578
-- 
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] [Bug 1473669] Re: Properties Dialog shows wrong dates

2015-09-06 Thread Carlos Jose Mazieri
** Changed in: ubuntu-filemanager-app
   Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1473669

Title:
  Properties Dialog shows wrong dates

Status in Ubuntu File Manager App:
  Fix Released

Bug description:
  When using Properties dialog on a Item, both 'Accessed' and 'Modified'
  dates are wrong, it does not  show the current Item dates, in fact it
  shows the current path dates, that means for every item it shows the
  same dates.

  The souce file FileDetailsPopover.qml:
   line 116 uses  'pathAccessedDate()' which is the current path accessed 
date, it should use 'model.accessedDate'
   line  125 uses 'pathModifiedDate()'  which is the current path modified 
date, it should  use 'model.modifiedDate'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1473669/+subscriptions

-- 
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:~verzegnassi-stefano/ubuntu-filemanager-app/fix-1490146-chdoctypes into lp:ubuntu-filemanager-app

2015-09-03 Thread Carlos Jose Mazieri
Review: Approve

This is OK to me. 

Thanks.
-- 
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-filemanager-app/fix-1490146-chdoctypes/+merge/269565
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:~mterry/ubuntu-filemanager-app/ok into lp:ubuntu-filemanager-app

2015-09-03 Thread Carlos Jose Mazieri
Review: Needs Information

Have you looked at the entire repository code?   

It may have any .cpp or .h code using the same, some messages come from c++ 
code.
-- 
https://code.launchpad.net/~mterry/ubuntu-filemanager-app/ok/+merge/269578
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] [Bug 1486808] Re: Cannot view folders in SD card from File manager

2015-09-03 Thread Carlos Jose Mazieri
Have you tried to check  "unlock full content" ?

if not please give it a try.

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1486808

Title:
  Cannot view folders in SD card from File manager

Status in Ubuntu File Manager App:
  New

Bug description:
  Test Environment:
  $ system-image-cli -i
  current build number: 103
  device name: krillin
  channel: ubuntu-touch/rc-proposed/bq-aquaris.en
  last update: 2015-08-19 02:08:58
  version version: 103
  version ubuntu: 20150818.2
  version device: 20150817-3879cb2
  version custom: 20150814-887-30-30-vivid

  Steps:
  1.Plug device into host machine using USB
  2.Using File explorer, copy content from Windows into the device external 
storage's Music/Pictures/Videos folders (SD Card).
  3.Open File manager app and browse to /media/phablet//Music, 
/Pictures and /Videos folders.

  Actual result:
  Empty list under /media/phablet/ while viewing in file manager, but 
we can see these folders by using file explorer on PC

  Expected result:
  Be able to view content in SD_card from file manager app

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1486808/+subscriptions

-- 
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-14 into lp:ubuntu-filemanager-app

2015-08-25 Thread Carlos Jose Mazieri
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-14 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-14/+merge/265213
-- 
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-14 into lp:ubuntu-filemanager-app

2015-08-25 Thread Carlos Jose Mazieri
Review: Approve

I did a top approve myself as Arto had already done it.
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-14/+merge/265213
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] [Bug 1482666] Re: Hidden files

2015-08-23 Thread Carlos Jose Mazieri
Hello,

Maybe you are talking about SD card only.

Can you confirm that it is not a file manager bug?

-- 
You received this bug notification because you are a member of Ubuntu
File Manager Developers, which is subscribed to Ubuntu File Manager App.
Matching subscriptions: File Manager App Bugmail
https://bugs.launchpad.net/bugs/1482666

Title:
  Hidden files

Status in Ubuntu File Manager App:
  New

Bug description:
  Hello,

  When I click to show hidden files, it not working. Option is 'ticked',
  but don't showing hidden files.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1482666/+subscriptions

-- 
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-14 into lp:ubuntu-filemanager-app

2015-08-16 Thread Carlos Jose Mazieri
Yes, it is a memory leak.

I will fix that.
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-14/+merge/265213
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-12 into lp:ubuntu-filemanager-app

2015-08-15 Thread Carlos Jose Mazieri
About the comment:
But it's not clear to me when existing context should be closed and new 
created etc.

It is not clear to me either, I could not find good documentation of 
libsmbclient, this source code is based on libsmbclient examples and some 
own tests, all operations require a context, but it is not clear if a 
context can be reused for example doing a rename after writing data into a 
file, that is the reason why some methods always create a context as example in 
SmbLocationItemFile::rename(const QString oldname, const QString newName). 
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-12/+merge/265211
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-11 into lp:ubuntu-filemanager-app

2015-08-15 Thread Carlos Jose Mazieri
About the comment:

   166  if (fd == 0)
   167  {
   168  - fd = openFile(context, smb_path);
   169  + openFile(context,smb_path);

It is really a mistake, the function still works most of the times due to next 
if that still tries to get a valid descriptor from the parent directory.

That will be fixed.

Other comment:

   153  +if (!currentPathWithDot.isEmpty())
   154  +{
   155  +content.append(currentPathWithDot);
   156  +}
   157  +if (!currentpathWithDotDot.isEmpty())
   158  +{
   159  +content.append(currentpathWithDotDot);
   160  +}

it will be improved. 

Thanks.

Diff comments:

 === modified file 
 'src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp'
 --- src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp   
 2015-05-20 17:15:29 +
 +++ src/plugin/folderlistmodel/smb/qsambaclient/src/smbutil.cpp   
 2015-07-19 15:35:10 +
 @@ -656,7 +681,18 @@
  Smb::FileHandler fd = openDir(context,smb_path);
  if (fd == 0)
  {
 -fd = openFile(context, smb_path);
 +openFile(context,smb_path);

It is a mistake, however that function works because of the next if that 
still tries to get a valid descriptor.

I am going to fix this. 

Thanks.

 +}
 +if (fd == 0) // item does not exist neither dir nor file
 +{
 +//usually smb_path is a file that does not exist yet
 +//so using the path
 +int lastSlash = smb_path.lastIndexOf(QDir::separator());
 +if (lastSlash != -1)
 +{
 + QString path (smb_path.mid(0,lastSlash));
 + fd = openDir(context,path);
 +}
  }
  if (fd)
  {


-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-11/+merge/265210
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-06 into lp:ubuntu-filemanager-app

2015-08-07 Thread Carlos Jose Mazieri
Answer from comment on line 35:

Yes, we can compare instances here because there will be just one instance for 
each type: one for DiskLocation, one for TrashLocation and another for 
SmbLocation. Locations are created by LocationsFactory creator class. See 
http://bazaar.launchpad.net/~ubuntu-filemanager-dev/ubuntu-filemanager-app/trunk/view/head:/src/plugin/folderlistmodel/locationsfactory.cpp#L46.

There is a Location::type() which can be used here, I can change that if you 
think that it is really necessary to make it clear. Please let me know about 
that. 
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-06/+merge/265197
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-03 into lp:ubuntu-filemanager-app

2015-07-25 Thread Carlos Jose Mazieri
Thanks for looking at this, for sure I agree, I just was not paying attention 
on this.

I will change that in the samba-actions-04 as it changes again 
DirModel::canReadDir(), I think that is possible to generate a merge conflict 
changing it here.
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-03/+merge/265194
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:~snwh/ubuntu-filemanager-app/new-icon into lp:ubuntu-filemanager-app

2015-07-21 Thread Carlos Jose Mazieri
Review: Approve

That is OK for me.
-- 
https://code.launchpad.net/~snwh/ubuntu-filemanager-app/new-icon/+merge/264632
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-13 into lp:ubuntu-filemanager-app

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

Commit message:
Some DirItemInfo objects created by targetLocation in Actions
QFile is no longer used in Actions, instead the abstract LocationItemFile is 
created by the suitable Location object

Requested reviews:
  Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot): 
continuous-integration
  Ubuntu File Manager Developers (ubuntu-filemanager-dev)

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

All QFile usage replaced by LocationItemFile.

* MP resubmitted to force a new build.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-13 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/filesystemaction.cpp'
--- src/plugin/folderlistmodel/filesystemaction.cpp	2015-07-21 12:21:26 +
+++ src/plugin/folderlistmodel/filesystemaction.cpp	2015-07-21 12:21:26 +
@@ -40,7 +40,7 @@
 #include location.h
 #include locationsfactory.h
 #include locationitemdiriterator.h
-
+#include locationitemfile.h
 
 #if defined(Q_OS_UNIX)
 #include sys/statvfs.h
@@ -669,7 +669,9 @@
 }
 else
 {
-m_cancelCurrentAction = !QFile::remove(fi.absoluteFilePath());
+LocationItemFile *qFile = m_curAction-sourceLocation-newFile(fi.absoluteFilePath());
+m_cancelCurrentAction = !qFile-remove();
+delete qFile;
 }
 #if DEBUG_REMOVE
 qDebug()  Q_FUNC_INFO  remove ret=  !m_cancelCurrentAction  fi.absoluteFilePath();
@@ -743,14 +745,17 @@
 const DirItemInfo fi = entry-reversedOrder.at(entry-currItem);
 QString orig= fi.absoluteFilePath();
 QString target = targetFrom(orig, entry);
+#if DEBUG_MESSAGES
+qDebug()  orig:  orig  target:  target;
+#endif
 QString path(target);
 // do this here to allow progress send right item number, copySingleFile will emit progress()
 m_curAction-currItem++;
 //--
 if (fi.isFile() || fi.isSymLink())
 {
-DirItemInfo  t(target);
-path = t.path();
+QScopedPointer DirItemInfo t(m_curAction-targetLocation-newItemInfo(target));
+path = t-path();
 }
 //check if the main item in the entry is a directory
 //if so it needs to appear on any attached view
@@ -763,7 +768,7 @@
 QDir entryDirObj(entryDir);
 if (!entryDirObj.exists()  entryDirObj.mkpath(entryDir))
 {
-QScopedPointer DirItemInfo item(m_locationsFactory-currentLocation()-newItemInfo(entryDir));
+QScopedPointer DirItemInfo item(m_curAction-targetLocation-newItemInfo(entryDir));
 entry-added = true;
 notifyActionOnItem(*item, ItemAdded);
 }
@@ -789,8 +794,10 @@
 else
 if (fi.isDir())
 {
+LocationItemFile *qFile = m_curAction-targetLocation-newFile(target);
 m_cancelCurrentAction = !
- QFile(target).setPermissions(fi.permissions());
+ qFile-setPermissions(fi.permissions());
+delete qFile;
 if (m_cancelCurrentAction)
 {
 m_errorTitle = QObject::tr(Could not set permissions to dir);
@@ -803,7 +810,7 @@
 {
 qint64 needsSize = 0;
 m_curAction-copyFile.clear();
-m_curAction-copyFile.source = new QFile(orig);
+m_curAction-copyFile.source = m_curAction-sourceLocation-newFile(orig);
 m_cancelCurrentAction = !m_curAction-copyFile.source-open(QFile::ReadOnly);
 if (m_cancelCurrentAction)
 {   
@@ -814,7 +821,7 @@
 {
 needsSize = m_curAction-copyFile.source-size();
 //create destination
-m_curAction-copyFile.target = new QFile(target); 
+m_curAction-copyFile.target = m_curAction-targetLocation-newFile(target);
 m_curAction-copyFile.targetName = target;
 //first open it read-only to get its size if exists
 if (m_curAction-copyFile.target-open(QFile::ReadOnly))
@@ -823,7 +830,7 @@
 m_curAction-copyFile.target-close();
 }
 //check if there is disk space to copy source to target   
-if (needsSize  0  !m_locationsFactory-currentLocation()-isThereDiskSpace(entry-itemPaths.targetPath(), needsSize))
+if (needsSize  0  !m_curAction-targetLocation-isThereDiskSpace(entry-itemPaths.targetPath(), needsSize

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

2015-07-20 Thread Carlos Jose Mazieri
No it is not, it was my mistake.

If you do no mind as it does not cause any problem, I will remove that later 
when this big MP finishes.

Thanks.
-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-actions-01/+merge/265192
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-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 QMimeType
 #include QStandardPaths
 #include QList
+#include QScopedPointer
 
 #if defined(REGRESSION_TEST_FOLDERLISTMODEL)
 # include QColor
@@ -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 +
@@ -41,6 +41,7 @@
 #include locationsfactory.h

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-10 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-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 +
+++ src/plugin/folderlistmodel/trash/trashlocation.cpp	2015-07-19 15:32:02 +
@@ -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 +
+++ src/plugin/folderlistmodel/trash/trashlocation.h	2015-07-19 15:32:02 +
@@ -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

-- 
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-12 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-12 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-11 as a prerequisite.

Commit message:
nherited Location classes now provide inherited LocationItemFile classes which 
will replace Qt QFile class in Actions.
DiskLocation provides DiskLocationItemFile and SmbLocation provides 
SmbLocationItemFile

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

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

Implemented all inherited LocationItemFile classes
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-12 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/CMakeLists.txt'
--- src/plugin/folderlistmodel/CMakeLists.txt	2015-07-19 15:38:39 +
+++ src/plugin/folderlistmodel/CMakeLists.txt	2015-07-19 15:38:39 +
@@ -53,6 +53,8 @@
 disk/disklocation.h
 disk/disklocationitemdiriterator.cpp
 disk/disklocationitemdiriterator.h
+disk/disklocationitemfile.cpp
+disk/disklocationitemfile.h
 trash/qtrashdir.cpp
 trash/qtrashdir.h   
 trash/qtrashutilinfo.cpp
@@ -69,6 +71,8 @@
 smb/qsambaclient/src/smbiteminfo.h
 smb/qsambaclient/src/smblocationdiriterator.cpp
 smb/qsambaclient/src/smblocationdiriterator.h
+smb/qsambaclient/src/smblocationitemfile.cpp
+smb/qsambaclient/src/smblocationitemfile.h
 smb/qsambaclient/src/smbobject.cpp
 smb/qsambaclient/src/smbobject.h
 smb/smblocation.h

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.cpp'
--- src/plugin/folderlistmodel/disk/disklocation.cpp	2015-07-19 15:38:39 +
+++ src/plugin/folderlistmodel/disk/disklocation.cpp	2015-07-19 15:38:39 +
@@ -25,6 +25,7 @@
 #include ioworkerthread.h
 #include externalfswatcher.h
 #include locationurl.h
+#include disklocationitemfile.h
 
 
 #if defined(Q_OS_UNIX)
@@ -196,6 +197,13 @@
 }
 
 
+LocationItemFile *
+DiskLocation::newFile(const QString path)
+{
+return new DiskLocationItemFile(path, this);
+}
+
+
 bool DiskLocation::isThereDiskSpace(const QString pathname, qint64 requiredSize)
 {
 bool ret = true;

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.h'
--- src/plugin/folderlistmodel/disk/disklocation.h	2015-07-19 15:38:39 +
+++ src/plugin/folderlistmodel/disk/disklocation.h	2015-07-19 15:38:39 +
@@ -65,7 +65,8 @@
   const bool isRecursive);
 virtual LocationItemDirIterator * newDirIterator(const QString  path,
  QDir::Filters filters,
- QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags);   
+ QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags);
+virtual LocationItemFile   * newFile(const QString  path);
 virtual boolisThereDiskSpace(const QString pathname, qint64 requiredSize);
 virtual QString urlBelongsToLocation(const QString urlPath, int indexOfColonAndSlashe);
 

=== added file 'src/plugin/folderlistmodel/disk/disklocationitemfile.cpp'
--- src/plugin/folderlistmodel/disk/disklocationitemfile.cpp	1970-01-01 00:00:00 +
+++ src/plugin/folderlistmodel/disk/disklocationitemfile.cpp	2015-07-19 15:38:39 +
@@ -0,0 +1,138 @@
+/**
+ *
+ * Copyright 2015 Canonical Ltd.
+ * Copyright 2015 Carlos J Mazieri carlos.mazi...@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see http://www.gnu.org/licenses/.
+ *
+ * File: disklocationitemfile.cpp
+ * Date: 20/04/2015
+ */
+
+#include disklocationitemfile.h
+
+DiskLocationItemFile::DiskLocationItemFile(QObject *parent)
+  : LocationItemFile(parent)
+  , m_qtFile( new QFile() )
+{
+
+}
+
+DiskLocationItemFile::DiskLocationItemFile(const QString name, QObject *parent)
+  : LocationItemFile(parent)
+  , m_qtFile( new QFile(name) )
+{
+
+}
+
+
+DiskLocationItemFile::~DiskLocationItemFile()
+{
+delete m_qtFile;
+}
+
+
+QString DiskLocationItemFile::fileName() const
+{
+return m_qtFile-fileName();
+}
+
+
+bool DiskLocationItemFile::rename(const QString newName

[Ubuntu-touch-coreapps-reviewers] [Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-14 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-14 into 
lp:ubuntu-filemanager-app with 
lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-13 as a prerequisite.

Commit message:
Inherited Location classes now provide inherited LocationItemDir classes which 
will replace Qt QDir class in Actions.
DiskLocation provides DiskLocationItemDir and SmbLocation provides 
SmbLocationItemDir

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

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

LocationItemDir classes are provided by Location inherited classes.
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-14 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/CMakeLists.txt'
--- src/plugin/folderlistmodel/CMakeLists.txt	2015-07-19 16:39:36 +
+++ src/plugin/folderlistmodel/CMakeLists.txt	2015-07-19 16:39:36 +
@@ -45,6 +45,10 @@
 locationurl.h
 locationitemdiriterator.cpp
 locationitemdiriterator.h
+locationitemfile.cpp
+locationitemfile.h
+locationitemdir.cpp
+locationitemdir.h
 cleanurl.cpp
 cleanurl.h
 urliteminfo.cpp
@@ -55,6 +59,8 @@
 disk/disklocationitemdiriterator.h
 disk/disklocationitemfile.cpp
 disk/disklocationitemfile.h
+disk/disklocationitemdir.cpp
+disk/disklocationitemdir.h
 trash/qtrashdir.cpp
 trash/qtrashdir.h   
 trash/qtrashutilinfo.cpp
@@ -73,6 +79,8 @@
 smb/qsambaclient/src/smblocationdiriterator.h
 smb/qsambaclient/src/smblocationitemfile.cpp
 smb/qsambaclient/src/smblocationitemfile.h
+smb/qsambaclient/src/smblocationitemdir.cpp
+smb/qsambaclient/src/smblocationitemdir.h
 smb/qsambaclient/src/smbobject.cpp
 smb/qsambaclient/src/smbobject.h
 smb/smblocation.h

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.cpp'
--- src/plugin/folderlistmodel/disk/disklocation.cpp	2015-07-19 16:39:36 +
+++ src/plugin/folderlistmodel/disk/disklocation.cpp	2015-07-19 16:39:36 +
@@ -26,6 +26,7 @@
 #include externalfswatcher.h
 #include locationurl.h
 #include disklocationitemfile.h
+#include disklocationitemdir.h
 
 
 #if defined(Q_OS_UNIX)
@@ -204,6 +205,13 @@
 }
 
 
+LocationItemDir *
+DiskLocation::newDir(const QString dir)
+{
+return new DiskLocationItemDir(dir);
+}
+
+
 bool DiskLocation::isThereDiskSpace(const QString pathname, qint64 requiredSize)
 {
 bool ret = true;

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.h'
--- src/plugin/folderlistmodel/disk/disklocation.h	2015-07-19 16:39:36 +
+++ src/plugin/folderlistmodel/disk/disklocation.h	2015-07-19 16:39:36 +
@@ -67,6 +67,7 @@
  QDir::Filters filters,
  QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags);
 virtual LocationItemFile   * newFile(const QString  path);
+virtual LocationItemDir* newDir(const QString  dir = QLatin1String(0));
 virtual boolisThereDiskSpace(const QString pathname, qint64 requiredSize);
 virtual QString urlBelongsToLocation(const QString urlPath, int indexOfColonAndSlashe);
 

=== added file 'src/plugin/folderlistmodel/disk/disklocationitemdir.cpp'
--- src/plugin/folderlistmodel/disk/disklocationitemdir.cpp	1970-01-01 00:00:00 +
+++ src/plugin/folderlistmodel/disk/disklocationitemdir.cpp	2015-07-19 16:39:36 +
@@ -0,0 +1,61 @@
+/**
+ *
+ * Copyright 2015 Canonical Ltd.
+ * Copyright 2015 Carlos J Mazieri carlos.mazi...@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see http://www.gnu.org/licenses/.
+ *
+ * File: disklocationitemdir.cpp
+ * Date: 16/05/2015
+ */
+
+#include disklocationitemdir.h
+#include QDir
+
+DiskLocationItemDir::DiskLocationItemDir(const QString dir) : LocationItemDir(dir), m_qtQDir(new QDir())
+{
+if(!dir.isNull()  !dir.isEmpty())
+{
+m_qtQDir-setPath(dir);
+}
+}
+
+
+DiskLocationItemDir::~DiskLocationItemDir()
+{
+
+}
+
+bool DiskLocationItemDir::exists() const
+{
+return m_qtQDir-exists();
+}
+
+
+bool DiskLocationItemDir::mkdir(const QString dir) const
+{
+return m_qtQDir-mkdir

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

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

Commit message:


FileSystemAction needs to interact with Locations, it now depends from 
LocationsFactory and Locations classes.

The following methods were removed because the Location where the Action 
was performed needs to create its DirIteminfo for its items:
   * Removed signals FileSystemAction::added(QString) and 
FileSystemAction::removed(QString)
   * Removed slots DirModel::onItemAdded(QString) and 
DirModel::onItemRemoved(QString)

FileSystemAction::isThereDiskSpace() was removed and 
Location::isThereDiskSpace() is 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-04/+merge/265195

Preparing FileSystemAction class to work based on Locations
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-04 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/dirmodel.cpp'
--- src/plugin/folderlistmodel/dirmodel.cpp	2015-07-18 21:41:28 +
+++ src/plugin/folderlistmodel/dirmodel.cpp	2015-07-18 21:41:28 +
@@ -114,7 +114,7 @@
 , mAuthData(NetAuthenticationDataList::getInstance(this))
 , mLocationFactory(new LocationsFactory(this))
 , mCurLocation(0)
-, m_fsAction(new FileSystemAction(this) )
+, m_fsAction(new FileSystemAction(mLocationFactory,this) )
 {
 mNameFilters = QStringList()  *;
 
@@ -126,15 +126,9 @@
 connect(m_fsAction, SIGNAL(added(DirItemInfo)),
 this, SLOT(onItemAdded(DirItemInfo)));
 
-connect(m_fsAction, SIGNAL(added(QString)),
-this, SLOT(onItemAdded(QString)));
-
 connect(m_fsAction, SIGNAL(removed(DirItemInfo)),
 this, SLOT(onItemRemoved(DirItemInfo)));
 
-connect(m_fsAction, SIGNAL(removed(QString)),
-this, SLOT(onItemRemoved(QString)));  
-
 connect(m_fsAction, SIGNAL(error(QString,QString)),
 this, SIGNAL(error(QString,QString)));
 
@@ -960,16 +954,6 @@
 return ret;
 }
 
-/*!
- * \brief DirModel::onItemRemoved()
- * \param pathname full pathname of removed file
- */
-void DirModel::onItemRemoved(const QString pathname)
-{
-DirItemInfo info(pathname);
-onItemRemoved(info);
-}
-
 
 void DirModel::onItemRemoved(const DirItemInfo fi)
 {  
@@ -993,17 +977,6 @@
 }
 
 
-/*!
- * \brief DirModel::onItemAdded()
- * \param pathname full pathname of the added file
- */
-void DirModel::onItemAdded(const QString pathname)
-{
-DirItemInfo info(pathname);
-onItemAdded(info);
-}
-
-
 void DirModel::onItemAdded(const DirItemInfo fi)
 {
 int newRow = addItem(fi);
@@ -1516,7 +1489,7 @@
 bool  DirModel::canReadDir(const QString folderName) const
 {
 DirItemInfo d = setParentIfRelative(folderName);
-return d.isDir()  d.isReadable();
+return d.isDir()  d.isReadable()  d.isExecutable();
 }
 
 

=== modified file 'src/plugin/folderlistmodel/dirmodel.h'
--- src/plugin/folderlistmodel/dirmodel.h	2015-07-18 21:41:28 +
+++ src/plugin/folderlistmodel/dirmodel.h	2015-07-18 21:41:28 +
@@ -461,10 +461,8 @@
 void clipboardChanged();
 void enabledExternalFSWatcherChanged(bool);
 
-private slots:
-void onItemRemoved(const QString);
-void onItemRemoved(const DirItemInfo);
-void onItemAdded(const QString);
+private slots:
+void onItemRemoved(const DirItemInfo);  
 void onItemAdded(const DirItemInfo);
 void onItemChanged(const DirItemInfo);
 

=== modified file 'src/plugin/folderlistmodel/filesystemaction.cpp'
--- src/plugin/folderlistmodel/filesystemaction.cpp	2014-12-29 11:29:21 +
+++ src/plugin/folderlistmodel/filesystemaction.cpp	2015-07-18 21:41:28 +
@@ -37,6 +37,9 @@
 #include filesystemaction.h
 #include clipboard.h
 #include qtrashutilinfo.h
+#include location.h
+#include locationsfactory.h
+
 
 #if defined(Q_OS_UNIX)
 #include sys/statvfs.h
@@ -51,6 +54,7 @@
 #include QDir
 #include QThread
 #include QTemporaryFile
+#include QScopedPointer
 
 /*!
  *   number of the files to work on a step, when this number is reached a signal is emitted
@@ -177,14 +181,16 @@
 //===
 /*!
  * \brief FileSystemAction::FileSystemAction
+ * \param LocationsFactory locationsFactory
  * \param parent
  */
-FileSystemAction::FileSystemAction(QObject *parent) :
+FileSystemAction::FileSystemAction(LocationsFactory *locationsFactory, QObject *parent) :
 QObject(parent)
   , m_curAction(0)
   , m_cancelCurrentAction(false)
   , m_busy(false)  
   , m_clipboardChanged(false)
+  , m_locationsFactory(locationsFactory)
 #if defined

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

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

Commit message:
Object LocationItemDirIterator is created by Location classes, it will replace 
Qt Object QDirIterator in Actions.

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

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

Location class improved: 

  * Created Location::urlBelongsToLocation() to be used in 
LocationsFactory::parse()
It avoids big changes in the  LocationsFactory when adding new protocols to 
File Manager
  * Added creation of LocationItemDirIterator object which is similar to Qt 
QDirIterator object
-- 
Your team Ubuntu File Manager Developers is requested to review the proposed 
merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-actions-08 into 
lp:ubuntu-filemanager-app.
=== modified file 'src/plugin/folderlistmodel/CMakeLists.txt'
--- src/plugin/folderlistmodel/CMakeLists.txt	2015-06-20 15:15:44 +
+++ src/plugin/folderlistmodel/CMakeLists.txt	2015-07-18 22:03:45 +
@@ -51,6 +51,8 @@
 urliteminfo.h
 disk/disklocation.cpp
 disk/disklocation.h
+disk/disklocationitemdiriterator.cpp
+disk/disklocationitemdiriterator.h
 trash/qtrashdir.cpp
 trash/qtrashdir.h   
 trash/qtrashutilinfo.cpp

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.cpp'
--- src/plugin/folderlistmodel/disk/disklocation.cpp	2015-03-01 15:32:42 +
+++ src/plugin/folderlistmodel/disk/disklocation.cpp	2015-07-18 22:03:45 +
@@ -20,9 +20,16 @@
  */
 
 #include disklocation.h
+#include disklocationitemdiriterator.h
 #include iorequest.h
 #include ioworkerthread.h
 #include externalfswatcher.h
+#include locationurl.h
+
+
+#if defined(Q_OS_UNIX)
+#include sys/statvfs.h
+#endif
 
 #include QDebug
 
@@ -168,3 +175,37 @@
 return new DirListWorker(urlPath,filter,isRecursive);
 }
 
+
+QString DiskLocation::urlBelongsToLocation(const QString urlPath, int indexOfColonAndSlashe)
+{
+QString ret;
+if (urlPath.startsWith(LocationUrl::DiskRootURL.midRef(0,5)))
+{
+ret  = QDir::rootPath() + DirItemInfo::removeExtraSlashes(urlPath, indexOfColonAndSlashe+1);
+}
+return ret;
+}
+
+
+LocationItemDirIterator *
+DiskLocation::newDirIterator(const QString path,
+ QDir::Filters filters,
+ QDirIterator::IteratorFlags flags)
+{
+return  new DiskLocationItemDirIterator(path, filters, flags);
+}
+
+
+bool DiskLocation::isThereDiskSpace(const QString pathname, qint64 requiredSize)
+{
+bool ret = true;
+#if defined(Q_OS_UNIX)
+struct statvfs  vfs;
+if ( ::statvfs( QFile::encodeName(pathname).constData(), vfs) == 0 )
+{
+qint64 free =  vfs.f_bsize * vfs.f_bfree;
+ret = free  requiredSize;
+}
+#endif
+   return ret;
+}

=== modified file 'src/plugin/folderlistmodel/disk/disklocation.h'
--- src/plugin/folderlistmodel/disk/disklocation.h	2015-03-01 15:32:42 +
+++ src/plugin/folderlistmodel/disk/disklocation.h	2015-07-18 22:03:45 +
@@ -63,6 +63,11 @@
 virtual DirListWorker * newListWorker(const QString urlPath,
   QDir::Filter filter,
   const bool isRecursive);
+virtual LocationItemDirIterator * newDirIterator(const QString  path,
+ QDir::Filters filters,
+ QDirIterator::IteratorFlags flags = QDirIterator::NoIteratorFlags);   
+virtual boolisThereDiskSpace(const QString pathname, qint64 requiredSize);
+virtual QString urlBelongsToLocation(const QString urlPath, int indexOfColonAndSlashe);
 
 protected:
 voidaddExternalFsWorkerRequest(ExternalFileSystemChangesWorker *);

=== added file 'src/plugin/folderlistmodel/disk/disklocationitemdiriterator.cpp'
--- src/plugin/folderlistmodel/disk/disklocationitemdiriterator.cpp	1970-01-01 00:00:00 +
+++ src/plugin/folderlistmodel/disk/disklocationitemdiriterator.cpp	2015-07-18 22:03:45 +
@@ -0,0 +1,94 @@
+/**
+ *
+ * Copyright 2015 Canonical Ltd.
+ * Copyright 2015 Carlos J Mazieri carlos.mazi...@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy

  1   2   >