forked from qt-creator/qt-creator
Icon: Pass const reference to QList in c'tor
Change-Id: I8e009cdd29d08fc0dbcac3c812885779c928337c Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -134,15 +134,15 @@ static QPixmap masksToIcon(const MasksAndColors &masks, const QPixmap &combinedM
|
||||
|
||||
Icon::Icon() = default;
|
||||
|
||||
Icon::Icon(QList<IconMaskAndColor> args, Icon::IconStyleOptions style)
|
||||
: m_iconSourceList(std::move(args))
|
||||
Icon::Icon(const QList<IconMaskAndColor> &args, Icon::IconStyleOptions style)
|
||||
: m_iconSourceList(args)
|
||||
, m_style(style)
|
||||
{
|
||||
}
|
||||
|
||||
Icon::Icon(const FilePath &imageFileName)
|
||||
: m_iconSourceList({{imageFileName, Theme::Color(-1)}})
|
||||
{
|
||||
m_iconSourceList.append({imageFileName, Theme::Color(-1)});
|
||||
}
|
||||
|
||||
QIcon Icon::icon() const
|
||||
|
@@ -40,7 +40,7 @@ public:
|
||||
Q_DECLARE_FLAGS(IconStyleOptions, IconStyleOption)
|
||||
|
||||
Icon();
|
||||
Icon(QList<IconMaskAndColor> args, IconStyleOptions style = ToolBarStyle);
|
||||
Icon(const QList<IconMaskAndColor> &args, IconStyleOptions style = ToolBarStyle);
|
||||
Icon(const FilePath &imageFileName);
|
||||
|
||||
QIcon icon() const;
|
||||
|
Reference in New Issue
Block a user