Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Add-ons
Commits
c6041bc8
Verified
Commit
c6041bc8
authored
May 05, 2022
by
Fushan Wen
Browse files
applets/dict: Add `loadingPlaceHolder` and `errorPlaceHolder`
Show loading status and error message in the config window.
parent
33f5aba6
Changes
1
Hide whitespace changes
Inline
Side-by-side
applets/dict/package/contents/ui/ConfigDictionaries.qml
View file @
c6041bc8
...
...
@@ -6,7 +6,7 @@
import
QtQuick
2.7
import
QtQuick
.
Controls
2.5
import
org
.
kde
.
kirigami
2.
5
as
Kirigami
import
org
.
kde
.
kirigami
2.
19
as
Kirigami
import
org
.
kde
.
plasma
.
private
.
dict
1.0
Page
{
...
...
@@ -51,4 +51,34 @@ Page {
}
}
}
Loader
{
active
:
dictionariesModel
.
loading
||
dictionariesModel
.
count
===
0
asynchronous
:
true
anchors.centerIn
:
parent
visible
:
active
sourceComponent
:
dictionariesModel
.
loading
?
loadingPlaceHolder
:
errorPlaceHolder
Component
{
id
:
loadingPlaceHolder
Kirigami.LoadingPlaceholder
{
anchors.centerIn
:
parent
}
}
Component
{
id
:
errorPlaceHolder
Kirigami.PlaceholderMessage
{
anchors.centerIn
:
parent
width
:
root
.
width
-
(
Kirigami
.
Units
.
largeSpacing
*
4
)
icon.name
:
"
network-disconnect
"
text
:
i18n
(
"
Unable to load dictionary list
"
)
explanation
:
i18nc
(
"
%2 human-readable error string
"
,
"
Error code: %1 (%2)
"
,
dictionariesModel
.
errorCode
,
dictionariesModel
.
errorString
)
}
}
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment