Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 800863
Collapse All | Expand All

(-)a/CMakeLists.txt (+4 lines)
Lines 18-23 else () Link Here
18
     include ( ${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake )
18
     include ( ${CMAKE_SOURCE_DIR}/NEXTCLOUD.cmake )
19
endif()
19
endif()
20
20
21
if(WITH_WEBENGINE)
22
  add_compile_definitions(WITH_WEBENGINE=1)
23
endif()
24
21
# Default suffix if the theme doesn't define one
25
# Default suffix if the theme doesn't define one
22
if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX)
26
if(NOT DEFINED APPLICATION_VIRTUALFILE_SUFFIX)
23
    set(APPLICATION_VIRTUALFILE_SUFFIX "${APPLICATION_SHORTNAME}_virtual" CACHE STRING "Virtual file suffix (not including the .)")
27
    set(APPLICATION_VIRTUALFILE_SUFFIX "${APPLICATION_SHORTNAME}_virtual" CACHE STRING "Virtual file suffix (not including the .)")
(-)a/NEXTCLOUD.cmake (+2 lines)
Lines 27-32 option( WITH_CRASHREPORTER "Build crashreporter" OFF ) Link Here
27
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE STRING "URL for crash reporter" )
27
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE STRING "URL for crash reporter" )
28
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
28
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )
29
29
30
option(WITH_WEBENGINE "Enable use of QWebEngine" ON)
31
30
## Updater options
32
## Updater options
31
option( BUILD_UPDATER "Build updater" OFF )
33
option( BUILD_UPDATER "Build updater" OFF )
32
34
(-)a/src/CMakeLists.txt (-1 / +5 lines)
Lines 4-10 endif() Link Here
4
4
5
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
5
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
6
6
7
find_package(Qt5 5.12 COMPONENTS Core Network Xml Concurrent WebEngineWidgets WebEngine REQUIRED)
7
find_package(Qt5 5.12 COMPONENTS Core Network Xml Concurrent REQUIRED)
8
if(WITH_WEBENGINE)
9
  find_package(Qt5 5.12 COMPONENTS WebEngineWidgets WebEngine REQUIRED)
10
endif()
11
8
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
12
get_target_property (QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
9
message(STATUS "Using Qt ${Qt5Core_VERSION} (${QT_QMAKE_EXECUTABLE})")
13
message(STATUS "Using Qt ${Qt5Core_VERSION} (${QT_QMAKE_EXECUTABLE})")
10
14
(-)a/src/gui/CMakeLists.txt (-3 / +11 lines)
Lines 133-145 set(client_SRCS Link Here
133
    wizard/owncloudwizardcommon.cpp
133
    wizard/owncloudwizardcommon.cpp
134
    wizard/owncloudwizard.cpp
134
    wizard/owncloudwizard.cpp
135
    wizard/owncloudwizardresultpage.cpp
135
    wizard/owncloudwizardresultpage.cpp
136
    wizard/webviewpage.cpp
137
    wizard/webview.cpp
138
    wizard/slideshow.cpp
136
    wizard/slideshow.cpp
139
    wizard/welcomepage.cpp
137
    wizard/welcomepage.cpp
140
    wizard/linklabel.cpp
138
    wizard/linklabel.cpp
141
)
139
)
142
140
141
if (WITH_WEBENGINE)
142
  list(APPEND client_SRCS
143
    wizard/webviewpage.cpp
144
    wizard/webview.cpp
145
  )
