Skip to content

Commit

Permalink
fix: WebEngineView on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjba committed Oct 2, 2024
1 parent 7152200 commit e96cde4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ ifneq ($(detected_OS),Windows)
endif
DOTHERSIDE_LIBFILE := vendor/DOtherSide/build/lib/libDOtherSideStatic.a
# order matters here, due to "-Wl,-as-needed"
NIM_PARAMS += --passL:"$(DOTHERSIDE_LIBFILE)" --passL:"$(shell PKG_CONFIG_PATH="$(QT5_PCFILEDIR)" pkg-config --libs Qt5Core Qt5Qml Qt5Gui Qt5Quick Qt5QuickControls2 Qt5Widgets Qt5Svg Qt5Multimedia Qt5WebView Qt5WebChannel)"
NIM_PARAMS += --passL:"$(DOTHERSIDE_LIBFILE)" --passL:"$(shell PKG_CONFIG_PATH="$(QT5_PCFILEDIR)" pkg-config --libs Qt5Core Qt5Qml Qt5Gui Qt5Quick Qt5QuickControls2 Qt5Widgets Qt5Svg Qt5Multimedia Qt5WebEngine Qt5WebChannel)"
else
NIM_EXTRA_PARAMS := --passL:"-lsetupapi -lhid"
endif
Expand Down
6 changes: 3 additions & 3 deletions storybook/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()

find_package(
Qt5
COMPONENTS Core Gui Quick QuickControls2 Test QuickTest Qml WebView
COMPONENTS Core Gui Quick QuickControls2 Test QuickTest Qml WebEngine
REQUIRED)

set(STATUSQ_BUILD_SANDBOX OFF)
Expand Down Expand Up @@ -76,7 +76,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
)

target_link_libraries(
${PROJECT_LIB} PUBLIC Qt5::Core Qt5::Gui Qt5::Quick Qt5::QuickControls2 Qt5::WebView)
${PROJECT_LIB} PUBLIC Qt5::Core Qt5::Gui Qt5::Quick Qt5::QuickControls2 Qt5::WebEngine)

target_link_libraries(
${PROJECT_NAME} PRIVATE ${PROJECT_LIB})
Expand All @@ -91,7 +91,7 @@ add_executable(
)

target_link_libraries(
PagesValidator PUBLIC Qt5::Core Qt5::Gui Qt5::Quick Qt5::QuickControls2 Qt5::WebView)
PagesValidator PUBLIC Qt5::Core Qt5::Gui Qt5::Quick Qt5::QuickControls2 Qt5::WebEngine)

add_dependencies(PagesValidator StatusQ)

Expand Down
4 changes: 2 additions & 2 deletions storybook/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QQmlComponent>
#include <QDirIterator>

#include <QtWebView>
#include <QtWebEngine>


#include "cachecleaner.h"
Expand All @@ -27,7 +27,7 @@ void loadContextPropertiesMocks(const char* storybookRoot, QQmlApplicationEngine
int main(int argc, char *argv[])
{
// Required by the WalletConnectSDK view
QtWebView::initialize();
QtWebEngine::initialize();

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
Expand Down
6 changes: 3 additions & 3 deletions vendor/DOtherSide/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ endif()

# Macro for merging common code between static and shared
macro(add_target name type)
find_package(Qt5 COMPONENTS Core Qml Gui Quick QuickControls2 Widgets Network Multimedia WebView REQUIRED)
find_package(Qt5 COMPONENTS Core Qml Gui Quick QuickControls2 Widgets Network Multimedia WebEngine REQUIRED)

file(GLOB HEADERS include/DOtherSide/*.h include/DOtherSide/Status/*.h)
file(GLOB SOURCES src/*.cpp src/Status/*.cpp)
Expand Down Expand Up @@ -40,7 +40,7 @@ macro(add_target name type)

target_include_directories(${name} PUBLIC include include/Qt)

target_link_libraries(${name} PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Qml Qt5::Quick Qt5::Network Qt5::Multimedia Qt5::WebView)
target_link_libraries(${name} PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Qml Qt5::Quick Qt5::Network Qt5::Multimedia Qt5::WebEngine)

target_compile_definitions(${name} PRIVATE $<$<CONFIG:Debug>:QT_QML_DEBUG>)
if(DEFINED QML_DEBUG_PORT)
Expand All @@ -63,7 +63,7 @@ macro(add_target name type)
endif()

# for DOtherSide.pc
set(PC_REQUIRES "Qt5Core, Qt5Gui, Qt5Widgets, Qt5Qml, Qt5Quick, Qt5Network, Qt5DBus, Qt5Multimedia, Qt5WebView")
set(PC_REQUIRES "Qt5Core, Qt5Gui, Qt5Widgets, Qt5Qml, Qt5Quick, Qt5Network, Qt5DBus, Qt5Multimedia, Qt5WebEngine")
if (${Qt5QuickControls2_FOUND})
target_link_libraries(${name} PRIVATE Qt5::QuickControls2)
set(PC_REQUIRES "${PC_REQUIRES}, Qt5QuickControls2")
Expand Down
4 changes: 2 additions & 2 deletions vendor/DOtherSide/lib/src/DOtherSide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#ifdef QT_QUICKCONTROLS2_LIB
#include <QtQuickControls2/QQuickStyle>
#endif
#include <QtWebView>
#include <QtWebEngine>
#include <stdio.h>
#include <stdlib.h>

Expand Down Expand Up @@ -174,7 +174,7 @@ void dos_qguiapplication_initialize_opengl()

void dos_qtwebview_initialize()
{
QtWebView::initialize();
QtWebEngine::initialize();
}

void dos_qguiapplication_try_enable_threaded_renderer()
Expand Down

0 comments on commit e96cde4

Please sign in to comment.