WCompleteLineEdit: refactor and fix needComplete()
WCompleteLineEdit: Fix may be undefined var: pos.