Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
c99d4967
Commit
c99d4967
authored
Oct 5, 2022
by
Andreas Traczyk
Committed by
Sébastien Blin
Oct 6, 2022
Browse files
Options
Downloads
Patches
Plain Diff
accountwizard: remove some useless parameters
Change-Id: I19a26ef9ea3d58565ca2e62f1b75ff8c119abdee GitLab:
#847
parent
f377f257
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/accountadapter.cpp
+5
-6
5 additions, 6 deletions
src/app/accountadapter.cpp
src/app/accountadapter.h
+1
-3
1 addition, 3 deletions
src/app/accountadapter.h
src/app/wizardviewstepmodel.cpp
+34
-37
34 additions, 37 deletions
src/app/wizardviewstepmodel.cpp
with
40 additions
and
46 deletions
src/app/accountadapter.cpp
+
5
−
6
View file @
c99d4967
...
@@ -97,16 +97,14 @@ AccountAdapter::connectFailure()
...
@@ -97,16 +97,14 @@ AccountAdapter::connectFailure()
}
}
void
void
AccountAdapter
::
createJamiAccount
(
QString
registeredName
,
AccountAdapter
::
createJamiAccount
(
const
QVariantMap
&
settings
)
const
QVariantMap
&
settings
,
bool
isCreating
)
{
{
auto
registeredName
=
settings
[
"registeredName"
].
toString
();
Utils
::
oneShotConnect
(
Utils
::
oneShotConnect
(
&
lrcInstance_
->
accountModel
(),
&
lrcInstance_
->
accountModel
(),
&
lrc
::
api
::
AccountModel
::
accountAdded
,
&
lrc
::
api
::
AccountModel
::
accountAdded
,
[
this
,
registeredName
,
settings
,
isCreating
](
const
QString
&
accountId
)
{
[
this
,
registeredName
,
settings
](
const
QString
&
accountId
)
{
lrcInstance_
->
accountModel
().
setAvatar
(
accountId
,
settings
[
"avatar"
].
toString
());
lrcInstance_
->
accountModel
().
setAvatar
(
accountId
,
settings
[
"avatar"
].
toString
());
Utils
::
oneShotConnect
(
&
lrcInstance_
->
accountModel
(),
Utils
::
oneShotConnect
(
&
lrcInstance_
->
accountModel
(),
&
lrc
::
api
::
AccountModel
::
accountDetailsChanged
,
&
lrc
::
api
::
AccountModel
::
accountDetailsChanged
,
[
this
](
const
QString
&
accountId
)
{
[
this
](
const
QString
&
accountId
)
{
...
@@ -127,6 +125,7 @@ AccountAdapter::createJamiAccount(QString registeredName,
...
@@ -127,6 +125,7 @@ AccountAdapter::createJamiAccount(QString registeredName,
registeredNameSavedConnection_
registeredNameSavedConnection_
=
connect
(
&
lrcInstance_
->
accountModel
(),
=
connect
(
&
lrcInstance_
->
accountModel
(),
&
lrc
::
api
::
AccountModel
::
profileUpdated
,
&
lrc
::
api
::
AccountModel
::
profileUpdated
,
this
,
[
this
,
addedAccountId
=
accountId
](
const
QString
&
accountId
)
{
[
this
,
addedAccountId
=
accountId
](
const
QString
&
accountId
)
{
if
(
addedAccountId
==
accountId
)
{
if
(
addedAccountId
==
accountId
)
{
Q_EMIT
lrcInstance_
->
accountListChanged
();
Q_EMIT
lrcInstance_
->
accountListChanged
();
...
...
This diff is collapsed.
Click to expand it.
src/app/accountadapter.h
+
1
−
3
View file @
c99d4967
...
@@ -56,9 +56,7 @@ public:
...
@@ -56,9 +56,7 @@ public:
Q_INVOKABLE
void
changeAccount
(
int
row
);
Q_INVOKABLE
void
changeAccount
(
int
row
);
// Create normal Jami account, SIP account and JAMS accounts.
// Create normal Jami account, SIP account and JAMS accounts.
Q_INVOKABLE
void
createJamiAccount
(
QString
registeredName
,
Q_INVOKABLE
void
createJamiAccount
(
const
QVariantMap
&
settings
);
const
QVariantMap
&
settings
,
bool
isCreating
);
Q_INVOKABLE
void
createSIPAccount
(
const
QVariantMap
&
settings
);
Q_INVOKABLE
void
createSIPAccount
(
const
QVariantMap
&
settings
);
Q_INVOKABLE
void
createJAMSAccount
(
const
QVariantMap
&
settings
);
Q_INVOKABLE
void
createJAMSAccount
(
const
QVariantMap
&
settings
);
...
...
This diff is collapsed.
Click to expand it.
src/app/wizardviewstepmodel.cpp
+
34
−
37
View file @
c99d4967
...
@@ -32,7 +32,10 @@ WizardViewStepModel::WizardViewStepModel(LRCInstance* lrcInstance,
...
@@ -32,7 +32,10 @@ WizardViewStepModel::WizardViewStepModel(LRCInstance* lrcInstance,
{
{
reset
();
reset
();
connect
(
accountAdapter_
,
&
AccountAdapter
::
accountAdded
,
[
this
](
QString
accountId
,
int
index
)
{
connect
(
accountAdapter_
,
&
AccountAdapter
::
accountAdded
,
this
,
[
this
](
QString
accountId
,
int
index
)
{
accountAdapter_
->
changeAccount
(
index
);
accountAdapter_
->
changeAccount
(
index
);
auto
accountCreationOption
=
get_accountCreationOption
();
auto
accountCreationOption
=
get_accountCreationOption
();
...
@@ -64,20 +67,17 @@ void
...
@@ -64,20 +67,17 @@ void
WizardViewStepModel
::
nextStep
()
WizardViewStepModel
::
nextStep
()
{
{
auto
accountCreationOption
=
get_accountCreationOption
();
auto
accountCreationOption
=
get_accountCreationOption
();
if
(
accountCreationOption
==
AccountCreationOption
::
None
)
if
(
get_mainStep
()
==
MainSteps
::
Initial
||
accountCreationOption
==
AccountCreationOption
::
None
)
{
return
;
return
;
}
switch
(
get_mainStep
())
{
switch
(
accountCreationOption
)
{
case
MainSteps
::
NameRegistration
:
case
MainSteps
::
AccountCreation
:
{
switch
(
get_accountCreationOption
())
{
case
AccountCreationOption
::
CreateJamiAccount
:
case
AccountCreationOption
::
CreateJamiAccount
:
case
AccountCreationOption
::
CreateRendezVous
:
case
AccountCreationOption
::
CreateRendezVous
:
case
AccountCreationOption
::
ImportFromBackup
:
case
AccountCreationOption
::
ImportFromBackup
:
case
AccountCreationOption
::
ImportFromDevice
:
{
case
AccountCreationOption
::
ImportFromDevice
:
{
accountAdapter_
->
createJamiAccount
(
get_accountCreationInfo
()[
"registeredName"
].
toString
(),
accountAdapter_
->
createJamiAccount
(
get_accountCreationInfo
());
get_accountCreationInfo
(),
false
);
break
;
break
;
}
}
case
AccountCreationOption
::
ConnectToAccountManager
:
{
case
AccountCreationOption
::
ConnectToAccountManager
:
{
...
@@ -88,11 +88,8 @@ WizardViewStepModel::nextStep()
...
@@ -88,11 +88,8 @@ WizardViewStepModel::nextStep()
accountAdapter_
->
createSIPAccount
(
get_accountCreationInfo
());
accountAdapter_
->
createSIPAccount
(
get_accountCreationInfo
());
break
;
break
;
}
}
}
break
;
}
default
:
default
:
b
re
ak
;
re
turn
;
}
}
}
}
...
...
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