Ladybird: Fix compilation on macOS/Clang

- Silences the -Wuser-defined-literals warning which is triggered by our
  use of the `sv` suffix for StringView
- Removes an unused captured `this` pointer [-Wunused-lambda-capture]
- Changes a JSONArray.h include to JSONObject.h to get the definition
  for `JSONValue::serialize`. This is needed because template functions
  are not exported for dylibs on macOS. This is a hack; the JSON headers
  should be refactored so that each one includes the definition of
  the template functions it sees. -- Maybe we should build with
  -fvisibility-inlines-hidden on Linux to catch issues like this?
This commit is contained in:
Daniel Bertalan 2022-07-13 21:33:22 +02:00 committed by Andrew Kaster
parent d1d6a204fc
commit af5250b2cb
Notes: sideshowbarker 2024-07-17 02:48:03 +09:00
3 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@ include(cmake/FetchLagom.cmake)
# Lagom warnings
include(${Lagom_SOURCE_DIR}/../CMake/lagom_compile_options.cmake)
add_compile_options(-Wno-expansion-to-defined)
add_compile_options(-Wno-user-defined-literals)
set(CMAKE_AUTOMOC ON)
find_package(Qt6 REQUIRED COMPONENTS Core Widgets Network)

View File

@ -5,7 +5,7 @@
*/
#include "RequestManagerQt.h"
#include <AK/JsonArray.h>
#include <AK/JsonObject.h>
RequestManagerQt::RequestManagerQt()
{

View File

@ -53,7 +53,7 @@ Tab::Tab(QMainWindow* window)
const QPoint* pos = new QPoint(0, size().height() - 15);
QToolTip::showText(*pos, title, this);
});
QObject::connect(m_view, &WebView::linkUnhovered, [this] {
QObject::connect(m_view, &WebView::linkUnhovered, [] {
QToolTip::hideText();
});