[Server] Don't use deprecated QSet methods and minor code improvements
ClosedPublic

Authored by ahmadsamir on Feb 13 2020, 10:09 AM.

Details

Summary

Drop one usage of QSet::fromList(), and use QList::removeDuplicates()
instead, assuming the conversion for QList to QSet was to remove
duplicates.

Return early if nameValue is empty, this also guards against accesing
an out of bounds index.

Use QList::at() instead of [], to prevent detaching.

Test Plan

using sasl still works

Diff Detail

Repository
R7 Konversation
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahmadsamir requested review of this revision.Feb 13 2020, 10:09 AM
ahmadsamir created this revision.
psn accepted this revision.Tue, Mar 3, 2:23 PM

looks good to me

This revision is now accepted and ready to land.Tue, Mar 3, 2:23 PM
This revision was automatically updated to reflect the committed changes.