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