From 2a0f89bab0b0f20be203ac6a598fdc9171838e97 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Wed, 11 Nov 2020 22:28:52 +0100 Subject: [PATCH] Remove unused qml files --- imports/NeoChat/Panel/NeoChatSidebar.qml | 25 ----- imports/NeoChat/Panel/RoomListPanel.qml | 115 ----------------------- imports/NeoChat/Panel/qmldir | 3 - res.qrc | 1 - 4 files changed, 144 deletions(-) delete mode 100644 imports/NeoChat/Panel/NeoChatSidebar.qml delete mode 100644 imports/NeoChat/Panel/RoomListPanel.qml diff --git a/imports/NeoChat/Panel/NeoChatSidebar.qml b/imports/NeoChat/Panel/NeoChatSidebar.qml deleted file mode 100644 index 4b78b1e7f..000000000 --- a/imports/NeoChat/Panel/NeoChatSidebar.qml +++ /dev/null @@ -1,25 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2020 Carl Schwan - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 as Controls -import QtQuick.Layouts 1.12 -import Qt.labs.qmlmodels 1.0 - -import org.kde.kirigami 2.12 as Kirigami - -import SortFilterProxyModel 0.2 - -import NeoChat.Component 1.0 -import NeoChat.Component.Timeline 1.0 -import org.kde.neochat 1.0 - -Kirigami.GlobalDrawer { - id: root - - modal: true - collapsible: true - collapsed: Kirigami.Settings.isMobile -} diff --git a/imports/NeoChat/Panel/RoomListPanel.qml b/imports/NeoChat/Panel/RoomListPanel.qml deleted file mode 100644 index 0597a48bc..000000000 --- a/imports/NeoChat/Panel/RoomListPanel.qml +++ /dev/null @@ -1,115 +0,0 @@ -/** - * SPDX-FileCopyrightText: 2018-2020 Black Hat - * SPDX-FileCopyrightText: 2020 Carl Schwan - * SPDX-FileCopyrightText: 2020 Tobias Fella - * - * SPDX-License-Identifier: GPL-3.0-only - */ -import QtQuick 2.12 -import QtQuick.Controls 2.12 as QQC2 -import QtQuick.Layouts 1.12 - -import org.kde.kirigami 2.13 as Kirigami - -import org.kde.kitemmodels 1.0 -import NeoChat.Component 1.0 -import org.kde.neochat 1.0 - -Kirigami.ScrollablePage { - id: page - - property var roomListModel - property var enteredRoom - property var searchText: "" - - onSearchTextChanged: sortedFilteredRoomListModel.invalidateFilter() - - signal enterRoom(var room) - signal leaveRoom(var room) - - title: "Rooms" - - titleDelegate: Kirigami.SearchField { - Layout.topMargin: Kirigami.Units.smallSpacing - Layout.bottomMargin: Kirigami.Units.smallSpacing - Layout.fillHeight: true - Layout.fillWidth: true - onTextChanged: page.searchText = text - } - - ListView { - id: messageListView - - model: KSortFilterProxyModel { - id: sortedFilteredRoomListModel - sourceModel: roomListModel - - sortRole: "name" - sortOrder: Qt.AscendingOrder - filterRowCallback: function(row, parent) { - return (roomListModel.data(roomListModel.index(row, 0), RoomListModel.JoinStateRole) !== "upgraded") && roomListModel.data(roomListModel.index(row, 0), RoomListModel.NameRole).toLowerCase().includes(page.searchText.toLowerCase()) - } - } - - section.property: "categoryName" - section.delegate: Kirigami.ListSectionHeader { - label: section - } - - delegate: Kirigami.AbstractListItem { - topPadding: Kirigami.Units.largeSpacing - bottomPadding: Kirigami.Units.largeSpacing - - contentItem: RowLayout { - spacing: Kirigami.Units.largeSpacing - - Kirigami.Avatar { - Layout.preferredWidth: height - Layout.fillHeight: true - - source: avatar ? "image://mxc/" + avatar : "" - name: model.name || "No Name" - } - - ColumnLayout { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignHCenter - - spacing: Kirigami.Units.smallSpacing - - QQC2.Label { - Layout.fillWidth: true - Layout.fillHeight: true - text: name ?? "" - font.pixelSize: 15 - font.bold: unreadCount >= 0 - elide: Text.ElideRight - wrapMode: Text.NoWrap - } - - QQC2.Label { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignHCenter - - text: (lastEvent == "" ? topic : lastEvent).replace(/(\r\n\t|\n|\r\t)/gm," ") - font.pixelSize: 12 - elide: Text.ElideRight - wrapMode: Text.NoWrap - } - } - } - - onClicked: { - if (enteredRoom) { - leaveRoom(enteredRoom) - } - - enteredRoom = currentRoom - - enterRoom(enteredRoom) - } - } - } -} diff --git a/imports/NeoChat/Panel/qmldir b/imports/NeoChat/Panel/qmldir index 74be87f9b..0b98bcc8c 100644 --- a/imports/NeoChat/Panel/qmldir +++ b/imports/NeoChat/Panel/qmldir @@ -1,5 +1,2 @@ module NeoChat.Panel -RoomPanel 1.0 RoomPanel.qml -RoomListPanel 1.0 RoomListPanel.qml RoomDrawer 1.0 RoomDrawer.qml -NeoChatSidebar 1.0 NeoChatSidebar.qml diff --git a/res.qrc b/res.qrc index bcdd06c29..d5775d7fa 100644 --- a/res.qrc +++ b/res.qrc @@ -40,7 +40,6 @@ imports/NeoChat/Panel/qmldir imports/NeoChat/Panel/RoomDrawer.qml imports/NeoChat/Panel/RoomHeader.qml - imports/NeoChat/Panel/NeoChatSidebar.qml imports/NeoChat/Effect/RippleEffect.qml imports/NeoChat/Effect/CircleMask.qml imports/NeoChat/Effect/ElevationEffect.qml