Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Network
KAccounts Providers
Commits
df88e51f
Commit
df88e51f
authored
Sep 21, 2020
by
Nicolas Fella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[nextcloud] Use controller's state property for view management
parent
b2061665
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
plugins/nextcloud-ui/nextcloud.cpp
plugins/nextcloud-ui/nextcloud.cpp
+1
-0
plugins/nextcloud-ui/package/contents/ui/main.qml
plugins/nextcloud-ui/package/contents/ui/main.qml
+13
-2
No files found.
plugins/nextcloud-ui/nextcloud.cpp
View file @
df88e51f
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
NextcloudWizard
::
NextcloudWizard
(
QObject
*
parent
)
NextcloudWizard
::
NextcloudWizard
(
QObject
*
parent
)
:
KAccountsUiPlugin
(
parent
)
:
KAccountsUiPlugin
(
parent
)
{
{
qmlRegisterUncreatableType
<
NextcloudController
>
(
"org.kde.kaccounts.nextcloud"
,
1
,
0
,
"NextcloudController"
,
QStringLiteral
(
"Only for enums"
));
}
}
NextcloudWizard
::~
NextcloudWizard
()
NextcloudWizard
::~
NextcloudWizard
()
...
...
plugins/nextcloud-ui/package/contents/ui/main.qml
View file @
df88e51f
...
@@ -6,10 +6,12 @@
...
@@ -6,10 +6,12 @@
*/
*/
import
QtQuick
2.2
import
QtQuick
2.2
import
org
.
kde
.
kirigami
2.5
as
Kirigami
import
QtQuick
.
Layouts
1.12
import
QtQuick
.
Layouts
1.12
import
QtQuick
.
Controls
2.5
import
QtQuick
.
Controls
2.5
import
org
.
kde
.
kirigami
2.5
as
Kirigami
import
org
.
kde
.
kaccounts
.
nextcloud
1.0
Kirigami.ApplicationWindow
{
Kirigami.ApplicationWindow
{
id
:
ncAccountRoot
id
:
ncAccountRoot
objectName
:
"
_root
"
objectName
:
"
_root
"
...
@@ -27,7 +29,16 @@ Kirigami.ApplicationWindow {
...
@@ -27,7 +29,16 @@ Kirigami.ApplicationWindow {
Loader
{
Loader
{
anchors.fill
:
parent
anchors.fill
:
parent
source
:
helper
.
isLoginComplete
?
Qt
.
resolvedUrl
(
"
Services.qml
"
)
:
Qt
.
resolvedUrl
(
"
Server.qml
"
)
source
:
{
switch
(
helper
.
state
)
{
case
NextcloudController
.
ServerUrl
:
return
Qt
.
resolvedUrl
(
"
Server.qml
"
);
case
NextcloudController
.
WebLogin
:
return
""
case
NextcloudController
.
Services
:
return
Qt
.
resolvedUrl
(
"
Services.qml
"
)
}
}
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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