From 8b1d94fe3e548ee933ad5a5644f010ea4dcaf8a0 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 11 Feb 2015 07:00:52 +0000 Subject: [PATCH] fix (by thunder) to avoid calling QPixmap outside the main thread, causing some avatars to fail to load git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7938 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- retroshare-gui/src/gui/gxs/GxsIdDetails.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp b/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp index 6d4aa1e54..71dea2651 100644 --- a/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp +++ b/retroshare-gui/src/gui/gxs/GxsIdDetails.cpp @@ -201,10 +201,14 @@ bool GxsIdDetails::process(const RsGxsId &id, GxsIdDetailsCallbackFunction callb } /* Try to get the information */ - if (rsIdentity && rsIdentity->getIdDetails(id, details)) { - callback(GXS_ID_DETAILS_TYPE_DONE, details, object, data); - return true; - } + // the idea behind this was, to call the callback directly when the identity is already loaded in librs + // without one timer tick, but it causes the use of Pixmap in avatars within a threat that is different than + // the GUI thread, which is not allowed by Qt => some avatars fail to load. + + // if (rsIdentity && rsIdentity->getIdDetails(id, details)) { + // callback(GXS_ID_DETAILS_TYPE_DONE, details, object, data); + // return true; + // } details.mId = id;