Hi here is a patch to upgrade nextcloud-client to current version 3.0.0.
Successfully tested on x86_64, built for i686. The build for arm failed... Parabola Website Notification <[email protected]> schrieb am Fri, 21. Aug 20 10:05:
[email protected] wants to notify you that the following packages may be out-of-date: * nextcloud-client 2.6.4-1.parabola1 [libre] (i686): https://parabolagnulinux.org/packages/libre/i686/nextcloud-client/ * nextcloud-client 2.6.4-1.parabola1 [libre] (x86_64): https://parabolagnulinux.org/packages/libre/x86_64/nextcloud-client/ The user provided the following additional text: 3.0.0 is out: https://github.com/nextcloud/desktop/releases/tag/v3.0.0 _______________________________________________ Dev mailing list [email protected] https://lists.parabola.nu/mailman/listinfo/dev
From 5872e6eddbc491be2343f4444974a3a687df7030 Mon Sep 17 00:00:00 2001 From: Theo von Arx <[email protected]> Date: Thu, 16 Jul 2020 21:55:28 +0200 Subject: [PATCH] [nextcloud-client] Upgrade to 3.0.0 --- libre/nextcloud-client/Nextcloud.conf | 2 - libre/nextcloud-client/PKGBUILD | 57 +-- .../nextcloud-client-fix-build.diff | 13 - .../nextcloud-client/remove-qtwebengine.patch | 446 +++++++++--------- 4 files changed, 250 insertions(+), 268 deletions(-) delete mode 100644 libre/nextcloud-client/Nextcloud.conf delete mode 100644 libre/nextcloud-client/nextcloud-client-fix-build.diff diff --git a/libre/nextcloud-client/Nextcloud.conf b/libre/nextcloud-client/Nextcloud.conf deleted file mode 100644 index 232a67665..000000000 --- a/libre/nextcloud-client/Nextcloud.conf +++ /dev/null @@ -1,2 +0,0 @@ -[General] -skipUpdateCheck=true diff --git a/libre/nextcloud-client/PKGBUILD b/libre/nextcloud-client/PKGBUILD index 9afa9b0fb..3028c35f0 100644 --- a/libre/nextcloud-client/PKGBUILD +++ b/libre/nextcloud-client/PKGBUILD @@ -8,8 +8,10 @@ pkgname=nextcloud-client -pkgver=2.6.4 -_commit=b45f5fd1a947dc21eb11c69049a99616a2ec950e +# Upstream does not provide signed tarballs (yet) +# https://github.com/nextcloud/desktop/issues/236#issuecomment-540538247 +pkgver=3.0.0 +_commit=ff175088a391007b66bfca89ef35cf29e37cf001 pkgrel=1 pkgrel+=.parabola1 pkgdesc='Nextcloud desktop client' @@ -18,69 +20,59 @@ arch=(x86_64) arch+=(i686 armv7h) url='https://nextcloud.com/' license=(GPL) -depends=(openssl sqlite qtkeychain qt5-svg xdg-utils libcloudproviders) +depends=(openssl sqlite qtkeychain qt5-svg xdg-utils libcloudproviders + qt5-graphicaleffects qt5-quickcontrols2) makedepends=(doxygen extra-cmake-modules kio python-sphinx qt5-tools git cmocka) optdepends=( 'kio: integration with Dolphin' 'nemo-python: integration with Nemo' 'python-nautilus: integration with Nautilus' - 'python2-caja: integration with Caja' + 'python-caja: integration with Caja' ) -source=("$pkgname::git+https://github.com/nextcloud/desktop.git?signed#commit=$_commit" - issue1458-workaround.patch::https://github.com/yan12125/desktop/commit/7da680ef7843a52c3136916744f50d4a003bb8b5.patch - issue1458-2.patch::https://github.com/yan12125/desktop/commit/2b313368325dac5b8d0e69394cfcc4faaa745f75.patch - $pkgname-fix-build.diff - Nextcloud.conf) +# Not using ?signed here as only the tag is properly signed, not the commit. +# See https://github.com/nextcloud/desktop/issues/2185 +source=("$pkgname::git+https://github.com/nextcloud/desktop.git#commit=$_commit") source+=(remove-qtwebengine.patch) validpgpkeys=( A26B951528EA1BA1678C7AE5D406C75CEE1A36D6 # one of keys controlled by github.com/camilasan 42E775EAA3E47F9E0D5CDB0E00819E3BF4177B28 # controlled by github.com/misch7 + 17166A5275C5FA6F1A48FD78074BBBCB8DECC9E2 # https://github.com/er-vin.gpg ) -sha256sums=('SKIP' - '07cd68f54c004175b4a09cce25830a357d0ebaafaf4e4cabfb8b0d4deeded2f3' - '157c87a789219a3442ca5947c48dcd1ef3898612ff32070bf8842a42bfbe857a' - '8b257a0554ceb54a7ed320dbfa3becb97d6845338e28a8aa0a4f6239f3141645' - '5f51e41ef01d4e5b88a4735531105b84b4fb5317adc2a2996117c03fe5a44fc7') -sha256sums+=('77d7afd2dc65a7625e1617dd2c287c1be004deca2f64ecc18a96bb6c3cd733cf') -backup=('etc/Nextcloud/sync-exclude.lst' - 'etc/Nextcloud/Nextcloud.conf') +sha256sums=('SKIP') +sha256sums+=('92a580a8de3141c2d04a28a4de3264a35f426fa74834379f5cae4ae0934b1d7b') +backup=('etc/Nextcloud/sync-exclude.lst') prepare() { # tmpdir for check() - mkdir tmpdir $pkgname/build + mkdir tmpdir # Use system GNUInstallDirs.cmake so that we can benefit from # https://gitlab.kitware.com/cmake/cmake/merge_requests/3735 rm -v $pkgname/cmake/modules/GNUInstallDirs.cmake cd $pkgname - patch -Np1 -i ../issue1458-workaround.patch - patch -Np1 -i ../issue1458-2.patch - - # https://github.com/nextcloud/desktop/pull/719 - # "Rename owncloud tests to nextcloud" - actually breaks building of tests - patch -Np1 -i ../$pkgname-fix-build.diff # Remove qt5-webengine dependency + # https://github.com/nextcloud/desktop/pull/2204 patch -Np1 -i ../remove-qtwebengine.patch } build() { - cd $pkgname/build + cd $pkgname # bundled breakpad in libcrashreporter-qt submodule is too old and does not build with glibc >= 2.26 # Upstream fix: https://github.com/google/breakpad/commit/bddcc58860f522a0d4cbaa7e9d04058caee0db9d - cmake \ + cmake -B build -S . \ + -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DNO_SHIBBOLETH=1 \ + -DNO_WEBENGINE=1 \ -DWITH_CRASHREPORTER=OFF \ - -DUNIT_TESTING=ON \ - .. + -DUNIT_TESTING=ON - make # TODO: fix installation of PDF and HTML documents # WIP at https://github.com/yan12125/desktop/tree/doc-install-path - make doc-man + make -C build all doc-man } check() { @@ -88,14 +80,11 @@ check() { # Tests fail if $TMPDIR is too small; specify an alternative for machines # with a small /tmp partition. - TMPDIR="$srcdir/tmpdir" make test ARGS="-V" + TMPDIR="$srcdir/tmpdir" make test } package() { cd $pkgname/build make DESTDIR="$pkgdir" install - - # Disables built-in update checker - install -Dm644 "$srcdir/Nextcloud.conf" -t "$pkgdir"/etc/Nextcloud } diff --git a/libre/nextcloud-client/nextcloud-client-fix-build.diff b/libre/nextcloud-client/nextcloud-client-fix-build.diff deleted file mode 100644 index 40e6f361f..000000000 --- a/libre/nextcloud-client/nextcloud-client-fix-build.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/test/testnextcloudpropagator.cpp b/test/testnextcloudpropagator.cpp -index 6ad1a6b37..dc2e476ad 100644 ---- a/test/testnextcloudpropagator.cpp -+++ b/test/testnextcloudpropagator.cpp -@@ -8,7 +8,7 @@ - #include <QDebug> - - #include "propagatedownload.h" --#include "nextcloudpropagator_p.h" -+#include "owncloudpropagator_p.h" - - using namespace OCC; - namespace OCC { diff --git a/libre/nextcloud-client/remove-qtwebengine.patch b/libre/nextcloud-client/remove-qtwebengine.patch index a480f4ad4..a0911d475 100644 --- a/libre/nextcloud-client/remove-qtwebengine.patch +++ b/libre/nextcloud-client/remove-qtwebengine.patch @@ -1,41 +1,67 @@ +From f3b783512dc6d54d80c7ce57bb7c6ce9efd6651b Mon Sep 17 00:00:00 2001 +From: Max Rees <[email protected]> +Date: Sun, 23 Feb 2020 23:09:29 -0600 +Subject: [PATCH] Add support for compiling without QtWebEngine (webflow / + flow2 support) + +Signed-off-by: Max Rees <[email protected]> +Signed-off-by: theova <[email protected]> +--- + CMakeLists.txt | 7 +++++++ + src/CMakeLists.txt | 6 +++++- + src/gui/CMakeLists.txt | 24 ++++++++++++++------- + src/gui/accountmanager.cpp | 2 ++ + src/gui/creds/credentialsfactory.cpp | 4 ++++ + src/gui/wizard/owncloudsetuppage.cpp | 4 ++++ + src/gui/wizard/owncloudwizard.cpp | 31 +++++++++++++++++++++++++++- + src/gui/wizard/owncloudwizard.h | 6 ++++++ + src/libsync/networkjobs.cpp | 8 +++++++ + 9 files changed, 82 insertions(+), 10 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5df238838..4a333dbdd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -176,6 +176,13 @@ if(NO_SHIBBOLETH) + add_definitions(-DNO_SHIBBOLETH=1) + endif() + ++# Disable webengine-based components ++option(NO_WEBENGINE "Build without webflow / flow2 support so QtWebEngine isn't required" OFF) ++if(NO_WEBENGINE) ++ message("Compiling without webengine") ++ add_definitions(-DNO_WEBENGINE=1) ++endif() ++ + if(APPLE) + set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" ) + endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 9f854b006..6f3546353 100644 +index a79edfcfb..c8ef114a4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -4,7 +4,7 @@ endif() - +@@ -4,7 +4,11 @@ endif() + set(synclib_NAME ${APPLICATION_EXECUTABLE}sync) - --find_package(Qt5 5.6 COMPONENTS Core Network Xml Concurrent WebEngineWidgets WebEngine REQUIRED) -+find_package(Qt5 5.6 COMPONENTS Core Network Xml Concurrent REQUIRED) - if (Qt5Core_VERSION VERSION_LESS 5.9.0) - message(STATUS "For HTTP/2 support, compile with Qt 5.9 or higher.") - endif() + +-find_package(Qt5 5.12 COMPONENTS Core Network Xml Concurrent WebEngineWidgets WebEngine REQUIRED) ++find_package(Qt5 5.12 COMPONENTS Core Network Xml Concurrent REQUIRED) ++ ++if(NOT NO_WEBENGINE) ++ find_package(Qt5 5.12 COMPONENTS WebEngineWidgets WebEngine REQUIRED) ++endif() + + if(NOT TOKEN_AUTH_ONLY) + find_package(Qt5Keychain REQUIRED) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt -index 285057992..8e61531bd 100644 +index 2f1e99e2b..c5be00c37 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt -@@ -35,14 +35,12 @@ set(client_UI_SRCS - addcertificatedialog.ui - proxyauthdialog.ui - mnemonicdialog.ui -- wizard/flow2authwidget.ui - wizard/owncloudadvancedsetuppage.ui - wizard/owncloudconnectionmethoddialog.ui - wizard/owncloudhttpcredspage.ui - wizard/owncloudoauthcredspage.ui - wizard/owncloudsetupnocredspage.ui - wizard/owncloudwizardresultpage.ui -- wizard/webview.ui - ) - - set(client_SRCS -@@ -108,24 +106,17 @@ set(client_SRCS +@@ -111,23 +111,16 @@ set(client_SRCS creds/credentialsfactory.cpp creds/httpcredentialsgui.cpp creds/oauth.cpp - creds/flow2auth.cpp - creds/keychainchunk.cpp - creds/webflowcredentials.cpp - creds/webflowcredentialsdialog.cpp wizard/postfixlineedit.cpp @@ -54,304 +80,286 @@ index 285057992..8e61531bd 100644 - wizard/webview.cpp wizard/slideshow.cpp ) - -@@ -298,7 +289,7 @@ else() + +@@ -148,6 +141,18 @@ IF(BUILD_UPDATER) + ) endif() - - add_library(updater STATIC ${updater_SRCS}) --target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml Qt5::WebEngineWidgets) -+target_link_libraries(updater ${synclib_NAME} Qt5::Widgets Qt5::Network Qt5::Xml) - target_include_directories(updater PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - + ++IF(NOT NO_WEBENGINE) ++ list(APPEND client_SRCS ++ creds/flow2auth.cpp ++ creds/webflowcredentials.cpp ++ creds/webflowcredentialsdialog.cpp ++ wizard/flow2authcredspage.cpp ++ wizard/flow2authwidget.cpp ++ wizard/webviewpage.cpp ++ wizard/webview.cpp ++ ) ++endif() ++ + IF( APPLE ) + list(APPEND client_SRCS cocoainitializer_mac.mm) + list(APPEND client_SRCS socketapisocket_mac.mm) +@@ -314,8 +319,11 @@ set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES set_target_properties( ${APPLICATION_EXECUTABLE} PROPERTIES + INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/${APPLICATION_EXECUTABLE};${CMAKE_INSTALL_RPATH}" ) + +-target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::Widgets Qt5::Svg Qt5::Network Qt5::Xml Qt5::Qml Qt5::Quick Qt5::QuickControls2 Qt5::WebEngineWidgets) ++target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::Widgets Qt5::Svg Qt5::Network Qt5::Xml Qt5::Qml Qt5::Quick Qt5::QuickControls2) + target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} ) ++IF(NOT NO_WEBENGINE) ++ target_link_libraries( ${APPLICATION_EXECUTABLE} Qt5::WebEngineWidgets ) ++endif() + IF(BUILD_UPDATER) + target_link_libraries( ${APPLICATION_EXECUTABLE} updater ) + endif() diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp -index eec375180..c8ae72bda 100644 +index 34c4cbc3e..372c52f44 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp -@@ -253,20 +253,6 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings) +@@ -253,6 +253,7 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings) acc->setUrl(urlConfig.toUrl()); } - -- // Migrate to webflow -- if (authType == QLatin1String("http")) { -- authType = "webflow"; -- settings.setValue(QLatin1String(authTypeC), authType); -- -- foreach(QString key, settings.childKeys()) { -- if (!key.startsWith("http_")) -- continue; -- auto newkey = QString::fromLatin1("webflow_").append(key.mid(5)); -- settings.setValue(newkey, settings.value((key))); -- settings.remove(key); -- } -- } -- + ++#ifndef NO_WEBENGINE + // Migrate to webflow + if (authType == QLatin1String("http")) { + authType = "webflow"; +@@ -266,6 +267,7 @@ AccountPtr AccountManager::loadAccountHelper(QSettings &settings) + settings.remove(key); + } + } ++#endif + qCInfo(lcAccountManager) << "Account for" << acc->url() << "using auth type" << authType; - - acc->_serverVersion = settings.value(QLatin1String(serverVersionC)).toString(); + diff --git a/src/gui/creds/credentialsfactory.cpp b/src/gui/creds/credentialsfactory.cpp -index 6062f70eb..52e003b57 100644 +index 6062f70eb..723196d08 100644 --- a/src/gui/creds/credentialsfactory.cpp +++ b/src/gui/creds/credentialsfactory.cpp -@@ -21,7 +21,6 @@ +@@ -21,7 +21,9 @@ #ifndef NO_SHIBBOLETH #include "creds/shibbolethcredentials.h" #endif --#include "creds/webflowcredentials.h" - ++#ifndef NO_WEBENGINE + #include "creds/webflowcredentials.h" ++#endif + namespace OCC { - -@@ -40,8 +39,6 @@ namespace CredentialsFactory { + +@@ -40,8 +42,10 @@ namespace CredentialsFactory { } else if (type == "shibboleth") { return new ShibbolethCredentials; #endif -- } else if (type == "webflow") { -- return new WebFlowCredentials; ++#ifndef NO_WEBENGINE + } else if (type == "webflow") { + return new WebFlowCredentials; ++#endif } else { qCWarning(lcGuiCredentials, "Unknown credentials type: %s", qPrintable(type)); return new DummyCredentials; -diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp -index 875dacf55..65dea6619 100644 ---- a/src/gui/owncloudsetupwizard.cpp -+++ b/src/gui/owncloudsetupwizard.cpp -@@ -409,7 +409,7 @@ void OwncloudSetupWizard::slotAuthError() - - // bring wizard to top - _ocWizard->bringToTop(); -- if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds || _ocWizard->currentId() == WizardCommon::Page_Flow2AuthCreds) { -+ if (_ocWizard->currentId() == WizardCommon::Page_ShibbolethCreds || _ocWizard->currentId() == WizardCommon::Page_OAuthCreds) { - _ocWizard->back(); - } - _ocWizard->displayError(errorMsg, _ocWizard->currentId() == WizardCommon::Page_ServerSetup && checkDowngradeAdvised(reply)); diff --git a/src/gui/wizard/owncloudsetuppage.cpp b/src/gui/wizard/owncloudsetuppage.cpp -index 9a6ced74b..101b5dae5 100644 +index 71f1c19c9..d997125a8 100644 --- a/src/gui/wizard/owncloudsetuppage.cpp +++ b/src/gui/wizard/owncloudsetuppage.cpp -@@ -144,7 +144,7 @@ void OwncloudSetupPage::slotLogin() +@@ -139,7 +139,11 @@ void OwncloudSetupPage::slotLogin() void OwncloudSetupPage::slotGotoProviderList() { _ocWizard->setRegistration(true); -- _ocWizard->setAuthType(DetermineAuthTypeJob::AuthType::WebViewFlow); -+ _ocWizard->setAuthType(DetermineAuthTypeJob::AuthType::OAuth); ++#ifndef NO_WEBENGINE + _ocWizard->setAuthType(DetermineAuthTypeJob::AuthType::WebViewFlow); ++#else ++ _ocWizard->setAuthType(DetermineAuthTypeJob::AuthType::Basic); ++#endif _authTypeKnown = true; _checking = false; emit completeChanged(); -@@ -259,12 +259,8 @@ int OwncloudSetupPage::nextId() const - return WizardCommon::Page_HttpCreds; - case DetermineAuthTypeJob::OAuth: - return WizardCommon::Page_OAuthCreds; -- case DetermineAuthTypeJob::LoginFlowV2: -- return WizardCommon::Page_Flow2AuthCreds; - case DetermineAuthTypeJob::Shibboleth: - return WizardCommon::Page_ShibbolethCreds; -- case DetermineAuthTypeJob::WebViewFlow: -- return WizardCommon::Page_WebView; - } - return WizardCommon::Page_HttpCreds; - } diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp -index 2076136ff..5f3480340 100644 +index aa7f0aaa4..0e7c71bda 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp -@@ -27,8 +27,6 @@ +@@ -27,8 +27,10 @@ #endif #include "wizard/owncloudadvancedsetuppage.h" #include "wizard/owncloudwizardresultpage.h" --#include "wizard/webviewpage.h" --#include "wizard/flow2authcredspage.h" - ++#ifndef NO_WEBENGINE + #include "wizard/webviewpage.h" + #include "wizard/flow2authcredspage.h" ++#endif + #include "QProgressIndicator.h" - -@@ -47,14 +45,12 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) - , _setupPage(new OwncloudSetupPage(this)) - , _httpCredsPage(new OwncloudHttpCredsPage(this)) - , _browserCredsPage(new OwncloudOAuthCredsPage) -- , _flow2CredsPage(new Flow2AuthCredsPage) + +@@ -50,22 +52,30 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) #ifndef NO_SHIBBOLETH , _shibbolethCredsPage(new OwncloudShibbolethCredsPage) #endif ++#ifndef NO_WEBENGINE + , _flow2CredsPage(new Flow2AuthCredsPage) ++#endif , _advancedSetupPage(new OwncloudAdvancedSetupPage) , _resultPage(new OwncloudWizardResultPage) - , _credentialsPage(nullptr) -- , _webViewPage(new WebViewPage(this)) - , _setupLog() - , _registration(false) ++#ifndef NO_WEBENGINE + , _webViewPage(new WebViewPage(this)) ++#endif { -@@ -62,13 +58,11 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setPage(WizardCommon::Page_ServerSetup, _setupPage); setPage(WizardCommon::Page_HttpCreds, _httpCredsPage); setPage(WizardCommon::Page_OAuthCreds, _browserCredsPage); -- setPage(WizardCommon::Page_Flow2AuthCreds, _flow2CredsPage); ++#ifndef NO_WEBENGINE + setPage(WizardCommon::Page_Flow2AuthCreds, _flow2CredsPage); ++#endif #ifndef NO_SHIBBOLETH setPage(WizardCommon::Page_ShibbolethCreds, _shibbolethCredsPage); #endif setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage); setPage(WizardCommon::Page_Result, _resultPage); -- setPage(WizardCommon::Page_WebView, _webViewPage); - ++#ifndef NO_WEBENGINE + setPage(WizardCommon::Page_WebView, _webViewPage); ++#endif + connect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished); - -@@ -80,11 +74,9 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) + +@@ -77,11 +87,15 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) connect(_setupPage, &OwncloudSetupPage::determineAuthType, this, &OwncloudWizard::determineAuthType); connect(_httpCredsPage, &OwncloudHttpCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); connect(_browserCredsPage, &OwncloudOAuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); -- connect(_flow2CredsPage, &Flow2AuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); ++#ifndef NO_WEBENGINE + connect(_flow2CredsPage, &Flow2AuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); ++#endif #ifndef NO_SHIBBOLETH connect(_shibbolethCredsPage, &OwncloudShibbolethCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); #endif -- connect(_webViewPage, &WebViewPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); ++#ifndef NO_WEBENGINE + connect(_webViewPage, &WebViewPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl); ++#endif connect(_advancedSetupPage, &OwncloudAdvancedSetupPage::createLocalAndRemoteFolders, this, &OwncloudWizard::createLocalAndRemoteFolders); connect(this, &QWizard::customButtonClicked, this, &OwncloudWizard::skipFolderConfiguration); -@@ -103,15 +95,6 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) - setButtonText(QWizard::CustomButton1, tr("Skip folders configuration")); - - -- // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) -- connect(this, &OwncloudWizard::styleChanged, _setupPage, &OwncloudSetupPage::slotStyleChanged); -- connect(this, &OwncloudWizard::styleChanged, _advancedSetupPage, &OwncloudAdvancedSetupPage::slotStyleChanged); -- connect(this, &OwncloudWizard::styleChanged, _flow2CredsPage, &Flow2AuthCredsPage::slotStyleChanged); -- -- customizeStyle(); -- -- // allow Flow2 page to poll on window activation -- connect(this, &OwncloudWizard::onActivate, _flow2CredsPage, &Flow2AuthCredsPage::slotPollNow); +@@ -103,12 +117,16 @@ OwncloudWizard::OwncloudWizard(QWidget *parent) + // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) + connect(this, &OwncloudWizard::styleChanged, _setupPage, &OwncloudSetupPage::slotStyleChanged); + connect(this, &OwncloudWizard::styleChanged, _advancedSetupPage, &OwncloudAdvancedSetupPage::slotStyleChanged); ++#ifndef NO_WEBENGINE + connect(this, &OwncloudWizard::styleChanged, _flow2CredsPage, &Flow2AuthCredsPage::slotStyleChanged); ++#endif + + customizeStyle(); + ++#ifndef NO_WEBENGINE + // allow Flow2 page to poll on window activation + connect(this, &OwncloudWizard::onActivate, _flow2CredsPage, &Flow2AuthCredsPage::slotPollNow); ++#endif } - + void OwncloudWizard::setAccount(AccountPtr account) -@@ -180,20 +163,12 @@ void OwncloudWizard::successfulStep() +@@ -177,9 +195,11 @@ void OwncloudWizard::successfulStep() _browserCredsPage->setConnected(); break; - -- case WizardCommon::Page_Flow2AuthCreds: -- _flow2CredsPage->setConnected(); -- break; -- + ++#ifndef NO_WEBENGINE + case WizardCommon::Page_Flow2AuthCreds: + _flow2CredsPage->setConnected(); + break; ++#endif + #ifndef NO_SHIBBOLETH case WizardCommon::Page_ShibbolethCreds: - _shibbolethCredsPage->setConnected(); +@@ -187,9 +207,11 @@ void OwncloudWizard::successfulStep() break; #endif - -- case WizardCommon::Page_WebView: -- _webViewPage->setConnected(); -- break; -- + ++#ifndef NO_WEBENGINE + case WizardCommon::Page_WebView: + _webViewPage->setConnected(); + break; ++#endif + case WizardCommon::Page_AdvancedSetup: _advancedSetupPage->directoriesCreated(); - break; -@@ -217,10 +192,6 @@ void OwncloudWizard::setAuthType(DetermineAuthTypeJob::AuthType type) +@@ -214,10 +236,12 @@ void OwncloudWizard::setAuthType(DetermineAuthTypeJob::AuthType type) #endif if (type == DetermineAuthTypeJob::OAuth) { _credentialsPage = _browserCredsPage; -- } else if (type == DetermineAuthTypeJob::LoginFlowV2) { -- _credentialsPage = _flow2CredsPage; -- } else if (type == DetermineAuthTypeJob::WebViewFlow) { -- _credentialsPage = _webViewPage; ++#ifndef NO_WEBENGINE + } else if (type == DetermineAuthTypeJob::LoginFlowV2) { + _credentialsPage = _flow2CredsPage; + } else if (type == DetermineAuthTypeJob::WebViewFlow) { + _credentialsPage = _webViewPage; ++#endif } else { // try Basic auth even for "Unknown" _credentialsPage = _httpCredsPage; } -@@ -245,7 +216,7 @@ void OwncloudWizard::slotCurrentPageChanged(int id) +@@ -242,7 +266,12 @@ void OwncloudWizard::slotCurrentPageChanged(int id) } - + setOption(QWizard::HaveCustomButton1, id == WizardCommon::Page_AdvancedSetup); - if (id == WizardCommon::Page_AdvancedSetup && (_credentialsPage == _browserCredsPage || _credentialsPage == _flow2CredsPage)) { -+ if (id == WizardCommon::Page_AdvancedSetup) { ++ if (id == WizardCommon::Page_AdvancedSetup ++ && (_credentialsPage == _browserCredsPage ++#ifndef NO_WEBENGINE ++ || _credentialsPage == _flow2CredsPage ++#endif ++ )) { // For OAuth, disable the back button in the Page_AdvancedSetup because we don't want // to re-open the browser. button(QWizard::BackButton)->setEnabled(false); diff --git a/src/gui/wizard/owncloudwizard.h b/src/gui/wizard/owncloudwizard.h -index 3cbf89f71..2eecbf95a 100644 +index ee6161ca5..c0ee06403 100644 --- a/src/gui/wizard/owncloudwizard.h +++ b/src/gui/wizard/owncloudwizard.h -@@ -39,8 +39,6 @@ class OwncloudAdvancedSetupPage; +@@ -39,8 +39,10 @@ class OwncloudAdvancedSetupPage; class OwncloudWizardResultPage; class AbstractCredentials; class AbstractCredentialsWizardPage; --class WebViewPage; --class Flow2AuthCredsPage; - ++#ifndef NO_WEBENGINE + class WebViewPage; + class Flow2AuthCredsPage; ++#endif + /** * @brief The OwncloudWizard class -@@ -114,11 +112,9 @@ private: +@@ -114,11 +116,15 @@ private: #ifndef NO_SHIBBOLETH OwncloudShibbolethCredsPage *_shibbolethCredsPage; #endif -- Flow2AuthCredsPage *_flow2CredsPage; ++#ifndef NO_WEBENGINE + Flow2AuthCredsPage *_flow2CredsPage; ++#endif OwncloudAdvancedSetupPage *_advancedSetupPage; OwncloudWizardResultPage *_resultPage; - AbstractCredentialsWizardPage *_credentialsPage; -- WebViewPage *_webViewPage; - + AbstractCredentialsWizardPage *_credentialsPage = nullptr; ++#ifndef NO_WEBENGINE + WebViewPage *_webViewPage; ++#endif + QStringList _setupLog; - -diff --git a/src/gui/wizard/owncloudwizardcommon.h b/src/gui/wizard/owncloudwizardcommon.h -index d1f7c08be..c55ed04fd 100644 ---- a/src/gui/wizard/owncloudwizardcommon.h -+++ b/src/gui/wizard/owncloudwizardcommon.h -@@ -38,8 +38,6 @@ namespace WizardCommon { - Page_HttpCreds, - Page_ShibbolethCreds, - Page_OAuthCreds, -- Page_Flow2AuthCreds, -- Page_WebView, - Page_AdvancedSetup, - Page_Result - }; + diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp -index 76789a8ce..06c94ea5b 100644 +index d40ccede4..0125f778b 100644 --- a/src/libsync/networkjobs.cpp +++ b/src/libsync/networkjobs.cpp -@@ -921,7 +921,7 @@ void DetermineAuthTypeJob::start() - }); - connect(oldFlowRequired, &JsonApiJob::jsonReceived, this, [this](const QJsonDocument &json, int statusCode) { - if (statusCode == 200) { -- _resultOldFlow = LoginFlowV2; -+ _resultOldFlow = Basic; - - auto data = json.object().value("ocs").toObject().value("data").toObject().value("capabilities").toObject(); - auto gs = data.value("globalscale"); -@@ -929,7 +929,7 @@ void DetermineAuthTypeJob::start() - auto flow = gs.toObject().value("desktoplogin"); - if (flow != QJsonValue::Undefined) { - if (flow.toInt() == 1) { -- _resultOldFlow = WebViewFlow; -+ _resultOldFlow = Basic; - } - } - } -@@ -955,17 +955,17 @@ void DetermineAuthTypeJob::checkAllDone() - +@@ -966,12 +966,20 @@ void DetermineAuthTypeJob::checkAllDone() + // WebViewFlow > OAuth > Shib > Basic if (_account->serverVersionInt() >= Account::makeServerVersion(12, 0, 0)) { -- result = WebViewFlow; ++#ifndef NO_WEBENGINE + result = WebViewFlow; ++#else + result = Basic; ++#endif } - + // LoginFlowV2 > WebViewFlow > OAuth > Shib > Basic if (_account->serverVersionInt() >= Account::makeServerVersion(16, 0, 0)) { -- result = LoginFlowV2; ++#ifndef NO_WEBENGINE + result = LoginFlowV2; ++#else + result = Basic; ++#endif } - + // If we determined that we need the webview flow (GS for example) then we switch to that -- if (_resultOldFlow == WebViewFlow) { -- result = WebViewFlow; -+ if (_resultOldFlow == Basic) { -+ result = Basic; - } - - qCInfo(lcDetermineAuthTypeJob) << "Auth type for" << _account->davUrl() << "is" << result; -diff --git a/src/libsync/networkjobs.h b/src/libsync/networkjobs.h -index 765204c88..088c517d7 100644 ---- a/src/libsync/networkjobs.h -+++ b/src/libsync/networkjobs.h -@@ -412,8 +412,6 @@ public: - Basic, // also the catch-all fallback for backwards compatibility reasons - OAuth, - Shibboleth, -- WebViewFlow, -- LoginFlowV2 - }; - - explicit DetermineAuthTypeJob(AccountPtr account, QObject *parent = nullptr); +-- +2.28.0 + -- 2.28.0
signature.asc
Description: PGP signature
_______________________________________________ Dev mailing list [email protected] https://lists.parabola.nu/mailman/listinfo/dev
