Commit 62e2d9ac authored by Marco Bubke's avatar Marco Bubke
Browse files

QmlDesigner: Remove dragIcon from ItemLibrary



Was not used any more.

Change-Id: I6fbe2e5224cfcf7f6250684f7653b34f3247220a
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 1fda4625
......@@ -195,8 +195,6 @@ void ItemLibraryModel::update(ItemLibraryInfo *itemLibraryInfo, Model *model)
// delayed creation of (default) icons
if (entry.iconPath().isEmpty())
entry.setIconPath(QStringLiteral(":/ItemLibrary/images/item-default-icon.png"));
if (entry.dragIcon().isNull())
entry.setDragIcon(createDragPixmap(getWidth(entry), getHeight(entry)));
itemModel->setItemIconPath(entry.iconPath());
itemModel->setItemIconSize(m_itemIconSize);
......@@ -224,13 +222,6 @@ QMimeData *ItemLibraryModel::getMimeData(int libId)
stream << m_itemInfos.value(libId);
mimeData->setData(QStringLiteral("application/vnd.bauhaus.itemlibraryinfo"), data);
const QIcon icon = m_itemInfos.value(libId).dragIcon();
if (!icon.isNull()) {
const QList<QSize> sizes = icon.availableSizes();
if (!sizes.isEmpty())
mimeData->setImageData(icon.pixmap(sizes.front()).toImage());
}
mimeData->removeFormat(QStringLiteral("text/plain"));
return mimeData;
......
......@@ -86,7 +86,6 @@ public:
void setIconPath(const QString &iconPath);
void addProperty(const Property &p);
void addProperty(PropertyName &name, QString &type, QVariant &value);
void setDragIcon(const QIcon &icon);
void setIcon(const QIcon &icon);
void setCategory(const QString &category);
void setQmlPath(const QString &qml);
......
......@@ -50,7 +50,6 @@ public:
int minorVersion;
QString iconPath;
QIcon icon;
QIcon dragIcon;
QList<PropertyContainer> properties;
QString qml;
QString qmlSource;
......@@ -76,21 +75,11 @@ ItemLibraryEntry& ItemLibraryEntry::operator=(const ItemLibraryEntry &other)
return *this;
}
void ItemLibraryEntry::setDragIcon(const QIcon &icon)
{
m_data->dragIcon = icon;
}
void ItemLibraryEntry::setIcon(const QIcon &icon)
{
m_data->icon = icon;
}
QIcon ItemLibraryEntry::dragIcon() const
{
return m_data->dragIcon;
}
void ItemLibraryEntry::addProperty(const Property &property)
{
m_data->properties.append(property);
......@@ -220,7 +209,6 @@ QDataStream& operator<<(QDataStream& stream, const ItemLibraryEntry &itemLibrary
stream << itemLibraryEntry.icon();
stream << itemLibraryEntry.iconPath();
stream << itemLibraryEntry.category();
stream << itemLibraryEntry.dragIcon();
stream << itemLibraryEntry.requiredImport();
stream << itemLibraryEntry.m_data->properties;
......@@ -239,7 +227,6 @@ QDataStream& operator>>(QDataStream& stream, ItemLibraryEntry &itemLibraryEntry)
stream >> itemLibraryEntry.m_data->icon;
stream >> itemLibraryEntry.m_data->iconPath;
stream >> itemLibraryEntry.m_data->category;
stream >> itemLibraryEntry.m_data->dragIcon;
stream >> itemLibraryEntry.m_data->requiredImport;
stream >> itemLibraryEntry.m_data->properties;
......@@ -258,7 +245,6 @@ QDebug operator<<(QDebug debug, const ItemLibraryEntry &itemLibraryEntry)
debug << itemLibraryEntry.m_data->icon;
debug << itemLibraryEntry.m_data->iconPath;
debug << itemLibraryEntry.m_data->category;
debug << itemLibraryEntry.m_data->dragIcon;
debug << itemLibraryEntry.m_data->requiredImport;
debug << itemLibraryEntry.m_data->properties;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment