MCPcopy Create free account
hub / github.com/VioletGiraffe/file-commander / pasteCurrentFilePath

Method pasteCurrentFilePath

qt-app/src/cmainwindow.cpp:703–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701}
702
703void CMainWindow::pasteCurrentFilePath()
704{
705 if (_currentFileList && _currentFileList->currentItemHash() != 0)
706 {
707 QString textToAdd = toNativeSeparators(_controller->itemByHash(_currentFileList->panelPosition(), _currentFileList->currentItemHash()).fullAbsolutePath());
708 if (textToAdd.contains(' '))
709 textToAdd = '\"' % textToAdd % '\"';
710
711 const QString newText = ui->_commandLine->lineEdit()->text().isEmpty() ? textToAdd : (ui->_commandLine->lineEdit()->text() % ' ' % textToAdd);
712 ui->_commandLine->lineEdit()->setText(newText);
713 }
714}
715
716void CMainWindow::refresh()
717{

Callers

nothing calls this directly

Calls 8

toNativeSeparatorsFunction · 0.85
fullAbsolutePathMethod · 0.80
textMethod · 0.80
setTextMethod · 0.80
currentItemHashMethod · 0.45
itemByHashMethod · 0.45
panelPositionMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected