qdoc: simplify Text::clear()
Use std::exchange() to fold three lines into one, with correct
sequencing, and drop the nulling of m_first, which is a dead store:
when the while loop exits, m_first _is_ nullptr, otherwise control
would have been re-entered the loop again.
Amends the start of the public history.
Pick-to: 6.12 6.11 6.8
Change-Id: I43b152a723b446db7bca0f963922a874e41d0d8a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Topi Reinio <topi.reinio@qt.io>