| 1702 | |
| 1703 | #ifndef QT_NO_CONTEXTMENU |
| 1704 | void DirectoryMergeWindow::contextMenuEvent(QContextMenuEvent* e) |
| 1705 | { |
| 1706 | QModelIndex mi = indexAt(e->pos()); |
| 1707 | qint32 c = mi.column(); |
| 1708 | |
| 1709 | MergeFileInfos* pMFI = d->getMFI(mi); |
| 1710 | if(pMFI == nullptr) |
| 1711 | return; |
| 1712 | if(c == s_ACol || c == s_BCol || c == s_CCol) |
| 1713 | { |
| 1714 | QString itemPath; |
| 1715 | if(c == s_ACol && pMFI->existsInA()) |
| 1716 | { |
| 1717 | itemPath = pMFI->fullNameA(); |
| 1718 | } |
| 1719 | else if(c == s_BCol && pMFI->existsInB()) |
| 1720 | { |
| 1721 | itemPath = pMFI->fullNameB(); |
| 1722 | } |
| 1723 | else if(c == s_CCol && pMFI->existsInC()) |
| 1724 | { |
| 1725 | itemPath = pMFI->fullNameC(); |
| 1726 | } |
| 1727 | |
| 1728 | if(!itemPath.isEmpty()) |
| 1729 | { |
| 1730 | d->selectItemAndColumn(mi, true); |
| 1731 | QMenu m(this); |
| 1732 | m.addAction(d->m_pDirCompareExplicit); |
| 1733 | m.addAction(d->m_pDirMergeExplicit); |
| 1734 | |
| 1735 | m.popup(e->globalPos()); |
| 1736 | } |
| 1737 | } |
| 1738 | } |
| 1739 | #endif |
| 1740 | |
| 1741 | QString DirectoryMergeWindow::DirectoryMergeWindowPrivate::getFileName(const QModelIndex& mi) const |