I have this compile error which has got me stumped.

error: passing ‘const QString’ as ‘this’ argument of ‘QString& QString::remove(const QRegExp&)’ discards qualifiers
the code in question is:

Qt Code:
  1. QString getPhoneMask(const QString &text)
  2. {
  3. QString tmp = text.remove(QRegExp("[()-]"));
To copy to clipboard, switch view to plain text mode 

I don't understand this...can anyone decipher the message ?