146
endif()
147
143
IF(BUILD_UPDATER)
148
IF(BUILD_UPDATER)
144
    set(updater_SRCS
149
    set(updater_SRCS
145
        updater/ocupdater.cpp
150
        updater/ocupdater.cpp
Lines 275-284 target_link_libraries(nextcloudCore Link Here
275
  Qt5::Qml
280
  Qt5::Qml
276
  Qt5::Quick
281
  Qt5::Quick
277
  Qt5::QuickControls2
282
  Qt5::QuickControls2
278
  Qt5::WebEngineWidgets
279
  ${synclib_NAME}
283
  ${synclib_NAME}
280
)
284
)
281
285
286
if(WITH_WEBENGINE)
287
  target_link_libraries(nextcloudCore PUBLIC Qt5::WebEngineWidgets)
288
endif()
289
282
set_target_properties(nextcloudCore
290
set_target_properties(nextcloudCore
283
  PROPERTIES
291
  PROPERTIES
284
  AUTOUIC ON
292
  AUTOUIC ON
(-)a/src/gui/creds/webflowcredentials.cpp (-1 / +7 lines)
Lines 16-22 Link Here
16
#include "account.h"
16
#include "account.h"
17
#include "configfile.h"
17
#include "configfile.h"
18
#include "theme.h"
18
#include "theme.h"
19
#ifdef WITH_WEBENGINE
19
#include "wizard/webview.h"
20
#include "wizard/webview.h"
21
#endif // WITH_WEBENGINE
20
#include "webflowcredentialsdialog.h"
22
#include "webflowcredentialsdialog.h"
21
23
22
using namespace QKeychain;
24
using namespace QKeychain;
Lines 144-151 void WebFlowCredentials::askFromUser() { Link Here
144
    // Do a DetermineAuthTypeJob to make sure that the server is still using Flow2
146
    // Do a DetermineAuthTypeJob to make sure that the server is still using Flow2
145
    auto job = new DetermineAuthTypeJob(_account->sharedFromThis(), this);
147
    auto job = new DetermineAuthTypeJob(_account->sharedFromThis(), this);
146
    connect(job, &DetermineAuthTypeJob::authType, [this](DetermineAuthTypeJob::AuthType type) {
148
    connect(job, &DetermineAuthTypeJob::authType, [this](DetermineAuthTypeJob::AuthType type) {
147
        // LoginFlowV2 > WebViewFlow > OAuth > Shib > Basic
149
    // LoginFlowV2 > WebViewFlow > OAuth > Shib > Basic
150
#ifdef WITH_WEBENGINE
148
        bool useFlow2 = (type != DetermineAuthTypeJob::WebViewFlow);
151
        bool useFlow2 = (type != DetermineAuthTypeJob::WebViewFlow);
152
#else // WITH_WEBENGINE
153
        bool useFlow2 = true;
154
#endif // WITH_WEBENGINE
149
155
150
        _askDialog = new WebFlowCredentialsDialog(_account, useFlow2);
156
        _askDialog = new WebFlowCredentialsDialog(_account, useFlow2);
151
157
(-)a/src/gui/creds/webflowcredentialsdialog.cpp (-4 / +16 lines)
Lines 8-23 Link Here
8
#include "owncloudgui.h"
8
#include "owncloudgui.h"
9
#include "headerbanner.h"
9
#include "headerbanner.h"
10
#include "wizard/owncloudwizardcommon.h"
10
#include "wizard/owncloudwizardcommon.h"
11
#ifdef WITH_WEBENGINE
11
#include "wizard/webview.h"
12
#include "wizard/webview.h"
13
#endif // WITH_WEBENGINE
12
#include "wizard/flow2authwidget.h"
14
#include "wizard/flow2authwidget.h"
13
15
14
namespace OCC {
16
namespace OCC {
15
17
16
WebFlowCredentialsDialog::WebFlowCredentialsDialog(Account *account, bool useFlow2, QWidget *parent)
18
WebFlowCredentialsDialog::WebFlowCredentialsDialog(Account *account, bool useFlow2, QWidget *parent)
17
    : QDialog(parent),
19
    : QDialog(parent)
18
      _useFlow2(useFlow2),
20
    , _useFlow2(useFlow2)
19
      _flow2AuthWidget(nullptr),
21
    , _flow2AuthWidget(nullptr)
20
      _webView(nullptr)
22
#ifdef WITH_WEBENGINE
23
    , _webView(nullptr)
24
#endif // WITH_WEBENGINE
21
{
25
{
22
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
26
    setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
23
27
Lines 49-58 WebFlowCredentialsDialog::WebFlowCredentialsDialog(Account *account, bool useFlo Link Here
49
53
50
        _flow2AuthWidget->startAuth(account);
54
        _flow2AuthWidget->startAuth(account);
51
    } else {
55
    } else {
56
#ifdef WITH_WEBENGINE
52
        _webView = new WebView();
57
        _webView = new WebView();
53
        _containerLayout->addWidget(_webView);
58
        _containerLayout->addWidget(_webView);
54
59
55
        connect(_webView, &WebView::urlCatched, this, &WebFlowCredentialsDialog::urlCatched);
60
        connect(_webView, &WebView::urlCatched, this, &WebFlowCredentialsDialog::urlCatched);
61
#endif // WITH_WEBENGINE
56
    }
62
    }
57
63
58
    auto app = static_cast<Application *>(qApp);
64
    auto app = static_cast<Application *>(qApp);
Lines 73-84 WebFlowCredentialsDialog::WebFlowCredentialsDialog(Account *account, bool useFlo Link Here
73
void WebFlowCredentialsDialog::closeEvent(QCloseEvent* e) {
79
void WebFlowCredentialsDialog::closeEvent(QCloseEvent* e) {
74
    Q_UNUSED(e)
80
    Q_UNUSED(e)
75
81
82
#ifdef WITH_WEBENGINE
76
    if (_webView) {
83
    if (_webView) {
77
        // Force calling WebView::~WebView() earlier so that _profile and _page are
84
        // Force calling WebView::~WebView() earlier so that _profile and _page are
78
        // deleted in the correct order.
85
        // deleted in the correct order.
79
        _webView->deleteLater();
86
        _webView->deleteLater();
80
        _webView = nullptr;
87
        _webView = nullptr;
81
    }
88
    }
89
#endif // WITH_WEBENGINE
82
90
83
    if (_flow2AuthWidget) {
91
    if (_flow2AuthWidget) {
84
        _flow2AuthWidget->resetAuth();
92
        _flow2AuthWidget->resetAuth();
Lines 90-97 void WebFlowCredentialsDialog::closeEvent(QCloseEvent* e) { Link Here
90
}
98
}
91
99
92
void WebFlowCredentialsDialog::setUrl(const QUrl &url) {
100
void WebFlowCredentialsDialog::setUrl(const QUrl &url) {
101
#ifdef WITH_WEBENGINE
93
    if (_webView)
102
    if (_webView)
94
        _webView->setUrl(url);
103
        _webView->setUrl(url);
104
#else // WITH_WEBENGINE
105
    Q_UNUSED(url);
106
#endif // WITH_WEBENGINE
95
}
107
}
96
108
97
void WebFlowCredentialsDialog::setInfo(const QString &msg) {
109
void WebFlowCredentialsDialog::setInfo(const QString &msg) {
(-)a/src/gui/creds/webflowcredentialsdialog.h (+4 lines)
Lines 13-19 class QVBoxLayout; Link Here
13
namespace OCC {
13
namespace OCC {
14
14
15
class HeaderBanner;
15
class HeaderBanner;
16
#ifdef WITH_WEBENGINE
16
class WebView;
17
class WebView;
18
#endif // WITH_WEBENGINE
17
class Flow2AuthWidget;
19
class Flow2AuthWidget;
18
20
19
class WebFlowCredentialsDialog : public QDialog
21
class WebFlowCredentialsDialog : public QDialog
Lines 50-56 private: Link Here
50
    bool _useFlow2;
52
    bool _useFlow2;
51
53
52
    Flow2AuthWidget *_flow2AuthWidget;
54
    Flow2AuthWidget *_flow2AuthWidget;
55
#ifdef WITH_WEBENGINE
53
    WebView *_webView;
56
    WebView *_webView;
57
#endif // WITH_WEBENGINE
54
58
55
    QLabel *_errorLabel;
59
    QLabel *_errorLabel;
56
    QLabel *_infoLabel;
60
    QLabel *_infoLabel;
(-)a/src/gui/wizard/owncloudsetuppage.cpp (-15 / +2 lines)
Lines 119-139 void OwncloudSetupPage::setupCustomization() Link Here
119
    _ui.leUrl->setPalette(leUrlPalette);
119
    _ui.leUrl->setPalette(leUrlPalette);
120
}
120
}
121
121
122
#ifdef WITH_PROVIDERS
123
void OwncloudSetupPage::slotLogin()
124
{
125
    _ocWizard->setRegistration(false);
126
}
127
void OwncloudSetupPage::slotGotoProviderList()
128
{
129
    _ocWizard->setRegistration(true);
130
    _ocWizard->setAuthType(DetermineAuthTypeJob::AuthType::WebViewFlow);
131
    _authTypeKnown = true;
132
    _checking = false;
133
    emit completeChanged();
134
}
135
#endif
136
137
// slot hit from textChanged of the url entry field.
122
// slot hit from textChanged of the url entry field.
138
void OwncloudSetupPage::slotUrlChanged(const QString &url)
123
void OwncloudSetupPage::slotUrlChanged(const QString &url)
139
{
124
{
Lines 228-235 int OwncloudSetupPage::nextId() const Link Here
228
        return WizardCommon::Page_OAuthCreds;
213
        return WizardCommon::Page_OAuthCreds;
229
    case DetermineAuthTypeJob::LoginFlowV2:
214
    case DetermineAuthTypeJob::LoginFlowV2:
230
        return WizardCommon::Page_Flow2AuthCreds;
215
        return WizardCommon::Page_Flow2AuthCreds;
216
#ifdef WITH_WEBENGINE
231
    case DetermineAuthTypeJob::WebViewFlow:
217
    case DetermineAuthTypeJob::WebViewFlow:
232
        return WizardCommon::Page_WebView;
218
        return WizardCommon::Page_WebView;
219
#endif // WITH_WEBENGINE
233
    }
220
    }
234
    return WizardCommon::Page_HttpCreds;
221
    return WizardCommon::Page_HttpCreds;
235
}
222
}
(-)a/src/gui/wizard/owncloudsetuppage.h (-5 lines)
Lines 67-77 public slots: Link Here
67
protected slots:
67
protected slots:
68
    void slotUrlChanged(const QString &);
68
    void slotUrlChanged(const QString &);
69
    void slotUrlEditFinished();
69
    void slotUrlEditFinished();
70
#ifdef WITH_PROVIDERS
71
    void slotLogin();
72
    void slotGotoProviderList();
73
#endif
74
75
    void setupCustomization();
70
    void setupCustomization();
76
71
77
signals:
72
signals:
(-)a/src/gui/wizard/owncloudwizard.cpp (-1 / +17 lines)
Lines 54-60 OwncloudWizard::OwncloudWizard(QWidget *parent) Link Here
54
    , _flow2CredsPage(new Flow2AuthCredsPage)
54
    , _flow2CredsPage(new Flow2AuthCredsPage)
55
    , _advancedSetupPage(new OwncloudAdvancedSetupPage(this))
55
    , _advancedSetupPage(new OwncloudAdvancedSetupPage(this))
56
    , _resultPage(new OwncloudWizardResultPage)
56
    , _resultPage(new OwncloudWizardResultPage)
57
#ifdef WITH_WEBENGINE
57
    , _webViewPage(new WebViewPage(this))
58
    , _webViewPage(new WebViewPage(this))
59
#else // WITH_WEBENGINE
60
    , _webViewPage(nullptr)
61
#endif // WITH_WEBENGINE
58
{
62
{
59
    setObjectName("owncloudWizard");
63
    setObjectName("owncloudWizard");
60
64
Lines 66-72 OwncloudWizard::OwncloudWizard(QWidget *parent) Link Here
66
    setPage(WizardCommon::Page_Flow2AuthCreds, _flow2CredsPage);
70
    setPage(WizardCommon::Page_Flow2AuthCreds, _flow2CredsPage);
67
    setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage);
71
    setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage);
68
    setPage(WizardCommon::Page_Result, _resultPage);
72
    setPage(WizardCommon::Page_Result, _resultPage);
73
#ifdef WITH_WEBENGINE
69
    setPage(WizardCommon::Page_WebView, _webViewPage);
74
    setPage(WizardCommon::Page_WebView, _webViewPage);
75
#endif // WITH_WEBENGINE
70
76
71
    connect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished);
77
    connect(this, &QDialog::finished, this, &OwncloudWizard::basicSetupFinished);
72
78
Lines 78-84 OwncloudWizard::OwncloudWizard(QWidget *parent) Link Here
78
    connect(_httpCredsPage, &OwncloudHttpCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
84
    connect(_httpCredsPage, &OwncloudHttpCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
79
    connect(_browserCredsPage, &OwncloudOAuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
85
    connect(_browserCredsPage, &OwncloudOAuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
80
    connect(_flow2CredsPage, &Flow2AuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
86
    connect(_flow2CredsPage, &Flow2AuthCredsPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
87
#ifdef WITH_WEBENGINE
81
    connect(_webViewPage, &WebViewPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
88
    connect(_webViewPage, &WebViewPage::connectToOCUrl, this, &OwncloudWizard::connectToOCUrl);
89
#endif // WITH_WEBENGINE
82
    connect(_advancedSetupPage, &OwncloudAdvancedSetupPage::createLocalAndRemoteFolders,
90
    connect(_advancedSetupPage, &OwncloudAdvancedSetupPage::createLocalAndRemoteFolders,
83
        this, &OwncloudWizard::createLocalAndRemoteFolders);
91
        this, &OwncloudWizard::createLocalAndRemoteFolders);
84
    connect(this, &QWizard::customButtonClicked, this, &OwncloudWizard::skipFolderConfiguration);
92
    connect(this, &QWizard::customButtonClicked, this, &OwncloudWizard::skipFolderConfiguration);
Lines 230-238 void OwncloudWizard::successfulStep() Link Here
230
        _flow2CredsPage->setConnected();
238
        _flow2CredsPage->setConnected();
231
        break;
239
        break;
232
240
241
#ifdef WITH_WEBENGINE
233
    case WizardCommon::Page_WebView:
242
    case WizardCommon::Page_WebView:
234
        _webViewPage->setConnected();
243
        _webViewPage->setConnected();
235
        break;
244
        break;
245
#endif // WITH_WEBENGINE
236
246
237
    case WizardCommon::Page_AdvancedSetup:
247
    case WizardCommon::Page_AdvancedSetup:
238
        _advancedSetupPage->directoriesCreated();
248
        _advancedSetupPage->directoriesCreated();
Lines 256-263 void OwncloudWizard::setAuthType(DetermineAuthTypeJob::AuthType type) Link Here
256
        _credentialsPage = _browserCredsPage;
266
        _credentialsPage = _browserCredsPage;
257
    } else if (type == DetermineAuthTypeJob::LoginFlowV2) {
267
    } else if (type == DetermineAuthTypeJob::LoginFlowV2) {
258
        _credentialsPage = _flow2CredsPage;
268
        _credentialsPage = _flow2CredsPage;
269
#ifdef WITH_WEBENGINE
259
    } else if (type == DetermineAuthTypeJob::WebViewFlow) {
270
    } else if (type == DetermineAuthTypeJob::WebViewFlow) {
260
        _credentialsPage = _webViewPage;
271
        _credentialsPage = _webViewPage;
272
#endif // WITH_WEBENGINE
261
    } else { // try Basic auth even for "Unknown"
273
    } else { // try Basic auth even for "Unknown"
262
        _credentialsPage = _httpCredsPage;
274
        _credentialsPage = _httpCredsPage;
263
    }
275
    }
Lines 281-287 void OwncloudWizard::slotCurrentPageChanged(int id) Link Here
281
        button(QWizard::NextButton)->setHidden(true);
293
        button(QWizard::NextButton)->setHidden(true);
282
        // Need to set it from here, otherwise it has no effect
294
        // Need to set it from here, otherwise it has no effect
283
        _welcomePage->setLoginButtonDefault();
295
        _welcomePage->setLoginButtonDefault();
284
    } else if (id == WizardCommon::Page_WebView || id == WizardCommon::Page_Flow2AuthCreds) {
296
    } else if (
297
#ifdef WITH_WEBENGINE
298
        id == WizardCommon::Page_WebView ||
299
#endif // WITH_WEBENGINE
300
        id == WizardCommon::Page_Flow2AuthCreds) {
285
        setButtonLayout({ QWizard::Stretch, QWizard::BackButton });
301
        setButtonLayout({ QWizard::Stretch, QWizard::BackButton });
286
    } else if (id == WizardCommon::Page_AdvancedSetup) {
302
    } else if (id == WizardCommon::Page_AdvancedSetup) {
287
        setButtonLayout({ QWizard::Stretch, QWizard::CustomButton1, QWizard::BackButton, QWizard::NextButton });
303
        setButtonLayout({ QWizard::Stretch, QWizard::CustomButton1, QWizard::BackButton, QWizard::NextButton });
(-)a/src/gui/wizard/owncloudwizard.h (-1 / +1 lines)
Lines 128-134 private: Link Here
128
    OwncloudAdvancedSetupPage *_advancedSetupPage;
128
    OwncloudAdvancedSetupPage *_advancedSetupPage;
129
    OwncloudWizardResultPage *_resultPage;
129
    OwncloudWizardResultPage *_resultPage;
130
    AbstractCredentialsWizardPage *_credentialsPage = nullptr;
130
    AbstractCredentialsWizardPage *_credentialsPage = nullptr;
131
    WebViewPage *_webViewPage;
131
    WebViewPage *_webViewPage = nullptr;
132
132
133
    QStringList _setupLog;
133
    QStringList _setupLog;
134
134
(-)a/src/gui/wizard/owncloudwizardcommon.h (+2 lines)
Lines 46-52 namespace WizardCommon { Link Here
46
        Page_HttpCreds,
46
        Page_HttpCreds,
47
        Page_OAuthCreds,
47
        Page_OAuthCreds,
48
        Page_Flow2AuthCreds,
48
        Page_Flow2AuthCreds,
49
#ifdef WITH_WEBENGINE
49
        Page_WebView,
50
        Page_WebView,
51
#endif // WITH_WEBENGINE
50
        Page_AdvancedSetup,
52
        Page_AdvancedSetup,
51
        Page_Result
53
        Page_Result
52
    };
54
    };
(-)a/src/gui/wizard/welcomepage.cpp (+8 lines)
Lines 13-18 Link Here
13
 */
13
 */
14
14
15
#include "welcomepage.h"
15
#include "welcomepage.h"
16
#include "guiutility.h"
16
#include "theme.h"
17
#include "theme.h"
17
#include "wizard/owncloudwizard.h"
18
#include "wizard/owncloudwizard.h"
18
#include "wizard/slideshow.h"
19
#include "wizard/slideshow.h"
Lines 94-104 void WelcomePage::setupLoginButton() Link Here
94
95
95
void WelcomePage::setupCreateAccountButton()
96
void WelcomePage::setupCreateAccountButton()
96
{
97
{
98
#ifdef WITH_WEBENGINE
97
    connect(_ui->createAccountButton, &QPushButton::clicked, this, [this](bool /*checked*/) {
99
    connect(_ui->createAccountButton, &QPushButton::clicked, this, [this](bool /*checked*/) {
98
        _ocWizard->setRegistration(true);
100
        _ocWizard->setRegistration(true);
99
        _nextPage = WizardCommon::Page_WebView;
101
        _nextPage = WizardCommon::Page_WebView;
100
        _ocWizard->next();
102
        _ocWizard->next();
101
    });
103
    });
104
#else // WITH_WEBENGINE
105
    connect(_ui->createAccountButton, &QPushButton::clicked, this, [this](bool /*checked*/) {
106
        _ocWizard->setRegistration(true);
107
        Utility::openBrowser(QStringLiteral("https://nextcloud.com/register"));
108
    });
109
#endif // WITH_WEBENGINE
102
}
110
}
103
111
104
void WelcomePage::setupHostYourOwnServerLabel()
112
void WelcomePage::setupHostYourOwnServerLabel()
(-)a/src/libsync/networkjobs.cpp (+9 lines)
Lines 30-35 Link Here
30
#include <QCoreApplication>
30
#include <QCoreApplication>
31
#include <QJsonDocument>
31
#include <QJsonDocument>
32
#include <QJsonObject>
32
#include <QJsonObject>
33
#include <qloggingcategory.h>
33
#ifndef TOKEN_AUTH_ONLY
34
#ifndef TOKEN_AUTH_ONLY
34
#include <QPainter>
35
#include <QPainter>
35
#include <QPainterPath>
36
#include <QPainterPath>
Lines 958-964 void DetermineAuthTypeJob::start() Link Here
958
                auto flow = gs.toObject().value("desktoplogin");
959
                auto flow = gs.toObject().value("desktoplogin");
959
                if (flow != QJsonValue::Undefined) {
960
                if (flow != QJsonValue::Undefined) {
960
                    if (flow.toInt() == 1) {
961
                    if (flow.toInt() == 1) {
962
#ifdef WITH_WEBENGINE
961
                        _resultOldFlow = WebViewFlow;
963
                        _resultOldFlow = WebViewFlow;
964
#else // WITH_WEBENGINE
965
                        qCWarning(lcDetermineAuthTypeJob) << "Server does only support flow1, but this client was compiled without support for flow1";
966
#endif // WITH_WEBENGINE
962
                    }
967
                    }
963
                }
968
                }
964
            }
969
            }
Lines 985-1004 void DetermineAuthTypeJob::checkAllDone() Link Here
985
990
986
    auto result = _resultPropfind;
991
    auto result = _resultPropfind;
987
992
993
#ifdef WITH_WEBENGINE
988
    // WebViewFlow > OAuth > Basic
994
    // WebViewFlow > OAuth > Basic
989
    if (_account->serverVersionInt() >= Account::makeServerVersion(12, 0, 0)) {
995
    if (_account->serverVersionInt() >= Account::makeServerVersion(12, 0, 0)) {
990
        result = WebViewFlow;
996
        result = WebViewFlow;
991
    }
997
    }
998
#endif // WITH_WEBENGINE
992
999
993
    // LoginFlowV2 > WebViewFlow > OAuth > Basic
1000
    // LoginFlowV2 > WebViewFlow > OAuth > Basic
994
    if (_account->serverVersionInt() >= Account::makeServerVersion(16, 0, 0)) {
1001
    if (_account->serverVersionInt() >= Account::makeServerVersion(16, 0, 0)) {
995
        result = LoginFlowV2;
1002
        result = LoginFlowV2;
996
    }
1003
    }
997
1004
1005
#ifdef WITH_WEBENGINE
998
    // If we determined that we need the webview flow (GS for example) then we switch to that
1006
    // If we determined that we need the webview flow (GS for example) then we switch to that
999
    if (_resultOldFlow == WebViewFlow) {
1007
    if (_resultOldFlow == WebViewFlow) {
1000
        result = WebViewFlow;
1008
        result = WebViewFlow;
1001
    }
1009
    }
1010
#endif // WITH_WEBENGINE
1002
1011
1003
    // If we determined that a simple get gave us an authentication required error
1012
    // If we determined that a simple get gave us an authentication required error
1004
    // then the server enforces basic auth and we got no choice but to use this
1013
    // then the server enforces basic auth and we got no choice but to use this
(-)a/src/libsync/networkjobs.h (+2 lines)
Lines 446-452 public: Link Here
446
        NoAuthType, // used only before we got a chance to probe the server
446
        NoAuthType, // used only before we got a chance to probe the server
447
        Basic, // also the catch-all fallback for backwards compatibility reasons
447
        Basic, // also the catch-all fallback for backwards compatibility reasons
448
        OAuth,
448
        OAuth,
449
#ifdef WITH_WEBENGINE
449
        WebViewFlow,
450
        WebViewFlow,
451
#endif // WITH_WEBENGINE
450
        LoginFlowV2
452
        LoginFlowV2
451
    };
453
    };
452
    Q_ENUM(AuthType)
454
    Q_ENUM(AuthType)

Return to bug 800863