hasColor method for mimedata

This commit is contained in:
Sebastian Kügler 2013-08-26 02:19:31 +02:00
parent 3ccf499854
commit 663b394d5e
2 changed files with 8 additions and 0 deletions

View File

@ -110,6 +110,13 @@ QColor DeclarativeMimeData::color() const
}
return QColor();
}
bool DeclarativeMimeData::hasColor() const
{
//qDebug() << " hasColor " << (QMimeData::hasColor() ? color().name() : "false");
return QMimeData::hasColor();
}
void DeclarativeMimeData::setColor(const QColor &color)
{
if (this->color() != color) {

View File

@ -77,6 +77,7 @@ public:
QColor color() const;
void setColor(const QColor &color);
Q_INVOKABLE bool hasColor() const;
Q_INVOKABLE void setData(const QString &mimeType, const QVariant &data);