ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #00710
[Merge] lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-08 into lp:ubuntu-filemanager-app
Carlos Jose Mazieri has proposed merging lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-08 into lp:ubuntu-filemanager-app with lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-07 as a prerequisite.
Commit message:
Activates samba browsing on LocationsFactory class
Requested reviews:
Ubuntu File Manager Developers (ubuntu-filemanager-dev)
For more details, see:
https://code.launchpad.net/~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-08/+merge/252977
Activates samba browsing on LocationsFactory class
--
Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~carlos-mazieri/ubuntu-filemanager-app/samba-browsing-08 into lp:ubuntu-filemanager-app.
=== modified file 'po/com.ubuntu.filemanager.pot'
--- po/com.ubuntu.filemanager.pot 2015-03-14 18:47:33 +0000
+++ po/com.ubuntu.filemanager.pot 2015-03-14 18:47:33 +0000
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-03-14 14:53-0300\n"
+"POT-Creation-Date: 2015-03-14 15:31-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@xxxxxx>\n"
=== modified file 'src/plugin/folderlistmodel/folderlistmodel.pri'
--- src/plugin/folderlistmodel/folderlistmodel.pri 2015-03-14 18:47:33 +0000
+++ src/plugin/folderlistmodel/folderlistmodel.pri 2015-03-14 18:47:33 +0000
@@ -43,10 +43,15 @@
HEADERS += $$PWD/trash/qtrashdir.h $$PWD/trash/trashiteminfo.h \
$$PWD/trash/qtrashutilinfo.h $$PWD/trash/trashlocation.h
+SOURCES += $$PWD/smb/smblocation.cpp $$PWD/smb/smblocationauthentication.cpp $$PWD/smb/smblistworker.cpp
+HEADERS += $$PWD/smb/smblocation.h $$PWD/smb/smblocationauthentication.h $$PWD/smb/smblistworker.h
+
SOURCES += $$PWD/net/netutil.cpp $$PWD/net/netauthenticationdata.cpp
-HEADERS += $$PWD/net/netutil.h $$PWD/net/netauthenticationdata.h
-
-INCLUDEPATH += $$PWD $$PWD/trash $$PWD/disk $$PWD/net
+HEADERS += $$PWD/net/netutil.h $$PWD/net/netauthenticationdata.h
+
+INCLUDEPATH += $$PWD $$PWD/trash $$PWD/disk $$PWD/smb $$PWD/net
+
+include ($$PWD/smb/qsambaclient/qsambaclient.pri)
greaterThan(QT_MAJOR_VERSION, 4) {
QT += qml
=== modified file 'src/plugin/folderlistmodel/locationsfactory.cpp'
--- src/plugin/folderlistmodel/locationsfactory.cpp 2015-03-14 18:47:33 +0000
+++ src/plugin/folderlistmodel/locationsfactory.cpp 2015-03-14 18:47:33 +0000
@@ -26,6 +26,7 @@
#include "disklocation.h"
#include "trashlocation.h"
#include "trashiteminfo.h"
+#include "smblocation.h"
#include "cleanurl.h"
#include "netauthenticationdata.h"
@@ -51,6 +52,14 @@
{
m_locations.append(new DiskLocation(LocalDisk));
m_locations.append(new TrashLocation(TrashDisk));
+ SmbLocation * smblocation = new SmbLocation(NetSambaShare);
+ m_locations.append(smblocation);
+
+ // Qt::DirectConnection is used here
+ // it allows lastUrlNeedsAuthencation() to have the right flag
+ connect(smblocation, SIGNAL(needsAuthentication(QString,QString)),
+ this, SLOT(onUrlNeedsAuthentication(QString,QString)),
+ Qt::DirectConnection);
}
LocationsFactory::~LocationsFactory()
@@ -94,6 +103,14 @@
type = LocalDisk;
m_tmpPath = QDir::rootPath() + DirItemInfo::removeExtraSlashes(uPath, index+1);
}
+ else
+ if ( uPath.startsWith(LocationUrl::SmbURL.midRef(0,4)) ||
+ uPath.startsWith(LocationUrl::CifsURL.midRef(0,5))
+ )
+ {
+ type = NetSambaShare;
+ m_tmpPath = LocationUrl::SmbURL + DirItemInfo::removeExtraSlashes(uPath, index+1);
+ }
}
else
{
@@ -207,8 +224,8 @@
DirItemInfo *item = location->validateUrlPath(m_tmpPath);
- //for remote locations, authentication might have failed
- //if so try to use a stored authentication data and authenticate it again
+ //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))
{
=== modified file 'src/plugin/folderlistmodel/locationsfactory.h'
--- src/plugin/folderlistmodel/locationsfactory.h 2015-03-14 18:47:33 +0000
+++ src/plugin/folderlistmodel/locationsfactory.h 2015-03-14 18:47:33 +0000
@@ -61,9 +61,9 @@
enum Locations
{
LocalDisk, //<! any mounted file system
- TrashDisk //<! special trash location in the disk
+ TrashDisk, //<! special trash location in the disk
+ NetSambaShare //<! SAMBA or CIFS shares
#if 0
- NetSambaShare //<! SAMBA or CIFS shares
NetFishShare //<! FISH protocol over ssh that provides file sharing
#endif
};
=== modified file 'src/plugin/folderlistmodel/smb/qsambaclient/qsambaclient.pri'
--- src/plugin/folderlistmodel/smb/qsambaclient/qsambaclient.pri 2015-03-14 18:47:33 +0000
+++ src/plugin/folderlistmodel/smb/qsambaclient/qsambaclient.pri 2015-03-14 18:47:33 +0000
@@ -1,12 +1,16 @@
-SOURCES += $$PWD/src/smbutil.cpp
-
-
-
-HEADERS += $$PWD/src/smbutil.h
-
-
-QT *= core network
+SOURCES += $$PWD/src/smbutil.cpp \
+ $$PWD/src/smbiteminfo.cpp \
+ $$PWD/src/smbobject.cpp \
+ $$PWD/src/smblocationdiriterator.cpp
+
+
+HEADERS += $$PWD/src/smbutil.h \
+ $$PWD/src/smbiteminfo.h \
+ $$PWD/src/smbobject.h \
+ $$PWD/src/smblocationdiriterator.h
+
+QT *= core network
CONFIG *= link_pkgconfig
PKGCONFIG *= smbclient
Follow ups