Commit 63e27916 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Now we depend against 5.11 and 5.64

parent cf9f8b32
......@@ -240,22 +240,14 @@ QSize TimeSpinBox::sizeHint() const
{
QSize sz = SpinBox2::sizeHint();
QFontMetrics fm(font());
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
return QSize(sz.width() + fm.horizontalAdvance(QLatin1Char(':')), sz.height());
#else
return QSize(sz.width() + fm.width(QLatin1Char(':')), sz.height());
#endif
}
QSize TimeSpinBox::minimumSizeHint() const
{
QSize sz = SpinBox2::minimumSizeHint();
QFontMetrics fm(font());
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
return QSize(sz.width() + fm.horizontalAdvance(QLatin1Char(':')), sz.height());
#else
return QSize(sz.width() + fm.width(QLatin1Char(':')), sz.height());
#endif
}
/******************************************************************************
......
......@@ -42,7 +42,6 @@
#include <AkonadiCore/itemfetchjob.h>
#include <AkonadiCore/itemfetchscope.h>
#include <kwindowsystem_version.h>
#include <KAboutData>
#include <kstandardguiitem.h>
#include <KLocalizedString>
......@@ -2020,12 +2019,8 @@ void MessageWin::slotEdit()
qCDebug(KALARM_LOG) << "MessageWin::slotEdit";
MainWindow* mainWin = MainWindow::mainMainWindow();
mEditDlg = EditAlarmDlg::create(false, &mOriginalEvent, false, mainWin, EditAlarmDlg::RES_IGNORE);
#if KWINDOWSYSTEM_VERSION >= QT_VERSION_CHECK(5,62,0)
mEditDlg->setAttribute(Qt::WA_NativeWindow, true);
KWindowSystem::setMainWindow(mEditDlg->windowHandle(), winId());
#else
KWindowSystem::setMainWindow(mEditDlg, winId());
#endif
KWindowSystem::setOnAllDesktops(mEditDlg->winId(), false);
setButtonsReadOnly(true);
connect(mEditDlg, &QDialog::accepted, this, &MessageWin::editCloseOk);
......
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