Commit ea5bf621 authored by Albert Astals Cid's avatar Albert Astals Cid

We require KF 5.68 now, so cleanup some ifdefs

parent f7cc59b7
......@@ -127,9 +127,7 @@ BookmarkList::BookmarkList(Okular::Document *document, QWidget *parent)
mainlay->setSpacing(6);
KTitleWidget *titleWidget = new KTitleWidget(this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 53, 0)
titleWidget->setLevel(2);
#endif
titleWidget->setText(i18n("Bookmarks"));
mainlay->addWidget(titleWidget);
mainlay->setAlignment(titleWidget, Qt::AlignHCenter);
......
......@@ -34,9 +34,7 @@ Layers::Layers(QWidget *parent, Okular::Document *document)
m_document->addObserver(this);
KTitleWidget *titleWidget = new KTitleWidget(this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 53, 0)
titleWidget->setLevel(2);
#endif
titleWidget->setText(i18n("Layers"));
mainlay->addWidget(titleWidget);
mainlay->setAlignment(titleWidget, Qt::AlignHCenter);
......
......@@ -14,19 +14,14 @@
#include "core/document.h"
// qt/kde includes
#include <QApplication>
#include <QLayout>
#include <QTimer>
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 61, 0)
#include <KBusyIndicatorWidget>
#else
#include <KPixmapSequence>
#include <KPixmapSequenceWidget>
#endif
#include <KColorScheme>
#include <KIconLoader>
#include <KLocalizedString>
#include <KMessageBox>
#include <QApplication>
#include <QLayout>
#include <QTimer>
SearchLineEdit::SearchLineEdit(QWidget *parent, Okular::Document *document)
: KLineEdit(parent)
......@@ -278,11 +273,7 @@ SearchLineWidget::SearchLineWidget(QWidget *parent, Okular::Document *document)
m_edit = new SearchLineEdit(this, document);
layout->addWidget(m_edit);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 61, 0)
m_anim = new KBusyIndicatorWidget(this);
#else
m_anim = new KPixmapSequenceWidget(this);
#endif
m_anim->setFixedSize(22, 22);
layout->addWidget(m_anim);
m_anim->hide();
......@@ -313,15 +304,6 @@ void SearchLineWidget::slotSearchStopped()
void SearchLineWidget::slotTimedout()
{
#if KWIDGETSADDONS_VERSION < QT_VERSION_CHECK(5, 61, 0)
if (m_anim->sequence().isEmpty()) {
const KPixmapSequence seq = KIconLoader::global()->loadPixmapSequence(QStringLiteral("process-working"), 22);
if (seq.frameCount() > 0) {
m_anim->setInterval(1000 / seq.frameCount());
m_anim->setSequence(seq);
}
}
#endif
m_anim->show();
}
......
......@@ -16,11 +16,7 @@
#include <KLineEdit>
#include <kwidgetsaddons_version.h>
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 61, 0)
class KBusyIndicatorWidget;
#else
class KPixmapSequenceWidget;
#endif
class QTimer;
/**
......@@ -94,11 +90,7 @@ private Q_SLOTS:
private:
SearchLineEdit *m_edit;
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 61, 0)
KBusyIndicatorWidget *m_anim;
#else
KPixmapSequenceWidget *m_anim;
#endif
QTimer *m_timer;
};
......
......@@ -97,9 +97,7 @@ Reviews::Reviews(QWidget *parent, Okular::Document *document)
vLayout->setSpacing(6);
KTitleWidget *titleWidget = new KTitleWidget(this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 53, 0)
titleWidget->setLevel(2);
#endif
titleWidget->setText(i18n("Reviews"));
m_view = new TreeView(m_document, this);
......
......@@ -46,9 +46,7 @@ SignaturePanel::SignaturePanel(Okular::Document *document, QWidget *parent)
Q_D(SignaturePanel);
KTitleWidget *titleWidget = new KTitleWidget(this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 53, 0)
titleWidget->setLevel(2);
#endif
titleWidget->setText(i18n("Signatures"));
d->m_view = new QTreeView(this);
......
......@@ -47,9 +47,7 @@ ThumbnailsBox::ThumbnailsBox(QWidget *parent)
vbox->setSpacing(0);
KTitleWidget *titleWidget = new KTitleWidget(this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 53, 0)
titleWidget->setLevel(2);
#endif
titleWidget->setText(i18n("Thumbnails"));
vbox->addWidget(titleWidget);
vbox->setAlignment(titleWidget, Qt::AlignHCenter);
......
......@@ -38,9 +38,7 @@ TOC::TOC(QWidget *parent, Okular::Document *document)
mainlay->setSpacing(6);
KTitleWidget *titleWidget = new KTitleWidget(this);
#if KWIDGETSADDONS_VERSION >= QT_VERSION_CHECK(5, 53, 0)
titleWidget->setLevel(2);
#endif
titleWidget->setText(i18n("Contents"));
mainlay->addWidget(titleWidget);
mainlay->setAlignment(titleWidget, Qt::AlignHCenter);
......
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