|
From: <cn...@us...> - 2023-03-15 18:26:31
|
Revision: 1355
http://sourceforge.net/p/seq/svn/1355
Author: cn187
Date: 2023-03-15 18:26:27 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix calls to QString::asprintf
Modified Paths:
--------------
showeq/trunk/src/bazaarlog.cpp
showeq/trunk/src/category.cpp
showeq/trunk/src/combatlog.cpp
showeq/trunk/src/editor.cpp
showeq/trunk/src/eqstr.cpp
showeq/trunk/src/interface.cpp
showeq/trunk/src/map.cpp
showeq/trunk/src/mapicon.cpp
showeq/trunk/src/messageshell.cpp
showeq/trunk/src/netdiag.cpp
showeq/trunk/src/packet.cpp
showeq/trunk/src/packetinfo.cpp
showeq/trunk/src/packetlog.cpp
showeq/trunk/src/packetstream.cpp
showeq/trunk/src/seqlistview.cpp
showeq/trunk/src/skilllist.cpp
showeq/trunk/src/spawn.cpp
showeq/trunk/src/spawnlist.cpp
showeq/trunk/src/spawnlist2.cpp
showeq/trunk/src/spawnlistcommon.cpp
showeq/trunk/src/spawnmonitor.cpp
showeq/trunk/src/spawnpointlist.cpp
showeq/trunk/src/spellshell.cpp
showeq/trunk/src/statlist.cpp
showeq/trunk/src/util.cpp
showeq/trunk/src/xmlpreferences.cpp
showeq/trunk/src/zonemgr.cpp
Modified: showeq/trunk/src/bazaarlog.cpp
===================================================================
--- showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -77,7 +77,7 @@
merchant_name = merchant->name().toLatin1().data();
QString csv;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- csv.asprintf("1^%d^%d^%d^%s^%s",
+ csv = QString::asprintf("1^%d^%d^%d^%s^%s",
int(time(NULL)),resp.price,resp.count,
merchant_name, name);
m_out << csv << ENDL;
Modified: showeq/trunk/src/category.cpp
===================================================================
--- showeq/trunk/src/category.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/category.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -338,7 +338,7 @@
for(i = 1; i <= tMaxNumCategories; i++)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- prefBaseName.asprintf("Category%d_", i);
+ prefBaseName = QString::asprintf("Category%d_", i);
#else
prefBaseName.sprintf("Category%d_", i);
#endif
@@ -391,7 +391,7 @@
break;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- prefBaseName.asprintf("Category%d_", count++);
+ prefBaseName = QString::asprintf("Category%d_", count++);
#else
prefBaseName.sprintf("Category%d_", count++);
#endif
@@ -409,7 +409,7 @@
while (count <= tMaxNumCategories)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- prefBaseName.asprintf("Category%d_", count++);
+ prefBaseName = QString::asprintf("Category%d_", count++);
#else
prefBaseName.sprintf("Category%d_", count++);
#endif
Modified: showeq/trunk/src/combatlog.cpp
===================================================================
--- showeq/trunk/src/combatlog.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/combatlog.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -632,7 +632,7 @@
{
// this is a normal skill
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s_type.asprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType);
+ s_type = QString::asprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType);
#else
s_type.sprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType);
#endif
@@ -641,7 +641,7 @@
case 231: // Non Melee Damage
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s_type.asprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell);
+ s_type = QString::asprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell);
#else
s_type.sprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell);
#endif
@@ -654,7 +654,7 @@
// -11 Killing Blow with MoR
// -8 Killing Blow with Ro? (45pt) (mage)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s_type.asprintf("Damage Shield: (%d)", iType);
+ s_type = QString::asprintf("Damage Shield: (%d)", iType);
#else
s_type.sprintf("Damage Shield: (%d)", iType);
#endif
Modified: showeq/trunk/src/editor.cpp
===================================================================
--- showeq/trunk/src/editor.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/editor.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -161,7 +161,7 @@
setWindowTitle( fileName );
QString s;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s.asprintf( "Opened %s", fileName );
+ s = QString::asprintf( "Opened %s", fileName );
#else
s.sprintf( "Opened %s", fileName );
#endif
Modified: showeq/trunk/src/eqstr.cpp
===================================================================
--- showeq/trunk/src/eqstr.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/eqstr.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -144,7 +144,7 @@
uint32_t arg_len;
unsigned char *cp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "Unknown: %04x:", formatid);
+ tempStr = QString::asprintf( "Unknown: %04x:", formatid);
#else
tempStr.sprintf( "Unknown: %04x:", formatid);
#endif
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -3127,7 +3127,7 @@
int i = winnum - mapCaptionBase;
if (i)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- title.asprintf("Map %d", i);
+ title = QString::asprintf("Map %d", i);
#else
title.sprintf("Map %d", i);
#endif
@@ -3727,7 +3727,7 @@
if (spell)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- txt.asprintf("%.3d %.2d %.2d %#4.04x %02d\t%s",
+ txt = QString::asprintf("%.3d %.2d %.2d %#4.04x %02d\t%s",
i, ((i / 8) + 1), ((i % 8) + 1),
spellid, spell->level(playerClass),
spell->name().toLatin1().data());
@@ -3741,7 +3741,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- txt.asprintf("%.3d %.2d %.2d %#4.04x \t%s",
+ txt = QString::asprintf("%.3d %.2d %.2d %#4.04x \t%s",
i, ((i / 8) + 1), ((i % 8) + 1),
spellid,
spell_name(spellid).toLatin1().data());
@@ -4698,7 +4698,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("New Level: %u", level);
+ tempStr = QString::asprintf("New Level: %u", level);
#else
tempStr.sprintf("New Level: %u", level);
#endif
@@ -4727,7 +4727,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Mobs: %d", num);
+ tempStr = QString::asprintf("Mobs: %d", num);
#else
tempStr.sprintf("Mobs: %d", num);
#endif
@@ -4745,7 +4745,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Run Speed: %3.6f", speed);
+ tempStr = QString::asprintf("Run Speed: %3.6f", speed);
#else
tempStr.sprintf("Run Speed: %3.6f", speed);
#endif
@@ -4783,13 +4783,13 @@
num -= m_initialcount;
if (num && delta)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Pkt: %d (%2.1f)", num, (float) (num<<10) / (float) delta);
+ tempStr = QString::asprintf("Pkt: %d (%2.1f)", num, (float) (num<<10) / (float) delta);
#else
tempStr.sprintf("Pkt: %d (%2.1f)", num, (float) (num<<10) / (float) delta);
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Pkt: %d", num);
+ tempStr = QString::asprintf("Pkt: %d", num);
#else
tempStr.sprintf("Pkt: %d", num);
#endif
@@ -4848,7 +4848,7 @@
float percentZEM = ((float)(m_zoneMgr->zoneExpMultiplier()-0.75)/0.75)*100;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ZEM: %3.2f%%", percentZEM);
+ tempStr = QString::asprintf("ZEM: %3.2f%%", percentZEM);
#else
tempStr.sprintf("ZEM: %3.2f%%", percentZEM);
#endif
@@ -4864,7 +4864,7 @@
float percentZEM = ((float)(m_zoneMgr->zoneExpMultiplier()-0.75)/0.75)*100;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ZEM: %3.2f%%", percentZEM);
+ tempStr = QString::asprintf("ZEM: %3.2f%%", percentZEM);
#else
tempStr.sprintf("ZEM: %3.2f%%", percentZEM);
#endif
@@ -4879,7 +4879,7 @@
emit newZoneName(shortZoneName);
float percentZEM = ((float)(m_zoneMgr->zoneExpMultiplier()-0.75)/0.75)*100;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ZEM: %3.2f%%", percentZEM);
+ tempStr = QString::asprintf("ZEM: %3.2f%%", percentZEM);
#else
tempStr.sprintf("ZEM: %3.2f%%", percentZEM);
#endif
@@ -5009,7 +5009,7 @@
QString string("");
if (spawn != 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%d: %s:%d (%d/%d) Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
+ string = QString::asprintf("%d: %s:%d (%d/%d) Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
item->id(),
item->name().toUtf8().data(),
spawn->level(), spawn->HP(),
@@ -5023,7 +5023,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%d: %s: Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
+ string = QString::asprintf("%d: %s: Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
item->id(),
item->name().toUtf8().data());
#else
@@ -5088,7 +5088,7 @@
{
QString fileName;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- fileName.asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
+ fileName = QString::asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#else
fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#endif
@@ -5110,7 +5110,7 @@
{
QString fileName;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- fileName.asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
+ fileName = QString::asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#else
fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#endif
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -4218,7 +4218,7 @@
p.setPen( Qt::yellow );
QString ts;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- ts.asprintf( "(%d, %d)",
+ ts = QString::asprintf( "(%d, %d)",
(int)(param.screenCenterX() * param.ratioX()),
(int)(param.screenCenterY() * param.ratioY()));
#else
@@ -4228,7 +4228,7 @@
#endif
p.drawText( 10, 8, ts );
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- ts.asprintf( "(%d, %d)",
+ ts = QString::asprintf( "(%d, %d)",
(int)((param.screenCenterX() - param.screenLength().width()) *
param.ratioX()),
(int)((param.screenCenterY() - param.screenLength().height()) *
@@ -4244,7 +4244,7 @@
// show frame times
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- ts.asprintf( "%2.0ffps/%dms", fps, drawTime);
+ ts = QString::asprintf( "%2.0ffps/%dms", fps, drawTime);
#else
ts.sprintf( "%2.0ffps/%dms", fps, drawTime);
#endif
@@ -4327,7 +4327,7 @@
if ( secs > 0 )
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- remaining.asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
+ remaining = QString::asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#else
remaining.sprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#endif
@@ -4349,7 +4349,7 @@
QString string;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("SpawnPoint: %s\n"
+ string = QString::asprintf("SpawnPoint: %s\n"
"%.3s/Z: %5d/%5d/%5d\n"
"Last: %s\n"
"Spawned: %s\t Remaining: %s\t Count: %d",
@@ -4399,7 +4399,7 @@
QString guild;
if (!spawn->guildTag().isEmpty())
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- guild.asprintf("<%s>", spawn->guildTag().toLatin1().data());
+ guild = QString::asprintf("<%s>", spawn->guildTag().toLatin1().data());
#else
guild.sprintf("<%s>", spawn->guildTag().toLatin1().data());
#endif
@@ -4431,7 +4431,7 @@
lastName = "";
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%s %s%s\n"
+ string = QString::asprintf("%s %s%s\n"
"Level: %2d\tHP: %s\t %.3s/Z: %5d/%5d/%5d\n"
"Race: %s\t Class: %s",
spawn->transformedName().toUtf8().data(),
@@ -4472,7 +4472,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%s\n"
+ string = QString::asprintf("%s\n"
"%.3s/Z: %5d/%5d/%5d\n"
"Race: %s\t Class: %s",
item->transformedName().toUtf8().data(),
@@ -5251,7 +5251,7 @@
{
QString cursorPos;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- cursorPos.asprintf(" %+5hd, %+5hd", y, x);
+ cursorPos = QString::asprintf(" %+5hd, %+5hd", y, x);
#else
cursorPos.sprintf(" %+5hd, %+5hd", y, x);
#endif
@@ -5263,7 +5263,7 @@
{
QString playerPos;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- playerPos.asprintf(" %+5hd, %+5hd, %+5hd", y, x, z);
+ playerPos = QString::asprintf(" %+5hd, %+5hd, %+5hd", y, x, z);
#else
playerPos.sprintf(" %+5hd, %+5hd, %+5hd", y, x, z);
#endif
Modified: showeq/trunk/src/mapicon.cpp
===================================================================
--- showeq/trunk/src/mapicon.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/mapicon.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -1113,7 +1113,7 @@
QString spawnNameText;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- spawnNameText.asprintf("%2d: %s",
+ spawnNameText = QString::asprintf("%2d: %s",
spawn->level(),
spawn->name().toLatin1().data());
#else
@@ -1233,7 +1233,7 @@
QString spawnNameText;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- spawnNameText.asprintf("sp:%s %s (%d)",
+ spawnNameText = QString::asprintf("sp:%s %s (%d)",
sp->name().toLatin1().data(),
sp->last().toLatin1().data(),
sp->count());
Modified: showeq/trunk/src/messageshell.cpp
===================================================================
--- showeq/trunk/src/messageshell.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/messageshell.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -107,7 +107,7 @@
if ((cmsg->target[0] != 0) && target)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' -> '%s' - %s {%s}",
+ tempStr = QString::asprintf( "'%s' -> '%s' - %s {%s}",
cmsg->sender,
cmsg->target,
cmsg->message,
@@ -125,7 +125,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' - %s {%s}",
+ tempStr = QString::asprintf( "'%s' - %s {%s}",
cmsg->sender,
cmsg->message,
language_name(cmsg->language).toLatin1().data()
@@ -144,7 +144,7 @@
if ((cmsg->target[0] != 0) && target)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' -> '%s' - %s",
+ tempStr = QString::asprintf( "'%s' -> '%s' - %s",
cmsg->sender,
cmsg->target,
cmsg->message
@@ -160,7 +160,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' - %s",
+ tempStr = QString::asprintf( "'%s' - %s",
cmsg->sender,
cmsg->message
);
@@ -385,7 +385,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Request random number between %d and %d",
+ tempStr = QString::asprintf("Request random number between %d and %d",
randr->bottom,
randr->top);
#else
@@ -403,7 +403,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Random number %d rolled between %d and %d by %s",
+ tempStr = QString::asprintf("Random number %d rolled between %d and %d by %s",
randr->result,
randr->bottom,
randr->top,
@@ -437,7 +437,7 @@
if (strnlen(inspt->itemNames[inp], 64) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("He has %s (icn:%i)", inspt->itemNames[inp], inspt->icons[inp]);
+ tempStr = QString::asprintf("He has %s (icn:%i)", inspt->itemNames[inp], inspt->icons[inp]);
#else
tempStr.sprintf("He has %s (icn:%i)", inspt->itemNames[inp], inspt->icons[inp]);
#endif
@@ -448,7 +448,7 @@
if (strnlen(inspt->mytext, 200) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("His info: %s", inspt->mytext);
+ tempStr = QString::asprintf("His info: %s", inspt->mytext);
#else
tempStr.sprintf("His info: %s", inspt->mytext);
#endif
@@ -583,7 +583,7 @@
default:
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "Unknown Spell Event ( %s ) - '",
+ tempStr = QString::asprintf( "Unknown Spell Event ( %s ) - '",
client ?
"Client --> Server" :
"Server --> Client"
@@ -612,7 +612,7 @@
if (mem->param1 != 4)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%s%s', slot %d.",
+ tempStr = QString::asprintf("%s%s', slot %d.",
tempStr.toLatin1().data(),
spellName.toLatin1().data(),
mem->slotId);
@@ -654,7 +654,7 @@
if (tempStr == "" || tempStr.isEmpty())
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("UNKNOWN (ID: %d)", bcast->spawnId);
+ tempStr = QString::asprintf("UNKNOWN (ID: %d)", bcast->spawnId);
#else
tempStr.sprintf("UNKNOWN (ID: %d)", bcast->spawnId);
#endif
@@ -672,7 +672,7 @@
spellName = spell_name(bcast->spellId);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "%s%s' - Casting time is %g Second%s",
+ tempStr = QString::asprintf( "%s%s' - Casting time is %g Second%s",
tempStr.toLatin1().data(),
spellName.toLatin1().data(), casttime,
casttime == 1 ? "" : "s");
@@ -694,7 +694,7 @@
if (strlen(sf->message) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "Faded: %s", sf->message);
+ tempStr = QString::asprintf( "Faded: %s", sf->message);
#else
tempStr.sprintf( "Faded: %s", sf->message);
#endif
@@ -711,7 +711,7 @@
QString tempStr;
if (item != NULL)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%s(%d): %s",
+ tempStr = QString::asprintf("%s(%d): %s",
item->name().toLatin1().data(), icast->spawnId, icast->message);
#else
tempStr.sprintf("%s(%d): %s",
@@ -719,7 +719,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("spawn(%d): %s",
+ tempStr = QString::asprintf("spawn(%d): %s",
icast->spawnId, icast->message);
#else
tempStr.sprintf("spawn(%d): %s",
@@ -752,7 +752,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("You begin casting %s. Current Target is %s(%d)",
+ tempStr = QString::asprintf("You begin casting %s. Current Target is %s(%d)",
spellName.toLatin1().data(), targetName.toLatin1().data(),
cast->targetId);
#else
@@ -780,7 +780,7 @@
{
case GUA_Joined :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s has joined the group.", gmem->membername);
+ tempStr = QString::asprintf ("Update: %s has joined the group.", gmem->membername);
#else
tempStr.sprintf ("Update: %s has joined the group.", gmem->membername);
#endif
@@ -787,7 +787,7 @@
break;
case GUA_Left :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s has left the group.", gmem->membername);
+ tempStr = QString::asprintf ("Update: %s has left the group.", gmem->membername);
#else
tempStr.sprintf ("Update: %s has left the group.", gmem->membername);
#endif
@@ -794,7 +794,7 @@
break;
case GUA_LastLeft :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: The group has been disbanded when %s left.",
+ tempStr = QString::asprintf ("Update: The group has been disbanded when %s left.",
gmem->membername);
#else
tempStr.sprintf ("Update: The group has been disbanded when %s left.",
@@ -803,7 +803,7 @@
break;
case GUA_MakeLeader :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s is now the leader of the group.",
+ tempStr = QString::asprintf ("Update: %s is now the leader of the group.",
gmem->membername);
#else
tempStr.sprintf ("Update: %s is now the leader of the group.",
@@ -812,7 +812,7 @@
break;
case GUA_Started :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s has formed the group.", gmem->membername);
+ tempStr = QString::asprintf ("Update: %s has formed the group.", gmem->membername);
#else
tempStr.sprintf ("Update: %s has formed the group.", gmem->membername);
#endif
@@ -819,7 +819,7 @@
break;
default :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: Unknown Update action:%d - %s - %s)",
+ tempStr = QString::asprintf ("Update: Unknown Update action:%d - %s - %s)",
gmem->action, gmem->yourname, gmem->membername);
#else
tempStr.sprintf ("Update: Unknown Update action:%d - %s - %s)",
@@ -837,13 +837,13 @@
if(dir == DIR_Client)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: You invite %s to join the group", gmem->invitee);
+ tempStr = QString::asprintf("Invite: You invite %s to join the group", gmem->invitee);
#else
tempStr.sprintf("Invite: You invite %s to join the group", gmem->invitee);
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s invites %s to join the group", gmem->inviter, gmem->invitee);
+ tempStr = QString::asprintf("Invite: %s invites %s to join the group", gmem->inviter, gmem->invitee);
#else
tempStr.sprintf("Invite: %s invites %s to join the group", gmem->inviter, gmem->invitee);
#endif
@@ -859,7 +859,7 @@
{
case 1:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s declines invite from %s (player is grouped)",
+ tempStr = QString::asprintf("Invite: %s declines invite from %s (player is grouped)",
gmem->membername, gmem->yourname);
#else
tempStr.sprintf("Invite: %s declines invite from %s (player is grouped)",
@@ -868,7 +868,7 @@
break;
case 3:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s declines invite from %s",
+ tempStr = QString::asprintf("Invite: %s declines invite from %s",
gmem->membername, gmem->yourname);
#else
tempStr.sprintf("Invite: %s declines invite from %s",
@@ -877,7 +877,7 @@
break;
default:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s declines invite from %s (unknown reason: %i)",
+ tempStr = QString::asprintf("Invite: %s declines invite from %s (unknown reason: %i)",
gmem->membername, gmem->yourname, gmem->reason);
#else
tempStr.sprintf("Invite: %s declines invite from %s (unknown reason: %i)",
@@ -897,7 +897,7 @@
tempStr = "Follow: You have joined the group";
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Follow: %s has joined the group", gFollow->invitee);
+ tempStr = QString::asprintf("Follow: %s has joined the group", gFollow->invitee);
#else
tempStr.sprintf("Follow: %s has joined the group", gFollow->invitee);
#endif
@@ -910,7 +910,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Disband: %s disbands from the group", gmem->membername);
+ tempStr = QString::asprintf ("Disband: %s disbands from the group", gmem->membername);
#else
tempStr.sprintf ("Disband: %s disbands from the group", gmem->membername);
#endif
@@ -922,7 +922,7 @@
const groupLeaderChangeStruct *gmem = (const groupLeaderChangeStruct*)data;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Update: %s is now the leader of the group",
+ tempStr = QString::asprintf("Update: %s is now the leader of the group",
gmem->membername);
#else
tempStr.sprintf("Update: %s is now the leader of the group",
@@ -936,7 +936,7 @@
QString message;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("Name: '%s' Last: '%s'",
+ message = QString::asprintf("Name: '%s' Last: '%s'",
player->name, player->lastName);
#else
message.sprintf("Name: '%s' Last: '%s'",
@@ -945,7 +945,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("Level: %d", player->profile.level);
+ message = QString::asprintf("Level: %d", player->profile.level);
#else
message.sprintf("Level: %d", player->profile.level);
#endif
@@ -952,7 +952,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("PlayerMoney: P=%d G=%d S=%d C=%d",
+ message = QString::asprintf("PlayerMoney: P=%d G=%d S=%d C=%d",
player->profile.platinum, player->profile.gold,
player->profile.silver, player->profile.copper);
#else
@@ -963,7 +963,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("BankMoney: P=%d G=%d S=%d C=%d",
+ message = QString::asprintf("BankMoney: P=%d G=%d S=%d C=%d",
player->platinum_bank, player->gold_bank,
player->silver_bank, player->copper_bank);
#else
@@ -974,7 +974,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("CursorMoney: P=%d G=%d S=%d C=%d",
+ message = QString::asprintf("CursorMoney: P=%d G=%d S=%d C=%d",
player->profile.platinum_cursor, player->profile.gold_cursor,
player->profile.silver_cursor, player->profile.copper_cursor);
#else
@@ -985,7 +985,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("SharedMoney: P=%d",
+ message = QString::asprintf("SharedMoney: P=%d",
player->platinum_shared);
#else
message.sprintf("SharedMoney: P=%d",
@@ -994,7 +994,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("DoN Crystals: Radiant=%d Ebon=%d",
+ message = QString::asprintf("DoN Crystals: Radiant=%d Ebon=%d",
player->currentRadCrystals, player->currentEbonCrystals);
#else
message.sprintf("DoN Crystals: Radiant=%d Ebon=%d",
@@ -1046,13 +1046,13 @@
if(player->profile.buffs[buffnumber].duration == -1)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("You have buff %s (permanent).", spellName.toLatin1().data());
+ message = QString::asprintf("You have buff %s (permanent).", spellName.toLatin1().data());
#else
message.sprintf("You have buff %s (permanent).", spellName.toLatin1().data());
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("You have buff %s duration left is %d in ticks.",
+ message = QString::asprintf("You have buff %s duration left is %d in ticks.",
#else
message.sprintf("You have buff %s duration left is %d in ticks.",
#endif
@@ -1081,7 +1081,7 @@
const skillIncStruct* skilli = (const skillIncStruct*)data;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Skill: %s has increased (%d)",
+ tempStr = QString::asprintf("Skill: %s has increased (%d)",
skill_name(skilli->skillId).toLatin1().data(),
skilli->value);
#else
@@ -1097,7 +1097,7 @@
const levelUpUpdateStruct *levelup = (const levelUpUpdateStruct *)data;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("NewLevel: %d", levelup->level);
+ tempStr = QString::asprintf("NewLevel: %d", levelup->level);
#else
tempStr.sprintf("NewLevel: %d", levelup->level);
#endif
@@ -1198,7 +1198,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Exp: Set: %u total, with %u (%u/330) into level with %u left, where 1/330 = %u",
+ tempStr = QString::asprintf("Exp: Set: %u total, with %u (%u/330) into level with %u left, where 1/330 = %u",
totalExp, (totalExp - minExpLevel), totalTick,
(maxExpLevel - totalExp), tickExpLevel);
#else
@@ -1225,7 +1225,7 @@
uint32_t needKills = leftExp / newExp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Exp: New: %u, %u (%u/330) into level with %u left [~%u kills]",
+ tempStr = QString::asprintf("Exp: New: %u, %u (%u/330) into level with %u left [~%u kills]",
newExp, (totalExp - minExpLevel), totalTick,
leftExp, needKills);
#else
@@ -1236,7 +1236,7 @@
}
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Exp: New: < %u, %u (%u/330) into level with %u left",
+ tempStr = QString::asprintf("Exp: New: < %u, %u (%u/330) into level with %u left",
tickExpLevel, (totalExp - minExpLevel), totalTick,
leftExp);
#else
@@ -1254,7 +1254,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ExpAA: Set: %u total, with %u aapoints",
+ tempStr = QString::asprintf("ExpAA: Set: %u total, with %u aapoints",
totalExp, aaPoints);
#else
tempStr.sprintf("ExpAA: Set: %u total, with %u aapoints",
@@ -1275,7 +1275,7 @@
// ie. a > 1/330'th experience increment.
if (newExp)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ExpAA: %u, %u (%u/330) with %u left",
+ tempStr = QString::asprintf("ExpAA: %u, %u (%u/330) with %u left",
newExp, totalExp, totalTick, maxExp - totalExp);
#else
tempStr.sprintf("ExpAA: %u, %u (%u/330) with %u left",
@@ -1283,7 +1283,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ExpAA: < %u, %u (%u/330) with %u left",
+ tempStr = QString::asprintf("ExpAA: < %u, %u (%u/330) with %u left",
tickExp, totalExp, totalTick, maxExp - totalExp);
#else
tempStr.sprintf("ExpAA: < %u, %u (%u/330) with %u left",
@@ -1361,7 +1361,7 @@
// extra info if it is a spawn
if (spawn)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- spawnInfo.asprintf(" LVL %d, HP %d/%d",
+ spawnInfo = QString::asprintf(" LVL %d, HP %d/%d",
spawn->level(), spawn->HP(), spawn->maxHP());
#else
spawnInfo.sprintf(" LVL %d, HP %d/%d",
Modified: showeq/trunk/src/netdiag.cpp
===================================================================
--- showeq/trunk/src/netdiag.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/netdiag.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -220,7 +220,7 @@
{
QString disp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- disp.asprintf("%4.4x", seq);
+ disp = QString::asprintf("%4.4x", seq);
#else
disp.sprintf("%4.4x", seq);
#endif
@@ -231,7 +231,7 @@
{
QString disp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- disp.asprintf("%4.4x", seq);
+ disp = QString::asprintf("%4.4x", seq);
#else
disp.sprintf("%4.4x", seq);
#endif
@@ -250,7 +250,7 @@
{
case 2:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf(":%d",
+ tmp = QString::asprintf(":%d",
m_packet->clientPort());
#else
tmp.sprintf(":%d",
@@ -274,7 +274,7 @@
disp = print_addr(addr);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf(":%d", clientPort);
+ tmp = QString::asprintf(":%d", clientPort);
#else
tmp.sprintf(":%d", clientPort);
#endif
@@ -345,7 +345,7 @@
int delta = mTime() - m_packetStartTime[stream];
if (numdelta && delta)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%2.1f",
+ tempStr = QString::asprintf("%2.1f",
(float) (numdelta<<10) / (float) delta);
#else
tempStr.sprintf("%2.1f",
@@ -353,7 +353,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("0.0");
+ tempStr = QString::asprintf("0.0");
#else
tempStr.sprintf("0.0");
#endif
@@ -379,7 +379,7 @@
QString paddr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- paddr.asprintf ( "%d.%d.%d.%d",
+ paddr = QString::asprintf ( "%d.%d.%d.%d",
addr & 0x000000ff,
(addr & 0x0000ff00) >> 8,
(addr & 0x00ff0000) >> 16,
Modified: showeq/trunk/src/packet.cpp
===================================================================
--- showeq/trunk/src/packet.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packet.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -818,19 +818,19 @@
if (speed == 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("Playback speed set Fast as possible");
+ string = QString::asprintf("Playback speed set Fast as possible");
#else
string.sprintf("Playback speed set Fast as possible");
#endif
else if (speed < 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("Playback paused (']' to resume)");
+ string = QString::asprintf("Playback paused (']' to resume)");
#else
string.sprintf("Playback paused (']' to resume)");
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("Playback speed set to %d", speed);
+ string = QString::asprintf("Playback speed set to %d", speed);
#else
string.sprintf("Playback speed set to %d", speed);
#endif
Modified: showeq/trunk/src/packetinfo.cpp
===================================================================
--- showeq/trunk/src/packetinfo.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packetinfo.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -375,7 +375,7 @@
// output the current opcode
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- opcodeString.asprintf("%04x", currentOPCode->opcode());
+ opcodeString = QString::asprintf("%04x", currentOPCode->opcode());
#else
opcodeString.sprintf("%04x", currentOPCode->opcode());
#endif
Modified: showeq/trunk/src/packetlog.cpp
===================================================================
--- showeq/trunk/src/packetlog.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packetlog.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -55,7 +55,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("[OPCode: %#.04x]", opCode);
+ tempStr = QString::asprintf("[OPCode: %#.04x]", opCode);
#else
tempStr.sprintf("[OPCode: %#.04x]", opCode);
#endif
@@ -92,7 +92,7 @@
paddr = "client";
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- paddr.asprintf( "%d.%d.%d.%d",
+ paddr = QString::asprintf( "%d.%d.%d.%d",
addr & 0x000000ff,
(addr & 0x0000ff00) >> 8,
(addr & 0x00ff0000) >> 16,
Modified: showeq/trunk/src/packetstream.cpp
===================================================================
--- showeq/trunk/src/packetstream.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packetstream.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -164,7 +164,7 @@
// construct a name for the dispatch
QString dispatchName(256, '\0');
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- dispatchName.asprintf("PacketDispatch:%s:%s:%d:%s:%d",
+ dispatchName = QString::asprintf("PacketDispatch:%s:%s:%d:%s:%d",
objectName().toLatin1().data(), opcodeName.toLatin1().data(),
payload->dir(), payload->typeName().toLatin1().data(),
payload->sizeCheckType());
@@ -472,7 +472,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%s (%#04x) (dataLen: %lu) doesn't match:",
+ tempStr = QString::asprintf("%s (%#04x) (dataLen: %lu) doesn't match:",
opcodeEntry->name().toLatin1().data(),
opcodeEntry->opcode(), len);
#else
Modified: showeq/trunk/src/seqlistview.cpp
===================================================================
--- showeq/trunk/src/seqlistview.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/seqlistview.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -147,7 +147,7 @@
QString tempStr, tempStr2;
if (header()->count() > 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%d", header()->logicalIndex(0));
+ tempStr = QString::asprintf("%d", header()->logicalIndex(0));
#else
tempStr.sprintf("%d", header()->logicalIndex(0));
#endif
@@ -154,7 +154,7 @@
for(i=1; i < header()->count(); i++)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr2.asprintf(":%d", header()->logicalIndex(i));
+ tempStr2 = QString::asprintf(":%d", header()->logicalIndex(i));
#else
tempStr2.sprintf(":%d", header()->logicalIndex(i));
#endif
Modified: showeq/trunk/src/skilllist.cpp
===================================================================
--- showeq/trunk/src/skilllist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/skilllist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -110,7 +110,7 @@
QString str;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf("%3d", value);
+ str = QString::asprintf("%3d", value);
#else
str.sprintf("%3d", value);
#endif
@@ -142,7 +142,7 @@
QString str;
/* Update skill value with new value */
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf ("%3d", value);
+ str = QString::asprintf ("%3d", value);
#else
str.sprintf ("%3d", value);
#endif
@@ -195,7 +195,7 @@
str = " NA";
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf ("%3d", value);
+ str = QString::asprintf ("%3d", value);
#else
str.sprintf ("%3d", value);
#endif
@@ -231,7 +231,7 @@
/* Update skill value with new value */
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf ("%3d", value);
+ str = QString::asprintf ("%3d", value);
#else
str.sprintf ("%3d", value);
#endif
Modified: showeq/trunk/src/spawn.cpp
===================================================================
--- showeq/trunk/src/spawn.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawn.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -188,7 +188,7 @@
{
QString item_str;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- item_str.asprintf("U%04x", item);
+ item_str = QString::asprintf("U%04x", item);
#else
item_str.sprintf("U%04x", item);
#endif
@@ -253,7 +253,7 @@
{
QString buff;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d",
+ buff = QString::asprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d",
transformedName().toUtf8().data(),
raceString().toUtf8().data(),
classString().toUtf8().data(),
@@ -911,7 +911,7 @@
QString buff;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("Name:%s:Level:%d:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:"
+ buff = QString::asprintf("Name:%s:Level:%d:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:"
"Light:%s:Deity:%s:RTeam:%d:DTeam:%d:Type:%s:LastName:%s:Guild:%s:Spawn:%s:",
name.toUtf8().data(),
level(),
@@ -1105,7 +1105,7 @@
(int16_t)(d->z * 10.0));
setHeading((int8_t)lrintf(d->heading));
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- m_name.asprintf("Door: %s (%d) ", d->name, d->doorId);
+ m_name = QString::asprintf("Door: %s (%d) ", d->name, d->doorId);
#else
m_name.sprintf("Door: %s (%d) ", d->name, d->doorId);
#endif
Modified: showeq/trunk/src/spawnlist.cpp
===================================================================
--- showeq/trunk/src/spawnlist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnlist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -161,7 +161,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", litem->item()->calcDist2DInt(x, y));
+ buff = QString::asprintf("%5d", litem->item()->calcDist2DInt(x, y));
#else
buff.sprintf("%5d", litem->item()->calcDist2DInt(x, y));
#endif
@@ -179,7 +179,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5.1f", litem->item()->calcDist(x, y, z));
+ buff = QString::asprintf("%5.1f", litem->item()->calcDist(x, y, z));
#else
buff.sprintf("%5.1f", litem->item()->calcDist(x, y, z));
#endif
Modified: showeq/trunk/src/spawnlist2.cpp
===================================================================
--- showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -566,7 +566,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", litem->item()->calcDist2DInt(x, y));
+ buff = QString::asprintf("%5d", litem->item()->calcDist2DInt(x, y));
#else
buff.sprintf("%5d", litem->item()->calcDist2DInt(x, y));
#endif
@@ -588,7 +588,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5.1f", litem->item()->calcDist(x, y, z));
+ buff = QString::asprintf("%5.1f", litem->item()->calcDist(x, y, z));
#else
buff.sprintf("%5.1f", litem->item()->calcDist(x, y, z));
#endif
Modified: showeq/trunk/src/spawnlistcommon.cpp
===================================================================
--- showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -191,7 +191,7 @@
{
// Level
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%2d", spawn->level());
+ buff = QString::asprintf("%2d", spawn->level());
#else
buff.sprintf("%2d", spawn->level());
#endif
@@ -202,7 +202,7 @@
{
// Hitpoints
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", spawn->HP());
+ buff = QString::asprintf("%5d", spawn->HP());
#else
buff.sprintf("%5d", spawn->HP());
#endif
@@ -210,7 +210,7 @@
// Maximum Hitpoints
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", spawn->maxHP());
+ buff = QString::asprintf("%5d", spawn->maxHP());
#else
buff.sprintf("%5d", spawn->maxHP());
#endif
@@ -241,7 +241,7 @@
{
// X position
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", showeq_params->retarded_coords ?
+ buff = QString::asprintf("%5d", showeq_params->retarded_coords ?
(int)item()->y() : (int)item()->x());
#else
buff.sprintf("%5d", showeq_params->retarded_coords ?
@@ -251,7 +251,7 @@
// Y position
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", showeq_params->retarded_coords ?
+ buff = QString::asprintf("%5d", showeq_params->retarded_coords ?
(int)item()->x() : (int)item()->y());
#else
buff.sprintf("%5d", showeq_params->retarded_coords ?
@@ -261,7 +261,7 @@
// Z position
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", item()->z());
+ buff = QString::asprintf("%5d", item()->z());
#else
buff.sprintf("%5d", item()->z());
#endif
@@ -272,7 +272,7 @@
{
//buff.sprintf("%5d", player->calcDist2DInt(*item()));
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", item()->getIDistanceToPlayer());
+ buff = QString::asprintf("%5d", item()->getIDistanceToPlayer());
#else
buff.sprintf("%5d", item()->getIDistanceToPlayer());
#endif
@@ -281,7 +281,7 @@
{
//buff.sprintf("%5.1f", player->calcDist(*item()));
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5.1f", item()->getFDistanceToPlayer());
+ buff = QString::asprintf("%5.1f", item()->getFDistanceToPlayer());
#else
buff.sprintf("%5.1f", item()->getFDistanceToPlayer());
#endif
@@ -293,7 +293,7 @@
{
// Id
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", item()->id());
+ buff = QString::asprintf("%5d", item()->id());
#else
buff.sprintf("%5d", item()->id());
#endif
@@ -325,7 +325,7 @@
// update childcount in header
QString temp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- temp.asprintf("%s (%d)",
+ temp = QString::asprintf("%s (%d)",
name.toLatin1().data(), childCount());
#else
temp.sprintf("%s (%d)",
Modified: showeq/trunk/src/spawnmonitor.cpp
===================================================================
--- showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -57,7 +57,7 @@
{
QString t;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- t.asprintf( "%d%d%d", x, y, z );
+ t = QString::asprintf( "%d%d%d", x, y, z );
#else
t.sprintf( "%d%d%d", x, y, z );
#endif
Modified: showeq/trunk/src/spawnpointlist.cpp
===================================================================
--- showeq/trunk/src/spawnpointlist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnpointlist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -77,7 +77,7 @@
if ( secs > 0 )
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmpStr.asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
+ tmpStr = QString::asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#else
tmpStr.sprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#endif
@@ -348,7 +348,7 @@
def = sp->last();
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- def.asprintf("%d/%d/%d '%s'",
+ def = QString::asprintf("%d/%d/%d '%s'",
sp->x(), sp->y(), sp->z(), def.toLatin1().data());
#else
def.sprintf("%d/%d/%d '%s'",
Modified: showeq/trunk/src/spellshell.cpp
===================================================================
--- showeq/trunk/src/spellshell.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spellshell.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -77,7 +77,7 @@
d %= 3600;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- text.asprintf("%02d:%02d:%02d", h, d / 60, d % 60);
+ text = QString::asprintf("%02d:%02d:%02d", h, d / 60, d % 60);
#else
text.sprintf("%02d:%02d:%02d", h, d / 60, d % 60);
#endif
Modified: showeq/trunk/src/statlist.cpp
===================================================================
--- showeq/trunk/src/statlist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/statlist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -58,7 +58,7 @@
for (int nloop = 0; nloop < LIST_MAXLIST; nloop++)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- statPrefName.asprintf("show%s", statNames[nloop]);
+ statPrefName = QString::asprintf("show%s", statNames[nloop]);
#else
statPrefName.sprintf("show%s", statNames[nloop]);
#endif
@@ -248,7 +248,7 @@
QString statPrefName;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- statPrefName.asprintf("show%s", statNames[stat]);
+ statPrefName = QString::asprintf("show%s", statNames[stat]);
#else
statPrefName.sprintf("show%s", statNames[stat]);
#endif
Modified: showeq/trunk/src/util.cpp
===================================================================
--- showeq/trunk/src/util.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/util.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -84,13 +84,13 @@
threeDigits = number % 1000L;
if (oldstring.isEmpty())
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buffer.asprintf("%u", threeDigits);
+ buffer = QString::asprintf("%u", threeDigits);
#else
buffer.sprintf("%u", threeDigits);
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buffer.asprintf("%03u", threeDigits);
+ buffer = QString::asprintf("%03u", threeDigits);
#else
buffer.sprintf("%03u", threeDigits);
#endif
@@ -348,7 +348,7 @@
{
QString mat_str;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- mat_str.asprintf("U%02x", material);
+ mat_str = QString::asprintf("U%02x", material);
#else
mat_str.sprintf("U%02x", material);
#endif
@@ -433,7 +433,7 @@
QString skill_name;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- skill_name.asprintf("U0x%2.2x", skill);
+ skill_name = QString::asprintf("U0x%2.2x", skill);
#else
skill_name.sprintf("U0x%2.2x", skill);
#endif
@@ -497,7 +497,7 @@
QString tmp;
// generate a string containing only the unknown flags
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf("U0x%8.8x", (equipableSlots & (~ 0x003fffff)));
+ tmp = QString::asprintf("U0x%8.8x", (equipableSlots & (~ 0x003fffff)));
#else
tmp.sprintf("U0x%8.8x", (equipableSlots & (~ 0x003fffff)));
#endif
@@ -532,7 +532,7 @@
{
QString tmp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf("Unknown faction: %d", faction);
+ tmp = QString::asprintf("Unknown faction: %d", faction);
#else
tmp.sprintf("Unknown faction: %d", faction);
#endif
@@ -754,7 +754,7 @@
if (uiDivisor == 1000 && (uiCopper / uiDivisor) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%d Platinum", uiCopper / uiDivisor);
+ qsMoney = QString::asprintf("%d Platinum", uiCopper / uiDivisor);
#else
qsMoney.sprintf("%d Platinum", uiCopper / uiDivisor);
#endif
@@ -767,7 +767,7 @@
if (uiDivisor == 100 && (uiCopper / uiDivisor) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%s%s%d Gold", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
+ qsMoney = QString::asprintf("%s%s%d Gold", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#else
qsMoney.sprintf("%s%s%d Gold", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#endif
@@ -780,7 +780,7 @@
if (uiDivisor == 10 && (uiCopper / uiDivisor) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%s%s%d Silver", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
+ qsMoney = QString::asprintf("%s%s%d Silver", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#else
qsMoney.sprintf("%s%s%d Silver", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#endif
@@ -792,7 +792,7 @@
if (uiDivisor == 1 && uiCopper != 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%s%s%d Copper", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper);
+ qsMoney = QString::asprintf("%s%s%d Copper", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper);
#else
qsMoney.sprintf("%s%s%d Copper", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper);
#endif
Modified: showeq/trunk/src/xmlpreferences.cpp
===================================================================
--- showeq/trunk/src/xmlpreferences.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/xmlpreferences.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -53,7 +53,7 @@
m_defaultsSections()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- m_templateDoc.asprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ m_templateDoc = QString::asprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE %s SYSTEM \"%s\">\n"
"<seqpreferences version=\"%1.1f\">\n"
"<!-- ============================================================= -->"
Modified: showeq/trunk/src/zonemgr.cpp
===================================================================
--- showeq/trunk/src/zonemgr.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/zonemgr.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -105,7 +105,7 @@
seqDebug("ZoneMgr::zoneNameFromID: zone name not found: zoneId=%d", zoneId);
QString tmpStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmpStr.asprintf("unk_zone_%d", zoneId);
+ tmpStr = QString::asprintf("unk_zone_%d", zoneId);
#else
tmpStr.sprintf("unk_zone_%d", zoneId);
#endif
@@ -124,7 +124,7 @@
seqDebug("ZoneMgr::zoneLongNameFromID: zone name not found: zoneId=%d", zoneId);
QString tmpStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmpStr.asprintf("unk_zone_%d", zoneId);
+ tmpStr = QString::asprintf("unk_zone_%d", zoneId);
#else
tmpStr.sprintf("unk_zone_%d", zoneId);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|