diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-02 19:10:45 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-07-10 12:17:52 +0200 |
commit | 984692dc629ca3712d482b174a67557dd9e635a8 (patch) | |
tree | dca8185a36528d94dd2c93ba8d930908271ca2cc /launcher/icons | |
parent | c1bcbf8c63ef4543fdf0d5529089721d2b4a01dd (diff) | |
download | PrismLauncher-984692dc629ca3712d482b174a67557dd9e635a8.tar.gz PrismLauncher-984692dc629ca3712d482b174a67557dd9e635a8.tar.bz2 PrismLauncher-984692dc629ca3712d482b174a67557dd9e635a8.zip |
refactor: fix deprecation up to Qt 5.15
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/icons')
-rw-r--r-- | launcher/icons/IconList.cpp | 8 | ||||
-rw-r--r-- | launcher/icons/MMCIcon.cpp | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/launcher/icons/IconList.cpp b/launcher/icons/IconList.cpp index d426aa80..fe7c34ea 100644 --- a/launcher/icons/IconList.cpp +++ b/launcher/icons/IconList.cpp @@ -86,7 +86,11 @@ void IconList::directoryChanged(const QString &path) QString &foo = (*it); foo = m_dir.filePath(foo); } +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + QSet<QString> new_set(new_list.begin(), new_list.end()); +#else auto new_set = new_list.toSet(); +#endif QList<QString> current_list; for (auto &it : icons) { @@ -94,7 +98,11 @@ void IconList::directoryChanged(const QString &path) continue; current_list.push_back(it.m_images[IconType::FileBased].filename); } +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + QSet<QString> current_set(current_list.begin(), current_list.end()); +#else QSet<QString> current_set = current_list.toSet(); +#endif QSet<QString> to_remove = current_set; to_remove -= new_set; diff --git a/launcher/icons/MMCIcon.cpp b/launcher/icons/MMCIcon.cpp index f0b82ec9..29e3939b 100644 --- a/launcher/icons/MMCIcon.cpp +++ b/launcher/icons/MMCIcon.cpp @@ -15,7 +15,7 @@ #include "MMCIcon.h" #include <QFileInfo> -#include <xdgicon.h> +#include <QIcon> IconType operator--(IconType &t, int) { @@ -63,7 +63,7 @@ QIcon MMCIcon::icon() const if(!icon.isNull()) return icon; // FIXME: inject this. - return XdgIcon::fromTheme(m_images[m_current_type].key); + return QIcon::fromTheme(m_images[m_current_type].key); } void MMCIcon::remove(IconType rm_type) |