~adamreichold/qpdfview/trunk

« back to all changes in this revision

Viewing changes to sources/recentlyclosedmenu.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:
44
44
{
45
45
    if(m_tabActionGroup->actions().count() >= m_count)
46
46
    {
47
 
        QAction* first = m_tabActionGroup->actions().first();
 
47
        QAction* first = m_tabActionGroup->actions().constFirst();
48
48
 
49
49
        removeAction(first);
50
50
        m_tabActionGroup->removeAction(first);
52
52
        first->parent()->deleteLater();
53
53
    }
54
54
 
55
 
    insertAction(actions().first(), tabAction);
 
55
    insertAction(actions().constFirst(), tabAction);
56
56
    m_tabActionGroup->addAction(tabAction);
57
57
}
58
58