Merge lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-05 into lp:ubuntu-filemanager-app

Proposed by Carlos Jose Mazieri
Status: Merged
Approved by: Arto Jalkanen
Approved revision: 516
Merged at revision: 518
Proposed branch: lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-05
Merge into: lp:ubuntu-filemanager-app
Prerequisite: lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-04
Diff against target: 148 lines (+2/-112)
4 files modified
src/plugin/folderlistmodel/CMakeLists.txt (+0/-2)
src/plugin/folderlistmodel/folderlistmodel.pri (+2/-2)
src/plugin/folderlistmodel/smb/smblistworker.cpp (+0/-68)
src/plugin/folderlistmodel/smb/smblistworker.h (+0/-40)
To merge this branch: bzr merge lp:~carlos-mazieri/ubuntu-filemanager-app/new-protocols-support-05
Reviewer Review Type Date Requested Status
Arto Jalkanen Approve
Jenkins Bot continuous-integration Approve
Review via email: mp+280391@code.launchpad.net

Commit message

class SmbListWorker removed from repostory

Description of the change

class SmbListWorker removed from repostory

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Arto Jalkanen (ajalkane) wrote :

Off you go foul beast!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/plugin/folderlistmodel/CMakeLists.txt'
--- src/plugin/folderlistmodel/CMakeLists.txt 2015-12-12 15:48:35 +0000
+++ src/plugin/folderlistmodel/CMakeLists.txt 2015-12-12 15:48:35 +0000
@@ -73,8 +73,6 @@
73 trash/trashiteminfo.h73 trash/trashiteminfo.h
74 trash/trashlocation.cpp74 trash/trashlocation.cpp
75 trash/trashlocation.h 75 trash/trashlocation.h
76 smb/smblistworker.cpp
77 smb/smblistworker.h
78 smb/qsambaclient/src/smbutil.cpp76 smb/qsambaclient/src/smbutil.cpp
79 smb/qsambaclient/src/smbutil.h77 smb/qsambaclient/src/smbutil.h
80 smb/qsambaclient/src/smbiteminfo.cpp78 smb/qsambaclient/src/smbiteminfo.cpp
8179
=== modified file 'src/plugin/folderlistmodel/folderlistmodel.pri'
--- src/plugin/folderlistmodel/folderlistmodel.pri 2015-12-12 15:48:35 +0000
+++ src/plugin/folderlistmodel/folderlistmodel.pri 2015-12-12 15:48:35 +0000
@@ -67,11 +67,11 @@
6767
68SOURCES += $$PWD/smb/smblocation.cpp \68SOURCES += $$PWD/smb/smblocation.cpp \
69 $$PWD/smb/smblocationauthentication.cpp \69 $$PWD/smb/smblocationauthentication.cpp \
70 $$PWD/smb/smblistworker.cpp70
7171
72HEADERS += $$PWD/smb/smblocation.h \72HEADERS += $$PWD/smb/smblocation.h \
73 $$PWD/smb/smblocationauthentication.h \73 $$PWD/smb/smblocationauthentication.h \
74 $$PWD/smb/smblistworker.h74
7575
76include ($$PWD/smb/qsambaclient/qsambaclient.pri)76include ($$PWD/smb/qsambaclient/qsambaclient.pri)
7777
7878
=== removed file 'src/plugin/folderlistmodel/smb/smblistworker.cpp'
--- src/plugin/folderlistmodel/smb/smblistworker.cpp 2015-12-08 16:55:41 +0000
+++ src/plugin/folderlistmodel/smb/smblistworker.cpp 1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
1/**************************************************************************
2 *
3 * Copyright 2015 Canonical Ltd.
4 * Copyright 2015 Carlos J Mazieri <carlos.mazieri@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * File: smblistworker.cpp
19 * Date: 17/01/2015
20 */
21
22#include "smblistworker.h"
23#include "smblocationdiriterator.h"
24
25SmbListWorker::SmbListWorker(const QString &pathName,
26 QDir::Filters filter,
27 const bool isRecursive,
28 DirItemInfo * parentItem,
29 Const_SmbUtil_Ptr smb)
30 : DirListWorker(pathName, filter, isRecursive)
31 , SmbObject(pathName, smb)
32 , m_parent(parentItem)
33{
34 mLoaderType = NetworkLoader;
35}
36
37/*!
38 * \brief SmbListWorker::getNetworkContent() it fills a \ref DirItemInfoList with samba (share/directory) content
39 * \return the list of \ref SmbItemInfo items
40 */
41DirItemInfoList SmbListWorker::getNetworkContent()
42{
43 DirItemInfoList smbContent;
44
45 QDirIterator::IteratorFlags flags = mIsRecursive ?
46 QDirIterator::Subdirectories :
47 QDirIterator::NoIteratorFlags;
48
49 SmbLocationDirIterator dir(mPathName, mFilter, flags, m_smb);
50 while (dir.hasNext())
51 {
52 QString next = dir.next();
53 SmbItemInfo item (next, m_smb);
54 if (m_parent)
55 {
56 if (m_parent->isHost()) {
57 item.setAsShare();
58 }
59 else if (m_parent->isWorkGroup()) {
60 item.setAsHost();
61 }
62 }
63 smbContent.append(item);
64 }
65
66 return smbContent;
67}
68
690
=== removed file 'src/plugin/folderlistmodel/smb/smblistworker.h'
--- src/plugin/folderlistmodel/smb/smblistworker.h 2015-12-08 16:55:41 +0000
+++ src/plugin/folderlistmodel/smb/smblistworker.h 1970-01-01 00:00:00 +0000
@@ -1,40 +0,0 @@
1/**************************************************************************
2 *
3 * Copyright 2015 Canonical Ltd.
4 * Copyright 2015 Carlos J Mazieri <carlos.mazieri@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; version 3.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * File: smblistworker.h
19 * Date: 17/01/2015
20 */
21
22#ifndef SMBLISTWORKER_H
23#define SMBLISTWORKER_H
24
25#include "iorequestworker.h"
26#include "smbiteminfo.h"
27
28class SmbListWorker : public DirListWorker, public SmbObject
29{
30 Q_OBJECT
31public:
32 explicit SmbListWorker(const QString &pathName, QDir::Filters filter, const bool isRecursive, DirItemInfo * parentItem, Const_SmbUtil_Ptr smb);
33
34private:
35 DirItemInfoList getNetworkContent();
36private:
37 DirItemInfo * m_parent;
38};
39
40#endif // SMBLISTWORKER_H

Subscribers

People subscribed via source and target branches