title: QMap insert QVector<QString> by pointer or value?
body: <p>I want to build up a map of devices such that the map contains:</p>
  
  <p>QString 'DeviceID' and QVector 'Command List'</p>
  
  <p>Currently I have the QMap as follows:</p>
  
  <pre><code>QMap&lt;QString, QVector&lt;QString&gt; *&gt; devices;
  
  QVector&lt;QString&gt; *pCommands= new QVector&lt;QString&gt;;
  //       :
  // Fill pCommands with lots of data here
  //       :
  devices.insert(RadioID, pCommands);
  </code></pre>
  
  <p>But I am wondering if this is actually any better then:</p>
  
  <pre><code>QMap&lt;QString, QVector&lt;QString&gt;&gt; devices;
  
  QVector&lt;QString&gt; commands;
  //       :
  // Fill commands with lots of data here
  //       :
  devices.insert(RadioID, commands);
  </code></pre>
  
  <p>I am sure that I read somewhere that Qt does something quite efficient when copying data. I am not seeing many people using pointers with Qt and it seems messy that I have to go through the QMap deleting all the QVector's at the end...</p>
  
  <p>I am using c++11, so maybe some kind of move semantic may work here?</p>
  
  <p><strong>EDIT</strong>
  I have modified the comments in the code to show that the vector is not empty.
  Also I would state that I do not need to change the data once it is stored.</p>