Fix GlobalMenu initialization on other platforms
Amends b5fcad3db0, we need a
ShareAction-like stub for GlobalMenu for this to work again.
This commit is contained in:
committed by
Carl Schwan
parent
fe0f159490
commit
76919a13b8
@@ -47,6 +47,9 @@ if(ANDROID OR WIN32)
|
||||
set_source_files_properties(qml/ShareActionStub.qml PROPERTIES
|
||||
QT_QML_SOURCE_TYPENAME ShareAction
|
||||
)
|
||||
set_source_files_properties(qml/GlobalMenuStub.qml PROPERTIES
|
||||
QT_QML_SOURCE_TYPENAME GlobalMenu
|
||||
)
|
||||
endif()
|
||||
|
||||
ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
|
||||
@@ -124,7 +127,10 @@ if(NOT ANDROID AND NOT WIN32)
|
||||
qml/EditMenu.qml
|
||||
)
|
||||
else()
|
||||
qt_target_qml_sources(neochat QML_FILES qml/ShareActionStub.qml)
|
||||
qt_target_qml_sources(neochat QML_FILES
|
||||
qml/ShareActionStub.qml
|
||||
qml/GlobalMenuStub.qml
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
||||
10
src/app/qml/GlobalMenuStub.qml
Normal file
10
src/app/qml/GlobalMenuStub.qml
Normal file
@@ -0,0 +1,10 @@
|
||||
// SPDX-FileCopyrightText: 2025 Joshua Goins <josh@redstrate.com
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import QtQuick
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Item {
|
||||
required property NeoChatConnection connection
|
||||
}
|
||||
@@ -79,7 +79,7 @@ Kirigami.ApplicationWindow {
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: Kirigami.Settings.hasPlatformMenuBar && !Kirigami.Settings.isMobile
|
||||
active: Kirigami.Settings.hasPlatformMenuBar && !Kirigami.Settings.isMobile && false
|
||||
sourceComponent: GlobalMenu {
|
||||
connection: root.connection
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user