cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp
changeset 47 cb7afde124a3
parent 46 95d45f234cf3
child 60 a9c709db68db
--- a/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Wed Jun 23 18:39:24 2010 +0300
+++ b/cmmanager/cpdestinationplugin/src/cpdestinationentryitem.cpp	Tue Jul 06 14:42:41 2010 +0300
@@ -534,7 +534,11 @@
             for (int i = 0; i < apIds.count(); i++) {
                 CmConnectionMethodShim *cm;
                 cm = cmm->connectionMethod(apIds.at(i));
-                apList.append(QSharedPointer<CmConnectionMethodShim>(cm));
+                if (!cm->getBoolAttribute(CMManagerShim::CmHidden)) {
+                    apList.append(QSharedPointer<CmConnectionMethodShim>(cm));
+                } else {
+                    delete cm;
+                }
             }
         } else {
             destination = cmm->destination(mDestinationId);
@@ -542,7 +546,12 @@
             for (int i = 0; i < apCount; i++) {
                 CmConnectionMethodShim *cm = NULL;
                 cm = destination->connectionMethod(i);
-                apList.append(QSharedPointer<CmConnectionMethodShim>(cm));
+                if (!cm->getBoolAttribute(CMManagerShim::CmDestination)
+                     && !cm->getBoolAttribute(CMManagerShim::CmHidden)) {
+                    apList.append(QSharedPointer<CmConnectionMethodShim>(cm));
+                } else {
+                    delete cm;
+                }
             }
             delete destination;
         }