title: Qt String Comparison
body: <p>Suppose I have:</p>
  
  <pre><code>QString x;
  </code></pre>
  
  <p>Is the following code fragment:</p>
  
  <pre><code>if(x.compare("abcdefg") == 0){
    doSomething();
  }
  else{
    doSomethingElse();
  }
  </code></pre>
  
  <p>... functionally equivalent to:</p>
  
  <pre><code>if(x == "abcdefg"){
    doSomething();
  }
  else{
    doSomethingElse();
  }
  </code></pre>
  
  <p>I could prove this for myself by writing a fairly trivial program and executing it, but I was surprised I couldn't find the question / answer here, so I thought I'd ask it for the sake of future me / others.</p>