mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +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() {
|
function cleanUpAndClose() {
|
||||||
if (inviteeEntry.text.match("@.+?:.{3,}"))
|
if (inviteeEntry.text.match("@.+?:.{3,}"))
|
||||||
addInvite();
|
addInvite();
|
||||||
|
|
||||||
invitees.accept();
|
invitees.accept();
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
@ -64,15 +65,17 @@ ApplicationWindow {
|
||||||
placeholderText: qsTr("@joe:matrix.org", "Example user id. The name 'joe' can be localized however you want.")
|
placeholderText: qsTr("@joe:matrix.org", "Example user id. The name 'joe' can be localized however you want.")
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
if (text !== "") {
|
if (text !== "")
|
||||||
addInvite();
|
addInvite();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Component.onCompleted: forceActiveFocus()
|
Component.onCompleted: forceActiveFocus()
|
||||||
|
|
||||||
Keys.onShortcutOverride: event.accepted = ((event.key === Qt.Key_Return || event.key === Qt.Key_Enter) && (event.modifiers & Qt.ControlModifier))
|
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 {
|
Button {
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
//
|
//
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
import "./ui"
|
||||||
import QtQuick 2.12
|
import QtQuick 2.12
|
||||||
import QtQuick.Controls 2.12
|
import QtQuick.Controls 2.12
|
||||||
import QtQuick.Layouts 1.12
|
import QtQuick.Layouts 1.12
|
||||||
import QtQuick.Window 2.12
|
import QtQuick.Window 2.12
|
||||||
import im.nheko 1.0
|
import im.nheko 1.0
|
||||||
import "./ui"
|
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: roomMembersRoot
|
id: roomMembersRoot
|
||||||
|
@ -110,7 +110,9 @@ ApplicationWindow {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: Spinner {
|
footer: Spinner {
|
||||||
|
@ -119,12 +121,16 @@ ApplicationWindow {
|
||||||
height: visible ? undefined : 0
|
height: visible ? undefined : 0
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer: DialogButtonBox {
|
footer: DialogButtonBox {
|
||||||
standardButtons: DialogButtonBox.Ok
|
standardButtons: DialogButtonBox.Ok
|
||||||
onAccepted: roomMembersRoot.close()
|
onAccepted: roomMembersRoot.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ Page {
|
||||||
|
|
||||||
RoomMembers {
|
RoomMembers {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
|
@ -77,11 +78,13 @@ Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: inviteDialog
|
id: inviteDialog
|
||||||
|
|
||||||
InviteDialog {
|
InviteDialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
|
|
|
@ -60,7 +60,11 @@ MemberList::addUsers(const std::vector<RoomMember> &members)
|
||||||
QHash<int, QByteArray>
|
QHash<int, QByteArray>
|
||||||
MemberList::roleNames() const
|
MemberList::roleNames() const
|
||||||
{
|
{
|
||||||
return {{Mxid, "mxid"}, {DisplayName, "displayName"}, {AvatarUrl, "avatarUrl"},};
|
return {
|
||||||
|
{Mxid, "mxid"},
|
||||||
|
{DisplayName, "displayName"},
|
||||||
|
{AvatarUrl, "avatarUrl"},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant
|
QVariant
|
||||||
|
|
Loading…
Reference in a new issue