• Marc Mutz's avatar
    QUnixPrintWidget: fix some poor uses of the QComboBox API · 04e76ec8
    Marc Mutz authored
    
    - populate the widget with addItems(QStringList) instead of
      looping over addItem(QString)
    - Use findText() instead of looping over itemText(int).
      QComboBox::findText() delegates searching to the model
      (via QAbstractItemModel::match()), so is potentially
      much faster. I say potentially, because match() isn't
      properly reimplemented in most models, yet. But that is
      something to fix in the models.
    
    Change-Id: I6e52cf5af810ab7869c0270504a241868a5ca281
    Reviewed-by: default avatarOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
    04e76ec8