fix misuse of std::unique's result
fix misuse of std::unique's result

After calling std::unique, we need to erase the range of duplicates,
not just the start of the range. Also, we can omit the check for
the range end.

Change-Id: Ie1cd7f92e01c9ceac28df834bda13125b29cf507
Reviewed-by: Christian Kandeler <3aa99dcdd3f0cac61fb81c2a11771c0cc2497607@theqtcompany.com>

qt-labs/qbs,qt-labs/qbs,qtproject/qt-labs-qbs,gatzka/qt-labs-qbs,gatzka/qt-labs-qbs,gatzka/qt-labs-qbs,gatzka/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,gatzka/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,qt-labs/qbs,gatzka/qt-labs-qbs,qtproject/qt-labs-qbs,qtproject/qt-labs-qbs,qt-labs/qbs,qtproject/qt-labs-qbs,gatzka/qt-labs-qbs