Merge lp:~lukas-baubkus/owncloud-sync/feature-keep-serverUrl-port-for-webdav into lp:~ocs-team/owncloud-sync/UBsync

Proposed by Luksus on 2019-02-12
Status: Needs review
Proposed branch: lp:~lukas-baubkus/owncloud-sync/feature-keep-serverUrl-port-for-webdav
Merge into: lp:~ocs-team/owncloud-sync/UBsync
Diff against target: 23 lines (+5/-1)
1 file modified
OwncloudSync/webdavfolderlistmodel.cpp (+5/-1)
To merge this branch: bzr merge lp:~lukas-baubkus/owncloud-sync/feature-keep-serverUrl-port-for-webdav
Reviewer Review Type Date Requested Status
ownCloud-Sync Devs 2019-02-12 Pending
Review via email: mp+363044@code.launchpad.net

Commit message

fix removing of cloud-server-portnumber, while creating the webdav access-url-path.

Description of the change

Fixes: Bug #1815388, and perhaps Bug #1592782

Retrieves the portnumber if one exists and makes use of the port parameter in QWebdav::setConnectionSettings.

To post a comment you must log in.
slash (slash-tux) wrote :

Thanks, I'll try to create a test version, would you be able to test it ?

Luksus (lukas-baubkus) wrote :

> Thanks, I'll try to create a test version, would you be able to test it ?

Sure.

slash (slash-tux) wrote :

Hello Luksus,
Sorry for the delay.
I was able to manage to find back a virtual machine to compile ubsync, with some changes, yours included.
I've let the full debug for you to troubleshoot...
https://www.dropfile.nl/f/Jbt63

- Are you on Ubports telegram supergroup ?
- Are you good in compiling ? I would like to move ubsync out of QT creator ubuntu 16.04 to clickable. But so far all trial failed.

Luksus (lukas-baubkus) wrote :

Hi, sorry for the late response, I was on vacation the last days.
I am currently a little bit confused. Somehow, the UBsync version on my phone already has the fix and I don't know anymore, how it got there... ;-)

Ok, I will have a look into it.

Honestly I am not very familiar with compiling that qml/c++ stuff, but as I already was digging around with a lot of ubports apps and clickable, maybe I am able to solve that problem.

Yes I am in the telegram supergroup, just as "Lukas".

Luksus (lukas-baubkus) wrote :

The click-package installs and works flawless.

I managed to build the project with clickable.

Just changed the line in OwncloudSync.pro:
LIBS += -L$$OUT_PWD/../qwebdavlib/ -lqwebdav
to
LIBS += -L$$OUT_PWD/../qwebdavlib

I am not sure what this -lqwebdav string is supposed to do, perhaps it is a temporary library-title for the built qwebdavlib. It seems, that it is not needed. At least I could not find any references to "lqwebdav" in the code or other files.

with "clickable clean build click-build" a click-package gets created.

But the share-directory, with language files is missing. I am not sure how this gets created.

Unmerged revisions

4. By Luksus on 2019-02-12

If the owncloud/nextcloud host-url contains a special portnumber, the portnumber was truncated when creating the webdav access path.
This fix does keep the portnumber, if one exists.
The port-parameter will be ignored by QWebdav::setConnectionSettings if it is 0.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'OwncloudSync/webdavfolderlistmodel.cpp'
2--- OwncloudSync/webdavfolderlistmodel.cpp 2018-08-09 03:52:33 +0000
3+++ OwncloudSync/webdavfolderlistmodel.cpp 2019-02-12 09:07:47 +0000
4@@ -53,6 +53,10 @@
5 QString url = sUrl.host();
6 qDebug() << "webdav::setConnectionSettings" << "url:" << url;
7
8+ int port = sUrl.port();
9+ if(port == -1) port = 0;
10+ qDebug() << "webdav::setConnectionSettings" << "port:" << port;
11+
12 QString path = sUrl.path();
13 path.append("/remote.php/webdav/");
14 qDebug() << "webdav::setConnectionSettings" << "path:" << path;
15@@ -66,7 +70,7 @@
16 connectionType = QWebdav::HTTP;
17 }
18
19- m_webdav.setConnectionSettings(connectionType, url, path, m_username, m_password);
20+ m_webdav.setConnectionSettings(connectionType, url, path, m_username, m_password, port);
21
22 }
23 }

Subscribers

People subscribed via source and target branches

to all changes: