Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mobile Datovka
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Datovka projects
mobile Datovka
Commits
b9c91fe8
Commit
b9c91fe8
authored
Jun 16, 2017
by
Martin Straka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed conflicts and updated file dialog properties
parent
80fc03a4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
42 deletions
+26
-42
qml/dialogues/FileDialogue.qml
qml/dialogues/FileDialogue.qml
+7
-6
qml/main.qml
qml/main.qml
+0
-8
qml/pages/PageAccountList.qml
qml/pages/PageAccountList.qml
+3
-6
qml/pages/PageSettingsAccount.qml
qml/pages/PageSettingsAccount.qml
+14
-16
src/accounts.cpp
src/accounts.cpp
+2
-6
No files found.
qml/dialogues/FileDialogue.qml
View file @
b9c91fe8
...
...
@@ -32,21 +32,22 @@ Dialog {
focus
:
true
modal
:
true
title
:
""
title
:
"
Select path
"
standardButtons
:
(
selectedFileIndex
!=
-
1
)
?
(
Dialog
.
Ok
|
Dialog
.
Cancel
)
:
Dialog
.
Cancel
/* Place the dialogue in the centre. */
x
:
parent
.
width
/
2
-
width
/
2
y
:
parent
.
height
/
2
-
height
/
2
x
:
2
*
defaultMargin
y
:
2
*
defaultMargin
height
:
parent
.
height
/
2
width
:
parent
.
width
/
2
height
:
parent
.
height
-
4
*
defaultMargin
width
:
parent
.
width
-
4
*
defaultMargin
signal
finished
(
string
path
)
property
int
selectedFileIndex
:
-
1
function
raise
()
{
function
raise
(
title
)
{
root
.
title
=
title
folderModel
.
folder
=
standardLocationUrl
(
InteractionFilesystem
.
DESKTOP_LOCATION
)
root
.
open
()
}
...
...
qml/main.qml
View file @
b9c91fe8
...
...
@@ -114,7 +114,6 @@ ApplicationWindow {
/* Exposes nested stack to code outside the page component. */
property
var
nestedStack
:
null
/* Password/OTP input dialog, emitted from C++ */
InputDialogue
{
id
:
inputDialog
...
...
@@ -129,13 +128,6 @@ ApplicationWindow {
}
}
FileDialogue
{
id
:
fileDialogue
onFinished
:
{
console
.
log
(
"
FileDialogue closed with '
"
+
path
+
"
'
"
)
}
}
StackView
{
// Page area.
id
:
mainStack
anchors.fill
:
parent
...
...
qml/pages/PageAccountList.qml
View file @
b9c91fe8
...
...
@@ -89,13 +89,10 @@ Component {
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
fileDialogue
.
raise
()
/*
pageView
.
push
(
pageAboutApp
,
{
"pageView": pageView,
"statusBar": statusBar
}, StackView.Immediate)
*/
"
pageView
"
:
pageView
,
"
statusBar
"
:
statusBar
},
StackView
.
Immediate
)
}
}
}
...
...
qml/pages/PageSettingsAccount.qml
View file @
b9c91fe8
...
...
@@ -44,6 +44,19 @@ Item {
accounts
.
getAccountData
(
userName
)
}
}
FileDialogue
{
id
:
fileDialogue
onFinished
:
{
if
(
path
==
""
)
{
certPathLabelId
.
visible
=
false
}
else
{
certPathLabelId
.
visible
=
true
certPathLabelId
.
text
=
path
}
}
}
PageHeader
{
id
:
headerBar
title
:
qsTr
(
"
Add a new account
"
)
...
...
@@ -198,21 +211,6 @@ Item {
wrapMode
:
Text
.
WrapAnywhere
text
:
""
}
FileDialog
{
id
:
fileDialog
title
:
qsTr
(
"
Please choose a certificate file
"
)
folder
:
shortcuts
.
home
nameFilters
:
[
qsTr
(
"
Cert file
"
)
+
"
(*.pem *.p12 *.pfx)
"
]
selectMultiple
:
false
onAccepted
:
{
certPathLabelId
.
text
=
fileDialog
.
fileUrl
.
toString
()
fileDialog
.
close
()
}
onRejected
:
{
fileDialog
.
close
()
}
Component.onCompleted
:
visible
=
false
}
Button
{
id
:
certPathButtonId
visible
:
false
...
...
@@ -220,7 +218,7 @@ Item {
height
:
inputItemHeight
font.pointSize
:
defaultTextFont
.
font
.
pointSize
onClicked
:
{
fileDialog
.
open
(
)
fileDialog
ue
.
raise
(
"
Select certificate file
"
)
}
}
Text
{
...
...
src/accounts.cpp
View file @
b9c91fe8
...
...
@@ -242,9 +242,7 @@ bool Accounts::updateAccount(const QVariant &acntModelVariant,
}
acntData
.
setStoreToDisk
(
storeToDisk
);
QUrl
url
(
certPath
,
QUrl
::
TolerantMode
);
url
.
toLocalFile
();
acntData
.
setCertPath
(
url
.
toLocalFile
());
acntData
.
setCertPath
(
certPath
);
/* Model data have changed. */
emit
AccountListModel
::
globAccounts
.
accountDataChanged
(
userName
);
...
...
@@ -286,9 +284,7 @@ bool Accounts::createAccount(const QVariant &acntModelVariant,
acntData
.
setTestAccount
(
isTestAccount
);
acntData
.
setRememberPwd
(
rememberPwd
);
acntData
.
setStoreToDisk
(
storeToDisk
);
QUrl
url
(
certPath
,
QUrl
::
TolerantMode
);
url
.
toLocalFile
();
acntData
.
setCertPath
(
url
.
toLocalFile
());
acntData
.
setCertPath
(
certPath
);
if
(
accountModel
->
addAccount
(
acntData
)
==
-
2
)
{
Dialogues
::
errorMessage
(
Dialogues
::
CRITICAL
,
...
...
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