Eliminate the crash on Unix caused by the QLockFile usage


We should not check against null because swap should always take place.
Initially, we do not construct a valid pointer guarded by the QScopedPointer
because not every constructor takes the portname argument, so it is possible to
create a QSerialPort instance without portname, and set it later.

Hence, removing the check makes sense, otherwise the smart pointer will guard a
null raw pointer which will cause crash all of a sudden when trying to be used.

Change-Id: Ib383f6eef2761ca5822585b848b0d29cce4eeb45
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
commit1eddbe335fc6d2ad4d1dca3a28d51d24b045bbf7
parente2e796301ab87aeedc1ab7952de8ae64df851646
authorLaszlo Papp <lpapp@kde.org>
committerThe Qt Project <gerrit-noreply@qt-project.org>
commit timeThu, 7 Nov 2013 15:36:30 +0100