Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/plugins/folder/foldermodel.cpp
Show First 20 Lines • Show All 1812 Lines • ▼ Show 20 Line(s) | 1745 | } else { | |||
---|---|---|---|---|---|
1813 | } | 1813 | } | ||
1814 | } | 1814 | } | ||
1815 | 1815 | | |||
1816 | if (visualParent) { | 1816 | if (visualParent) { | ||
1817 | m_menuPosition = visualParent->mapToGlobal(QPointF(0, visualParent->height())).toPoint(); | 1817 | m_menuPosition = visualParent->mapToGlobal(QPointF(0, visualParent->height())).toPoint(); | ||
1818 | } else { | 1818 | } else { | ||
1819 | m_menuPosition = QCursor::pos(); | 1819 | m_menuPosition = QCursor::pos(); | ||
1820 | } | 1820 | } | ||
1821 | | ||||
1822 | | ||||
1823 | menu->setAttribute(Qt::WA_TranslucentBackground); | ||||
1821 | menu->winId(); //force surface creation before ensurePolish call in menu::Popup which happens before show | 1824 | menu->winId(); //force surface creation before ensurePolish call in menu::Popup which happens before show | ||
1822 | menu->popup(m_menuPosition); | 1825 | menu->popup(m_menuPosition); | ||
1823 | connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); }); | 1826 | connect(menu, &QMenu::aboutToHide, [menu]() { menu->deleteLater(); }); | ||
1824 | } | 1827 | } | ||
1825 | 1828 | | |||
1826 | void FolderModel::openPropertiesDialog() | 1829 | void FolderModel::openPropertiesDialog() | ||
1827 | { | 1830 | { | ||
1828 | const QModelIndexList indexes = m_selectionModel->selectedIndexes(); | 1831 | const QModelIndexList indexes = m_selectionModel->selectedIndexes(); | ||
▲ Show 20 Lines • Show All 234 Lines • Show Last 20 Lines |