mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 11:05:33 +08:00
[AFV] CInputManager stores icon indexes instead of QPixmap instances
The GUI converts icon indexes to QPixmap indexes when needed. This fixes the context unittest that was broken by audio context changes.
This commit is contained in:
@@ -31,7 +31,7 @@ namespace BlackCore
|
||||
|
||||
//! Constructor
|
||||
template <typename Receiver>
|
||||
CActionBind(const QString &action, const QPixmap &icon, Receiver *receiver,
|
||||
CActionBind(const QString &action, BlackMisc::CIcons::IconIndex icon, Receiver *receiver,
|
||||
MembFunc<Receiver> slot = nullptr,
|
||||
const std::function<void()> &deleteCallback = {},
|
||||
QObject *parent = nullptr) :
|
||||
@@ -48,7 +48,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
//! Signature just to set an icon for an action
|
||||
CActionBind(const QString &action, const QPixmap &icon, QObject *parent = nullptr);
|
||||
CActionBind(const QString &action, BlackMisc::CIcons::IconIndex icon, QObject *parent = nullptr);
|
||||
|
||||
//! Not copyable
|
||||
//! @{
|
||||
@@ -75,7 +75,7 @@ namespace BlackCore
|
||||
static QString normalizeAction(const QString &action);
|
||||
|
||||
//! Register action
|
||||
static QString registerAction(const QString &action, const QPixmap &icon);
|
||||
static QString registerAction(const QString &action, BlackMisc::CIcons::IconIndex icon);
|
||||
|
||||
int m_index = -1; //!< action index (unique)
|
||||
std::function<void()> m_deleteCallback; //!< called when deleted
|
||||
|
||||
Reference in New Issue
Block a user