Commit a147c95d authored by Dan Pascu's avatar Dan Pascu

Fixed issue encoding the contact uri list in drag and drop operations

parent 48eb22a2
...@@ -2798,7 +2798,7 @@ class ContactDetailModel(QAbstractListModel): ...@@ -2798,7 +2798,7 @@ class ContactDetailModel(QAbstractListModel):
if contact_list: if contact_list:
mime_data.setData('application/x-blink-contact-list', QByteArray(pickle.dumps(contact_list))) mime_data.setData('application/x-blink-contact-list', QByteArray(pickle.dumps(contact_list)))
if contact_uris: if contact_uris:
mime_data.setData('application/x-blink-contact-uri-list', QByteArray(pickle.dumps(contact_uris))) mime_data.setData('application/x-blink-contact-uri-list', QByteArray(pickle.dumps((self.contact_detail, contact_uris))))
return mime_data return mime_data
def dropMimeData(self, mime_data, action, row, column, parent_index): def dropMimeData(self, mime_data, action, row, column, parent_index):
......
...@@ -1701,13 +1701,12 @@ class AudioSessionModel(QAbstractListModel): ...@@ -1701,13 +1701,12 @@ class AudioSessionModel(QAbstractListModel):
if not index.isValid(): if not index.isValid():
return return
try: try:
contact_uris = pickle.loads(str(mime_data.data('application/x-blink-contact-uri-list'))) contact, contact_uris = pickle.loads(str(mime_data.data('application/x-blink-contact-uri-list')))
except Exception: except Exception:
return False return False
session = self.sessions[index.row()] session = self.sessions[index.row()]
session_manager = SessionManager() session_manager = SessionManager()
for contact_uri in contact_uris: for contact_uri in contact_uris:
contact = contact_uri.contact
session_manager.create_session(contact, contact_uri.uri, [StreamDescription('audio')], sibling=session.blink_session) session_manager.create_session(contact, contact_uri.uri, [StreamDescription('audio')], sibling=session.blink_session)
return True return True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment