Improve QML types

This commit is contained in:
Tobias Fella
2023-06-06 21:06:58 +02:00
parent 72c85af407
commit 47c28ce9a2
30 changed files with 35 additions and 30 deletions

View File

@@ -12,7 +12,7 @@ import org.kde.neochat 1.0
Kirigami.Page {
id: devtoolsPage
property var room
property NeoChatRoom room
title: i18n("Developer Tools")

View File

@@ -12,7 +12,7 @@ import org.kde.neochat 1.0
Kirigami.ScrollablePage {
id: root
property var room
property NeoChatRoom room
title: i18n("Invite a User")

View File

@@ -28,7 +28,7 @@ Kirigami.ScrollablePage {
Kirigami.SearchField {
id: identifierField
property bool isRoomAlias: text.match(/#(.+):(.+)/g)
property var room: isRoomAlias ? connection.roomByAlias(text) : null
property NeoChatRoom room: isRoomAlias ? connection.roomByAlias(text) : null
property bool isJoined: room != null
Layout.fillWidth: true

View File

@@ -16,7 +16,7 @@ import './' as RoomList
QQC2.ItemDelegate {
id: root
required property var currentRoom
required property NeoChatRoom currentRoom
required property bool categoryVisible
required property string filterText
required property string avatar

View File

@@ -15,7 +15,7 @@ import org.kde.neochat 1.0
*/
Loader {
id: root
property var room
property NeoChatRoom room
signal closed()
Component {

View File

@@ -19,7 +19,7 @@ Kirigami.BasicListItem {
required property int index
required property int notificationCount
required property int highlightCount
required property var currentRoom
required property NeoChatRoom currentRoom
required property bool categoryVisible
required property string filterText
required property string avatar

View File

@@ -15,7 +15,7 @@ import org.kde.neochat 1.0
*/
Loader {
id: root
property var room
property NeoChatRoom room
signal closed()
Component {

View File

@@ -16,7 +16,7 @@ Kirigami.Page {
id: root
/// Not readonly because of the separate window view.
property var currentRoom: RoomManager.currentRoom
property NeoChatRoom currentRoom: RoomManager.currentRoom
property bool loading: !root.currentRoom || (root.currentRoom.timelineSize === 0 && !root.currentRoom.allHistoryLoaded)
/// Used to determine if scrolling to the bottom should mark the message as unread
property bool hasScrolledUpBefore: false;

View File

@@ -7,9 +7,11 @@ import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
Kirigami.ApplicationWindow {
id: window
required property var currentRoom
required property NeoChatRoom currentRoom
minimumWidth: Kirigami.Units.gridUnit * 10
minimumHeight: Kirigami.Units.gridUnit * 15

View File

@@ -12,7 +12,7 @@ import org.kde.neochat 1.0
Kirigami.ScrollablePage {
id: searchPage
property var currentRoom
property NeoChatRoom currentRoom
title: i18nc("@action:title", "Search Messages")