Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/foldermodel.cpp
Show First 20 Lines • Show All 1767 Lines • ▼ Show 20 Line(s) | 1645 | { | |||
---|---|---|---|---|---|
1768 | 1768 | | |||
1769 | } | 1769 | } | ||
1770 | 1770 | | |||
1771 | if (visualParent) { | 1771 | if (visualParent) { | ||
1772 | m_menuPosition = visualParent->mapToGlobal(QPointF(0, visualParent->height())).toPoint(); | 1772 | m_menuPosition = visualParent->mapToGlobal(QPointF(0, visualParent->height())).toPoint(); | ||
1773 | } else { | 1773 | } else { | ||
1774 | m_menuPosition = QCursor::pos(); | 1774 | m_menuPosition = QCursor::pos(); | ||
1775 | } | 1775 | } | ||
1776 | menu->winId(); //force surface creation before ensurePolish call in menu::Popup which happens before show | ||||
1776 | menu->popup(m_menuPosition); | 1777 | menu->popup(m_menuPosition); | ||
1777 | connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); }); | 1778 | connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); }); | ||
1778 | } | 1779 | } | ||
1779 | 1780 | | |||
1780 | void FolderModel::openPropertiesDialog() | 1781 | void FolderModel::openPropertiesDialog() | ||
1781 | { | 1782 | { | ||
1782 | const QModelIndexList indexes = m_selectionModel->selectedIndexes(); | 1783 | const QModelIndexList indexes = m_selectionModel->selectedIndexes(); | ||
1783 | if (indexes.isEmpty()) { | 1784 | if (indexes.isEmpty()) { | ||
▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines |