mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
make lint
This commit is contained in:
parent
10c6f2b43f
commit
48669302ec
4 changed files with 23 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue