diff -Nuar a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt	2017-12-08 04:01:54.000000000 +0300
+++ b/CMakeLists.txt	2017-12-16 14:15:53.500569441 +0300
@@ -36,7 +36,7 @@
     SOVERSION 5
 )
 
-set(QT_REQUIRED_VERSION "5.8.0")
+set(QT_REQUIRED_VERSION "5.7.1")
 find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS Widgets)
 find_package(Grantlee5 "5.1" CONFIG REQUIRED)
 set_package_properties(Grantlee5 PROPERTIES
diff -Nuar a/src/composer-ng/richtextcomposerimages.cpp b/src/composer-ng/richtextcomposerimages.cpp
--- a/src/composer-ng/richtextcomposerimages.cpp	2017-12-02 14:51:13.000000000 +0300
+++ b/src/composer-ng/richtextcomposerimages.cpp	2017-12-16 14:24:33.940531889 +0300
@@ -193,7 +193,7 @@
         buffer.open(QIODevice::WriteOnly);
         normalImage->image.save(&buffer, "PNG");
 
-        qsrand(QDateTime::currentDateTimeUtc().toSecsSinceEpoch() + qHash(normalImage->name));
+        qsrand(QDateTime::currentDateTimeUtc().toMSecsSinceEpoch() + qHash(normalImage->name));
         QSharedPointer<EmbeddedImage> embeddedImage(new EmbeddedImage());
         retImages.append(embeddedImage);
         embeddedImage->image = KCodecs::Codec::codecForName("base64")->encode(buffer.buffer());
