Commit e2869a95 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compiles

parent c7fba1d0
......@@ -294,8 +294,8 @@ void KompareShell::readProperties(const KConfigGroup& config)
if (mode == QLatin1String("ComparingFiles"))
{
m_mode = Kompare::ComparingFiles;
m_sourceURL = config.readPathEntry("SourceUrl", QString());
m_destinationURL = config.readPathEntry("DestinationFile", QString());
m_sourceURL = QUrl::fromLocalFile(config.readPathEntry("SourceUrl", QString()));
m_destinationURL = QUrl::fromLocalFile(config.readPathEntry("DestinationFile", QString()));
viewPart()->readProperties(const_cast<KConfig*>(config.config()));
......@@ -304,7 +304,7 @@ void KompareShell::readProperties(const KConfigGroup& config)
else if (mode == QLatin1String("ShowingDiff"))
{
m_mode = Kompare::ShowingDiff;
m_diffURL = config.readPathEntry("DiffUrl", QString());
m_diffURL = QUrl::fromLocalFile(config.readPathEntry("DiffUrl", QString()));
viewPart()->readProperties(const_cast<KConfig*>(config.config()));
......
......@@ -75,8 +75,13 @@ KompareSaveOptionsWidget::KompareSaveOptionsWidget(const QString& source, const
connect(m_RCSRB, &QCheckBox::toggled, this, &KompareSaveOptionsWidget::updateCommandLine);
connect(m_UnifiedRB, &QCheckBox::toggled, this, &KompareSaveOptionsWidget::updateCommandLine);
connect(m_SideBySideRB, &QCheckBox::toggled, this, &KompareSaveOptionsWidget::updateCommandLine);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
connect(m_ContextLinesSB, &QSpinBox::textChanged,
this, &KompareSaveOptionsWidget::updateCommandLine);
#else
connect(m_ContextLinesSB, static_cast<void(QSpinBox::*)(const QString&)>(&QSpinBox::valueChanged),
this, &KompareSaveOptionsWidget::updateCommandLine);
#endif
connect(m_directoryRequester, &KUrlRequester::textChanged, this, &KompareSaveOptionsWidget::updateCommandLine);
m_FormatBG->setExclusive(true);
......
......@@ -249,15 +249,15 @@ void KompareSplitter::keyPressEvent(QKeyEvent* e)
void KompareSplitter::wheelEvent(QWheelEvent* e)
{
if (e->orientation() == Qt::Vertical)
if (e->angleDelta().y() != 0)
{
if (e->modifiers() & Qt::ControlModifier) {
if (e->delta() < 0) // scroll down one page
if (e->angleDelta().y() < 0) // scroll down one page
m_vScroll->triggerAction(QAbstractSlider::SliderPageStepAdd);
else // scroll up one page
m_vScroll->triggerAction(QAbstractSlider::SliderPageStepSub);
} else {
if (e->delta() < 0) // scroll down
if (e->angleDelta().y() < 0) // scroll down
m_vScroll->triggerAction(QAbstractSlider::SliderSingleStepAdd);
else // scroll up
m_vScroll->triggerAction(QAbstractSlider::SliderSingleStepSub);
......@@ -266,12 +266,12 @@ void KompareSplitter::wheelEvent(QWheelEvent* e)
else
{
if (e->modifiers() & Qt::ControlModifier) {
if (e->delta() < 0) // scroll right one page
if (e->angleDelta().y() < 0) // scroll right one page
m_hScroll->triggerAction(QAbstractSlider::SliderPageStepAdd);
else // scroll left one page
m_hScroll->triggerAction(QAbstractSlider::SliderPageStepSub);
} else {
if (e->delta() < 0) // scroll to the right
if (e->angleDelta().y() < 0) // scroll to the right
m_hScroll->triggerAction(QAbstractSlider::SliderSingleStepAdd);
else // scroll to the left
m_hScroll->triggerAction(QAbstractSlider::SliderSingleStepSub);
......
Markdown is supported
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