~adamreichold/qpdfview/trunk

« back to all changes in this revision

Viewing changes to sources/recentlyusedmenu.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:
56
56
            removeAction(action);
57
57
            m_openActionGroup->removeAction(action);
58
58
 
59
 
            insertAction(actions().first(), action);
 
59
            insertAction(actions().constFirst(), action);
60
60
            m_openActionGroup->addAction(action);
61
61
 
62
62
            return;
65
65
 
66
66
    if(m_openActionGroup->actions().count() >= m_count)
67
67
    {
68
 
        QAction* first = m_openActionGroup->actions().first();
 
68
        QAction* first = m_openActionGroup->actions().constFirst();
69
69
 
70
70
        removeAction(first);
71
71
        m_openActionGroup->removeAction(first);
77
77
    action->setToolTip(fileInfo.absoluteFilePath());
78
78
    action->setData(fileInfo.absoluteFilePath());
79
79
 
80
 
    insertAction(actions().first(), action);
 
80
    insertAction(actions().constFirst(), action);
81
81
    m_openActionGroup->addAction(action);
82
82
}
83
83