- May 25, 2017
-
-
Guillaume Roguez authored
VCardUtils::parseMimeAttributes() returns by value, but it was used in IMConversationManagerPrivate::newMessage() by reference. So this reference is on a stack-allocated object and can be invalidated by the system. Use a by-value copy, mostly optimized by compiler with copy elision [1]. [1] http://en.cppreference.com/w/cpp/language/copy_elision Change-Id: I1b7ef8eb1ebc738949243d5ace1363d4b4fa3caf Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
- add contactAdded and contactRemoved signal required by clients using libwrap. Change-Id: I809139cd103380605de86d61a4841d436393f67d Reviewed-by:
Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
-
- May 24, 2017
-
-
- getContactDetails is missing in configurationmanager_wrap.h leadig clients without dbus to failed at compilation, when this function is called. Change-Id: I324fbd2644e9a5c72bb6468b7c63923c7e53535a Reviewed-by:
Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
-
- May 23, 2017
-
-
Stepan Salenikovich authored
Due to the ability to receive vCards from other peers (during a Call or from a ContactRequest), there are many possibilities to create duplicate Person objects. This is because up until now we have been using the Person's UID as a unique identifier. However the UID has come from the vCard, and we cannot trust the vCards we receive from peers to have either unique UIDs when they are different contacts, nor the same UID if its the same contact. Thus in the case of received vCards, we identify whether or not a new Person should be created based on the ContactMethod. Note that this doesn't necessarily solve the issue in the case we have multiple ContactMethods with the same RingID (this may happen when we have multiple Accounts communicating with the same peer). However, this is a step in the right direction. Change-Id: I9c05fe00fc46ba0e26e8886cad33cf0fd4afeb81
-
- May 19, 2017
-
-
Stepan Salenikovich authored
This fixes one particular instance of "contact duplication" in the RecentModel. When we had a call from a peer incoming for the very first time, a ContactMethod ndoe was first being created. Then we received the profile from the peer, and so a Person node was created. However, the contactChanged signal could be called before the Person node is created; in this case the ContactMethod node was not being removed and the result was a duplication of the the same contact twice in the RecentModel: once as a CM and once as a Person. Calling slotLastUsedTimeChanged() on the new Person ensures that the Person node is created. We also call slotContactChanged() from slotPersonAdded() to reduce code duplication. Change-Id: Ia9b49ab939a017052cccc69f8d72df5db0aef41d
-
- May 15, 2017
-
-
Houmin authored
Use the DRing::Account::TrustRequest constants instead Change-Id: I0f6e1e71c21fe689f071abe6d3ae5afed9a71926 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Stepan Salenikovich authored
It returns the bestId() of the lastUsedContactMethod(). This way views will not get an empty QVariant when asking for the number role from a Person item. This also makes sense as what we want to show most of the time and most of the time a Person will only have one ContactMethod anyways. Change-Id: I0edea8c4fe3f6848a523c4f88d3115cf13b20938 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Stepan Salenikovich authored
Changes the function to return the pointer to the last used ContactMethod. This is more generic than returning the id, since the caller can then decide what info they need themselves. Drops the "get" from the function name to follow LRC/Qt convention: getters don't begin with "get". Makes this getter public as its useful for other purposes as well. Change-Id: I8eb57c8d830e84e76365311870aaaf10dc5739a6 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
- May 12, 2017
-
-
Stepan Salenikovich authored
Instead of sending the vCard during an incoming or ringing call, we wait to send the vCard only once the call has started. This is to prevent connectivity failures during the call initialization due to dropped vCard packets. Change-Id: I08e63bf35724ed543c36d88cd43f872aa246b73c Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Stepan Salenikovich authored
This moves the logic for determining the best name to use away from the roleData function into its own function. This way we reduce the logic in roleDat() and make it easy to access this property if we have the pointer to a ContactMethod. Change-Id: Id1df8e0c0b40627c5c0f1f8ce922a7142c2076d6 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Stepan Salenikovich authored
This is to follow LRC/Qt naming convention. Getters don't begin with the word "get". Note that getBestId() has been kept so as not to break API, but marked as deprecated so that we can quickly update the clients. Change-Id: Ifcf1d66763b70b5ef4f1b67d39b40892263b5359 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Stepan Salenikovich authored
Calls and ContactMethods will support this role in case the user would like to explicitly get the URI and not the registered name. Change-Id: I920509a1c07c8b372110e2e97e9e335df57a0565 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Stepan Salenikovich authored
Whenever possible, we should be displaying the registered name instead of the RingID. We make the Ring::Role::Number data role use getBestId() instead of uri(). The user can still explicitly ask for the Uri if needed. Change-Id: I9dda876bff9c6dbe293f40781c5c388b7ec1bb2a Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
- May 11, 2017
-
-
Emmanuel Lepage Vallée authored
As of now, unresolved registered names could be passed to placeCall with a Ring account. As the URI parser doesn't have the metadata required to correctly pick the scheme, it used `sip:`. This isn't correct when the account is a Ring account (but the URI is unaware of that). This commit set the correct scheme before calling placeCall. Change-Id: Ied3cfd1ef7f7171e3bf05d51a245e35e2df95ffb Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Before this commit, registeredName, contact and presence would be lost when merging. Given it could not really happen for SIP account, it wasn't an issue. However, it is an issue for Ring accounts. Change-Id: I973e7b6a26f76c6d656dee211f201b9ef6f3c826 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
This commit complements the previous one. Now that Ring CMs are properly deduplicated once their registeredName is validated, disable the old entry in the debug model. It also foward the deduplication signal to the RecentModel/Timeline can also take notice. This greatly simplify the code. Change-Id: I4e8839744d0eb12aa32f4bf6a8a50f7e0cc51d88 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Will help makes some other algorithm saner Change-Id: I5fae9bab47c6b508a95cf318c1a5a9fdb26d4bb3 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
**WARNING** This makes the setRegisteredName method private and thus break the API. That method could not stay public as this would potentially corrupt the indexes. This patch adds the registered names to the global name directory. If `::getNumber()` is used with a known registered name, no new CM are created. This patch fixes the "most common" case, but doesn't implement the following corner cases: * If the registered name is already part of the directory, but not fully linked to an account and/or RingId. * If there is multiple name service For the multiple name service, the `NameDirectory::registeredNameFound` signal will need to use full URIs for the names (ring:foo@ns.ring.cx). This is out of this patch scope and will have side effects that needs to be addressed in each clients. Change-Id: If06561dc4cb56453cc77092f4c30c633e852b7fd Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
First of all, [begin/end][Insert/Remove][Rows/Columns] is a flat transaction and can only exist once per model. The code was calling begin in other begin section due to some lazy-loading code. This could result in SIGSEGV if the model had active proxies. More importantly, this code is called from the collections. Some collections run in different threads. The class had a mutex, but only used it in half the places it should have been used. This caused a crash on the macOS and KDE client. I could not manage to crash the Gnome client, but it is probably possible. ASAN also got asserted due to this even when it would have otherwise not crashed. The commit alse fix a memory leak when the ID was duplicated by the race condition. This is a band-aid on the problem: IDs potentially not unique. However a band-aid is better than acrash and the patch to fix this would be too invasive to get past Gerrit. Change-Id: I92e313d0243659b6af374a0cbf8bab18c3f6ba76 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
- May 10, 2017
-
-
Stepan Salenikovich authored
I forgot to remove this qDebug before submitting the patch which introduced it. Change-Id: I14cf6b6ae9b5b3689a38d8947547b08d5a25fa19 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Change-Id: I2e1a5299956fb9218d03e6429c98fbe15ce22cf0 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
For QML and tests Change-Id: I5957cc0e96a8476e60b1d325f00c49d425270bf0 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Allows accounts to be created using bindings other than C++ and also allow the "GammaRay" introspection debugger to work. Change-Id: I20af7073c01d3002463908daff97073f3fd23a8d Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
It *is* initialized, but some compilers fail to see that and print a scary warning. Change-Id: I2f92767f6c0e5186112e814c160841523dbdac5e Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Also change a proxy model property to a model interface. The bindings have trouble exporting the proxies. This is probably a Qt bug. This has no side effect I am aware of. They both share the same interface. Also remove commented out code which inits the role names. [SS: add change missing from commit msg] Change-Id: Ib3d2e3ed3b96d9d83a711a9005235d886840dfe5 Signed-off-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com> Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Make it accessible to QML Change-Id: Id3d88a1c56a48c8614d56ad80471a7833b1679e0 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
For the bindings Change-Id: I90572880acd3b96ec6442f2ad08024909f2c10a5 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Nicolas Jager authored
missing edit in d57d2748 make the next bug still present : the vcard sent was obtained trough a Person object returned by contact() from a ContactMethod. But this Person may be never set. fix : now we use the profile to get the vcard to send within the ContactRequest. Change-Id: I150715b45bf564fa7e0fb3fae5b186375dfe0ec1 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
- May 08, 2017
-
-
Nicolas Jager authored
bug : the vcard sent was obtained trough a Person object returned by contact() from a ContactMethod. But this Person may be never set. fix : now we use the profile to get the vcard to send within the ContactRequest. [SS: improve ci msg; use Account's profile, rather than selected profile] Change-Id: I21ef691e3fdd96a6e504989a1178444c0d4b90ef Signed-off-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com> Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
- May 05, 2017
-
-
Emmanuel Lepage Vallée authored
Also adopt an exit early code style to make it more readable. Change-Id: I51333e202244fbf14769507696ffae0c3807cc2b Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
When the user enters a string, it isn't always yet known if it is a search for registered name, a SIP URI or some local DNS names. However at some point the choice can be noarrowed down. This is a good time to set the scheme. This help later on top pick the right account and hopefully resolve the RingId before placing the call. Change-Id: Iad8283fc4c6ff2e4cfe189bf216f00720202ce92 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
There is a code path combination (that should not happen, but is reachable) that could cause a null dereference. [SS: add warning log in case it happens to make it easier to track down] Change-Id: I1c2c2b5be417e9ec74e0ab157c9aadcd0ec4a613 Signed-off-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com> Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Change-Id: I59a0dd2d74c10479c97292919736f2db5bdcfab2 Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
A missing `break`. Change-Id: I194ea1446627f2bc862f0309f83076abdde34aff Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Stepan Salenikovich authored
Make sure child Calls of a ContactMethod node are moved to the Person node when a Person node replaces a CM node. This should prevent two bugs. One is Calls not appearing in the smart list. The second is the model not properly signaling the tree view about the child rows moving. Change-Id: Ibff9186e8494d930726ccb0e8a0e61d2119bc315 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Early versions of the Ring protocol generated a mandatory self signed CA cert. This isn't true anymore. The error is just noise. This also fixes the error message. The enum to string mapping was in the wrong order. Change-Id: I0ca67b7185065e12a44c15dd5bbd4fdf170a8ec3
-
Kateryna Kostiuk authored
Check account new state and update prior Account only in case when current prior Account became unavailable. Change-Id: I74fcc1e056a4afc20fe923789be21c17806cc112 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
- May 02, 2017
-
-
Nicolas Jager authored
- mapToPersonFromIncomingContactRequest : this function creates a Person from a vCard stored by the daemon; we make sure to ignore any ContactMethods which might be contained in the vCard and only use the CM from which we receive it. - PendingContactRequestModel::data now can return : * PEER_ID : get the username if possible or ring Id if not. * FORMATTED_NAME : get the profile name stored in the vCard. * COUNT__ : used to get the number of elements in the enum. - ContactRequest now store a person. This person matches the vCard. - PeerProfileCollection updates the CM(s) of the vCards it stores with the last modified date of the vCard in to get the date at which the contact request was accepted. [SS: update commit message] [SS: change how we restore the ContactRequest accept date] Change-Id: I3bafda5b38d5e2332e095cd5f1f1d0b101847f86 Signed-off-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com> Reviewed-by:
Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
-
- May 01, 2017
-
-
AmarOk authored
When a contact is removed we need to remove it from personmodel and update recentmodel & categorizedcontactmodel. Change-Id: I09694a901278cdd01f771ea83498613159180e8d Tuleap: #1050 Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-
Emmanuel Lepage Vallée authored
Change-Id: If958f6aa7a89ca3878482b60be5c3905502cac3e Reviewed-by:
Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
-