Commit 335dcfc2 authored by LNJ's avatar LNJ 💬

Drop Qt 5.9 support

parent 593ab253
cmake_minimum_required(VERSION 3.3)
find_package(ECM 5.40.0 REQUIRED NO_MODULE)
set(CMAKE_CXX_STANDARD 14)
set(QT_MIN_VERSION "5.8.0")
set(QT_MIN_VERSION "5.10.0")
if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
......
......@@ -39,7 +39,7 @@ how to do that:
### Dependencies
Here are the general dependencies of Kaidan listed:
* [Qt](https://doc.qt.io/qt-5/build-sources.html) (Core Qml Quick Svg Sql QuickControls2) (>= 5.8.0)
* [Qt](https://doc.qt.io/qt-5/build-sources.html) (Core Qml Quick Svg Sql QuickControls2) (>= 5.10.0)
* [QXmpp][qxmpp] (>= 1.0.0)
* [Kirigami 2](https://phabricator.kde.org/source/kirigami/) (>= 5.42.0)
* [ECM (extra-cmake-modules)](https://api.kde.org/ecm/manual/ecm.7.html)
......
......@@ -104,15 +104,8 @@ QString QmlUtils::fileNameFromUrl(const QUrl &url) const
QString QmlUtils::fileSizeFromUrl(const QUrl &url) const
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) // Qt 5.10 or later
return QLocale::system().formattedDataSize(QFileInfo(QUrl(url).toLocalFile())
.size());
#else
// before Qt 5.10 there was no formattedDataSize() method:
// sizes will always be in MiB
double size = QFileInfo(QUrl(url).toLocalFile()).size();
return QString::number(qRound(size / 1024.0 / 10.24) / 100.0).append(" MiB");
#endif
return QLocale::system().formattedDataSize(
QFileInfo(QUrl(url).toLocalFile()).size());
}
QString QmlUtils::formatMessage(const QString &message) const
......
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