diff --git a/desktop/kde/applications/akonadi/files/qt5.patch b/desktop/kde/applications/akonadi/files/qt5.patch
new file mode 100644
index 0000000000..c22c98f88a
--- /dev/null
+++ b/desktop/kde/applications/akonadi/files/qt5.patch
@@ -0,0 +1,48 @@
+diff -Nuar a/autotests/libs/testrunner/setup.cpp b/autotests/libs/testrunner/setup.cpp
+--- a/autotests/libs/testrunner/setup.cpp 2017-12-04 19:40:18.000000000 +0300
++++ b/autotests/libs/testrunner/setup.cpp 2017-12-16 12:43:17.517970333 +0300
+@@ -309,7 +309,9 @@
+ case Akonadi::ServerManager::NotRunning:
+ case Akonadi::ServerManager::Broken:
+ shutdownHarder();
++#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
+ Q_FALLTHROUGH();
++#endif
+ case Akonadi::ServerManager::Stopping:
+ // safety timeout
+ QTimer::singleShot(30 * 1000, this, &SetupTest::shutdownHarder);
+diff -Nuar a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2017-12-08 04:01:14.000000000 +0300
++++ b/CMakeLists.txt 2017-12-16 12:43:59.721967288 +0300
+@@ -29,7 +29,7 @@
+
+ include(AkonadiMacros)
+
+-set(QT_REQUIRED_VERSION "5.8.0")
++set(QT_REQUIRED_VERSION "5.7.1")
+ set(AKONADI_VERSION ${PIM_VERSION})
+
+ ecm_setup_version(PROJECT
+diff -Nuar a/src/core/models/entitytreemodel.cpp b/src/core/models/entitytreemodel.cpp
+--- a/src/core/models/entitytreemodel.cpp 2017-12-04 19:40:18.000000000 +0300
++++ b/src/core/models/entitytreemodel.cpp 2017-12-16 12:43:10.167970863 +0300
+@@ -324,7 +324,9 @@
+ }
+ }
+ // fall through.
++#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
+ Q_FALLTHROUGH();
++#endif
+ }
+ default:
+ return entityData(collection, index.column(), role);
+@@ -373,7 +375,9 @@
+ }
+ }
+ // fall through.
++#if QT_VERSION >= QT_VERSION_CHECK(5,8,0)
+ Q_FALLTHROUGH();
++#endif
+ }
+ default:
+ return entityData(item, index.column(), role);
diff --git a/desktop/kde/applications/akonadi/pspec.xml b/desktop/kde/applications/akonadi/pspec.xml
index 65b396b348..398d7cf132 100644
--- a/desktop/kde/applications/akonadi/pspec.xml
+++ b/desktop/kde/applications/akonadi/pspec.xml
@@ -32,6 +32,9 @@
kio-devel
extra-cmake-modules
+
+ qt5.patch
+
@@ -88,7 +91,7 @@
- 2017-12-15
+ 2017-12-16
17.12.0
Version bump.
Mustafa Cinasal