title: Crash on QString assignment
body: <p>I'm pretty new to Qt and C++ so I'm probably missing something obvious, but for the life of me I can't figure out what is going wrong.  One of the classes in a program I wrote is causing a crash whenever I try to do a basic string assignment.  See below (slightly pared down).</p>
  
  <pre><code>class AutochargeData : public QWidget
  {
  
  public:
      AutochargeData(appData *appInfo, QWidget *parent = 0);
  
      QString orderNum;
      QString paymentMethod;
      QString total;
  
      void setPayment(QString payment);
      void setOrderID(QString orderID);
      void setTotal(QString total);
  
      void getPaymentData(QString orderID);
  
  private:
      appData *appInfo;
  
  };
  </code></pre>
  
  <p>So in the below code, I have tried many variations. I know the query is fine because I've used qDebug() to check the output.  I have tried skipping the set functions and doing a direct assignment, I have tried using the "this" keyword, and I have even tried just assigning a random string directly to the variables.  </p>
  
  <pre><code>AutochargeData::AutochargeData(appData *appInfo, QWidget *parent) :
      QWidget(parent)
  {
      this-&gt;appInfo = appInfo;
  }
  
  void AutochargeData::getPaymentData(QString orderID)
  {    
      QString queryString = "SELECT order_payment.method, order.increment_id, order.grand_total FROM order JOIN order_payment ON sales_flat_order.entity_id = order_payment.parent_id WHERE order.increment_id = '" + orderID + "';";
  
      QSqlQuery query(queryString, QSqlDatabase::database("db"));
      query.exec();
  
      while (query.next()) {
          setOrderID(query.value("increment_id").toString());
          setPayment(query.value("method").toString());
          setTotal(query.value("grand_total").toString());
      }
  }
  
  void AutochargeData::setPayment(QString payment)
  {
      paymentMethod = payment;
  }
  
  void AutochargeData::setOrderID(QString orderID)
  {
      orderNum = orderID;
  }
  
  void AutochargeData::setTotal(QString grandTotal)
  {
      total = grandTotal;
  }
  </code></pre>
  
  <p>Any time I tried to assign a string to the <code>orderNum</code>, <code>paymentMethod</code>, or <code>total</code> variables, the program crashes.  The debugger is ending on <code>QString::operator=(const char*)</code> in the <code>qstring.h</code> file.  As I mentioned, I am relatively new at this so it may be something obvious that I am missing.  But after multiple hours of googling and trying different variations, I am stumped.  Any thoughts would be much appreciated, and please let me know if there's more information that would be helpful.</p>