summaryrefslogtreecommitdiff
path: root/plugins/CopyEngine/Ultracopier/RenamingRules.cpp
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2018-02-23 23:49:48 +0000
committerThomas Preud'homme <robotux@celest.fr>2018-02-23 23:49:48 +0000
commitbd56579c7d9de94c17287adefa118290e6b7ba33 (patch)
tree666d7d0b6945b442573b7a3145969f66a53aa460 /plugins/CopyEngine/Ultracopier/RenamingRules.cpp
parentb3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (diff)
New upstream version 1.4.0.3
Diffstat (limited to 'plugins/CopyEngine/Ultracopier/RenamingRules.cpp')
-rw-r--r--plugins/CopyEngine/Ultracopier/RenamingRules.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/plugins/CopyEngine/Ultracopier/RenamingRules.cpp b/plugins/CopyEngine/Ultracopier/RenamingRules.cpp
index 848d7fb..4ae23b8 100644
--- a/plugins/CopyEngine/Ultracopier/RenamingRules.cpp
+++ b/plugins/CopyEngine/Ultracopier/RenamingRules.cpp
@@ -9,7 +9,7 @@ RenamingRules::RenamingRules(QWidget *parent) :
{
ui->setupUi(this);
connectUI();
- setRenamingRules(QStringLiteral(""),QStringLiteral(""));
+ setRenamingRules("","");
}
RenamingRules::~RenamingRules()
@@ -23,22 +23,22 @@ void RenamingRules::on_buttonBox_clicked(QAbstractButton *button)
reject();
if(ui->buttonBox->buttonRole(button)==QDialogButtonBox::ResetRole)
{
- setRenamingRules(QStringLiteral(""),QStringLiteral(""));
+ setRenamingRules("","");
emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule);
}
}
-void RenamingRules::setRenamingRules(QString firstRenamingRule,QString otherRenamingRule)
+void RenamingRules::setRenamingRules(std::string firstRenamingRule,std::string otherRenamingRule)
{
disconnectUI();
this->firstRenamingRule=firstRenamingRule;
this->otherRenamingRule=otherRenamingRule;
- if(!firstRenamingRule.isEmpty())
- ui->firstRenamingRule->setText(firstRenamingRule);
+ if(!firstRenamingRule.empty())
+ ui->firstRenamingRule->setText(QString::fromStdString(firstRenamingRule));
else
ui->firstRenamingRule->setText(tr("%1 - copy").arg(QStringLiteral("%name%")));
- if(!otherRenamingRule.isEmpty())
- ui->otherRenamingRule->setText(otherRenamingRule);
+ if(!otherRenamingRule.empty())
+ ui->otherRenamingRule->setText(QString::fromStdString(otherRenamingRule));
else
ui->otherRenamingRule->setText(tr("%1 - copy (%2)").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%")));
connectUI();
@@ -61,9 +61,9 @@ void RenamingRules::firstRenamingRule_haveChanged()
QString newValue=ui->firstRenamingRule->text();
if(newValue==tr("%1 - copy").arg(QStringLiteral("%name%")))
newValue=QStringLiteral("");
- if(newValue==firstRenamingRule)
+ if(newValue.toStdString()==firstRenamingRule)
return;
- firstRenamingRule=newValue;
+ firstRenamingRule=newValue.toStdString();
emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule);
}
@@ -72,9 +72,9 @@ void RenamingRules::otherRenamingRule_haveChanged()
QString newValue=ui->otherRenamingRule->text();
if(newValue==tr("%1 - copy (%2)").arg(QStringLiteral("%name%")).arg(QStringLiteral("%number%")))
newValue=QStringLiteral("");
- if(newValue==otherRenamingRule)
+ if(newValue.toStdString()==otherRenamingRule)
return;
- otherRenamingRule=newValue;
+ otherRenamingRule=newValue.toStdString();
emit sendNewRenamingRules(firstRenamingRule,otherRenamingRule);
}