Commit 09a7b3bd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix method signature when we build against qt6

parent d3c24121
......@@ -36,7 +36,11 @@ AudioLevelWidget::AudioLevelWidget(int width, QWidget *parent)
AudioLevelWidget::~AudioLevelWidget() = default;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void AudioLevelWidget::enterEvent(QEnterEvent *event)
#else
void AudioLevelWidget::enterEvent(QEvent *event)
#endif
{
QWidget::enterEvent(event);
m_displayToolTip = true;
......
......@@ -26,7 +26,11 @@ protected:
void paintEvent(QPaintEvent *) override;
void resizeEvent(QResizeEvent *event) override;
void changeEvent(QEvent *event) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent *event) override;
#else
void enterEvent(QEvent *event) override;
#endif
void leaveEvent(QEvent *event) override;
private:
......
......@@ -673,7 +673,11 @@ void MyListView::dropEvent(QDropEvent *event)
QListView::dropEvent(event);
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void MyListView::enterEvent(QEnterEvent *event)
#else
void MyListView::enterEvent(QEvent *event)
#endif
{
QListView::enterEvent(event);
pCore->setWidgetKeyBinding(i18n("<b>Double click</b> to add a file to the project"));
......@@ -816,7 +820,11 @@ void MyTreeView::focusInEvent(QFocusEvent *event)
}
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void MyTreeView::enterEvent(QEnterEvent *event)
#else
void MyTreeView::enterEvent(QEvent *event)
#endif
{
QTreeView::enterEvent(event);
pCore->setWidgetKeyBinding(i18n("<b>Double click</b> to add a file to the project"));
......
......@@ -72,7 +72,11 @@ protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void focusInEvent(QFocusEvent *event) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent *event) override;
#else
void enterEvent(QEvent *event) override;
#endif
void leaveEvent(QEvent *event) override;
void dropEvent(QDropEvent *event) override;
......@@ -103,7 +107,11 @@ protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
void focusInEvent(QFocusEvent *event) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent *) override;
#else
void enterEvent(QEvent *event) override;
#endif
void leaveEvent(QEvent *event) override;
protected slots:
......
......@@ -188,7 +188,7 @@ EncodingProfilesChooser::EncodingProfilesChooser(QWidget *parent, EncodingProfil
, m_showAutoItem(showAutoItem)
{
QGridLayout *grid = new QGridLayout();
grid->setMargin(0);
grid->setContentsMargins(0, 0, 0, 0);
setLayout(grid);
m_profilesCombo = new QComboBox();
if (!configName.isEmpty()) {
......
......@@ -36,7 +36,11 @@ QStringList JogShuttleConfig::actionMap(const QString &actionsConfig)
continue;
}
// skip the 'button' prefix
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
int button_id = parts[0].midRef(BUTTON_PREFIX.size()).toInt();
#else
int button_id = QStringView(parts[0]).mid(BUTTON_PREFIX.size()).toInt();
#endif
// fprintf(stderr, " - Handling map key='%s' (ID=%d), value='%s'\n", parts[0].data().toLatin1(), button_id, parts[1].data().toLatin1()); // DBG
while (actionMap.size() <= button_id) {
actionMap << QString();
......
......@@ -108,7 +108,11 @@ AnalysisTree::AnalysisTree(QWidget *parent)
}
// virtual
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QMimeData *AnalysisTree::mimeData(const QList<QTreeWidgetItem *> &list) const
#else
QMimeData *AnalysisTree::mimeData(const QList<QTreeWidgetItem *> list) const
#endif
{
QString mimeData;
for (QTreeWidgetItem *item : list) {
......
......@@ -53,7 +53,11 @@ public:
explicit AnalysisTree(QWidget *parent = nullptr);
protected:
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QMimeData *mimeData(const QList<QTreeWidgetItem *> &list) const override;
#else
QMimeData *mimeData(const QList<QTreeWidgetItem *> list) const override;
#endif
};
/** @class ClipPropertiesController
......
......@@ -143,8 +143,11 @@ void TimecodeDisplay::wheelEvent(QWheelEvent *e)
slotEditingFinished();
}
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void TimecodeDisplay::enterEvent(QEnterEvent *e)
#else
void TimecodeDisplay::enterEvent(QEvent *e)
#endif
{
QAbstractSpinBox::enterEvent(e);
setFrame(true);
......
......@@ -123,7 +123,11 @@ protected:
void keyPressEvent(QKeyEvent *e) override;
void mouseReleaseEvent(QMouseEvent *) override;
void wheelEvent(QWheelEvent *e) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent *e) override;
#else
void enterEvent(QEvent *e) override;
#endif
void leaveEvent(QEvent *e) override;
QAbstractSpinBox::StepEnabled stepEnabled() const override;
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment