~adamreichold/qpdfview/trunk

« back to all changes in this revision

Viewing changes to sources/documentview.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:
240
240
 
241
241
#ifdef WITH_SYNCTEX
242
242
 
243
 
DocumentView::SourceLink scanForSourceLink(const QString& filePath, const int page, const QPointF& pos)
 
243
DocumentView::SourceLink scanForSourceLink(const QString& filePath, const int page, QPointF pos)
244
244
{
245
245
    DocumentView::SourceLink sourceLink;
246
246
 
265
265
 
266
266
#endif // WITH_SYNCTEX
267
267
 
268
 
inline bool modifiersAreActive(const QWheelEvent* event, const Qt::KeyboardModifiers& modifiers)
 
268
inline bool modifiersAreActive(const QWheelEvent* event, Qt::KeyboardModifiers modifiers)
269
269
{
270
270
    if(modifiers == Qt::NoModifier)
271
271
    {
660
660
 
661
661
class DocumentView::VerticalScrollBarChangedBlocker
662
662
{
 
663
    Q_DISABLE_COPY(VerticalScrollBarChangedBlocker)
 
664
 
663
665
private:
664
666
    DocumentView* const that;
665
667
 
1236
1238
    }
1237
1239
}
1238
1240
 
1239
 
void DocumentView::setThumbnailsViewportSize(const QSize& thumbnailsViewportSize)
 
1241
void DocumentView::setThumbnailsViewportSize(QSize thumbnailsViewportSize)
1240
1242
{
1241
1243
    if(m_thumbnailsViewportSize != thumbnailsViewportSize)
1242
1244
    {
1328
1330
    return url;
1329
1331
}
1330
1332
 
1331
 
DocumentView::SourceLink DocumentView::sourceLink(const QPoint& pos)
 
1333
DocumentView::SourceLink DocumentView::sourceLink(QPoint pos)
1332
1334
{
1333
1335
    SourceLink sourceLink;
1334
1336
 
2010
2012
    jumpToPage(page, false, rect.left(), rect.top());
2011
2013
}
2012
2014
 
2013
 
void DocumentView::on_pages_openInSourceEditor(int page, const QPointF& pos)
 
2015
void DocumentView::on_pages_openInSourceEditor(int page, QPointF pos)
2014
2016
{
2015
2017
#ifdef WITH_SYNCTEX
2016
2018