-rw-r--r-- | libkdepim/externalapphandler.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 3079141..7200da9 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -1086,96 +1086,97 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete | |||
1086 | //Now check how many parts we have. | 1086 | //Now check how many parts we have. |
1087 | //=0 :no params to pass | 1087 | //=0 :no params to pass |
1088 | //>0 :parameters to pass | 1088 | //>0 :parameters to pass |
1089 | for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) | 1089 | for ( QStringList::Iterator it = paramlist.begin(); it != paramlist.end(); ++it ) |
1090 | { | 1090 | { |
1091 | QString param = (*it); | 1091 | QString param = (*it); |
1092 | QStringList keyvallist = QStringList::split("=", param); | 1092 | QStringList keyvallist = QStringList::split("=", param); |
1093 | 1093 | ||
1094 | //if we have keyvalue pairs, we assume that we pass a map to the envelope | 1094 | //if we have keyvalue pairs, we assume that we pass a map to the envelope |
1095 | QStringList::Iterator it2 = keyvallist.begin(); | 1095 | QStringList::Iterator it2 = keyvallist.begin(); |
1096 | QString key = (*it2); | 1096 | QString key = (*it2); |
1097 | key = key.replace( QRegExp("%1"), param1 ); | 1097 | key = key.replace( QRegExp("%1"), param1 ); |
1098 | key = key.replace( QRegExp("%2"), param2 ); | 1098 | key = key.replace( QRegExp("%2"), param2 ); |
1099 | ++it2; | 1099 | ++it2; |
1100 | 1100 | ||
1101 | if(it2 != keyvallist.end()) | 1101 | if(it2 != keyvallist.end()) |
1102 | { | 1102 | { |
1103 | QString value = (*it2); | 1103 | QString value = (*it2); |
1104 | value = value.replace( QRegExp("%1"), param1 ); | 1104 | value = value.replace( QRegExp("%1"), param1 ); |
1105 | value = value.replace( QRegExp("%2"), param2 ); | 1105 | value = value.replace( QRegExp("%2"), param2 ); |
1106 | 1106 | ||
1107 | valmap.insert(key, value); | 1107 | valmap.insert(key, value); |
1108 | useValMap = true; | 1108 | useValMap = true; |
1109 | } | 1109 | } |
1110 | else | 1110 | else |
1111 | { | 1111 | { |
1112 | // qDebug("pass parameter << %s", key.latin1()); | 1112 | // qDebug("pass parameter << %s", key.latin1()); |
1113 | (*e) << key; | 1113 | (*e) << key; |
1114 | } | 1114 | } |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | if (useValMap == true) | 1117 | if (useValMap == true) |
1118 | (*e) << valmap; | 1118 | (*e) << valmap; |
1119 | 1119 | ||
1120 | #endif | 1120 | #endif |
1121 | 1121 | ||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | 1124 | ||
1125 | 1125 | ||
1126 | /************************************************************************** | 1126 | /************************************************************************** |
1127 | * | 1127 | * |
1128 | **************************************************************************/ | 1128 | **************************************************************************/ |
1129 | 1129 | ||
1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) | 1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) |
1131 | { | 1131 | { |
1132 | 1132 | ||
1133 | if ( cmsg == "nextView()" ) { | 1133 | if ( cmsg == "nextView()" ) { |
1134 | qDebug("nextView()"); | ||
1134 | emit nextView(); | 1135 | emit nextView(); |
1135 | return; | 1136 | return; |
1136 | } | 1137 | } |
1137 | 1138 | ||
1138 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1139 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1139 | if (!res) | 1140 | if (!res) |
1140 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); | 1141 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); |
1141 | 1142 | ||
1142 | if (!res) | 1143 | if (!res) |
1143 | res = mDisplayDetails->appMessage( cmsg, data ); | 1144 | res = mDisplayDetails->appMessage( cmsg, data ); |
1144 | 1145 | ||
1145 | // if (!res) | 1146 | // if (!res) |
1146 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1147 | // res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1147 | } | 1148 | } |
1148 | 1149 | ||
1149 | 1150 | ||
1150 | 1151 | ||
1151 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) | 1152 | bool ExternalAppHandler::requestNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid) |
1152 | { | 1153 | { |
1153 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1154 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1154 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); | 1155 | return mNameEmailUidListFromKAPITransfer->sendMessageToTarget(sessionuid); |
1155 | } | 1156 | } |
1156 | 1157 | ||
1157 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1158 | bool ExternalAppHandler::returnNameEmailUidListFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1158 | { | 1159 | { |
1159 | QStringList list4, list5, list6; | 1160 | QStringList list4, list5, list6; |
1160 | 1161 | ||
1161 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); | 1162 | mNameEmailUidListFromKAPITransfer->setSourceChannel(sourceChannel); |
1162 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1163 | return mNameEmailUidListFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1163 | } | 1164 | } |
1164 | 1165 | ||
1165 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) | 1166 | bool ExternalAppHandler::requestFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QString& email) |
1166 | { | 1167 | { |
1167 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1168 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1168 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); | 1169 | return mFindByEmailFromKAPITransfer->sendMessageToTarget(sessionuid, email); |
1169 | } | 1170 | } |
1170 | 1171 | ||
1171 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) | 1172 | bool ExternalAppHandler::returnFindByEmailFromKAPI(const QString& sourceChannel, const QString& sessionuid, const QStringList& list1, const QStringList& list2, const QStringList& list3) |
1172 | { | 1173 | { |
1173 | QStringList list4, list5, list6; | 1174 | QStringList list4, list5, list6; |
1174 | 1175 | ||
1175 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); | 1176 | mFindByEmailFromKAPITransfer->setSourceChannel(sourceChannel); |
1176 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); | 1177 | return mFindByEmailFromKAPITransfer->sendMessageToSource(sessionuid, list1, list2, list3, list4, list5, list6); |
1177 | } | 1178 | } |
1178 | 1179 | ||
1179 | bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) | 1180 | bool ExternalAppHandler::requestDetailsFromKAPI(const QString& name, const QString& email, const QString& uid) |
1180 | { | 1181 | { |
1181 | mDisplayDetails->setSourceChannel(""); | 1182 | mDisplayDetails->setSourceChannel(""); |