diff options
author | Thomas Preud'homme <robotux@celest.fr> | 2018-02-23 23:49:48 +0000 |
---|---|---|
committer | Thomas Preud'homme <robotux@celest.fr> | 2018-02-23 23:49:48 +0000 |
commit | bd56579c7d9de94c17287adefa118290e6b7ba33 (patch) | |
tree | 666d7d0b6945b442573b7a3145969f66a53aa460 /HelpDialog.cpp | |
parent | b3c8bdcc0d1e4b2ab298847a7902b6d60410a5bc (diff) |
New upstream version 1.4.0.3
Diffstat (limited to 'HelpDialog.cpp')
-rw-r--r-- | HelpDialog.cpp | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/HelpDialog.cpp b/HelpDialog.cpp index f821eac..0e266e4 100644 --- a/HelpDialog.cpp +++ b/HelpDialog.cpp @@ -12,7 +12,7 @@ HelpDialog::HelpDialog() : ui(new Ui::HelpDialog) { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); ui->setupUi(this); reloadTextValue(); #ifdef ULTRACOPIER_DEBUG @@ -50,7 +50,7 @@ void HelpDialog::changeEvent(QEvent *e) QDialog::changeEvent(e); switch (e->type()) { case QEvent::LanguageChange: - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); ui->retranslateUi(this); reloadTextValue(); break; @@ -62,7 +62,7 @@ void HelpDialog::changeEvent(QEvent *e) /// \brief To reload the text value void HelpDialog::reloadTextValue() { - ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start")); + ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start"); QString text=ui->label_ultracopier->text(); #ifdef ULTRACOPIER_VERSION_ULTIMATE text=text.replace(QStringLiteral("%1"),QStringLiteral("Ultimate %1").arg(ULTRACOPIER_VERSION)); @@ -70,7 +70,7 @@ void HelpDialog::reloadTextValue() text=text.replace(QStringLiteral("%1"),ULTRACOPIER_VERSION); #endif #ifdef ULTRACOPIER_MODE_SUPERCOPIER - text=text.replace(QStringLiteral("Ultracopier"),QStringLiteral("Supercopier"),Qt::CaseInsensitive); + text=text.replace(QStringLiteral("Ultracopier"),QStringLiteral("Supercopier"),Qt::CaseInsensitive); #endif ui->label_ultracopier->setText(text); @@ -96,7 +96,7 @@ void HelpDialog::reloadTextValue() text=ui->label_site->text(); //: This site need be the official site of ultracopier, into the right languages, english if not exists - text=text.replace(QStringLiteral("%1"),getWebSite()); + text=text.replace("%1",QString::fromStdString(getWebSite())); ui->label_site->setText(text); text=ui->label_platform->text(); @@ -104,33 +104,29 @@ void HelpDialog::reloadTextValue() ui->label_platform->setText(text); } -QString HelpDialog::getWebSite() +std::string HelpDialog::getWebSite() { - #ifdef ULTRACOPIER_MODE_SUPERCOPIER - return tr("http://ultracopier.first-world.info/")+QStringLiteral("supercopier.html"); - #else - return tr("http://ultracopier.first-world.info/"); - #endif + return tr("http://ultracopier.first-world.info/").toStdString(); } -QString HelpDialog::getUpdateUrl() +std::string HelpDialog::getUpdateUrl() { #if defined(ULTRACOPIER_VERSION_ULTIMATE) - return tr("http://ultracopier.first-world.info/shop.html"); - #else - #ifdef ULTRACOPIER_MODE_SUPERCOPIER - return tr("http://ultracopier.first-world.info/")+QStringLiteral("supercopier.html"); - #else - return tr("http://ultracopier.first-world.info/download.html"); - #endif - #endif + return tr("http://ultracopier.first-world.info/shop.html").toStdString(); + #else + #ifdef ULTRACOPIER_MODE_SUPERCOPIER + return tr("http://ultracopier.first-world.info/").toStdString()+"supercopier.html"; + #else + return tr("http://ultracopier.first-world.info/download.html").toStdString(); + #endif + #endif } #ifdef ULTRACOPIER_DEBUG void HelpDialog::on_lineEditInsertDebug_returnPressed() { - DebugEngine::addDebugNote(ui->lineEditInsertDebug->text()); + DebugEngine::addDebugNote(ui->lineEditInsertDebug->text().toStdString()); ui->lineEditInsertDebug->clear(); ui->debugView->scrollToBottom(); } |