mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Improve content file/folder names handling
Move files/folders renaming functions to core classes. Query file/folder for renaming by its current path. Add ability to rename content folders from WebAPI/WebUI.
This commit is contained in:
parent
79048812e9
commit
4453e7fcdd
16 changed files with 309 additions and 299 deletions
|
@ -158,7 +158,7 @@ PropertiesWidget::PropertiesWidget(QWidget *parent)
|
|||
connect(m_ui->listWebSeeds, &QListWidget::doubleClicked, this, &PropertiesWidget::editWebSeed);
|
||||
|
||||
const auto *renameFileHotkey = new QShortcut(Qt::Key_F2, m_ui->filesList, nullptr, nullptr, Qt::WidgetShortcut);
|
||||
connect(renameFileHotkey, &QShortcut::activated, this, [this]() { m_ui->filesList->renameSelectedFile(m_torrent); });
|
||||
connect(renameFileHotkey, &QShortcut::activated, this, [this]() { m_ui->filesList->renameSelectedFile(*m_torrent); });
|
||||
const auto *openFileHotkeyReturn = new QShortcut(Qt::Key_Return, m_ui->filesList, nullptr, nullptr, Qt::WidgetShortcut);
|
||||
connect(openFileHotkeyReturn, &QShortcut::activated, this, &PropertiesWidget::openSelectedFile);
|
||||
const auto *openFileHotkeyEnter = new QShortcut(Qt::Key_Enter, m_ui->filesList, nullptr, nullptr, Qt::WidgetShortcut);
|
||||
|
@ -593,7 +593,7 @@ void PropertiesWidget::displayFilesListMenu(const QPoint &)
|
|||
connect(actOpenContainingFolder, &QAction::triggered, this, [this, index]() { openParentFolder(index); });
|
||||
|
||||
const QAction *actRename = menu->addAction(UIThemeManager::instance()->getIcon("edit-rename"), tr("Rename..."));
|
||||
connect(actRename, &QAction::triggered, this, [this]() { m_ui->filesList->renameSelectedFile(m_torrent); });
|
||||
connect(actRename, &QAction::triggered, this, [this]() { m_ui->filesList->renameSelectedFile(*m_torrent); });
|
||||
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue