MCPcopy Index your code
hub / github.com/Audio4Linux/JDSP4Linux / onRenameRequested

Method onRenameRequested

src/interface/FileSelectionWidget.cpp:194–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void FileSelectionWidget::onRenameRequested()
195{
196 if (ui->fileview->selectedItems().count() < 1)
197 {
198 return;
199 }
200
201 bool ok;
202 QString name = QInputDialog::getText(this, "Rename",
203 "New name", QLineEdit::Normal,
204 ui->fileview->selectedItems().first()->text(), &ok);
205 QString src = currentDirectory().filePath(currentFile().value());
206 QString dest = currentDirectory().filePath(name);
207
208 if (ok && !name.isEmpty())
209 {
210 QFile::rename(src, dest);
211 }
212
213 enumerateFiles();
214}
215
216void FileSelectionWidget::onRemoveRequested()
217{

Callers

nothing calls this directly

Calls 5

countMethod · 0.80
selectedItemsMethod · 0.80
textMethod · 0.80
valueMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected