Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Akonadi Contacts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
Akonadi Contacts
Commits
cd42783d
Commit
cd42783d
authored
Jun 03, 2014
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecated--
parent
3540c03d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
60 deletions
+0
-60
akonadi-contact/src/contacteditor.cpp
akonadi-contact/src/contacteditor.cpp
+0
-53
akonadi-contact/src/contacteditor.h
akonadi-contact/src/contacteditor.h
+0
-7
No files found.
akonadi-contact/src/contacteditor.cpp
View file @
cd42783d
...
...
@@ -293,59 +293,6 @@ void ContactEditor::saveContactInAddressBook()
}
}
bool
ContactEditor
::
saveContact
()
{
if
(
d
->
mMode
==
EditMode
)
{
if
(
!
d
->
mItem
.
isValid
()
)
{
return
true
;
}
if
(
d
->
mReadOnly
)
{
return
true
;
}
KABC
::
Addressee
addr
=
d
->
mItem
.
payload
<
KABC
::
Addressee
>
();
d
->
storeContact
(
addr
,
d
->
mContactMetaData
);
d
->
mContactMetaData
.
store
(
d
->
mItem
);
d
->
mItem
.
setPayload
<
KABC
::
Addressee
>
(
addr
);
Akonadi
::
ItemModifyJob
*
job
=
new
Akonadi
::
ItemModifyJob
(
d
->
mItem
);
connect
(
job
,
SIGNAL
(
result
(
KJob
*
)),
SLOT
(
storeDone
(
KJob
*
))
);
}
else
if
(
d
->
mMode
==
CreateMode
)
{
if
(
!
d
->
mDefaultCollection
.
isValid
()
)
{
const
QStringList
mimeTypeFilter
(
KABC
::
Addressee
::
mimeType
()
);
AutoQPointer
<
CollectionDialog
>
dlg
=
new
CollectionDialog
(
this
);
dlg
->
setMimeTypeFilter
(
mimeTypeFilter
);
dlg
->
setAccessRightsFilter
(
Collection
::
CanCreateItem
);
dlg
->
setCaption
(
i18n
(
"Select Address Book"
)
);
dlg
->
setDescription
(
i18n
(
"Select the address book the new contact shall be saved in:"
)
);
if
(
dlg
->
exec
()
==
KDialog
::
Accepted
)
{
setDefaultAddressBook
(
dlg
->
selectedCollection
()
);
}
else
{
return
false
;
}
}
KABC
::
Addressee
addr
;
d
->
storeContact
(
addr
,
d
->
mContactMetaData
);
Akonadi
::
Item
item
;
item
.
setPayload
<
KABC
::
Addressee
>
(
addr
);
item
.
setMimeType
(
KABC
::
Addressee
::
mimeType
()
);
d
->
mContactMetaData
.
store
(
item
);
Akonadi
::
ItemCreateJob
*
job
=
new
Akonadi
::
ItemCreateJob
(
item
,
d
->
mDefaultCollection
);
connect
(
job
,
SIGNAL
(
result
(
KJob
*
)),
SLOT
(
storeDone
(
KJob
*
))
);
}
return
true
;
}
void
ContactEditor
::
setContactTemplate
(
const
KABC
::
Addressee
&
contact
)
{
d
->
loadContact
(
contact
,
d
->
mContactMetaData
);
...
...
akonadi-contact/src/contacteditor.h
View file @
cd42783d
...
...
@@ -152,13 +152,6 @@ class AKONADI_CONTACT_EXPORT ContactEditor : public QWidget
*/
void
loadContact
(
const
Akonadi
::
Item
&
contact
);
/**
* Saves the contact from the editor back to the storage.
* @deprecated use saveContactInAddressBook. We can't get contactStored and error infos.
* Remove it for KDE SC5
*/
AKONADI_CONTACT_DEPRECATED
bool
saveContact
();
/**
* Save the contact from the editor back to the storage. And return error.
* Need to connect to finished() signal, to keep time to emit signal.
...
...
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