Use KTextEditor for source editing if available (benefits: line numbering, syntax highlighting etc.)