Skip to content

Remove QtWebEngine#10092

Draft
i2h3 wants to merge 1 commit into
masterfrom
i2h3/remove-qtwebengine
Draft

Remove QtWebEngine#10092
i2h3 wants to merge 1 commit into
masterfrom
i2h3/remove-qtwebengine

Conversation

@i2h3
Copy link
Copy Markdown
Collaborator

@i2h3 i2h3 commented Jun 1, 2026

Summary

Removes the QtWebEngine dependency from the desktop client. QtWebEngine existed in this codebase only to host the legacy embedded login flow (Flow v1 / WebViewFlow) used during account setup and reauth. The modern OAuth flow (Flow2, used for any Nextcloud server >= 16.0.0) already drives login through the system browser and remains the only authentication path after this change.

  • Deletes the embedded-browser UI (src/gui/wizard/webview{,page}.{h,cpp,ui}).
  • Drops the WITH_WEBENGINE CMake option, find_package lookups, and target_link_libraries entries; drops the #cmakedefine WITH_WEBENGINE from config.h.in.
  • Strips every #ifdef WITH_WEBENGINE block — keeping only the "without" branch — and removes the now-dead useFlow2 / forceLoginV2 boolean machinery, the WebViewFlow auth type, the Page_WebView wizard page, and the OldFlow capability probe in DetermineAuthTypeJob (which existed solely to detect Flow-v1-requiring servers).
  • Cleans up packaging: drops --without-webengine and the buildWithWebEngine craft option from mac-crafter, removes signQtWebEngineProcessApp from the macOS signer, removes the WiX rule that stripped Qt6WebEngineCore.pdb from the MSI, and removes qt5.qtwebengine from the Nix flake.

User-visible consequence

Nextcloud servers older than 16.0.0 (and any server advertising the legacy globalscale.desktoplogin=1 capability — historically used by Global Scale deployments) can no longer be added through an in-app embedded browser. Modern servers are unaffected: login continues to go through the system browser via Flow2.

Follow-up

The macOS build invokes a separate craft blueprint repo that defines buildWithWebEngine as a blueprint option. With this PR, mac-crafter stops passing it. A follow-up PR to that blueprint repo can drop the option there too; it's not blocking.

Test plan

  • cmake -S . -B build configures cleanly with no find_package(Qt6WebEngineCore) / find_package(Qt6WebEngineWidgets) output and no WITH_WEBENGINE in the generated build/config.h.
  • cmake --build build completes without errors on Linux.
  • grep -rn 'WITH_WEBENGINE\|WebEngine\|Page_WebView\|WebViewFlow\|forceLoginV2\|useFlow2\|signQtWebEngine' src/ admin/ CMakeLists.txt config.h.in returns nothing.
  • Add-account wizard works end-to-end against a Nextcloud >= 16.0.0 server: the "Log in" button opens the system browser via Flow2, the wizard advances to folder setup after authentication.
  • Reauth works end-to-end: invalidate the token server-side, reopen the client, confirm WebFlowCredentialsDialog shows the Flow2 polling widget (not anything Chromium-based) and recovers credentials.
  • macOS Crafter build (swift run mac-crafter build) succeeds and the resulting .app does not contain Contents/Frameworks/QtWebEngineCore.framework.
  • Windows MSI build contains no QtWebEngine* files (7z l nextcloud-*.msi | grep -i webengine empty).

🤖 Generated with Claude Code

Dependencies

This must be integrated before QtWebEngine can be excluded from the build environment which must happen in upstream changes tracked by this issue:

nextcloud/desktop-client-blueprints#37

@i2h3 i2h3 self-assigned this Jun 1, 2026
@i2h3 i2h3 added os: 🍎 macOS Apple macOS, formerly also known as OS X os: 🚪 Windows os: 🐧 Linux Performance 🚀 dependencies Pull requests that update a dependency file labels Jun 1, 2026
@i2h3 i2h3 added this to the 34.0.0 milestone Jun 1, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team Jun 1, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team Jun 1, 2026
@i2h3 i2h3 marked this pull request as draft June 1, 2026 15:06
@i2h3 i2h3 changed the title refactor: remove QtWebEngine dependency entirely Remove QtWebEngine Jun 1, 2026
@i2h3 i2h3 force-pushed the i2h3/remove-qtwebengine branch 2 times, most recently from 81c9445 to 1ce9d63 Compare June 1, 2026 15:42
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 1, 2026

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@i2h3 i2h3 mentioned this pull request Jun 1, 2026
Drop the legacy embedded login flow (Flow v1 / WebViewFlow) and every
piece of build, packaging, and signing infrastructure that existed to
support it. The modern OAuth flow (Flow2, used by Nextcloud server
>= 16.0.0) already drives login through the system browser and remains
the only authentication path.

User-visible consequence: Nextcloud servers older than 16.0.0, and any
server advertising the legacy globalscale.desktoplogin=1 capability,
can no longer be added through an in-app embedded browser. Modern
servers are unaffected.

Changes:
- delete src/gui/wizard/webview{,page}.{h,cpp,ui,ui.license}
- drop BUILD_WITH_WEBENGINE option, find_package calls, and
  target_link_libraries entries from CMake; drop the cmakedefine in
  config.h.in
- remove DetermineAuthTypeJob's WebViewFlow enum value and the
  third (OldFlow) capability probe; the job now only runs the GET and
  PROPFIND probes
- remove ConfigFile::forceLoginV2 / setForceLoginV2 and the
  forceLoginV2 settings key
- drop the useFlow2 boolean machinery: WebFlowCredentialsDialog now
  always hosts Flow2AuthWidget, and OwncloudWizard / OwncloudSetupPage
  no longer thread a useFlow2 flag
- drop Page_WebView, WebViewPage, the welcomepage WebEngine branch
  (Create Account now always opens the system browser), and related
  #ifdef WITH_WEBENGINE blocks
- remove --without-webengine flag and buildWithWebEngine craft option
  from mac-crafter
- remove signQtWebEngineProcessApp helper from mac-crafter's Signer
- remove the WiX/MSI rule that stripped Qt6WebEngineCore.pdb
- remove qt5.qtwebengine (and the now-dead isARM helper) from the Nix
  flake

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
@i2h3 i2h3 force-pushed the i2h3/remove-qtwebengine branch from 1ce9d63 to 8faf717 Compare June 2, 2026 07:35
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Artifact containing the AppImage: nextcloud-appimage-pr-10092.zip

Digest: sha256:d125caed7c159e5ed6ff4e75165fe4c0c344f8f70dcbd86870bcf75e73958b60

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@i2h3
Copy link
Copy Markdown
Collaborator Author

i2h3 commented Jun 2, 2026

This is ready for review but @Rello explicitly asked for keeping it as a draft to prevent merging until dependent issues in other projects are resolved first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file os: 🍎 macOS Apple macOS, formerly also known as OS X os: 🚪 Windows os: 🐧 Linux Performance 🚀

Projects

Status: 🏗️ In progress

Development

Successfully merging this pull request may close these issues.

1 participant