replace qAsConst with std::as_const in nglpdfdocument
Reduce Qt deprecation warnings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
3546d1c7aa
commit
46e673f660
1 file changed
+3
-3
@@ -163,7 +163,7 @@ void PDFDocument::setZoomFactor(double zoom)
|
|||||||
return;
|
return;
|
||||||
m_scaleFactor = zoom;
|
m_scaleFactor = zoom;
|
||||||
|
|
||||||
for (PDFPage *p : qAsConst(m_pages))
|
for (PDFPage *p : std::as_const(m_pages))
|
||||||
p->setZoomFactor(m_scaleFactor / m_widthFactor);
|
p->setZoomFactor(m_scaleFactor / m_widthFactor);
|
||||||
|
|
||||||
rebuildRanges();
|
rebuildRanges();
|
||||||
@@ -177,7 +177,7 @@ void PDFDocument::setRotation(Poppler::Page::Rotation rot)
|
|||||||
if (m_pages.isEmpty())
|
if (m_pages.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (PDFPage *p : qAsConst(m_pages))
|
for (PDFPage *p : std::as_const(m_pages))
|
||||||
p->setRotation(m_rotation);
|
p->setRotation(m_rotation);
|
||||||
|
|
||||||
rebuildRanges();
|
rebuildRanges();
|
||||||
@@ -322,7 +322,7 @@ void PDFDocument::rebuildRanges()
|
|||||||
QVBoxLayout *l = qobject_cast<QVBoxLayout *> (m_pdfLabel->layout());
|
QVBoxLayout *l = qobject_cast<QVBoxLayout *> (m_pdfLabel->layout());
|
||||||
m_ranges.clear();
|
m_ranges.clear();
|
||||||
int height = l->contentsMargins().top();
|
int height = l->contentsMargins().top();
|
||||||
for (PDFPage *p : qAsConst(m_pages))
|
for (PDFPage *p : std::as_const(m_pages))
|
||||||
{
|
{
|
||||||
m_ranges += height;
|
m_ranges += height;
|
||||||
height += p->height();
|
height += p->height();
|
||||||
|
|||||||
Reference in new issue
Block a user