| 152 | } |
| 153 | |
| 154 | void FileSelectionWidget::onBookmarkRequested() |
| 155 | { |
| 156 | if(ui->fileview->selectedItems().count() < 1 || !bookmarkDirectory().has_value()) |
| 157 | { |
| 158 | return; |
| 159 | } |
| 160 | |
| 161 | QString src = currentDirectory().filePath(currentFile().value()); |
| 162 | QString dest = bookmarkDirectory().value().filePath(currentFileName().value()); |
| 163 | |
| 164 | if (QFile::exists(dest)) |
| 165 | { |
| 166 | QFile::remove(dest); |
| 167 | } |
| 168 | |
| 169 | QFile::copy(src, dest); |
| 170 | enumerateFiles(); |
| 171 | |
| 172 | emit bookmarkAdded(dest); |
| 173 | } |
| 174 | |
| 175 | void FileSelectionWidget::onFileSelectionChanged() |
| 176 | { |
nothing calls this directly
no test coverage detected