--- baloo-widgets-19.04.0/CMakeLists.txt.old	2019-04-12 00:13:39.000000000 +0000
+++ baloo-widgets-19.04.0/CMakeLists.txt	2019-04-19 07:30:31.523838076 +0000
@@ -8,7 +8,7 @@
 project(baloo-widgets VERSION ${KDE_APPLICATIONS_VERSION})
 
 set(QT_MIN_VERSION "5.8.0")
-set(KF5_MIN_VERSION "5.58.0")
+set(KF5_MIN_VERSION "5.54.0")
 
 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH})
--- baloo-widgets-19.08.0/CMakeLists.txt.old	2019-08-15 12:25:44.456788542 +0000
+++ baloo-widgets-19.08.0/CMakeLists.txt	2019-08-15 15:26:31.843791794 +0000
@@ -28,8 +28,6 @@
 include(ECMAddTests)
 include(CMakePackageConfigHelpers)
 
-add_definitions(-DQT_NO_FOREACH)
-
 ecm_setup_version(PROJECT
                   VARIABLE_PREFIX BALOO_WIDGETS
                   SOVERSION 5
--- baloo-widgets-19.08.0/autotests/filemetadatadatedisplaytest.cpp.old	2019-08-09 00:09:30.000000000 +0000
+++ baloo-widgets-19.08.0/autotests/filemetadatadatedisplaytest.cpp	2019-08-15 15:37:50.301115034 +0000
@@ -53,7 +53,8 @@
 #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
     struct stat fileStat;
     struct utimbuf newTimes;
-    const QByteArray file = QFile::encodeName(filePath);
+    const QByteArray q_file = QFile::encodeName(filePath);
+    const char *file = q_file.constData();
     stat(file, &fileStat);
 
     newTimes.actime = fileStat.st_atime;