mirror of
https://github.com/transmission/transmission
synced 2025-01-30 19:03:04 +00:00
Fix qt/IconCache includes
This commit is contained in:
parent
c31cb65691
commit
7cbfaf9d59
2 changed files with 11 additions and 8 deletions
|
@ -133,7 +133,7 @@ QIcon IconCache::getMimeTypeIcon(QString const& mime_type_name, bool multifile)
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
void IconCache::addAssociatedFileIcon(QFileInfo const& file_info, UINT icon_size, QIcon& icon) const
|
void IconCache::addAssociatedFileIcon(QFileInfo const& file_info, unsigned int icon_size, QIcon& icon) const
|
||||||
{
|
{
|
||||||
QString const pixmap_cache_key = QStringLiteral("tr_file_ext_") + QString::number(icon_size) + QLatin1Char('_') +
|
QString const pixmap_cache_key = QStringLiteral("tr_file_ext_") + QString::number(icon_size) + QLatin1Char('_') +
|
||||||
file_info.suffix();
|
file_info.suffix();
|
||||||
|
|
|
@ -8,18 +8,21 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
#include <windows.h> // UINT
|
|
||||||
class QFileInfo;
|
|
||||||
#else
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include "Utils.h" // std::hash<QString>()
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
#include "Utils.h" // std::hash<QString>()
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
class QFileInfo;
|
||||||
|
#endif
|
||||||
|
|
||||||
class QModelIndex;
|
class QModelIndex;
|
||||||
|
|
||||||
class IconCache
|
class IconCache
|
||||||
|
@ -43,7 +46,7 @@ private:
|
||||||
mutable std::unordered_map<QString, QIcon> name_to_emblem_icon_;
|
mutable std::unordered_map<QString, QIcon> name_to_emblem_icon_;
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
void addAssociatedFileIcon(QFileInfo const& file_info, UINT icon_size, QIcon& icon) const;
|
void addAssociatedFileIcon(QFileInfo const& file_info, unsigned int icon_size, QIcon& icon) const;
|
||||||
#else
|
#else
|
||||||
mutable std::unordered_set<QString> suffixes_;
|
mutable std::unordered_set<QString> suffixes_;
|
||||||
mutable std::unordered_map<QString, QIcon> ext_to_icon_;
|
mutable std::unordered_map<QString, QIcon> ext_to_icon_;
|
||||||
|
|
Loading…
Reference in a new issue