summaryrefslogtreecommitdiffstats
path: root/examples/pdfwidgets
diff options
context:
space:
mode:
Diffstat (limited to 'examples/pdfwidgets')
-rw-r--r--examples/pdfwidgets/pdfviewer/zoomselector.cpp6
-rw-r--r--examples/pdfwidgets/pdfviewer/zoomselector.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/pdfwidgets/pdfviewer/zoomselector.cpp b/examples/pdfwidgets/pdfviewer/zoomselector.cpp
index 0205489aa..e38140e67 100644
--- a/examples/pdfwidgets/pdfviewer/zoomselector.cpp
+++ b/examples/pdfwidgets/pdfviewer/zoomselector.cpp
@@ -57,11 +57,11 @@ ZoomSelector::ZoomSelector(QWidget *parent)
addItem(QLatin1String("200%"));
addItem(QLatin1String("400%"));
- connect(this, static_cast<void(QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
+ connect(this, &QComboBox::currentIndexChanged,
this, &ZoomSelector::onCurrentTextChanged);
connect(lineEdit(), &QLineEdit::editingFinished,
- this, [this](){onCurrentTextChanged(lineEdit()->text()); });
+ this, [this](){onCurrentTextChanged(0, lineEdit()->text()); });
}
void ZoomSelector::setZoomFactor(qreal zoomFactor)
@@ -74,7 +74,7 @@ void ZoomSelector::reset()
setCurrentIndex(8); // 100%
}
-void ZoomSelector::onCurrentTextChanged(const QString &text)
+void ZoomSelector::onCurrentTextChanged(int, const QString &text)
{
if (text == QLatin1String("Fit Width")) {
emit zoomModeChanged(QPdfView::FitToWidth);
diff --git a/examples/pdfwidgets/pdfviewer/zoomselector.h b/examples/pdfwidgets/pdfviewer/zoomselector.h
index c58d09970..0f27bafb4 100644
--- a/examples/pdfwidgets/pdfviewer/zoomselector.h
+++ b/examples/pdfwidgets/pdfviewer/zoomselector.h
@@ -57,7 +57,7 @@ signals:
void zoomFactorChanged(qreal zoomFactor);
private slots:
- void onCurrentTextChanged(const QString &text);
+ void onCurrentTextChanged(int, const QString &text);
};
#endif // ZOOMSELECTOR_H