1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Use QString::chopped() only for Qt 5.10+

https://github.com/KDE/falkon/pull/6

Signed-off-by: Juraj Oravec <sgd.orava@gmail.com>
This commit is contained in:
Juraj Oravec 2020-01-01 12:08:37 +01:00
parent d45e51a4e5
commit c934e40440
No known key found for this signature in database
GPG Key ID: 63ACB65056BC8D07

View File

@ -27,6 +27,7 @@
#include <QDir>
#include <QMessageBox>
#include <QtCoreVersion>
ThemeManager::ThemeManager(QWidget* parent, Preferences* preferences)
: QWidget(parent)
@ -137,7 +138,12 @@ ThemeManager::Theme ThemeManager::parseTheme(const QString &path, const QString
info.name = metadata.name();
info.description = metadata.comment();
info.author = metadata.value(QSL("X-Falkon-Author")).toString();
#if QTCORE_VERSION >= QT_VERSION_CHECK(5, 10, 0)
info.themePath = path.chopped(1);
#else
info.themePath = path;
info.themePath.chop(1);
#endif
const QString iconName = metadata.icon();
if (!iconName.isEmpty()) {