forked from qt-creator/qt-creator
QmlDesigner: remove delayed drag and drop call
Change-Id: I6d2c1c2f25ba88f3c6f0af9b52968a9bd005cd85 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
@@ -78,7 +78,7 @@ Rectangle {
|
|||||||
property int pressedY
|
property int pressedY
|
||||||
|
|
||||||
onPressed: {
|
onPressed: {
|
||||||
rootView.startDragAndDropDelayed(itemLibraryEntry)
|
rootView.startDragAndDrop(itemLibraryEntry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -369,14 +369,10 @@ void ItemLibraryWidget::setResourcePath(const QString &resourcePath)
|
|||||||
updateSearch();
|
updateSearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemLibraryWidget::startDragAndDropDelayed(QVariant itemLibraryId)
|
void ItemLibraryWidget::startDragAndDrop(QVariant itemLibraryId)
|
||||||
{
|
{
|
||||||
m_currentitemLibraryEntry = itemLibraryId.value<ItemLibraryEntry>();
|
m_currentitemLibraryEntry = itemLibraryId.value<ItemLibraryEntry>();
|
||||||
QTimer::singleShot(0, this, SLOT(startDragAndDrop()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ItemLibraryWidget::startDragAndDrop()
|
|
||||||
{
|
|
||||||
QMimeData *mimeData = m_itemLibraryModel->getMimeData(m_currentitemLibraryEntry);
|
QMimeData *mimeData = m_itemLibraryModel->getMimeData(m_currentitemLibraryEntry);
|
||||||
QDrag *drag = new QDrag(this);
|
QDrag *drag = new QDrag(this);
|
||||||
|
|
||||||
|
@@ -96,8 +96,7 @@ public slots:
|
|||||||
|
|
||||||
void setResourcePath(const QString &resourcePath);
|
void setResourcePath(const QString &resourcePath);
|
||||||
|
|
||||||
void startDragAndDropDelayed(QVariant itemLibId);
|
void startDragAndDrop(QVariant itemLibId);
|
||||||
void startDragAndDrop();
|
|
||||||
|
|
||||||
void setModel(Model *model);
|
void setModel(Model *model);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user