Merge lp:~carlos-mazieri/ubuntu-filemanager-app/bug-1436186 into lp:ubuntu-filemanager-app

Proposed by Carlos Jose Mazieri
Status: Merged
Approved by: Arto Jalkanen
Approved revision: 425
Merged at revision: 426
Proposed branch: lp:~carlos-mazieri/ubuntu-filemanager-app/bug-1436186
Merge into: lp:ubuntu-filemanager-app
Diff against target: 93 lines (+10/-6)
5 files modified
src/plugin/folderlistmodel/diriteminfo.cpp (+2/-1)
src/plugin/folderlistmodel/locationsfactory.cpp (+1/-1)
src/plugin/folderlistmodel/locationurl.cpp (+2/-0)
src/plugin/folderlistmodel/locationurl.h (+1/-0)
src/plugin/test_folderlistmodel/regression/tst_folderlistmodel.cpp (+4/-4)
To merge this branch: bzr merge lp:~carlos-mazieri/ubuntu-filemanager-app/bug-1436186
Reviewer Review Type Date Requested Status
Arto Jalkanen Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+263201@code.launchpad.net

Commit message

It fixes the bug #1436186 to allow browsing directories like AA:BB::CC

Description of the change

It fixes the bug #1436186 to allow browsing directories like AA:BB::CC

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/plugin/folderlistmodel/diriteminfo.cpp'
--- src/plugin/folderlistmodel/diriteminfo.cpp 2015-03-16 21:39:37 +0000
+++ src/plugin/folderlistmodel/diriteminfo.cpp 2015-06-28 18:11:30 +0000
@@ -20,6 +20,7 @@
20 */20 */
2121
22#include "diriteminfo.h"22#include "diriteminfo.h"
23#include "locationurl.h"
23#include <sys/types.h>24#include <sys/types.h>
24#include <sys/stat.h>25#include <sys/stat.h>
2526
@@ -537,7 +538,7 @@
537 QString ret;538 QString ret;
538 if (firstSlashIndex == -1)539 if (firstSlashIndex == -1)
539 {540 {
540 firstSlashIndex = url.indexOf(QLatin1String(":/"));541 firstSlashIndex = url.indexOf(LocationUrl::UrlIndicator);
541 if (firstSlashIndex != -1)542 if (firstSlashIndex != -1)
542 {543 {
543 ++firstSlashIndex;544 ++firstSlashIndex;
544545
=== modified file 'src/plugin/folderlistmodel/locationsfactory.cpp'
--- src/plugin/folderlistmodel/locationsfactory.cpp 2015-06-03 11:54:36 +0000
+++ src/plugin/folderlistmodel/locationsfactory.cpp 2015-06-28 18:11:30 +0000
@@ -85,7 +85,7 @@
85 int index = -1;85 int index = -1;
86 int type = -1;86 int type = -1;
87 Location * location = 0; 87 Location * location = 0;
88 if ( (index = uPath.indexOf(QChar(':'))) != -1 )88 if ( (index = uPath.indexOf(LocationUrl::UrlIndicator)) != -1 )
89 {89 {
90#if defined(Q_OS_WIN)90#if defined(Q_OS_WIN)
91#else91#else
9292
=== modified file 'src/plugin/folderlistmodel/locationurl.cpp'
--- src/plugin/folderlistmodel/locationurl.cpp 2015-03-01 19:02:31 +0000
+++ src/plugin/folderlistmodel/locationurl.cpp 2015-06-28 18:11:30 +0000
@@ -21,6 +21,8 @@
2121
22#include "locationurl.h"22#include "locationurl.h"
2323
24const QString LocationUrl::UrlIndicator("://");
25
24const QString LocationUrl::TrashRootURL("trash:///");26const QString LocationUrl::TrashRootURL("trash:///");
25const QString LocationUrl::DiskRootURL("file:///");27const QString LocationUrl::DiskRootURL("file:///");
26const QString LocationUrl::SmbURL("smb://");28const QString LocationUrl::SmbURL("smb://");
2729
=== modified file 'src/plugin/folderlistmodel/locationurl.h'
--- src/plugin/folderlistmodel/locationurl.h 2015-03-01 19:02:31 +0000
+++ src/plugin/folderlistmodel/locationurl.h 2015-06-28 18:11:30 +0000
@@ -27,6 +27,7 @@
27class LocationUrl27class LocationUrl
28{28{
29public:29public:
30 static const QString UrlIndicator;
30 static const QString DiskRootURL;31 static const QString DiskRootURL;
31 static const QString TrashRootURL;32 static const QString TrashRootURL;
32 static const QString SmbURL;33 static const QString SmbURL;
3334
=== modified file 'src/plugin/test_folderlistmodel/regression/tst_folderlistmodel.cpp'
--- src/plugin/test_folderlistmodel/regression/tst_folderlistmodel.cpp 2015-06-20 17:39:20 +0000
+++ src/plugin/test_folderlistmodel/regression/tst_folderlistmodel.cpp 2015-06-28 18:11:30 +0000
@@ -2517,16 +2517,14 @@
25172517
2518 QString validTrashURL(LocationUrl::TrashRootURL);2518 QString validTrashURL(LocationUrl::TrashRootURL);
25192519
2520 //Due to current File Manager UI typing method both: "file:" and "trash:" are supported2520#if 0 // "sheme:/" (single slash) is no longer supported
2521 // location = factoryLocations.setNewPath("trash:");
2522 // QVERIFY(location == 0);
2523
2524 location = factoryLocations.setNewPath("trash:/");2521 location = factoryLocations.setNewPath("trash:/");
2525 QVERIFY(location);2522 QVERIFY(location);
2526 QVERIFY(location->type() == LocationsFactory::TrashDisk);2523 QVERIFY(location->type() == LocationsFactory::TrashDisk);
2527 QCOMPARE(location->info()->absoluteFilePath(), validTrashURL);2524 QCOMPARE(location->info()->absoluteFilePath(), validTrashURL);
2528 QCOMPARE(location->urlPath(), validTrashURL);2525 QCOMPARE(location->urlPath(), validTrashURL);
2529 QCOMPARE(location->isRoot(), true);2526 QCOMPARE(location->isRoot(), true);
2527#endif
25302528
2531 location = factoryLocations.setNewPath("trash://");2529 location = factoryLocations.setNewPath("trash://");
2532 QVERIFY(location);2530 QVERIFY(location);
@@ -2549,9 +2547,11 @@
2549 QCOMPARE(location->urlPath(), validTrashURL);2547 QCOMPARE(location->urlPath(), validTrashURL);
2550 QCOMPARE(location->isRoot(), true);2548 QCOMPARE(location->isRoot(), true);
25512549
2550#if 0 // "sheme:/" (single slash) is no longer supported
2552 QString myDir("___myDir_must_NOT_EXIST___");2551 QString myDir("___myDir_must_NOT_EXIST___");
2553 location = factoryLocations.setNewPath(QString("trash:/") + myDir);2552 location = factoryLocations.setNewPath(QString("trash:/") + myDir);
2554 QVERIFY(location == 0);2553 QVERIFY(location == 0);
2554#endif
25552555
2556 location = factoryLocations.setNewPath("file://////");2556 location = factoryLocations.setNewPath("file://////");
2557 QVERIFY(location);2557 QVERIFY(location);

Subscribers

People subscribed via source and target branches