TextEditor: Replace in-class connection by virtual function

Change-Id: Ifb51606f71100223631d086318c230a478d70712
Reviewed-by: Christian Stenger <christian.stenger@digia.com>