Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
7c08d889
Commit
7c08d889
authored
2 years ago
by
Marcus Hoffmann
Browse files
Options
Downloads
Patches
Plain Diff
print errors on failed dialog creation
Signed-off-by:
Marcus Hoffmann
<
bubu@bubu1.eu
>
parent
5d9895a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4448
passed
2 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/qml/RoomList.qml
+16
-8
16 additions, 8 deletions
resources/qml/RoomList.qml
resources/qml/Root.qml
+169
-88
169 additions, 88 deletions
resources/qml/Root.qml
resources/qml/TimelineView.qml
+10
-5
10 additions, 5 deletions
resources/qml/TimelineView.qml
with
195 additions
and
101 deletions
resources/qml/RoomList.qml
+
16
−
8
View file @
7c08d889
...
...
@@ -470,11 +470,14 @@ Page {
function
openUserProfile
()
{
Nheko
.
updateUserProfile
();
var
userProfile
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/UserProfile.qml
"
).
createObject
(
timelineRoot
,
{
"
profile
"
:
Nheko
.
currentUser
});
userProfile
.
show
();
timelineRoot
.
destroyOnClose
(
userProfile
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/UserProfile.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
userProfile
=
component
.
createObject
(
timelineRoot
,
{
"
profile
"
:
Nheko
.
currentUser
});
userProfile
.
show
();
timelineRoot
.
destroyOnClose
(
userProfile
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
...
...
@@ -790,9 +793,14 @@ Page {
ToolTip.text
:
qsTr
(
"
Search rooms (Ctrl+K)
"
)
Layout.margins
:
Nheko
.
paddingMedium
onClicked
:
{
var
quickSwitch
=
Qt
.
createComponent
(
"
qrc:/qml/QuickSwitcher.qml
"
).
createObject
(
timelineRoot
);
quickSwitch
.
open
();
destroyOnClosed
(
quickSwitch
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/QuickSwitcher.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
quickSwitch
=
component
.
createObject
(
timelineRoot
);
quickSwitch
.
open
();
destroyOnClosed
(
quickSwitch
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/qml/Root.qml
+
169
−
88
View file @
7c08d889
...
...
@@ -51,36 +51,57 @@ Pane {
}
function
showAliasEditor
(
settings
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/AliasEditor.qml
"
).
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
dialog
.
show
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/AliasEditor.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
showPLEditor
(
settings
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/PowerLevelEditor.qml
"
).
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
dialog
.
show
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/PowerLevelEditor.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
showSpacePLApplyPrompt
(
settings
,
editingModel
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/PowerLevelSpacesApplyDialog.qml
"
).
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
,
"
editingModel
"
:
editingModel
});
dialog
.
show
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/PowerLevelSpacesApplyDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
,
"
editingModel
"
:
editingModel
});
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
showAllowedRoomsEditor
(
settings
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/AllowedRoomsSettingsDialog.qml
"
).
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
dialog
.
show
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/AllowedRoomsSettingsDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
Component
{
...
...
@@ -99,9 +120,14 @@ Pane {
Shortcut
{
sequence
:
"
Ctrl+K
"
onActivated
:
{
var
quickSwitch
=
Qt
.
createComponent
(
"
qrc:/qml/QuickSwitcher.qml
"
).
createObject
(
timelineRoot
);
quickSwitch
.
open
();
destroyOnClosed
(
quickSwitch
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/QuickSwitcher.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
quickSwitch
=
component
.
createObject
(
timelineRoot
);
quickSwitch
.
open
();
destroyOnClosed
(
quickSwitch
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
}
...
...
@@ -123,21 +149,36 @@ Pane {
Connections
{
function
onOpenLogoutDialog
()
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/LogoutDialog.qml
"
).
createObject
(
timelineRoot
);
dialog
.
open
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/LogoutDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
);
dialog
.
open
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onOpenJoinRoomDialog
()
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/JoinRoomDialog.qml
"
).
createObject
(
timelineRoot
);
dialog
.
show
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/JoinRoomDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
);
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onShowRoomJoinPrompt
(
summary
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/ConfirmJoinRoomDialog.qml
"
).
createObject
(
timelineRoot
,
{
"
summary
"
:
summary
});
dialog
.
show
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/ConfirmJoinRoomDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
summary
"
:
summary
});
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
target
:
Nheko
...
...
@@ -145,11 +186,14 @@ Pane {
Connections
{
function
onNewDeviceVerificationRequest
(
flow
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/device-verification/DeviceVerification.qml
"
).
createObject
(
timelineRoot
,
{
"
flow
"
:
flow
});
dialog
.
show
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/device-verification/DeviceVerification.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
flow
"
:
flow
});
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
target
:
VerificationManager
...
...
@@ -166,73 +210,105 @@ Pane {
Connections
{
function
onOpenProfile
(
profile
)
{
var
userProfile
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/UserProfile.qml
"
).
createObject
(
timelineRoot
,
{
"
profile
"
:
profile
});
userProfile
.
show
();
destroyOnClose
(
userProfile
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/UserProfile.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
userProfile
=
component
.
createObject
(
timelineRoot
,
{
"
profile
"
:
profile
});
userProfile
.
show
();
destroyOnClose
(
userProfile
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onShowImagePackSettings
(
room
,
packlist
)
{
var
packSet
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/ImagePackSettingsDialog.qml
"
).
createObject
(
timelineRoot
,
{
"
room
"
:
room
,
"
packlist
"
:
packlist
});
packSet
.
show
();
destroyOnClose
(
packSet
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/ImagePackSettingsDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
packSet
=
component
.
createObject
(
timelineRoot
,
{
"
room
"
:
room
,
"
packlist
"
:
packlist
});
packSet
.
show
();
destroyOnClose
(
packSet
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onOpenRoomMembersDialog
(
members
,
room
)
{
var
membersDialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/RoomMembers.qml
"
).
createObject
(
timelineRoot
,
{
"
members
"
:
members
,
"
room
"
:
room
});
membersDialog
.
show
();
destroyOnClose
(
membersDialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/RoomMembers.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
membersDialog
=
component
.
createObject
(
timelineRoot
,
{
"
members
"
:
members
,
"
room
"
:
room
});
membersDialog
.
show
();
destroyOnClose
(
membersDialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onOpenRoomSettingsDialog
(
settings
)
{
var
roomSettings
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/RoomSettings.qml
"
).
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
roomSettings
.
show
();
destroyOnClose
(
roomSettings
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/RoomSettings.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
roomSettings
=
component
.
createObject
(
timelineRoot
,
{
"
roomSettings
"
:
settings
});
roomSettings
.
show
();
destroyOnClose
(
roomSettings
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onOpenInviteUsersDialog
(
invitees
)
{
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/InviteDialog.qml
"
)
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
roomId
"
:
Rooms
.
currentRoom
.
roomId
,
"
plainRoomName
"
:
Rooms
.
currentRoom
.
plainRoomName
,
"
invitees
"
:
invitees
});
if
(
component
.
status
!=
Component
.
Ready
)
{
console
.
log
(
"
Failed to create component:
"
+
component
.
errorString
());
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
roomId
"
:
Rooms
.
currentRoom
.
roomId
,
"
plainRoomName
"
:
Rooms
.
currentRoom
.
plainRoomName
,
"
invitees
"
:
invitees
});
dialog
.
show
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
dialog
.
show
();
destroyOnClose
(
dialog
);
}
function
onOpenLeaveRoomDialog
(
roomid
,
reason
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/LeaveRoomDialog.qml
"
).
createObject
(
timelineRoot
,
{
"
roomId
"
:
roomid
,
"
reason
"
:
reason
});
dialog
.
open
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/LeaveRoomDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
roomId
"
:
roomid
,
"
reason
"
:
reason
});
dialog
.
open
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onShowImageOverlay
(
room
,
eventId
,
url
,
originalWidth
,
proportionalHeight
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/ImageOverlay.qml
"
).
createObject
(
timelineRoot
,
{
"
room
"
:
room
,
"
eventId
"
:
eventId
,
"
url
"
:
url
,
"
originalWidth
"
:
originalWidth
??
0
,
"
proportionalHeight
"
:
proportionalHeight
??
0
});
dialog
.
showFullScreen
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/ImageOverlay.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
room
"
:
room
,
"
eventId
"
:
eventId
,
"
url
"
:
url
,
"
originalWidth
"
:
originalWidth
??
0
,
"
proportionalHeight
"
:
proportionalHeight
??
0
}
);
dialog
.
showFullScreen
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
target
:
TimelineManager
...
...
@@ -241,9 +317,14 @@ Pane {
Connections
{
function
onNewInviteState
()
{
if
(
CallManager
.
haveCallInvite
&&
Settings
.
mobileMode
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/voip/CallInvite.qml
"
).
createObject
(
timelineRoot
);
dialog
.
open
();
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/voip/CallInvite.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
);
dialog
.
open
();
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
}
...
...
This diff is collapsed.
Click to expand it.
resources/qml/TimelineView.qml
+
10
−
5
View file @
7c08d889
...
...
@@ -423,11 +423,16 @@ Item {
}
function
onShowRawMessageDialog
(
rawMessage
)
{
var
dialog
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/RawMessageDialog.qml
"
).
createObject
(
timelineRoot
,
{
"
rawMessage
"
:
rawMessage
});
dialog
.
show
();
timelineRoot
.
destroyOnClose
(
dialog
);
var
component
=
Qt
.
createComponent
(
"
qrc:/qml/dialogs/RawMessageDialog.qml
"
)
if
(
component
.
status
==
Component
.
Ready
)
{
var
dialog
=
component
.
createObject
(
timelineRoot
,
{
"
rawMessage
"
:
rawMessage
});
dialog
.
show
();
timelineRoot
.
destroyOnClose
(
dialog
);
}
else
{
console
.
error
(
"
Failed to create component:
"
+
component
.
errorString
());
}
}
function
onConfetti
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment