Commit 3580da59 authored by Volker Krause's avatar Volker Krause
Browse files

Use non-deprecated API to check the calendar loading state

parent ae7cea29
Pipeline #214163 failed with stage
in 2 minutes and 17 seconds
......@@ -13,7 +13,7 @@ set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_
project(kalendar VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION "5.15.2")
set(KF5_MIN_VERSION "5.92.0")
set(KF5_MIN_VERSION "5.96.0")
set(PIM_VERSION "5.19.0")
include(FeatureSummary)
......
......@@ -60,7 +60,7 @@ private Q_SLOTS:
loadedCheckTimer.setInterval(300);
loadedCheckTimer.setSingleShot(true);
connect(&loadedCheckTimer, &QTimer::timeout, this, [&]() {
if (calendar->isLoaded()) {
if (!calendar->isLoading()) {
Q_EMIT calendarLoaded();
} else {
loadedCheckTimer.start();
......@@ -74,7 +74,7 @@ private Q_SLOTS:
void testAddCalendar()
{
QVERIFY(calendar->isLoaded());
QVERIFY(!calendar->isLoading());
QVERIFY(calendar->items().count() > 0);
QSignalSpy fetchFinished(&model, &QAbstractItemModel::modelReset);
......
......@@ -60,7 +60,7 @@ private Q_SLOTS:
loadedCheckTimer.setInterval(300);
loadedCheckTimer.setSingleShot(true);
connect(&loadedCheckTimer, &QTimer::timeout, this, [&]() {
if (calendar->isLoaded()) {
if (!calendar->isLoading()) {
Q_EMIT calendarLoaded();
} else {
loadedCheckTimer.start();
......@@ -77,7 +77,7 @@ private Q_SLOTS:
void testAddCalendar()
{
QVERIFY(calendar->isLoaded());
QVERIFY(!calendar->isLoading());
QVERIFY(calendar->items().count() > 0);
QSignalSpy fetchFinished(&model, &QAbstractItemModel::modelReset);
......
......@@ -328,7 +328,7 @@ void CalendarManager::refreshEnabledTodoCollections()
bool CalendarManager::loading() const
{
return !m_calendar->isLoaded();
return m_calendar->isLoading();
}
void CalendarManager::setCollectionSelectionProxyModel(KCheckableProxyModel *m)
......
Supports Markdown
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