1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 11:19:10 +00:00

Convert many of the now-deprecated plString::Format calls to plFormat

This commit is contained in:
2014-05-24 23:46:54 -07:00
parent 89a9bbb3c4
commit 1debf8180b
98 changed files with 404 additions and 413 deletions

View File

@ -44,7 +44,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#define __plAddDlgs_h__
#include <QDialog>
#include "plString.h"
#include "plFormat.h"
class plAddElementDlg : public QDialog
{
@ -57,7 +57,7 @@ public:
bool DoPick(); // returns true if [Ok] clicked, false otherwise.
plString GetValue() const
{
return plString::Format("%s.%s.%s", fAgeName.c_str(), fSetName.c_str(), fElementName.c_str());
return plFormat("{}.{}.{}", fAgeName, fSetName, fElementName);
}
private slots:

View File

@ -117,7 +117,7 @@ void EditDialog::SaveLocalizationText()
if (ageName.IsEmpty() || setName.IsEmpty() || elementName.IsEmpty() || elementLanguage.IsEmpty())
return;
plString name = plString::Format("%s.%s.%s", ageName.c_str(), setName.c_str(), elementName.c_str());
plString name = plFormat("{}.{}.{}", ageName, setName, elementName);
pfLocalizationDataMgr::Instance().SetElementPlainTextData(name, elementLanguage, text);
}
@ -138,7 +138,7 @@ void EditDialog::LoadLocalization(const plString &locPath)
else
{
EnableEdit(true);
plString key = plString::Format("%s.%s.%s", ageName.c_str(), setName.c_str(), elementName.c_str());
plString key = plFormat("{}.{}.{}", ageName, setName, elementName);
plString elementText = pfLocalizationDataMgr::Instance().GetElementPlainTextData(key, elementLanguage);
fUI->fLocalizationText->setPlainText(elementText.c_str());
}
@ -306,12 +306,12 @@ void EditDialog::AddClicked()
plString newLanguage = dlg.GetValue();
plString ageName, setName, elementName, elementLanguage;
SplitLocalizationPath(fCurrentLocPath, ageName, setName, elementName, elementLanguage);
plString key = plString::Format("%s.%s.%s", ageName.c_str(), setName.c_str(), elementName.c_str());
plString key = plFormat("{}.{}.{}", ageName, setName, elementName);
if (!pfLocalizationDataMgr::Instance().AddLocalization(key, newLanguage))
QMessageBox::critical(this, tr("Error"), tr("Couldn't add additional localization!"));
else
{
plString path = plString::Format("%s.%s", key.c_str(), newLanguage.c_str());
plString path = plFormat("{}.{}", key, newLanguage);
fCurrentLocPath = "";
fUI->fLocalizationTree->clear();
fUI->fLocalizationTree->LoadData(path);
@ -347,7 +347,7 @@ void EditDialog::DeleteClicked()
{
plString ageName, setName, elementName, elementLanguage;
SplitLocalizationPath(fCurrentLocPath, ageName, setName, elementName, elementLanguage);
plString key = plString::Format("%s.%s.%s", ageName.c_str(), setName.c_str(), elementName.c_str());
plString key = plFormat("{}.{}.{}", ageName, setName, elementName);
if (!pfLocalizationDataMgr::Instance().DeleteLocalization(key, elementLanguage))
QMessageBox::critical(this, tr("Error"), tr("Couldn't delete localization!"));
else