diff options
author | q5sys <jt@ixsystems.com> | 2017-09-24 20:33:20 -0400 |
---|---|---|
committer | q5sys <jt@ixsystems.com> | 2017-09-24 20:33:20 -0400 |
commit | fb13a95bcb1c88028e74a525c998d419984c3b28 (patch) | |
tree | b1e31b2ec6906226e5b0b1c8c1edfcd02dcbd9cd /src-qt5 | |
parent | prototype webdav functionality for lumina-fm (diff) | |
download | lumina-fb13a95bcb1c88028e74a525c998d419984c3b28.tar.gz lumina-fb13a95bcb1c88028e74a525c998d419984c3b28.tar.bz2 lumina-fb13a95bcb1c88028e74a525c998d419984c3b28.zip |
oops hadn't saved all my changes yet
Diffstat (limited to 'src-qt5')
-rw-r--r-- | src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp b/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp index 9c82aa3e..6e65ebaf 100644 --- a/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp +++ b/src-qt5/desktop-utils/lumina-fm/widgets/fmwebdav.cpp @@ -21,3 +21,16 @@ QString fmwebdav::password() const{ return wdPassword; } fmwebdav::QWebdavConnectionType : fmwebdav::connectionType() const{ return wdCurrentConnectionType; } bool fmwebdav::isSSL() const{ return (wdCurrentConnectionType==QWebdav::HTTPS); } + +void QWebdav::setConnectionSettings(const QWebdavConnectionType connectionType, const QString *hostname, const QString *rootPath, const QString *username, const QString *password, int *port){ + wdRootPath = rootPath; + if ((wdRootPath.endsWith("/")){ wdRootPath.chop(1); } + wdCurrentConnectionType = connectionType; + wdBaseUrl.setScheme(); + wdBaseUrl.setHost(hostname); + wdBaseUrl.setPath(rootPath); + if (port != 0) { // use user-defined port number if not 80 or 443 + if ( ! ( ( (port == 80) && (wdCurrentConnectionType==QWebdav::HTTP) ) || ( (port == 443) && (wdCurrentConnectionType==QWebdav::HTTPS) ) ) ){ wdBaseUrl.setPort(port); } + wdUsername = username; + wdPassword = password; +} |