QString's toAscii() is gone in Qt5, so stop using it, which is a good idea anyway.
parent
5485d06111
commit
9b39acb748
|
@ -205,7 +205,7 @@ static bool eventLoadContext(WzConfig &ini)
|
|||
break;
|
||||
case VAL_STRING:
|
||||
data.v.sval = (char*)malloc(MAXSTRLEN);
|
||||
strcpy(data.v.sval, ini.value("var/" + QString::number(i) + "/data").toString().toAscii().constData());
|
||||
strcpy(data.v.sval, ini.value("var/" + QString::number(i) + "/data").toString().toUtf8().constData());
|
||||
break;
|
||||
case VAL_OBJ_GETSET:
|
||||
case VAL_FUNC_EXTERN:
|
||||
|
|
|
@ -302,8 +302,8 @@ bool addChallenges()
|
|||
debug(LOG_SAVE, "We found [%s]", *i);
|
||||
|
||||
/* Set the button-text */
|
||||
sstrcpy(sSlotCaps[slotCount], name.toAscii().constData()); // store it!
|
||||
sstrcpy(sSlotTips[slotCount], description.toAscii().constData()); // store it, too!
|
||||
sstrcpy(sSlotCaps[slotCount], name.toUtf8().constData()); // store it!
|
||||
sstrcpy(sSlotTips[slotCount], description.toUtf8().constData()); // store it, too!
|
||||
sstrcpy(sSlotFile[slotCount], sPath); // store filename
|
||||
|
||||
/* Add button */
|
||||
|
|
|
@ -871,7 +871,7 @@ void displayProximityMessage(PROXIMITY_DISPLAY *psProxDisp)
|
|||
//display text - if any
|
||||
if (psViewData->textMsg.size() > 0 && psViewData->type != VIEW_BEACON)
|
||||
{
|
||||
addConsoleMessage(psViewData->textMsg[0].toAscii().constData(), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
||||
addConsoleMessage(psViewData->textMsg[0].toUtf8().constData(), DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
|
||||
}
|
||||
|
||||
//play message - if any
|
||||
|
|
|
@ -666,11 +666,11 @@ void readAIs()
|
|||
WzConfig aiconf(path, WzConfig::ReadOnly);
|
||||
AIDATA ai;
|
||||
aiconf.beginGroup("AI");
|
||||
sstrcpy(ai.name, aiconf.value("name", "error").toString().toAscii().constData());
|
||||
sstrcpy(ai.slo, aiconf.value("slo", "").toString().toAscii().constData());
|
||||
sstrcpy(ai.vlo, aiconf.value("vlo", "").toString().toAscii().constData());
|
||||
sstrcpy(ai.js, aiconf.value("js", "").toString().toAscii().constData());
|
||||
sstrcpy(ai.tip, aiconf.value("tip", "Click to choose this AI").toString().toAscii().constData());
|
||||
sstrcpy(ai.name, aiconf.value("name", "error").toString().toUtf8().constData());
|
||||
sstrcpy(ai.slo, aiconf.value("slo", "").toString().toUtf8().constData());
|
||||
sstrcpy(ai.vlo, aiconf.value("vlo", "").toString().toUtf8().constData());
|
||||
sstrcpy(ai.js, aiconf.value("js", "").toString().toUtf8().constData());
|
||||
sstrcpy(ai.tip, aiconf.value("tip", "Click to choose this AI").toString().toUtf8().constData());
|
||||
if (strcmp(ai.name, "Nexus") == 0)
|
||||
{
|
||||
std::vector<AIDATA>::iterator it;
|
||||
|
|
|
@ -812,7 +812,7 @@ bool scrValDefLoad(INTERP_VAL *psVal, WzConfig &ini)
|
|||
case ST_INTMESSAGE:
|
||||
if (ini.contains("data"))
|
||||
{
|
||||
psVal->v.oval = (void*)getViewData(ini.value("data").toString().toAscii().constData());
|
||||
psVal->v.oval = (void*)getViewData(ini.value("data").toString().toUtf8().constData());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -839,7 +839,7 @@ bool scrValDefLoad(INTERP_VAL *psVal, WzConfig &ini)
|
|||
index = 0;
|
||||
if (ini.contains("data"))
|
||||
{
|
||||
index = getStructStatFromName(ini.value("data").toString().toAscii().constData());
|
||||
index = getStructStatFromName(ini.value("data").toString().toUtf8().constData());
|
||||
if (index == -1)
|
||||
{
|
||||
debug( LOG_FATAL, "Could not find stat");
|
||||
|
@ -852,7 +852,7 @@ bool scrValDefLoad(INTERP_VAL *psVal, WzConfig &ini)
|
|||
index = 0;
|
||||
if (ini.contains("data"))
|
||||
{
|
||||
index = getFeatureStatFromName(ini.value("data").toString().toAscii().constData());
|
||||
index = getFeatureStatFromName(ini.value("data").toString().toUtf8().constData());
|
||||
if (index == -1)
|
||||
{
|
||||
debug( LOG_FATAL, "Could not find stat");
|
||||
|
@ -949,14 +949,14 @@ bool scrValDefLoad(INTERP_VAL *psVal, WzConfig &ini)
|
|||
psVal->v.sval = NULL;
|
||||
if (ini.contains("data"))
|
||||
{
|
||||
psVal->v.sval = strdup(ini.value("data").toString().toAscii().constData());
|
||||
psVal->v.sval = strdup(ini.value("data").toString().toUtf8().constData());
|
||||
}
|
||||
break;
|
||||
case ST_LEVEL:
|
||||
psVal->v.sval = NULL;
|
||||
if (ini.contains("data"))
|
||||
{
|
||||
psLevel = levFindDataSet(ini.value("data").toString().toAscii().constData());
|
||||
psLevel = levFindDataSet(ini.value("data").toString().toUtf8().constData());
|
||||
if (psLevel == NULL)
|
||||
{
|
||||
debug(LOG_FATAL, "Could not find level dataset");
|
||||
|
@ -1022,16 +1022,16 @@ bool scrValDefLoad(INTERP_VAL *psVal, WzConfig &ini)
|
|||
break;
|
||||
}
|
||||
|
||||
index = audio_GetTrackID(ini.value("data").toString().toAscii().constData());
|
||||
index = audio_GetTrackID(ini.value("data").toString().toUtf8().constData());
|
||||
if (index == SAMPLE_NOT_FOUND)
|
||||
{
|
||||
// find empty id and set track vals
|
||||
QString soundname = ini.value("data").toString();
|
||||
index = audio_SetTrackVals(soundname.toAscii().constData(), false, 100, 1800);
|
||||
index = audio_SetTrackVals(soundname.toUtf8().constData(), false, 100, 1800);
|
||||
if (!index) // this is a NON fatal error.
|
||||
{
|
||||
// We can't find filename of the sound for some reason.
|
||||
debug(LOG_ERROR, "Sound ID not available %s not found", soundname.toAscii().constData());
|
||||
debug(LOG_ERROR, "Sound ID not available %s not found", soundname.toUtf8().constData());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue