mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 09:23:03 +00:00

应用升级后,其desktop文件中对应的Icon字段可能发生变更,任务栏会重新获取当前的Icon, 当这个Icon对应的图片还没有放到指定的位置时,此时获取的图标就是异常的,且后续再获取时,及时图标已经正常, 但因为qt的缓存机制,也会导致获取的图标仍然是第一次获取的异常图标 Log: 修复应用升级后任务栏驻留的图标可能显示异常的问题 Task: https://pms.uniontech.com/zentao/task-view-64795.html Change-Id: I955108d04af65b2ca9cc1e6347a4c390b9ec9d77
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
/*
|
|
* Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
|
|
*
|
|
* Author: sbw <sbw@sbw.so>
|
|
*
|
|
* Maintainer: sbw <sbw@sbw.so>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef THEMEAPPICON_H
|
|
#define THEMEAPPICON_H
|
|
|
|
#include <QObject>
|
|
|
|
class ThemeAppIcon : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ThemeAppIcon(QObject *parent = 0);
|
|
~ThemeAppIcon();
|
|
|
|
static QIcon getIcon(const QString &name);
|
|
static bool getIcon(QPixmap &pix, const QString iconName, const int size, const qreal ratio, bool reObtain = false);
|
|
};
|
|
|
|
#endif // THEMEAPPICON_H
|