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

Now we depend against qt5.13

parent 1b820e87
Pipeline #21299 passed with stage
in 28 minutes and 46 seconds
......@@ -242,11 +242,7 @@ EwsOAuthPrivate::EwsOAuthPrivate(EwsOAuth *parent, const QString &email, const Q
mOAuth2.setAuthorizationUrl(o365AuthorizationUrl);
mOAuth2.setAccessTokenUrl(o365AccessTokenUrl);
mOAuth2.setClientIdentifier(appId);
#if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 13, 0)
mWebProfile.setRequestInterceptor(&mRequestInterceptor);
#else
mWebProfile.setUrlRequestInterceptor(&mRequestInterceptor);
#endif
mWebProfile.installUrlSchemeHandler("urn", &mSchemeHandler);
mWebView.setPage(&mWebPage);
......
......@@ -77,19 +77,11 @@ void QWebEngineProfile::setHttpUserAgent(const QString &ua)
mUserAgent = ua;
}
#if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 13, 0)
void QWebEngineProfile::setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor)
{
mInterceptor = interceptor;
}
#else
void QWebEngineProfile::setUrlRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor)
{
mInterceptor = interceptor;
}
#endif
void QWebEngineProfile::installUrlSchemeHandler(QByteArray const &scheme, QWebEngineUrlSchemeHandler *handler)
{
mScheme = QString::fromLatin1(scheme);
......
......@@ -101,11 +101,7 @@ public:
~QWebEngineProfile() override;
void setHttpUserAgent(const QString &ua);
#if QTWEBENGINEWIDGETS_VERSION < QT_VERSION_CHECK(5, 13, 0)
void setRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor);
#else
void setUrlRequestInterceptor(QWebEngineUrlRequestInterceptor *interceptor);
#endif
void installUrlSchemeHandler(QByteArray const &scheme, QWebEngineUrlSchemeHandler *handler);
Q_SIGNALS:
void logEvent(const QString &event);
......
......@@ -647,28 +647,16 @@ void getRecurrence(T &i, const I &e)
}
const QVector<int> bySecondsVector = defaultRR->bySeconds().toVector();
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
rrule.setBysecond(bySecondsVector.toStdVector());
#else
const auto stdVectorBySeconds = std::vector<int>(bySecondsVector.begin(), bySecondsVector.end());
rrule.setBysecond(stdVectorBySeconds);
#endif
const QVector<int> byMinutesVector = defaultRR->byMinutes().toVector();
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
rrule.setByminute(byMinutesVector.toStdVector());
#else
const auto stdVectorByMinutes = std::vector<int>(byMinutesVector.begin(), byMinutesVector.end());
rrule.setByminute(stdVectorByMinutes);
#endif
const QVector<int> byHoursVector = defaultRR->byHours().toVector();
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
rrule.setByhour(byHoursVector.toStdVector());
#else
const auto stdVectorByHours = std::vector<int>(byHoursVector.begin(), byHoursVector.end());
rrule.setByhour(stdVectorByHours);
#endif
std::vector<Kolab::DayPos> daypos;
daypos.reserve(defaultRR->byDays().count());
......@@ -678,39 +666,23 @@ void getRecurrence(T &i, const I &e)
rrule.setByday(daypos);
const QVector<int> bymonthdayVector = defaultRR->byMonthDays().toVector();
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
rrule.setBymonthday(bymonthdayVector.toStdVector());
#else
const auto stdByMonthDayVector = std::vector<int>(bymonthdayVector.begin(), bymonthdayVector.end());
rrule.setBymonthday(stdByMonthDayVector);
#endif
const QVector<int> byYearDaysVector = defaultRR->byYearDays().toVector();
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
rrule.setByyearday(byYearDaysVector.toStdVector());
#else
const auto stdByYearDayVector = std::vector<int>(byYearDaysVector.begin(), byYearDaysVector.end());
rrule.setByyearday(stdByYearDayVector);
#endif
const QVector<int> byWeekNumberVector = defaultRR->byWeekNumbers().toVector();
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
rrule.setByweekno(byWeekNumberVector.toStdVector());
#else
const auto stdWeekNumberVector = std::vector<int>(byWeekNumberVector.begin(), byWeekNumberVector.end());
rrule.setByweekno(stdWeekNumberVector);
#endif
const QVector<int> byMonthVector = defaultRR->byMonths().toVector();
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
rrule.setBymonth(byMonthVector.toStdVector());
#else
const auto stdByMonthVector = std::vector<int>(byMonthVector.begin(), byMonthVector.end());
rrule.setBymonth(stdByMonthVector);
#endif
i.setRecurrenceRule(rrule);
......
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