Hi , I have a problem when compile following code:
Qt Code:
  1. for(int i=0;i<curConnections.size();++i)
  2. {
  3. if (curConnections.at(i).Descriptor()==connName)
  4. {
  5. curConnections.at(i).sendCmd(cmd);
  6. break;
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 

Compiler complains:
error: passing 'const ConnConnection' as 'this' argument of 'void ConnConnection::sendCmd(const QString&)' discards qualifiers

Then I use following it compiles OK.

Qt Code:
  1. curConnections[i].sendCmd(cmd);
To copy to clipboard, switch view to plain text mode 

I am not quite get what's the difference of these 2 lines of code.