~adamreichold/qpdfview/trunk

« back to all changes in this revision

Viewing changes to sources/settingsdialog.cpp

  • Committer: Adam Reichold
  • Date: 2017-04-19 21:01:25 UTC
  • mto: This revision was merged to the branch mainline in revision 2043.
  • Revision ID: adam.reichold@t-online.de-20170419210125-x3ubrcjkdmjzkn5g
Fix usage of QList in the bookmark and search models and various small performance issues reported by the clazy tool using the checks of "level0,level1,level2,no-missing-qobject-macro,no-qstring-allocations,no-copyable-polymorphic,no-ctor-missing-parent-argument,no-reserve-candidates".

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    return color.isValid() ? color : defaultColor;
79
79
}
80
80
 
81
 
void setCurrentIndexFromKeyboardModifiers(QComboBox* comboBox, const Qt::KeyboardModifiers& modifiers)
 
81
void setCurrentIndexFromKeyboardModifiers(QComboBox* comboBox, Qt::KeyboardModifiers modifiers)
82
82
{
83
83
    comboBox->setCurrentIndex(comboBox->findData(static_cast< int >(modifiers)));
84
84
}
854
854
    return comboBox;
855
855
}
856
856
 
857
 
QComboBox* SettingsDialog::addModifiersComboBox(QFormLayout* layout, const QString& label, const QString& toolTip, const Qt::KeyboardModifiers& modifiers)
 
857
QComboBox* SettingsDialog::addModifiersComboBox(QFormLayout* layout, const QString& label, const QString& toolTip, Qt::KeyboardModifiers modifiers)
858
858
{
859
859
    QComboBox* comboBox = new QComboBox(this);
860
860
    comboBox->addItem(QShortcut::tr("Shift"), static_cast< int >(Qt::ShiftModifier));