summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-08-22 05:44:02 (GMT)
committerMontel Laurent <montel@kde.org>2016-08-22 05:46:19 (GMT)
commit9764181593d6fc2de82f341d2f101433870d9156 (patch)
treeeb2af58088ae4fc33582bbe1332989763c59fe45
parentb124b0c6482d0f59e1717bdc1dff1e9769856c59 (diff)
Remove commented code
-rw-r--r--src/editor/generalinfoeditor/messaging/messagingwidgetlister.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/editor/generalinfoeditor/messaging/messagingwidgetlister.cpp b/src/editor/generalinfoeditor/messaging/messagingwidgetlister.cpp
index d276e5f..90a5bfc 100644
--- a/src/editor/generalinfoeditor/messaging/messagingwidgetlister.cpp
+++ b/src/editor/generalinfoeditor/messaging/messagingwidgetlister.cpp
@@ -41,65 +41,6 @@ MessagingWidgetLister::~MessagingWidgetLister()
}
-#if 0
-void IMEditWidget::loadContact(const KContacts::Addressee &contact)
-{
- mIMEdit->setText(contact.custom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-IMAddress")));
-
- const QStringList customs = contact.customs();
-
- foreach (const QString &custom, customs) {
- QString app, name, value;
- Akonadi::CustomFieldsListWidget::splitCustomField(custom, app, name, value);
-
- if (app.startsWith(QStringLiteral("messaging/"))) {
- if (name == QLatin1String("All")) {
- const QString protocol = app;
- const QStringList names = value.split(QChar(0xE000), QString::SkipEmptyParts);
-
- foreach (const QString &name, names) {
- mIMAddresses << IMAddress(protocol, name, (name == mIMEdit->text()));
- }
- }
- }
- }
-}
-
-void IMEditWidget::storeContact(KContacts::Addressee &contact) const
-{
- if (!mIMEdit->text().isEmpty()) {
- contact.insertCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-IMAddress"), mIMEdit->text());
- } else {
- contact.removeCustom(QStringLiteral("KADDRESSBOOK"), QStringLiteral("X-IMAddress"));
- }
-
- // create a map with protocol as key and list of names for that protocol as value
- QMap<QString, QStringList> protocolMap;
-
- // fill map with all known protocols
- foreach (const QString &protocol, IMProtocols::self()->protocols()) {
- protocolMap.insert(protocol, QStringList());
- }
-
- // add the configured addresses
- foreach (const IMAddress &address, mIMAddresses) {
- protocolMap[address.protocol()].append(address.name());
- }
-
- // iterate over this list and modify the contact according
- QMapIterator<QString, QStringList> it(protocolMap);
- while (it.hasNext()) {
- it.next();
-
- if (!it.value().isEmpty()) {
- contact.insertCustom(it.key(), QStringLiteral("All"), it.value().join(QString(0xE000)));
- } else {
- contact.removeCustom(it.key(), QStringLiteral("All"));
- }
- }
-}
-
-#endif
void MessagingWidgetLister::loadContact(const KContacts::Addressee &contact)
{