|
From: <cn...@us...> - 2021-04-30 04:10:24
|
Revision: 1163
http://sourceforge.net/p/seq/svn/1163
Author: cn187
Date: 2021-04-30 04:10:23 +0000 (Fri, 30 Apr 2021)
Log Message:
-----------
[Qt5] Replace toAscii with toLatin1
Modified Paths:
--------------
showeq/branches/cn187_devel/src/bazaarlog.cpp
showeq/branches/cn187_devel/src/combatlog.cpp
showeq/branches/cn187_devel/src/datalocationmgr.cpp
showeq/branches/cn187_devel/src/db3conv.cpp
showeq/branches/cn187_devel/src/drawmap.cpp
showeq/branches/cn187_devel/src/editor.cpp
showeq/branches/cn187_devel/src/experiencelog.cpp
showeq/branches/cn187_devel/src/filter.cpp
showeq/branches/cn187_devel/src/filteredspawnlog.cpp
showeq/branches/cn187_devel/src/filtermgr.cpp
showeq/branches/cn187_devel/src/filternotifications.cpp
showeq/branches/cn187_devel/src/gdbmconv.cpp
showeq/branches/cn187_devel/src/group.cpp
showeq/branches/cn187_devel/src/guild.cpp
showeq/branches/cn187_devel/src/interface.cpp
showeq/branches/cn187_devel/src/logger.cpp
showeq/branches/cn187_devel/src/main.cpp
showeq/branches/cn187_devel/src/map.cpp
showeq/branches/cn187_devel/src/mapcore.cpp
showeq/branches/cn187_devel/src/mapicon.cpp
showeq/branches/cn187_devel/src/messageshell.cpp
showeq/branches/cn187_devel/src/messagewindow.cpp
showeq/branches/cn187_devel/src/packet.cpp
showeq/branches/cn187_devel/src/packetinfo.cpp
showeq/branches/cn187_devel/src/packetlog.cpp
showeq/branches/cn187_devel/src/packetstream.cpp
showeq/branches/cn187_devel/src/player.cpp
showeq/branches/cn187_devel/src/spawnlist.cpp
showeq/branches/cn187_devel/src/spawnlist2.cpp
showeq/branches/cn187_devel/src/spawnlistcommon.cpp
showeq/branches/cn187_devel/src/spawnlog.cpp
showeq/branches/cn187_devel/src/spawnmonitor.cpp
showeq/branches/cn187_devel/src/spawnpointlist.cpp
showeq/branches/cn187_devel/src/spawnshell.cpp
showeq/branches/cn187_devel/src/util.cpp
showeq/branches/cn187_devel/src/xmlconv.cpp
showeq/branches/cn187_devel/src/xmlpreferences.cpp
showeq/branches/cn187_devel/src/zonemgr.cpp
Modified: showeq/branches/cn187_devel/src/bazaarlog.cpp
===================================================================
--- showeq/branches/cn187_devel/src/bazaarlog.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/bazaarlog.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -67,7 +67,7 @@
Item *merchant = m_shell.spawns().value(resp.player_id, nullptr);
const char *merchant_name = "unknown";
if (merchant)
- merchant_name = merchant->name().toAscii().data();
+ merchant_name = merchant->name().toLatin1().data();
QString csv;
csv.sprintf("1^%d^%d^%d^%s^%s",
int(time(NULL)),resp.price,resp.count,
Modified: showeq/branches/cn187_devel/src/combatlog.cpp
===================================================================
--- showeq/branches/cn187_devel/src/combatlog.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/combatlog.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -631,12 +631,12 @@
case 52: // Tiger Claw
{
// this is a normal skill
- s_type.sprintf("%s(%d)", skill_name(iType).toAscii().data(), iType);
+ s_type.sprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType);
break;
}
case 231: // Non Melee Damage
{
- s_type.sprintf("Spell: %s(%d)", spell_name(iSpell).toAscii().data(), iSpell);
+ s_type.sprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell);
break;
}
default: // Damage Shield?
Modified: showeq/branches/cn187_devel/src/datalocationmgr.cpp
===================================================================
--- showeq/branches/cn187_devel/src/datalocationmgr.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/datalocationmgr.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -55,7 +55,7 @@
// no, then attempt to create it.
if (!userDataDir.mkdir(m_userData))
{
- seqWarn("Failed to create '%s'\n", userDataDir.absolutePath().toAscii().data());
+ seqWarn("Failed to create '%s'\n", userDataDir.absolutePath().toLatin1().data());
return false;
}
}
Modified: showeq/branches/cn187_devel/src/db3conv.cpp
===================================================================
--- showeq/branches/cn187_devel/src/db3conv.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/db3conv.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -94,7 +94,7 @@
if (!dirInfo.exists())
{
fprintf(stderr, "DB3Convenience: Data Directory '%s' doesn't exist.\n",
- dirInfo.absoluteFilePath().toAscii().data());
+ dirInfo.absoluteFilePath().toLatin1().data());
// nothing more to do, just return NULL
return (Db*)NULL;
@@ -104,7 +104,7 @@
if (!dirInfo.isDir())
{
fprintf(stderr, "DB3Convenience: Data Directory '%s isn't a directory.\n",
- dirInfo.absoluteFilePath().toAscii().data());
+ dirInfo.absoluteFilePath().toLatin1().data());
// nothing more to do, just return NULL
return (Db*)NULL;
@@ -119,7 +119,7 @@
{
// if the file isn't readable, no point in going on is there...
fprintf(stderr, "DB3Convenience: Data File '%s isn't readable.\n",
- dirInfo.absoluteFilePath().toAscii().data());
+ dirInfo.absoluteFilePath().toLatin1().data());
// nothing more to do, just return NULL
return (Db*)NULL;
@@ -156,7 +156,7 @@
// setup the common database environment for all databases opened
// using this object
- ret = m_dbEnv->open(dirInfo.absoluteFilePath().toAscii().data(), dbEnvFlags,
+ ret = m_dbEnv->open(dirInfo.absoluteFilePath().toLatin1().data(), dbEnvFlags,
0664);
if (ret != 0)
@@ -187,16 +187,16 @@
#if 1 // can't do verify with transactions, logging, or locking
// verify the database before we go any further
- ret = retdbp->verify(dbName.toAscii().data(), NULL, NULL, 0);
+ ret = retdbp->verify(dbName.toLatin1().data(), NULL, NULL, 0);
if (ret != 0)
{
// display a human readable error
fprintf(stderr, "DB3Convenience: Db::verify() failed on file '%s': %s\n",
- dbName.toAscii().data(), DbEnv::strerror(ret));
+ dbName.toLatin1().data(), DbEnv::strerror(ret));
if (ret == DB_RUNRECOVERY)
fprintf(stderr, "DB3Convenience: Please run db_recover on file '%s'\n",
- dbName.toAscii().data());
+ dbName.toLatin1().data());
// check if it's a file access problem
if (openForReadOnly)
@@ -221,7 +221,7 @@
// display a human readable error
fprintf(stderr,
"DB3Convenience: Db::set_flags(0) failed on file '%s': %s\n",
- dbName.toAscii().data(), DbEnv::strerror(ret));
+ dbName.toLatin1().data(), DbEnv::strerror(ret));
// delete the database handle since it's not usable
delete retdbp;
@@ -233,13 +233,13 @@
// open the database
// ret = retdbp->open((const char*)dbName, NULL, DB_HASH, dbOpenFlags, 0664);
- ret = retdbp->open(NULL, dbName.toAscii().data(), NULL, DB_BTREE, dbOpenFlags, 0664);
+ ret = retdbp->open(NULL, dbName.toLatin1().data(), NULL, DB_BTREE, dbOpenFlags, 0664);
if (ret != 0)
{
// display a human readable error
fprintf(stderr, "DB3Convenience: Db::open() failed on file '%s': %s\n",
- dbName.toAscii().data(), DbEnv::strerror(ret));
+ dbName.toLatin1().data(), DbEnv::strerror(ret));
// check if it's a file access problem
if (openForReadOnly)
@@ -283,7 +283,7 @@
success = true;
break;
default:
- displayDB3Error(ret, "Insert: put", dbName.toAscii().data());
+ displayDB3Error(ret, "Insert: put", dbName.toLatin1().data());
}
}
@@ -307,7 +307,7 @@
success = true;
break;
default:
- displayDB3Error(ret, "Delete: del", dbName.toAscii().data());
+ displayDB3Error(ret, "Delete: del", dbName.toLatin1().data());
}
}
@@ -335,7 +335,7 @@
success = false;
break;
default:
- displayDB3Error(ret, "IsEntryExist: get", dbName.toAscii().data());
+ displayDB3Error(ret, "IsEntryExist: get", dbName.toLatin1().data());
}
}
@@ -368,7 +368,7 @@
success = false;
break;
default:
- displayDB3Error(ret, "GetEntry: get", dbName.toAscii().data());
+ displayDB3Error(ret, "GetEntry: get", dbName.toLatin1().data());
}
}
@@ -404,7 +404,7 @@
int ret = db->close(0);
if (ret != 0)
- displayDB3Error(ret, "Close: close", dbName.toAscii().data());
+ displayDB3Error(ret, "Close: close", dbName.toLatin1().data());
// remove the db from the dictionary
m_dbDict.remove(dbName);
@@ -440,7 +440,7 @@
ret = db->close(0);
if (ret != 0)
- displayDB3Error(ret, "Shutdown: close", dbName.toAscii().data());
+ displayDB3Error(ret, "Shutdown: close", dbName.toLatin1().data());
// remove the db from the dictionary
m_dbDict.remove(dbName);
@@ -510,7 +510,7 @@
if (ret != 0)
{
- displayDB3Error(ret, "GetFirstKey: cursor", dbName.toAscii().data());
+ displayDB3Error(ret, "GetFirstKey: cursor", dbName.toLatin1().data());
return false;
}
@@ -528,7 +528,7 @@
// display an error on any other error returns
if (ret != 0)
{
- displayDB3Error(ret, "GetFirstKey: get", m_dbName.toAscii().data());
+ displayDB3Error(ret, "GetFirstKey: get", m_dbName.toLatin1().data());
return false;
}
@@ -579,7 +579,7 @@
// display an error on any other error returns
if (ret != 0)
{
- displayDB3Error(ret, "GetNextKey: get", m_dbName.toAscii().data());
+ displayDB3Error(ret, "GetNextKey: get", m_dbName.toLatin1().data());
return false;
}
@@ -642,7 +642,7 @@
int ret = m_db->close(0);
if (ret != 0)
- displayDB3Error(ret, "Done: close", m_dbName.toAscii().data());
+ displayDB3Error(ret, "Done: close", m_dbName.toLatin1().data());
}
// if there is any data left over that the user didn't get, then free it
Modified: showeq/branches/cn187_devel/src/drawmap.cpp
===================================================================
--- showeq/branches/cn187_devel/src/drawmap.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/drawmap.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -527,7 +527,7 @@
gdImageString (im, gdFontSmall,
calcXOffset (locationX[n]) - 2,
calcYOffset (locationY[n]) - 2,
- (unsigned char*)locationName[n].toAscii().data(), tmpcolor);
+ (unsigned char*)locationName[n].toLatin1().data(), tmpcolor);
}
/* Print the http header */
@@ -583,7 +583,7 @@
mapName.replace(slashExp, "_");
mapName.prepend(PKGDATADIR "maps/");
- loadFileMap (mapName.toAscii().data());
+ loadFileMap (mapName.toLatin1().data());
paintMap();
}
else
Modified: showeq/branches/cn187_devel/src/editor.cpp
===================================================================
--- showeq/branches/cn187_devel/src/editor.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/editor.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -136,7 +136,7 @@
{
QString fn = QFileDialog::getOpenFileName(this);
if ( !fn.isEmpty() )
- load(fn.toAscii().data());
+ load(fn.toLatin1().data());
else
statusBar()->showMessage( "File Open Cancelled", 2000 );
}
Modified: showeq/branches/cn187_devel/src/experiencelog.cpp
===================================================================
--- showeq/branches/cn187_devel/src/experiencelog.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/experiencelog.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -324,7 +324,7 @@
QFileInfo fileInfo = m_dataLocMgr->findWriteFile("logs", "exp.log");
- m_log = fopen(fileInfo.absoluteFilePath().toAscii().data(), "a");
+ m_log = fopen(fileInfo.absoluteFilePath().toLatin1().data(), "a");
if (m_log == 0)
{
m_log_exp = 0;
@@ -363,7 +363,7 @@
#ifdef DEBUGEXP
resize( sizeHint() );
qDebug("ExperienceWindow::addExpRecord() '%s', lvl %d, exp %d",
- mob_name.toAscii().data(), mob_level, xp_gained);
+ mob_name.toLatin1().data(), mob_level, xp_gained);
#endif
if (m_log_exp)
@@ -418,7 +418,7 @@
FILE* newlogfp = NULL;
// open the file for append
- newlogfp = fopen(m_newExpLogFile.toAscii().data(), "a");
+ newlogfp = fopen(m_newExpLogFile.toLatin1().data(), "a");
if (newlogfp != NULL)
{
@@ -426,11 +426,11 @@
fprintf(newlogfp,
"0\t%s\t%s\t%d\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%d\t%d\t%lu",
- s_time, s_mob_name.toAscii().data(), mob_level,
- s_xp_value.toAscii().data(), s_xp_valueZEM.toAscii().data(),
- s_xp_valuep.toAscii().data(), s_xp_valueg.toAscii().data(),
- s_xp_gained.toAscii().data(), m_player->name().toAscii().data(),
- m_player->lastName().toAscii().data(), m_player->level(),
+ s_time, s_mob_name.toLatin1().data(), mob_level,
+ s_xp_value.toLatin1().data(), s_xp_valueZEM.toLatin1().data(),
+ s_xp_valuep.toLatin1().data(), s_xp_valueg.toLatin1().data(),
+ s_xp_gained.toLatin1().data(), m_player->name().toLatin1().data(),
+ m_player->lastName().toLatin1().data(), m_player->level(),
m_player->classVal(), m_group->groupSize());
const Spawn* spawn;
Modified: showeq/branches/cn187_devel/src/filter.cpp
===================================================================
--- showeq/branches/cn187_devel/src/filter.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/filter.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -181,7 +181,7 @@
// For the pattern, save off the original. This is what will be saved
// during save operations. But the actual regexp we filter with will
// mark the # in spawn names as optional to aid in filter writing.
- m_regexpOriginalPattern = QString(regexString.toAscii().data());
+ m_regexpOriginalPattern = QString(regexString.toLatin1().data());
QString fixedFilterPattern = regexString;
fixedFilterPattern.replace("Name:", "Name:#?", Qt::CaseInsensitive);
@@ -190,8 +190,8 @@
if (!m_regexp.isValid())
{
seqWarn("Filter Error: '%s' - %s",
- m_regexp.pattern().toAscii().data(),
- m_regexp.errorString().toAscii().data());
+ m_regexp.pattern().toLatin1().data(),
+ m_regexp.errorString().toLatin1().data());
}
}
@@ -203,8 +203,8 @@
if (!m_regexp.isValid())
{
seqWarn("Filter Error: '%s' - %s",
- m_regexp.pattern().toAscii().data(),
- m_regexp.errorString().toAscii().data());
+ m_regexp.pattern().toLatin1().data(),
+ m_regexp.errorString().toLatin1().data());
}
}
@@ -604,13 +604,13 @@
FilterMap::const_iterator it;
seqInfo("Filters from file '%s':",
- m_file.toAscii().data());
+ m_file.toLatin1().data());
// iterate over the filters
for (it = m_filters.begin(); it != m_filters.end(); it++)
{
// print the header
seqInfo("Filter Type '%s':",
- m_types.name(it->first).toAscii().data());
+ m_types.name(it->first).toLatin1().data());
// list off the actual filters
it->second->listFilters();
Modified: showeq/branches/cn187_devel/src/filteredspawnlog.cpp
===================================================================
--- showeq/branches/cn187_devel/src/filteredspawnlog.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/filteredspawnlog.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -92,12 +92,12 @@
// log the information
outputf("%s %s %s LOC %dy, %dx, %dz at %s (%s)\n",
- m_filterMgr->filterString(flag).toAscii().data(),
+ m_filterMgr->filterString(flag).toLatin1().data(),
action,
- item->name().toAscii().data(),
+ item->name().toLatin1().data(),
item->y(), item->x(), item->z(),
- eqDate.isValid() ? eqDate.toString().toAscii().data() : "",
- item->spawnTimeStr().toAscii().data());
+ eqDate.isValid() ? eqDate.toString().toLatin1().data() : "",
+ item->spawnTimeStr().toLatin1().data());
flush();
}
Modified: showeq/branches/cn187_devel/src/filtermgr.cpp
===================================================================
--- showeq/branches/cn187_devel/src/filtermgr.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/filtermgr.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -138,7 +138,7 @@
m_filterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Filters from '%s'", m_filterFile.toAscii().data());
+ seqInfo("Loading Filters from '%s'", m_filterFile.toLatin1().data());
m_filters->load(m_filterFile);
@@ -152,7 +152,7 @@
m_filterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Filters from '%s'", m_filterFile.toAscii().data());
+ seqInfo("Loading Filters from '%s'", m_filterFile.toLatin1().data());
m_filters->load(m_filterFile);
@@ -168,7 +168,7 @@
m_filterFile = fileInfo.absoluteFilePath();
- seqInfo("Saving filters to %s", m_filterFile.toAscii().data());
+ seqInfo("Saving filters to %s", m_filterFile.toLatin1().data());
m_filters->save(m_filterFile);
}
@@ -243,7 +243,7 @@
m_zoneFilterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toAscii().data());
+ seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toLatin1().data());
m_zoneFilters->load(m_zoneFilterFile);
@@ -259,7 +259,7 @@
m_zoneFilterFile = fileInfo.absoluteFilePath();
- seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toAscii().data());
+ seqInfo("Loading Zone Filter File: %s", m_zoneFilterFile.toLatin1().data());
m_zoneFilters->load(m_zoneFilterFile);
@@ -281,7 +281,7 @@
m_zoneFilterFile = fileInfo.absoluteFilePath();
- seqInfo("Saving filters to %s", m_zoneFilterFile.toAscii().data());
+ seqInfo("Saving filters to %s", m_zoneFilterFile.toLatin1().data());
if (! m_zoneFilters->save(m_zoneFilterFile))
{
Modified: showeq/branches/cn187_devel/src/filternotifications.cpp
===================================================================
--- showeq/branches/cn187_devel/src/filternotifications.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/filternotifications.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -141,7 +141,7 @@
command.replace(cueExp, audioCue);
// fire off the command
- system (command.toAscii().data());
+ system (command.toLatin1().data());
}
#ifndef QMAKEBUILD
Modified: showeq/branches/cn187_devel/src/gdbmconv.cpp
===================================================================
--- showeq/branches/cn187_devel/src/gdbmconv.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/gdbmconv.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -75,7 +75,7 @@
dbName += ".dbm";
// attempt to open the database for write
- if ((dbf = gdbm_open(dbName.toAscii().data(), 0, GDBM_WRCREAT, 0644, 0))
+ if ((dbf = gdbm_open(dbName.toLatin1().data(), 0, GDBM_WRCREAT, 0644, 0))
!= NULL)
{
// if successful, then attempt to insert or replace data under key
@@ -86,7 +86,7 @@
success = true;
break;
default:
- displayGDBMError("Insert: gdbm_store", dbName.toAscii().data());
+ displayGDBMError("Insert: gdbm_store", dbName.toLatin1().data());
}
// close the database
@@ -95,7 +95,7 @@
else
{
// display GDBM Error
- displayGDBMError("Insert: gdbm_open", dbName.toAscii().data());
+ displayGDBMError("Insert: gdbm_open", dbName.toLatin1().data());
// attempt to diagnose the open for write failure
diagFileWriteFail(dbName);
@@ -116,7 +116,7 @@
dbName += ".dbm";
// attempt to open the database for write
- if ((dbf = gdbm_open(dbName.toAscii().data(), 0, GDBM_WRITER, 0644, 0))
+ if ((dbf = gdbm_open(dbName.toLatin1().data(), 0, GDBM_WRITER, 0644, 0))
!= NULL)
{
// if successful, then attempt to insert or replace data under key
@@ -123,7 +123,7 @@
if (gdbm_delete(dbf, key_) == 0)
success = true;
else
- displayGDBMError("Delete: gdbm_delete", dbName.toAscii().data());
+ displayGDBMError("Delete: gdbm_delete", dbName.toLatin1().data());
// close the database
gdbm_close(dbf);
@@ -131,7 +131,7 @@
else
{
// display GDBM Error
- displayGDBMError("Delete: gdbm_open", dbName.toAscii().data());
+ displayGDBMError("Delete: gdbm_open", dbName.toLatin1().data());
// attempt to diagnose the open for write failure
diagFileWriteFail(dbName);
@@ -153,7 +153,7 @@
dbName += ".dbm";
// attempt to open the database for read
- if ((dbf = gdbm_open(dbName.toAscii().data(), 0, GDBM_READER,
+ if ((dbf = gdbm_open(dbName.toLatin1().data(), 0, GDBM_READER,
0644, 0)) != NULL)
{
// attempt to retrieve the entry from the database
@@ -188,7 +188,7 @@
dbName += ".dbm";
// attmpet to open the database for read
- if ((dbf = gdbm_open(dbName.toAscii().data(), 0, GDBM_READER,
+ if ((dbf = gdbm_open(dbName.toLatin1().data(), 0, GDBM_READER,
0644, 0)) != NULL)
{
// attempt to retrieve the entry from the database
@@ -208,7 +208,7 @@
else
{
// display the notice (this isn't necessarily bad)
- displayGDBMError("GetEntry: gdbm_open", dbName.toAscii().data(), "Notice");
+ displayGDBMError("GetEntry: gdbm_open", dbName.toLatin1().data(), "Notice");
// attempt to diagnose the open for read failure
diagFileReadFail(dbName);
@@ -227,7 +227,7 @@
dbName += ".dbm";
// attempt to open the database for write
- if ((dbf = gdbm_open(dbName.toAscii().data(), 0, GDBM_WRITER, 0644, 0))
+ if ((dbf = gdbm_open(dbName.toLatin1().data(), 0, GDBM_WRITER, 0644, 0))
!= NULL)
{
// if successful, then attempt to insert or replace data under key
@@ -234,7 +234,7 @@
if (gdbm_reorganize(dbf) == 0)
success = true;
else
- displayGDBMError("Reorganize: gdbm_reorganize", dbName.toAscii().data());
+ displayGDBMError("Reorganize: gdbm_reorganize", dbName.toLatin1().data());
// close the database
gdbm_close(dbf);
@@ -242,7 +242,7 @@
else
{
// display GDBM Error
- displayGDBMError("Reorganize: gdbm_open", dbName.toAscii().data());
+ displayGDBMError("Reorganize: gdbm_open", dbName.toLatin1().data());
// attempt to diagnose the open for write failure
diagFileWriteFail(dbName);
@@ -311,13 +311,13 @@
dbName += ".dbm";
// open the specified DB file for reading
- m_dbf = gdbm_open(dbName.toAscii().data(), 0, GDBM_READER,
+ m_dbf = gdbm_open(dbName.toLatin1().data(), 0, GDBM_READER,
0644, 0);
// if failed, then nothing to read
if (m_dbf == NULL)
{
- displayGDBMError("GetFirstKey: gdbm_open", dbName.toAscii().data());
+ displayGDBMError("GetFirstKey: gdbm_open", dbName.toLatin1().data());
// attempt to diagnose the open for read failure
diagFileReadFail(dbName);
Modified: showeq/branches/cn187_devel/src/group.cpp
===================================================================
--- showeq/branches/cn187_devel/src/group.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/group.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -198,7 +198,7 @@
const groupDisbandStruct* gmem = (const groupDisbandStruct*)data;
// If we're disbanding, reset counters and clear member slots
- if(!strcmp(gmem->membername, m_player->name().toAscii().data()))
+ if(!strcmp(gmem->membername, m_player->name().toLatin1().data()))
{
m_memberCount = 0;
m_membersInZoneCount = 0;
Modified: showeq/branches/cn187_devel/src/guild.cpp
===================================================================
--- showeq/branches/cn187_devel/src/guild.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/guild.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -197,7 +197,7 @@
seqInfo("GuildMgr: Guildsfile loaded");
}
else
- seqWarn("GuildMgr: Could not load guildsfile, %s", guildsFileName.toAscii().data());
+ seqWarn("GuildMgr: Could not load guildsfile, %s", guildsFileName.toLatin1().data());
}
void GuildMgr::guildList2text(QString fn)
@@ -237,7 +237,7 @@
for (auto itr = m_guildList.begin(); itr != m_guildList.end(); ++itr)
{
if (!itr->second.isNull())
- seqInfo("%d\t%s", itr->first, itr->second.toAscii().data());
+ seqInfo("%d\t%s", itr->first, itr->second.toLatin1().data());
}
}
Modified: showeq/branches/cn187_devel/src/interface.cpp
===================================================================
--- showeq/branches/cn187_devel/src/interface.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/interface.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -2493,7 +2493,7 @@
bool usePos = pSEQPrefs->getPrefBool("UseWindowPos", section, true);
if (usePos)
{
- if (!restoreGeometry(QByteArray::fromBase64(dockPrefsGeometry.toAscii())))
+ if (!restoreGeometry(QByteArray::fromBase64(dockPrefsGeometry.toLatin1())))
seqWarn("Could not restore dock/window geometry. Rearrange windows "
"as desired and then re-save preferences");
else
@@ -2501,7 +2501,7 @@
if (isMaximized())
setGeometry(QApplication::desktop()->availableGeometry(this));
- if (!restoreState(QByteArray::fromBase64(dockPrefsState.toAscii())))
+ if (!restoreState(QByteArray::fromBase64(dockPrefsState.toLatin1())))
seqWarn("Could not restore dock/window state. Rearrange windows as"
" desired and then re-save prefrences");
}
@@ -3491,7 +3491,7 @@
// dump the spawns
m_spawnShell->dumpSpawns(tSpawn, out);
- seqInfo(outText.toAscii().data());
+ seqInfo(outText.toLatin1().data());
}
void EQInterface::listDrops (void)
@@ -3507,7 +3507,7 @@
// dump the drops
m_spawnShell->dumpSpawns(tDrop, out);
- seqInfo(outText.toAscii().data());
+ seqInfo(outText.toLatin1().data());
}
void EQInterface::listMapInfo(void)
@@ -3531,7 +3531,7 @@
m_map[i]->dumpInfo(out);
}
- seqInfo(outText.toAscii().data());
+ seqInfo(outText.toLatin1().data());
}
void EQInterface::listInterfaceInfo(void)
@@ -3556,7 +3556,7 @@
out << "FIXME" << endl;
out << "-----------------------" << endl;
- seqInfo(outText.toAscii().data());
+ seqInfo(outText.toLatin1().data());
}
void EQInterface::listGroup(void)
@@ -3572,7 +3572,7 @@
// dump the drops
m_groupMgr->dumpInfo(out);
- seqInfo(outText.toAscii().data());
+ seqInfo(outText.toLatin1().data());
}
@@ -3589,7 +3589,7 @@
// dump the drops
m_guildShell->dumpMembers(out);
- seqInfo(outText.toAscii().data());
+ seqInfo(outText.toLatin1().data());
}
void EQInterface::dumpSpawns (void)
@@ -3772,7 +3772,7 @@
void
EQInterface::launch_editor_filters(void)
{
- EditorWindow * ew = new EditorWindow(m_filterMgr->filterFile().toAscii().data());
+ EditorWindow * ew = new EditorWindow(m_filterMgr->filterFile().toLatin1().data());
ew->setWindowTitle(m_filterMgr->filterFile());
ew->show();
}
@@ -3780,7 +3780,7 @@
void
EQInterface::launch_editor_zoneFilters(void)
{
- EditorWindow * ew = new EditorWindow(m_filterMgr->zoneFilterFile().toAscii().data());
+ EditorWindow * ew = new EditorWindow(m_filterMgr->zoneFilterFile().toLatin1().data());
ew->setWindowTitle(m_filterMgr->zoneFilterFile());
ew->show();
}
@@ -4397,7 +4397,7 @@
pSEQPrefs->setPrefString("OpCodeList", section, opCodeList);
- seqInfo("OpCode monitoring is now ENABLED...\nUsing list:\t%s", opCodeList.toAscii().data());
+ seqInfo("OpCode monitoring is now ENABLED...\nUsing list:\t%s", opCodeList.toLatin1().data());
}
}
else
@@ -4424,7 +4424,7 @@
m_opcodeMonitorLog->init(opCodeList);
seqInfo("The monitored OpCode list has been reloaded...\nUsing list:\t%s",
- opCodeList.toAscii().data());
+ opCodeList.toLatin1().data());
// set the list of monitored opcodes
pSEQPrefs->setPrefString("OpCodeList", section, opCodeList);
@@ -5013,7 +5013,7 @@
void EQInterface::saveSelectedSpawnPath(void)
{
QString fileName;
- fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toAscii().data());
+ fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
QFileInfo fileInfo = m_dataLocationMgr->findWriteFile("maps", fileName, false);
@@ -5024,7 +5024,7 @@
// append the selected spawns path to the end
saveSpawnPath(out, m_selectedSpawn);
- seqInfo("Finished appending '%s'!\n", fileName.toAscii().data());
+ seqInfo("Finished appending '%s'!\n", fileName.toLatin1().data());
}
}
@@ -5031,7 +5031,7 @@
void EQInterface::saveSpawnPaths(void)
{
QString fileName;
- fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toAscii().data());
+ fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
QFileInfo fileInfo = m_dataLocationMgr->findWriteFile("maps", fileName, false);
@@ -5059,7 +5059,7 @@
saveSpawnPath(out, it.value());
}
- seqInfo("Finished writing '%s'!\n", fileName.toAscii().data());
+ seqInfo("Finished writing '%s'!\n", fileName.toLatin1().data());
}
}
@@ -5150,7 +5150,7 @@
{
if (address.length() != 17)
{
- seqWarn("Invalid MAC Address (%s)! Ignoring!", address.toAscii().data());
+ seqWarn("Invalid MAC Address (%s)! Ignoring!", address.toLatin1().data());
return;
}
for (int i = 4; i > 0; i--)
@@ -5782,7 +5782,7 @@
m_spawnMonitor,
mapPrefName,
mapCaption,
- mapName.toAscii().data(),
+ mapName.toLatin1().data(),
0);
@@ -5837,7 +5837,7 @@
m_messageWindow[i] = new MessageWindow(m_messages, m_messageFilters,
prefName, caption,
- 0, name.toAscii().data());
+ 0, name.toLatin1().data());
setDockEnabled(m_messageWindow[i],
pSEQPrefs->getPrefBool(QString("Dockable") + prefName,
Modified: showeq/branches/cn187_devel/src/logger.cpp
===================================================================
--- showeq/branches/cn187_devel/src/logger.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/logger.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -52,7 +52,7 @@
if (m_fp)
return true;
- m_fp = fopen(m_filename.toAscii().data(),"a");
+ m_fp = fopen(m_filename.toLatin1().data(),"a");
if (!m_fp)
{
@@ -59,7 +59,7 @@
if (!m_errOpen)
{
::fprintf(stderr, "Error opening %s: %s (will keep trying)\n",
- m_filename.toAscii().data(), strerror(errno));
+ m_filename.toLatin1().data(), strerror(errno));
m_errOpen = true;
}
Modified: showeq/branches/cn187_devel/src/main.cpp
===================================================================
--- showeq/branches/cn187_devel/src/main.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/main.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -250,7 +250,7 @@
}
/* NOTE: See preferencefile.cpp for info on how to use prefrences class */
- printf("Using config file '%s'\n", configFile.toAscii().data());
+ printf("Using config file '%s'\n", configFile.toLatin1().data());
pSEQPrefs = new XMLPreferences(configFileDef, configFile);
showeq_params = new ShowEQParams;
Modified: showeq/branches/cn187_devel/src/map.cpp
===================================================================
--- showeq/branches/cn187_devel/src/map.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/map.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -350,7 +350,7 @@
{
#ifdef DEBUGMAP
qDebug ("zoneEnd(%s, %s)",
- longZoneName.toAscii().data(), shortZoneName.toAscii().data());
+ longZoneName.toLatin1().data(), shortZoneName.toLatin1().data());
#endif /* DEBUGMAP */
// atttempt to load the new map
@@ -381,14 +381,14 @@
}
else
{
- seqInfo("No Map found for zone '%s'!", shortZoneName.toAscii().data());
+ seqInfo("No Map found for zone '%s'!", shortZoneName.toLatin1().data());
seqInfo(" Checked for all variants of '%s.map', '%s.txt', and '%s_1.txt'",
- shortZoneName.toAscii().data(),
- shortZoneName.toAscii().data(),
- shortZoneName.toAscii().data());
+ shortZoneName.toLatin1().data(),
+ shortZoneName.toLatin1().data(),
+ shortZoneName.toLatin1().data());
seqInfo(" in directories '%s' and '%s'!",
- m_dataLocMgr->userDataDir("maps").absolutePath().toAscii().data(),
- m_dataLocMgr->pkgDataDir("maps").absolutePath().toAscii().data());
+ m_dataLocMgr->userDataDir("maps").absolutePath().toLatin1().data(),
+ m_dataLocMgr->pkgDataDir("maps").absolutePath().toLatin1().data());
}
}
@@ -410,7 +410,7 @@
if (fileName.isEmpty ())
return;
- seqInfo("Attempting to load map: %s", fileName.toAscii().data());
+ seqInfo("Attempting to load map: %s", fileName.toLatin1().data());
// load the map
loadFileMap(fileName, false, true);
@@ -434,7 +434,7 @@
if (fileName.isEmpty ())
return;
- seqInfo("Attempting to import map: %s", fileName.toAscii().data());
+ seqInfo("Attempting to import map: %s", fileName.toLatin1().data());
// load the map
loadFileMap(fileName, true, true);
@@ -3012,7 +3012,7 @@
// first create the dialog
m_mapIconDialog = new MapIconDialog(this);
m_mapIconDialog->setObjectName(
- QString(windowTitle() + " Icon Dialog").toAscii().data());
+ QString(windowTitle() + " Icon Dialog").toLatin1().data());
// then pass it this objects map icons object
m_mapIconDialog->setMapIcons(m_mapIcons);
@@ -4230,14 +4230,14 @@
"%.3s/Z: %5d/%5d/%5d\n"
"Last: %s\n"
"Spawned: %s\t Remaining: %s\t Count: %d",
- sp->name().toAscii().data(),
+ sp->name().toLatin1().data(),
showeq_params->retarded_coords ? "Y/X" : "X/Y",
showeq_params->retarded_coords ? sp->y() : sp->x(),
showeq_params->retarded_coords ? sp->x() : sp->y(),
sp->z(),
- sp->last().toAscii().data(),
- spawned.toAscii().data(),
- remaining.toAscii().data(),
+ sp->last().toLatin1().data(),
+ spawned.toLatin1().data(),
+ remaining.toLatin1().data(),
sp->count());
m_mapTip->setText( string );
@@ -4259,7 +4259,7 @@
{
QString guild;
if (!spawn->guildTag().isEmpty())
- guild.sprintf("<%s>", spawn->guildTag().toAscii().data());
+ guild.sprintf("<%s>", spawn->guildTag().toLatin1().data());
else if (spawn->guildID())
guild = QString::number(spawn->guildID());
else
@@ -4293,13 +4293,13 @@
spawn->transformedName().toUtf8().data(),
lastName.toUtf8().data(),
guild.toLatin1().data(),
- spawn->level(), hp.toAscii().data(),
+ spawn->level(), hp.toLatin1().data(),
showeq_params->retarded_coords ? "Y/X" : "X/Y",
showeq_params->retarded_coords ? spawn->y() : spawn->x(),
showeq_params->retarded_coords ? spawn->x() : spawn->y(),
item->z(),
- spawn->raceString().toAscii().data(),
- spawn->classString().toAscii().data());
+ spawn->raceString().toLatin1().data(),
+ spawn->classString().toLatin1().data());
if (m_deityPvP)
string += " Deity: " + spawn->deityName();
@@ -4320,8 +4320,8 @@
showeq_params->retarded_coords ? item->y() : item->x(),
showeq_params->retarded_coords ? item->x() : item->y(),
item->z(),
- item->raceString().toAscii().data(),
- item->classString().toAscii().data());
+ item->raceString().toLatin1().data(),
+ item->classString().toLatin1().data());
if ((door) && (door->zonePoint() != 0xFFFFFFFF))
{
@@ -4604,8 +4604,8 @@
filename = files[0];
if (!filename.isEmpty())
- m_offscreen.save(filename.toAscii().data(),
- filter.left(filter.indexOf(' ')).toAscii().data());
+ m_offscreen.save(filename.toLatin1().data(),
+ filter.left(filter.indexOf(' ')).toLatin1().data());
}
//----------------------------------------------------------------------
Modified: showeq/branches/cn187_devel/src/mapcore.cpp
===================================================================
--- showeq/branches/cn187_devel/src/mapcore.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/mapcore.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -508,7 +508,7 @@
return;
- const char* filename = fileName.toAscii().data();
+ const char* filename = fileName.toLatin1().data();
QFile mapFile(fileName);
@@ -607,7 +607,7 @@
bool ok;
- switch (entryType.toAscii())
+ switch (entryType.toLatin1())
{
case 'M':
{
@@ -918,7 +918,7 @@
if (m_image.load(imageFileName))
{
m_imageLoaded = true;
- seqInfo("Loaded map image: '%s'", imageFileName.toAscii().data());
+ seqInfo("Loaded map image: '%s'", imageFileName.toLatin1().data());
}
seqInfo("Loaded map: '%s'", filename);
@@ -952,7 +952,7 @@
if (fileName.contains("/.txt") != 0)
return;
- const char* filename = fileName.toAscii().data();
+ const char* filename = fileName.toLatin1().data();
QFile mapFile(fileName);
@@ -1027,7 +1027,7 @@
// get the field count
count = fields.count();
- switch (entryType.toAscii())
+ switch (entryType.toLatin1())
{
case 'L':
{
@@ -1148,7 +1148,7 @@
if (m_image.load(imageFileName))
{
m_imageLoaded = true;
- seqInfo("Loaded map image: '%s'", imageFileName.toAscii().data());
+ seqInfo("Loaded map image: '%s'", imageFileName.toLatin1().data());
}
seqInfo("Loaded SOE map: '%s'", filename);
@@ -1164,9 +1164,9 @@
const char* filename;
if (!fileName.isEmpty())
- filename = fileName.toAscii().data();
+ filename = fileName.toLatin1().data();
else
- filename = m_fileName.toAscii().data();
+ filename = m_fileName.toLatin1().data();
if ((fh = fopen(filename, "w")) == NULL)
{
@@ -1175,8 +1175,8 @@
}
// write out header info
- fprintf(fh, "%s,%s,%d,%d\n", m_zoneLongName.toAscii().data(),
- m_zoneShortName.toAscii().data(), m_size.width(), m_size.height());
+ fprintf(fh, "%s,%s,%d,%d\n", m_zoneLongName.toLatin1().data(),
+ m_zoneShortName.toLatin1().data(), m_size.width(), m_size.height());
// write out ZEM info if non-default
if (m_zoneZEM != 75)
@@ -1210,8 +1210,8 @@
// write out the start of the line info
fprintf (fh, "L,%s,%s,%d",
- currentLineL->name().toAscii().data(),
- currentLineL->colorName().toAscii().data(),
+ currentLineL->name().toLatin1().data(),
+ currentLineL->colorName().toLatin1().data(),
currentLineL->size());
// write out all the 2D points in the line
@@ -1235,8 +1235,8 @@
currentLineM = *mmit;
// write out the start of the line info
fprintf (fh, "M,%s,%s,%d",
- currentLineM->name().toAscii().data(),
- currentLineM->colorName().toAscii().data(),
+ currentLineM->name().toLatin1().data(),
+ currentLineM->colorName().toLatin1().data(),
currentLineM->size());
// write out all the 3D points in the line
@@ -1259,14 +1259,14 @@
if (!currentLoc->heightSet())
fprintf (fh, "P,%s,%s,%d,%d\n",
- currentLoc->name().toAscii().data(),
- currentLoc->colorName().toAscii().data(),
+ currentLoc->name().toLatin1().data(),
+ currentLoc->colorName().toLatin1().data(),
currentLoc->x(),
currentLoc->y());
else
fprintf (fh, "P,%s,%s,%d,%d,%d\n",
- currentLoc->name().toAscii().data(),
- currentLoc->colorName().toAscii().data(),
+ currentLoc->name().toLatin1().data(),
+ currentLoc->colorName().toLatin1().data(),
currentLoc->x(),
currentLoc->y(),
currentLoc->z());
@@ -1279,7 +1279,7 @@
MapAggro* currentAggro = *ait;
fprintf (fh, "A,%s,%d\n",
- currentAggro->name().toAscii().data(), currentAggro->range());
+ currentAggro->name().toLatin1().data(), currentAggro->range());
}
#ifdef DEBUGMAP
@@ -1302,9 +1302,9 @@
const char* filename;
if (!fileName.isEmpty())
- filename = fileName.toAscii().data();
+ filename = fileName.toLatin1().data();
else
- filename = m_fileName.toAscii().data();
+ filename = m_fileName.toLatin1().data();
if ((fh = fopen(filename, "w")) == NULL)
{
@@ -1392,7 +1392,7 @@
-float(currentLoc->x()), -float(currentLoc->y()),
float(currentLoc->z()),
color.red(), color.green(), color.blue(),
- name.toAscii().data());
+ name.toLatin1().data());
}
#ifdef DEBUGMAP
seqDebug("saveMap() - map '%s' saved with %d L lines, %d M lines, %d locations", filename,
Modified: showeq/branches/cn187_devel/src/mapicon.cpp
===================================================================
--- showeq/branches/cn187_devel/src/mapicon.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/mapicon.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -1103,7 +1103,7 @@
spawnNameText.sprintf("%2d: %s",
spawn->level(),
- spawn->name().toAscii().data());
+ spawn->name().toLatin1().data());
QFontMetrics fm(param.font());
int width = fm.width(spawnNameText);
@@ -1216,8 +1216,8 @@
QString spawnNameText;
spawnNameText.sprintf("sp:%s %s (%d)",
- sp->name().toAscii().data(),
- sp->last().toAscii().data(),
+ sp->name().toLatin1().data(),
+ sp->last().toLatin1().data(),
sp->count());
QFontMetrics fm(param.font());
Modified: showeq/branches/cn187_devel/src/messageshell.cpp
===================================================================
--- showeq/branches/cn187_devel/src/messageshell.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/messageshell.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -110,7 +110,7 @@
cmsg->sender,
cmsg->target,
cmsg->message,
- language_name(cmsg->language).toAscii().data()
+ language_name(cmsg->language).toLatin1().data()
);
}
else
@@ -118,7 +118,7 @@
tempStr.sprintf( "'%s' - %s {%s}",
cmsg->sender,
cmsg->message,
- language_name(cmsg->language).toAscii().data()
+ language_name(cmsg->language).toLatin1().data()
);
}
}
@@ -549,8 +549,8 @@
if (mem->param1 != 4)
tempStr.sprintf("%s%s', slot %d.",
- tempStr.toAscii().data(),
- spellName.toAscii().data(),
+ tempStr.toLatin1().data(),
+ spellName.toLatin1().data(),
mem->slotId);
else
@@ -598,8 +598,8 @@
spellName = spell_name(bcast->spellId);
tempStr.sprintf( "%s%s' - Casting time is %g Second%s",
- tempStr.toAscii().data(),
- spellName.toAscii().data(), casttime,
+ tempStr.toLatin1().data(),
+ spellName.toLatin1().data(), casttime,
casttime == 1 ? "" : "s");
m_messages->addMessage(MT_Spell, tempStr);
@@ -626,7 +626,7 @@
QString tempStr;
if (item != NULL)
tempStr.sprintf("%s(%d): %s",
- item->name().toAscii().data(), icast->spawnId, icast->message);
+ item->name().toLatin1().data(), icast->spawnId, icast->message);
else
tempStr.sprintf("spawn(%d): %s",
icast->spawnId, icast->message);
@@ -657,7 +657,7 @@
QString tempStr;
tempStr.sprintf("You begin casting %s. Current Target is %s(%d)",
- spellName.toAscii().data(), targetName.toAscii().data(),
+ spellName.toLatin1().data(), targetName.toLatin1().data(),
cast->targetId);
m_messages->addMessage(MT_Spell, tempStr);
@@ -742,7 +742,7 @@
const groupFollowStruct* gFollow = (const groupFollowStruct*)data;
QString tempStr;
- if(!strcmp(gFollow->invitee, m_player->name().toAscii().data()))
+ if(!strcmp(gFollow->invitee, m_player->name().toLatin1().data()))
tempStr = "Follow: You have joined the group";
else
tempStr.sprintf("Follow: %s has joined the group", gFollow->invitee);
@@ -872,7 +872,7 @@
const skillIncStruct* skilli = (const skillIncStruct*)data;
QString tempStr;
tempStr.sprintf("Skill: %s has increased (%d)",
- skill_name(skilli->skillId).toAscii().data(),
+ skill_name(skilli->skillId).toLatin1().data(),
skilli->value);
m_messages->addMessage(MT_Player, tempStr);
}
Modified: showeq/branches/cn187_devel/src/messagewindow.cpp
===================================================================
--- showeq/branches/cn187_devel/src/messagewindow.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/messagewindow.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -1151,8 +1151,8 @@
QString styleCaption = windowTitle() + " - " + typeName + " Style";
MessageTypeStyleDialog dialog(m_typeStyles[id],
m_defaultColor, m_defaultBGColor,
- styleCaption.toAscii().data(),
- this, styleCaption.toAscii().data());
+ styleCaption.toLatin1().data(),
+ this, styleCaption.toLatin1().data());
// popup the modal dialog
int result = dialog.exec();
Modified: showeq/branches/cn187_devel/src/packet.cpp
===================================================================
--- showeq/branches/cn187_devel/src/packet.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/packet.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -132,7 +132,7 @@
// load the world opcode db
if (!m_worldOPCodeDB->load(*m_packetTypeDB, worldopcodesxml))
- seqFatal("Error loading '%s'!", worldopcodesxml.toAscii().data());
+ seqFatal("Error loading '%s'!", worldopcodesxml.toLatin1().data());
#ifdef PACKET_OPCODEDB_DIAG
m_worldOPCodeDB->list();
@@ -145,7 +145,7 @@
// load the zone opcode db
if (!m_zoneOPCodeDB->load(*m_packetTypeDB, zoneopcodesxml))
- seqFatal("Error loading '%s'!", zoneopcodesxml.toAscii().data());
+ seqFatal("Error loading '%s'!", zoneopcodesxml.toLatin1().data());
#ifdef PACKET_OPCODEDB_DIAG
m_zoneOPCodeDB->list();
@@ -201,11 +201,11 @@
if (m_ip == "auto")
inet_aton (AUTOMATIC_CLIENT_IP, &ia);
- else if (inet_aton (m_ip.toAscii().data(), &ia) == 0)
+ else if (inet_aton (m_ip.toLatin1().data(), &ia) == 0)
{
- he = gethostbyname(m_ip.toAscii().data());
+ he = gethostbyname(m_ip.toLatin1().data());
if (!he)
- seqFatal("Invalid address; %s", m_ip.toAscii().data());
+ seqFatal("Invalid address; %s", m_ip.toLatin1().data());
memcpy (&ia, he->h_addr_list[0], he->h_length);
}
@@ -220,7 +220,7 @@
else
{
m_detectingClient = false;
- seqInfo("Listening for client: %s", m_ip.toAscii().data());
+ seqInfo("Listening for client: %s", m_ip.toLatin1().data());
}
}
@@ -229,12 +229,12 @@
// create the pcap object and initialize, either with MAC or IP
m_packetCapture = new PacketCaptureThread();
if (m_mac.length() == 17)
- m_packetCapture->start(m_device.toAscii().data(),
- m_mac.toAscii().data(),
+ m_packetCapture->start(m_device.toLatin1().data(),
+ m_mac.toLatin1().data(),
m_realtime, MAC_ADDRESS_TYPE );
else
- m_packetCapture->start(m_device.toAscii().data(),
- m_ip.toAscii().data(),
+ m_packetCapture->start(m_device.toLatin1().data(),
+ m_ip.toLatin1().data(),
m_realtime, IP_ADDRESS_TYPE );
emit filterChanged();
}
@@ -245,9 +245,9 @@
QString filename = pSEQPrefs->getPrefString("Filename", "VPacket");
- m_packetCapture->startOffline(filename.toAscii().data(), m_playbackSpeed);
+ m_packetCapture->startOffline(filename.toLatin1().data(), m_playbackSpeed);
seqInfo("Playing back packets from '%s' at speed '%d'",
- filename.toAscii().data(), m_playbackSpeed);
+ filename.toLatin1().data(), m_playbackSpeed);
}
// Flag session tracking properly on streams
@@ -285,9 +285,9 @@
if (m_recordPackets)
{
- m_vPacket = new VPacket(filename.toAscii().data(), 1, true);
+ m_vPacket = new VPacket(filename.toLatin1().data(), 1, true);
// Must appear befire next call to getPrefString, which uses a static string
- seqInfo("Recording packets to '%s' for future playback", filename.toAscii().data());
+ seqInfo("Recording packets to '%s' for future playback", filename.toLatin1().data());
if (!pSEQPrefs->getPrefString("FlushPackets", section).isNull())
m_vPacket->setFlushPacket(true);
@@ -294,11 +294,11 @@
}
else if (m_playbackPackets == PLAYBACK_FORMAT_SEQ)
{
- m_vPacket = new VPacket(filename.toAscii().data(), 1, false);
+ m_vPacket = new VPacket(filename.toLatin1().data(), 1, false);
m_vPacket->setCompressTime(pSEQPrefs->getPrefInt("CompressTime", section, 0));
m_vPacket->setPlaybackSpeed(m_playbackSpeed);
- seqInfo("Playing back packets from '%s' at speed '%d'", filename.toAscii().data(),
+ seqInfo("Playing back packets from '%s' at speed '%d'", filename.toLatin1().data(),
m_playbackSpeed);
}
@@ -611,7 +611,7 @@
m_client_addr = packet.getIPv4DestN();
m_detectingClient = false;
emit clientChanged(m_client_addr);
- seqInfo("Client Detected: %s", m_ip.toAscii().data());
+ seqInfo("Client Detected: %s", m_ip.toLatin1().data());
}
else if (m_detectingClient &&
(packet.getDestPort() >= WorldServerGeneralMinPort
@@ -621,7 +621,7 @@
m_client_addr = packet.getIPv4SourceN();
m_detectingClient = false;
emit clientChanged(m_client_addr);
- seqInfo("Client Detected: %s", m_ip.toAscii().data());
+ seqInfo("Client Detected: %s", m_ip.toLatin1().data());
}
// Dispatch based on known streams
@@ -690,7 +690,7 @@
(m_playbackPackets == PLAYBACK_OFF ||
m_playbackPackets == PLAYBACK_FORMAT_TCPDUMP))
{
- m_packetCapture->setFilter(m_device.toAscii().data(), m_ip.toAscii().data(),
+ m_packetCapture->setFilter(m_device.toLatin1().data(), m_ip.toLatin1().data(),
m_realtime, IP_ADDRESS_TYPE, 0, 0);
emit filterChanged();
}
@@ -710,7 +710,7 @@
emit clientPortLatched(m_clientPort);
seqInfo("EQPacket: SessionDisconnect detected, awaiting next zone session, pcap filter: EQ Client %s",
- m_ip.toAscii().data());
+ m_ip.toLatin1().data());
}
}
@@ -726,8 +726,8 @@
{
if (m_mac.length() == 17)
{
- m_packetCapture->setFilter(m_device.toAscii().data(),
- m_mac.toAscii().data(),
+ m_packetCapture->setFilter(m_device.toLatin1().data(),
+ m_mac.toLatin1().data(),
m_realtime,
MAC_ADDRESS_TYPE, 0,
m_clientPort);
@@ -735,8 +735,8 @@
}
else
{
- m_packetCapture->setFilter(m_device.toAscii().data(),
- m_ip.toAscii().data(),
+ m_packetCapture->setFilter(m_device.toLatin1().data(),
+ m_ip.toLatin1().data(),
m_realtime,
IP_ADDRESS_TYPE, 0,
m_clientPort);
@@ -748,12 +748,12 @@
if (m_mac.length() == 17)
{
seqInfo("EQPacket: SessionRequest detected, pcap filter: EQ Client %s, Client port %d. Server port %d",
- m_mac.toAscii().data(), m_clientPort, m_serverPort);
+ m_mac.toLatin1().data(), m_clientPort, m_serverPort);
}
else
{
seqInfo("EQPacket: SessionRequest detected, pcap filter: EQ Client %s, Client port %d. Server port %d",
- m_ip.toAscii().data(), m_clientPort, m_serverPort);
+ m_ip.toLatin1().data(), m_clientPort, m_serverPort);
}
emit clientPortLatched(m_clientPort);
@@ -917,18 +917,18 @@
{
m_ip = ip;
struct in_addr ia;
- inet_aton (m_ip.toAscii().data(), &ia);
+ inet_aton (m_ip.toLatin1().data(), &ia);
m_client_addr = ia.s_addr;
emit clientChanged(m_client_addr);
resetEQPacket();
- seqInfo("Listening for IP client: %s", m_ip.toAscii().data());
+ seqInfo("Listening for IP client: %s", m_ip.toLatin1().data());
if (m_playbackPackets == PLAYBACK_OFF ||
m_playbackPackets == PLAYBACK_FORMAT_TCPDUMP)
{
- m_packetCapture->setFilter(m_device.toAscii().data(),
- m_ip.toAscii().data(),
+ m_packetCapture->setFilter(m_device.toLatin1().data(),
+ m_ip.toLatin1().data(),
m_realtime,
IP_ADDRESS_TYPE, 0, 0);
emit filterChanged();
@@ -948,13 +948,13 @@
resetEQPacket();
- seqInfo("Listening for MAC client: %s", m_mac.toAscii().data());
+ seqInfo("Listening for MAC client: %s", m_mac.toLatin1().data());
if (m_playbackPackets == PLAYBACK_OFF ||
m_playbackPackets == PLAYBACK_FORMAT_TCPDUMP)
{
- m_packetCapture->setFilter(m_device.toAscii().data(),
- m_ip.toAscii().data(),
+ m_packetCapture->setFilter(m_device.toLatin1().data(),
+ m_ip.toLatin1().data(),
m_realtime,
IP_ADDRESS_TYPE, 0, 0);
emit filterChanged();
@@ -968,7 +968,7 @@
m_detectingClient = true;
m_ip = AUTOMATIC_CLIENT_IP;
struct in_addr ia;
- inet_aton (m_ip.toAscii().data(), &ia);
+ inet_aton (m_ip.toLatin1().data(), &ia);
m_client_addr = ia.s_addr;
emit clientChanged(m_client_addr);
@@ -979,7 +979,7 @@
if (m_playbackPackets == PLAYBACK_OFF ||
m_playbackPackets == PLAYBACK_FORMAT_TCPDUMP)
{
- m_packetCapture->setFilter(m_device.toAscii().data(), NULL,
+ m_packetCapture->setFilter(m_device.toLatin1().data(), NULL,
m_realtime,
DEFAULT_ADDRESS_TYPE, 0, 0);
emit filterChanged();
@@ -1011,11 +1011,11 @@
if (m_ip == "auto")
inet_aton (AUTOMATIC_CLIENT_IP, &ia);
- else if (inet_aton (m_ip.toAscii().data(), &ia) == 0)
+ else if (inet_aton (m_ip.toLatin1().data(), &ia) == 0)
{
- he = gethostbyname(m_ip.toAscii().data());
+ he = gethostbyname(m_ip.toLatin1().data());
if (!he)
- seqFatal("Invalid address; %s", m_ip.toAscii().data());
+ seqFatal("Invalid address; %s", m_ip.toLatin1().data());
memcpy (&ia, he->h_addr_list[0], he->h_length);
}
@@ -1030,7 +1030,7 @@
else
{
m_detectingClient = false;
- seqInfo("Listening for client: %s", m_ip.toAscii().data());
+ seqInfo("Listening for client: %s", m_ip.toLatin1().data());
}
}
@@ -1038,11 +1038,11 @@
// restart packet capture
if (m_mac.length() == 17)
- m_packetCapture->start(m_device.toAscii().data(),
- m_mac.toAscii().data(),
+ m_packetCapture->start(m_device.toLatin1().data(),
+ m_mac.toLatin1().data(),
m_realtime, MAC_ADDRESS_TYPE );
else
- m_packetCapture->start(m_device.toAscii().data(), m_ip.toAscii().data(),
+ m_packetCapture->start(m_device.toLatin1().data(), m_ip.toLatin1().data(),
m_realtime, IP_ADDRESS_TYPE );
emit filterChanged();
}
Modified: showeq/branches/cn187_devel/src/packetinfo.cpp
===================================================================
--- showeq/branches/cn187_devel/src/packetinfo.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/packetinfo.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -479,7 +479,7 @@
break;
seqInfo("\t\t\tdir=%d typename=%s size=%d sizechecktype=%d",
- currentPayload->dir(), currentPayload->typeName().toAscii().data(),
+ currentPayload->dir(), currentPayload->typeName().toLatin1().data(),
currentPayload->typeSize(), currentPayload->sizeCheckType());
}
}
@@ -691,7 +691,7 @@
if (!value.isEmpty())
{
- if (!m_currentPayload->setType(m_typeDB, value.toAscii().data()))
+ if (!m_currentPayload->setType(m_typeDB, value.toLatin1().data()))
seqWarn("Unknown payload typename '%s' for opcode '%04x'",
value.toLatin1().data(), m_currentOPCode->opcode());
}
Modified: showeq/branches/cn187_devel/src/packetlog.cpp
===================================================================
--- showeq/branches/cn187_devel/src/packetlog.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/packetlog.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -95,7 +95,7 @@
if (!open())
return;
- outputf ("%s\n", message.toAscii().data());
+ outputf ("%s\n", message.toLatin1().data());
flush();
}
@@ -300,13 +300,13 @@
uint16_t opcode, const QString& origPrefix)
{
if (!origPrefix.isEmpty())
- ::printf("%s ", origPrefix.toAscii().data());
+ ::printf("%s ", origPrefix.toLatin1().data());
else
::putchar('\n');
::printf("%s [Size: %lu]%s\n",
((dir == DIR_Server) ? "[Server->Client]" : "[Client->Server]"),
- len, opCodeToString(opcode).toAscii().data());
+ len, opCodeToString(opcode).toLatin1().data());
if (len)
{
@@ -415,7 +415,7 @@
}
seqInfo("OpCode monitoring ENABLED...");
- seqInfo("Using list:\t%s", monitoredOPCodes.toAscii().data());
+ seqInfo("Using list:\t%s", monitoredOPCodes.toLatin1().data());
QString qsCommaBuffer (""); /* Construct these outside the loop so we don't have to construct
@@ -483,7 +483,7 @@
#if 1 // ZBTEMP
seqDebug("opcode=%04x name='%s' dir=%d known=%d",
MonitoredOpCodeList [uiIndex] [0],
- MonitoredOpCodeAliasList [uiIndex].toAscii().data(),
+ MonitoredOpCodeAliasList [uiIndex].toLatin1().data(),
MonitoredOpCodeList [uiIndex] [1],
MonitoredOpCodeList [uiIndex] [2]);
#endif
Modified: showeq/branches/cn187_devel/src/packetstream.cpp
===================================================================
--- showeq/branches/cn187_devel/src/packetstream.cpp 2021-04-23 23:57:55 UTC (rev 1162)
+++ showeq/branches/cn187_devel/src/packetstream.cpp 2021-04-30 04:10:23 UTC (rev 1163)
@@ -118,9 +118,9 @@
if (!opcode)
{
seqDebug("connect2: Unknown opcode '%s' with payload type '%s'",
- opcodeName.toAscii().data(), payloadType);
+ opcodeName.toLatin1().data(), payloadType);
seqDebug("\tfor receiver '%s' of type '%s' to member '%s'",
- receiver->objectName().toAscii().data(),
+ receiver->objectName().toLatin1().data(),
receiver->metaObject()->className(), member);
return false;
}
@@ -145,11 +145,11 @@
if (!payload)
{
seqDebug("connect2: Warning! opcode '%s' has no matching payload.",
- opcodeName.toAscii().data());
+ opcodeName.toLatin1().data());
seqDebug("\tdir '%d' payload '%s' szt '%d'",
m_dir, payloadType, szt);
seqDebug("\tfor receiver '%s' of type '%s' to member '%s'",
- receiver->objectName().toAscii().data(),
+ receiver->objectName().toLatin1().data(),
receiver->metaObject()->className(), member);
return false;
@@ -164,12 +164,12 @@
// construct a name for the dispatch
QString dispatchName(256, '\0');
dispatchName.sprintf("PacketDispatch:%s:%s:%d:%s:%d",
- objectName().toAscii().data(), opcodeName.toAscii().data(),
- payload->dir(), payload->typeName().toAscii().data(),
+ objectName().toLatin1().data(), opcodeName.toLatin1().data(),
+ payload->dir(), payload->typeName().toLatin1().data(),
...
[truncated message content] |