1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-09 21:34:20 +00:00

- Fixed 'cancel' button in RSS feed renaming dialog (Thanks Mariusz)

This commit is contained in:
Christophe Dumez 2009-12-01 19:28:45 +00:00
parent 4af05dc63c
commit 422c03b4ec

View File

@ -322,17 +322,19 @@ void RSSImp::renameFiles() {
do { do {
newName = QInputDialog::getText(this, tr("Please choose a new name for this RSS feed"), tr("New feed name:"), QLineEdit::Normal, listStreams->getRSSItem(item)->getName(), &ok); newName = QInputDialog::getText(this, tr("Please choose a new name for this RSS feed"), tr("New feed name:"), QLineEdit::Normal, listStreams->getRSSItem(item)->getName(), &ok);
// Check if name is already taken // Check if name is already taken
if(ok && rss_item->getParent()->contains(newName)) { if(ok) {
QMessageBox::warning(0, tr("Name already in use"), tr("This name is already used by another item, please choose another one.")); if(rss_item->getParent()->contains(newName)) {
ok = false; QMessageBox::warning(0, tr("Name already in use"), tr("This name is already used by another item, please choose another one."));
ok = false;
}
} else {
return;
} }
}while(!ok); }while(!ok);
if(ok) { // Rename item
// Rename item rss_item->rename(newName);
rss_item->rename(newName); // Update TreeWidget
// Update TreeWidget updateItemInfos(item);
updateItemInfos(item);
}
} }
//right-click on stream : refresh it //right-click on stream : refresh it