Bug 478857 - Build fails with Qt 6.7
Summary: Build fails with Qt 6.7
Status: RESOLVED FIXED
Alias: None
Product: Falkon
Classification: Applications
Component: general (show other bugs)
Version: 24.01.85
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-21 23:09 UTC by Antonio Rojas
Modified: 2023-12-22 20:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2023-12-21 23:09:03 UTC
QUrl::fromEncoded no longer takes a QByteArray since https://github.com/qt/qtbase/commit/aa481854a98b1be0a061257ae4e817adcf1f77fc

/build/falkon/src/falkon-24.01.85/src/lib/app/mainmenu.cpp: In member function ‘void MainMenu::sendLink()’:
/build/falkon/src/falkon-24.01.85/src/lib/app/mainmenu.cpp:180:161: error: cannot convert ‘QStringBuilder<QStringBuilder<QStringBuilder<const char (&)[17], QByteArray>, const char (&)[10]>, QByteArray>’ to ‘QByteArrayView’
  180 |     const QUrl mailUrl = QUrl::fromEncoded("mailto:%20?body=" + QUrl::toPercentEncoding(QString::fromUtf8(m_window->weView()->url().toEncoded())) + "&subject=" + QUrl::toPercentEncoding(m_window->weView()->title()));
      |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                                                                                 |
      |                                                                                                                                                                 QStringBuilder<QStringBuilder<QStringBuilder<const char (&)[17], QByteArray>, const char (&)[10]>, QByteArray>
In file included from /usr/include/qt6/QtCore/QUrl:1,
                 from /build/falkon/src/falkon-24.01.85/src/lib/other/siteinfo.h:23,
                 from /build/falkon/src/falkon-24.01.85/src/lib/app/mainmenu.cpp:19:
/usr/include/qt6/QtCore/qurl.h:170:44: note:   initializing argument 1 of ‘static QUrl QUrl::fromEncoded(QByteArrayView, ParsingMode)’
  170 |     static QUrl fromEncoded(QByteArrayView input, ParsingMode mode = TolerantMode);
      |                             ~~~~~~~~~~~~~~~^~~~~
Comment 1 Bug Janitor Service 2023-12-22 01:34:38 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/falkon/-/merge_requests/68
Comment 2 Juraj 2023-12-22 20:03:46 UTC
Git commit 0681dccfcce0c96bbc256ee78a930aa481347d24 by Juraj Oravec, on behalf of Yifan Zhu.
Committed on 22/12/2023 at 21:03.
Pushed by jurajo into branch 'master'.

Fix compilation against Qt 6.7

QUrl::fromEncoded(const QByteArray &url...) is removed in Qt 6.7 in
favor of QUrl::fromEncoded(QByteArrayView input...).
Wrap the corresponding argument in QByteArray() to make the cast explicit.
This is backwards-compatible with old Qt versions.

See qt/qtbase commit aa481854a98b1be0a061257ae4e817adcf1f77fc

M  +1    -1    src/lib/app/mainmenu.cpp
M  +1    -1    src/lib/other/updater.cpp
M  +2    -2    src/lib/webengine/webview.cpp

https://invent.kde.org/network/falkon/-/commit/0681dccfcce0c96bbc256ee78a930aa481347d24