Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-libclient
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-libclient
Commits
d9b5182f
Commit
d9b5182f
authored
11 years ago
by
Emmanuel Lepage Vallee
Browse files
Options
Downloads
Patches
Plain Diff
[ #36391 ] Fix cppcheck warnings
parent
118a2e58
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/accountlistmodel.cpp
+2
-5
2 additions, 5 deletions
src/accountlistmodel.cpp
src/call.cpp
+1
-1
1 addition, 1 deletion
src/call.cpp
src/contactproxymodel.cpp
+1
-1
1 addition, 1 deletion
src/contactproxymodel.cpp
src/numbercompletionmodel.cpp
+5
-5
5 additions, 5 deletions
src/numbercompletionmodel.cpp
with
9 additions
and
12 deletions
src/accountlistmodel.cpp
+
2
−
5
View file @
d9b5182f
...
...
@@ -241,13 +241,12 @@ void AccountListModel::slotVoiceMailNotify(const QString &accountID, int count)
void
AccountListModel
::
update
()
{
ConfigurationManagerInterface
&
configurationManager
=
DBus
::
ConfigurationManager
::
instance
();
Account
*
current
;
QList
<
Account
*>
tmp
;
for
(
int
i
=
0
;
i
<
m_lAccounts
.
size
();
i
++
)
tmp
<<
m_lAccounts
[
i
];
for
(
int
i
=
0
;
i
<
tmp
.
size
();
i
++
)
{
current
=
tmp
[
i
];
Account
*
current
=
tmp
[
i
];
if
(
!
current
->
isNew
()
&&
(
current
->
state
()
!=
Account
::
AccountEditState
::
NEW
&&
current
->
state
()
!=
Account
::
AccountEditState
::
MODIFIED
&&
current
->
state
()
!=
Account
::
AccountEditState
::
OUTDATED
))
...
...
@@ -297,7 +296,6 @@ void AccountListModel::save()
//create or update each account from accountList
for
(
int
i
=
0
;
i
<
size
();
i
++
)
{
Account
*
current
=
(
*
this
)[
i
];
//current->save();
current
->
performAction
(
Account
::
AccountEditAction
::
SAVE
);
}
...
...
@@ -406,9 +404,8 @@ QVector<Account*> AccountListModel::getAccountsByState(const QString& state)
///Get the first registerred account (default account)
Account
*
AccountListModel
::
firstRegisteredAccount
()
const
{
Account
*
current
;
for
(
int
i
=
0
;
i
<
m_lAccounts
.
count
();
++
i
)
{
current
=
m_lAccounts
[
i
];
Account
*
current
=
m_lAccounts
[
i
];
if
(
current
&&
current
->
registrationStatus
()
==
Account
::
State
::
REGISTERED
&&
current
->
isEnabled
())
return
current
;
else
if
(
current
&&
(
current
->
registrationStatus
()
==
Account
::
State
::
READY
)
&&
m_lAccounts
.
count
()
==
1
)
...
...
This diff is collapsed.
Click to expand it.
src/call.cpp
+
1
−
1
View file @
d9b5182f
...
...
@@ -808,7 +808,7 @@ Call::State Call::performAction(Call::Action action)
try
{
changeCurrentState
(
actionPerformedStateMap
[
previousState
][
action
]);
}
catch
(
Call
::
State
state
)
{
catch
(
Call
::
State
&
state
)
{
qDebug
()
<<
"State change failed (actionPerformedStateMap)"
<<
state
;
m_CurrentState
=
Call
::
State
::
ERROR
;
emit
stateChanged
();
...
...
This diff is collapsed.
Click to expand it.
src/contactproxymodel.cpp
+
1
−
1
View file @
d9b5182f
...
...
@@ -70,7 +70,7 @@ TopLevelItem::~TopLevelItem() {
}
ContactTreeNode
::
ContactTreeNode
(
Contact
*
ct
,
ContactProxyModel
*
parent
)
:
CategorizedCompositeNode
(
CategorizedCompositeNode
::
Type
::
CONTACT
),
m_pContact
(
ct
)
m_pContact
(
ct
)
,
m_pParent3
(
nullptr
)
{
m_pBinder
=
new
ContactTreeBinder
(
parent
,
this
);
}
...
...
This diff is collapsed.
Click to expand it.
src/numbercompletionmodel.cpp
+
5
−
5
View file @
d9b5182f
...
...
@@ -217,8 +217,8 @@ void NumberCompletionModel::getRange(QMap<QString,PhoneDirectoryModel::NumberWra
int
toAdd
=
size
-
1
;
mid
=
iBeg
;
while
(
toAdd
&&
mid
!=
map
.
end
())
{
mid
++
;
toAdd
--
;
++
mid
;
--
toAdd
;
}
}
if
(
mid
!=
map
.
end
()
&&
mid
.
key
().
left
(
prefixLen
)
==
pref
&&
iBeg
.
key
().
left
(
prefixLen
)
<
pref
)
{
...
...
@@ -236,7 +236,7 @@ void NumberCompletionModel::getRange(QMap<QString,PhoneDirectoryModel::NumberWra
}
while
((
iEnd
).
key
().
left
(
prefixLen
)
==
pref
&&
iEnd
+
1
!=
map
.
end
())
{
iEnd
++
;
++
iEnd
;
}
endOk
=
(
iEnd
.
key
().
left
(
prefixLen
)
==
pref
);
...
...
@@ -245,7 +245,7 @@ void NumberCompletionModel::getRange(QMap<QString,PhoneDirectoryModel::NumberWra
}
while
(
iBeg
.
key
().
left
(
prefixLen
)
!=
pref
&&
iBeg
!=
iEnd
)
iBeg
++
;
++
iBeg
;
if
(
iEnd
==
iBeg
&&
iBeg
.
key
().
left
(
prefixLen
)
!=
pref
)
{
iEnd
=
map
.
end
();
...
...
@@ -257,7 +257,7 @@ void NumberCompletionModel::getRange(QMap<QString,PhoneDirectoryModel::NumberWra
set
<<
n
;
}
}
iBeg
++
;
++
iBeg
;
}
}
...
...
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