Skip to content
Snippets Groups Projects
Commit 48669302 authored by Loren Burkholder's avatar Loren Burkholder
Browse files

make lint

parent 10c6f2b4
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ ApplicationWindow {
function cleanUpAndClose() {
if (inviteeEntry.text.match("@.+?:.{3,}"))
addInvite();
invitees.accept();
close();
}
......@@ -64,15 +65,17 @@ ApplicationWindow {
placeholderText: qsTr("@joe:matrix.org", "Example user id. The name 'joe' can be localized however you want.")
Layout.fillWidth: true
onAccepted: {
if (text !== "") {
if (text !== "")
addInvite();
}
}
Component.onCompleted: forceActiveFocus()
Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && (event.modifiers & Qt.ControlModifier))
Keys.onPressed: if ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && (event.modifiers === Qt.ControlModifier)) cleanUpAndClose()
Keys.onPressed: {
if ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && (event.modifiers === Qt.ControlModifier)) {
cleanUpAndClose();
}
}
}
Button {
......
......@@ -2,12 +2,12 @@
//
// SPDX-License-Identifier: GPL-3.0-or-later
import "./ui"
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12
import QtQuick.Window 2.12
import im.nheko 1.0
import "./ui"
ApplicationWindow {
id: roomMembersRoot
......@@ -110,7 +110,9 @@ ApplicationWindow {
Layout.fillHeight: true
Layout.fillWidth: true
}
}
}
footer: Spinner {
......@@ -119,12 +121,16 @@ ApplicationWindow {
height: visible ? undefined : 0
anchors.centerIn: parent
}
}
}
}
footer: DialogButtonBox {
standardButtons: DialogButtonBox.Ok
onAccepted: roomMembersRoot.close()
}
}
......@@ -52,6 +52,7 @@ Page {
RoomMembers {
}
}
Component {
......@@ -77,11 +78,13 @@ Page {
}
}
Component {
id: inviteDialog
InviteDialog {
}
}
Shortcut {
......
......@@ -60,7 +60,11 @@ MemberList::addUsers(const std::vector<RoomMember> &members)
QHash<int, QByteArray>
MemberList::roleNames() const
{
return {{Mxid, "mxid"}, {DisplayName, "displayName"}, {AvatarUrl, "avatarUrl"},};
return {
{Mxid, "mxid"},
{DisplayName, "displayName"},
{AvatarUrl, "avatarUrl"},
};
}
QVariant
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment