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

2016-01-15 Thread noreply
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04 into 
lp:ubuntu-filemanager-app has been updated.

Status: Approved => Merged

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

2016-01-10 Thread Arto Jalkanen
Review: Approve

Some trivial code style comments

Diff comments:

> 
> === 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 
> + *
> + * 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 .
> + *
> + * 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) :

Code style: * mainItemInfo, but *parent. Space or not before variable?

> +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);

code style: camelCase or use_underscores with variables and method names? 
Regarding is_parent_of_smb_url

> + while (m_dirIterator->hasNext())
> + {
> + m_mainItemInfo->setFile(m_dirIterator->next());
> + if (is_parent_of_smb_url)
> + {
> + setSmbItemAttributes();
> + }
> + netContent.append(*m_mainItemInfo);
> + }
> + return netContent;
> +}
> +
> +/*!
> + * \brief NetworkListWorker::setSmbItemAttributes()
> + *
> + *  This original implementation regards only to Samba (smb:// protocol),
> + *  it will not hurt other protocols implementation.
> + */
> +void NetworkListWorker::setSmbItemAttributes()
> +{
> +if (m_parent->isHost())  { m_mainItemInfo->setAsShare(); }
> +else
> +if (m_parent->isWorkGroup()) { m_mainItemInfo->setAsHost(); }
> +}


-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04/+merge/280390
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

2016-01-10 Thread Arto Jalkanen
The proposal to merge 
lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04 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-04/+merge/280390
-- 
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-04 into lp:ubuntu-filemanager-app

2015-12-12 Thread Jenkins Bot
Review: Approve continuous-integration

PASSED: Continuous integration, rev:515
https://core-apps-jenkins.ubuntu.com/job/filemanager-app-ci/40/
Executed test runs:
None: https://core-apps-jenkins.ubuntu.com/job/generic-update-mp/254/console

Click here to trigger a rebuild:
https://core-apps-jenkins.ubuntu.com/job/filemanager-app-ci/40/rebuild

-- 
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04/+merge/280390
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.

-- 
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 
+ *
+ * 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 .
+ *
+ * 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());
+ if (is_parent_of_smb_url)
+ {
+ setSmbItemAttributes();
+ }
+