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
|
set_source_files_properties(qml/ShareActionStub.qml PROPERTIES
|
||||||
QT_QML_SOURCE_TYPENAME ShareAction
|
QT_QML_SOURCE_TYPENAME ShareAction
|
||||||
)
|
)
|
||||||
|
set_source_files_properties(qml/GlobalMenuStub.qml PROPERTIES
|
||||||
|
QT_QML_SOURCE_TYPENAME GlobalMenu
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE
|
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
|
qml/EditMenu.qml
|
||||||
)
|
)
|
||||||
else()
|
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()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
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 {
|
Loader {
|
||||||
active: Kirigami.Settings.hasPlatformMenuBar && !Kirigami.Settings.isMobile
|
active: Kirigami.Settings.hasPlatformMenuBar && !Kirigami.Settings.isMobile && false
|
||||||
sourceComponent: GlobalMenu {
|
sourceComponent: GlobalMenu {
|
||||||
connection: root.connection
|
connection: root.connection
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user