KStringHandler::escapeAmpersands()? [Re: KDE_3_1_BRANCH:	kdebase/konsole/konsole]
    Stephan Binner 
    binner at kde.org
       
    Mon Jul 14 21:44:38 BST 2003
    
    
  
On Monday 14 July 2003 22:28, Stephan Binner wrote:
> Make ampersand escape work with any amount of ampersands.
> -    ra->setText(dlg.text().replace("&","&&"));
> +    ra->setText(dlg.text().replace(QRegExp("^&|([^&])&"),"\\1&&"));
Would this make a good KStringHandler function or is it short and easy
enough to be copied to almost everywhere? :-)
Bye,
   Steve
    
    
More information about the kde-core-devel
mailing list