summaryrefslogtreecommitdiff
path: root/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2019-02-03 00:10:52 +0000
committerThomas Preud'homme <robotux@celest.fr>2019-02-03 00:10:52 +0000
commit9b10c21f5cad0e2ec27d23c59e65af7141a226f3 (patch)
treebf81d75a9ed990bb76488c502767600fcf7550b7 /plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp
parent594fcba67600704bee9115c86e18927b2237b304 (diff)
New upstream version 1.6.1.3
Diffstat (limited to 'plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp')
-rw-r--r--plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp b/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp
index 91df1f8..10b8543 100644
--- a/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp
+++ b/plugins/CopyEngine/Ultracopier/FileExistsDialog.cpp
@@ -134,30 +134,26 @@ void FileExistsDialog::on_SuggestNewName_clicked()
if(num==1)
{
if(firstRenamingRule.empty())
- newFileName=tr("%1 - copy").arg(fileName);
+ newFileName=tr("%name% - copy%suffix%");
else
- {
newFileName=QString::fromStdString(firstRenamingRule);
- newFileName.replace("%name%",fileName);
- }
}
else
{
if(otherRenamingRule.empty())
- newFileName=tr("%1 - copy (%2)").arg(fileName).arg(num);
+ newFileName=tr("%name% - copy (%number%)%suffix%");
else
- {
newFileName=QString::fromStdString(otherRenamingRule);
- newFileName.replace(QStringLiteral("%name%"),fileName);
- newFileName.replace(QStringLiteral("%number%"),QString::number(num));
- }
+ newFileName.replace(QStringLiteral("%number%"),QString::number(num));
}
- destination=absolutePath+CURRENTSEPARATOR+newFileName+suffix;
+ newFileName.replace(QStringLiteral("%name%"),fileName);
+ newFileName.replace(QStringLiteral("%suffix%"),suffix);
+ destination=absolutePath+CURRENTSEPARATOR+newFileName;
destinationInfo.setFile(destination);
num++;
}
while(destinationInfo.exists());
- ui->lineEditNewName->setText(newFileName+suffix);
+ ui->lineEditNewName->setText(newFileName);
}
void FileExistsDialog::on_Rename_clicked()