Commit 0f82a544 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use Qt5.12/Kf5.68

parent bb8aa01a
......@@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.5.0 FATAL_ERROR)
project(kcron)
set (QT_MIN_VERSION "5.12.0")
set (KF5_MIN_VERSION "5.58.0")
set (KF5_MIN_VERSION "5.68.0")
find_package (ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set (CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
......
......@@ -7,7 +7,6 @@
*/
#include "taskEditorDialog.h"
#include "kwidgetsaddons_version.h"
#include <QLayout>
#include <QCheckBox>
......@@ -545,19 +544,11 @@ QGroupBox *TaskEditorDialog::createHoursGroup(QWidget *main)
void TaskEditorDialog::setupTitleWidget(const QString &comment, KTitleWidget::MessageType messageType)
{
titleWidget->setComment(comment, messageType);
#if KWIDGETSADDONS_VERSION < QT_VERSION_CHECK(5, 63, 0)
if (messageType == KTitleWidget::ErrorMessage) {
titleWidget->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-error")), KTitleWidget::ImageRight);
} else {
titleWidget->setPixmap(QIcon::fromTheme(QStringLiteral("system-run")), KTitleWidget::ImageRight);
}
#else
if (messageType == KTitleWidget::ErrorMessage) {
titleWidget->setIcon(QIcon::fromTheme(QStringLiteral("dialog-error")), KTitleWidget::ImageRight);
} else {
titleWidget->setIcon(QIcon::fromTheme(QStringLiteral("system-run")), KTitleWidget::ImageRight);
}
#endif
}
void TaskEditorDialog::slotEnabledChanged()
......
......@@ -7,7 +7,6 @@
*/
#include "variableEditorDialog.h"
#include "kwidgetsaddons_version.h"
#include <QGridLayout>
#include <QPushButton>
......@@ -146,26 +145,14 @@ void VariableEditorDialog::setupTitleWidget(const QString &comment, KTitleWidget
//krazy:exclude=doublequote_chars
if (comment.isEmpty()) {
titleWidget->setComment(i18n("<i>This variable will be used by scheduled tasks.</i>"));
#if KWIDGETSADDONS_VERSION < QT_VERSION_CHECK(5, 63, 0)
titleWidget->setPixmap(QIcon::fromTheme(QStringLiteral("text-plain")), KTitleWidget::ImageRight);
#else
titleWidget->setIcon(QIcon::fromTheme(QStringLiteral("text-plain")), KTitleWidget::ImageRight);
#endif
} else {
titleWidget->setComment(comment, messageType);
#if KWIDGETSADDONS_VERSION < QT_VERSION_CHECK(5, 63, 0)
if (messageType == KTitleWidget::ErrorMessage) {
titleWidget->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-error")), KTitleWidget::ImageRight);
} else {
titleWidget->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-information")), KTitleWidget::ImageRight);
}
#else
if (messageType == KTitleWidget::ErrorMessage) {
titleWidget->setIcon(QIcon::fromTheme(QStringLiteral("dialog-error")), KTitleWidget::ImageRight);
} else {
titleWidget->setIcon(QIcon::fromTheme(QStringLiteral("dialog-information")), KTitleWidget::ImageRight);
}
#endif
}
}
......
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