|
From: <cn...@us...> - 2023-03-15 18:25:57
|
Revision: 1352
http://sourceforge.net/p/seq/svn/1352
Author: cn187
Date: 2023-03-15 18:25:55 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix Qt deprecation warnings about endl
Modified Paths:
--------------
showeq/trunk/src/bazaarlog.cpp
showeq/trunk/src/filter.cpp
showeq/trunk/src/group.cpp
showeq/trunk/src/guild.cpp
showeq/trunk/src/guildshell.cpp
showeq/trunk/src/interface.cpp
showeq/trunk/src/map.cpp
showeq/trunk/src/mapicon.cpp
showeq/trunk/src/messagewindow.cpp
showeq/trunk/src/packetinfo.cpp
showeq/trunk/src/packetlog.cpp
showeq/trunk/src/sortitem.cpp
showeq/trunk/src/spawnshell.cpp
Modified: showeq/trunk/src/bazaarlog.cpp
===================================================================
--- showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -27,6 +27,13 @@
#include "spawnshell.h"
#include "diagnosticmessages.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
BazaarLog::BazaarLog(EQPacket& packet, const QString& fname,
QObject* parent, SpawnShell& shell, const char* name)
: SEQLogger(fname, parent, name),
@@ -72,7 +79,7 @@
csv.sprintf("1^%d^%d^%d^%s^%s",
int(time(NULL)),resp.price,resp.count,
merchant_name, name);
- m_out << csv << endl;
+ m_out << csv << ENDL;
}
flush();
Modified: showeq/trunk/src/filter.cpp
===================================================================
--- showeq/trunk/src/filter.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/filter.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -36,6 +36,13 @@
#define MAXLEN 5000
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//#define DEBUG_FILTER
//----------------------------------------------------------------------
@@ -229,7 +236,7 @@
out << "/>";
}
- out << "</oldfilter>" << endl;
+ out << "</oldfilter>" << ENDL;
return true;
}
@@ -565,9 +572,9 @@
out.setFieldAlignment(QTextStream::AlignLeft);
// print document header
- out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl
- << "<!DOCTYPE seqfilters SYSTEM \"seqfilters.dtd\">" << endl
- << "<seqfilters>" << endl;
+ out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << ENDL
+ << "<!DOCTYPE seqfilters SYSTEM \"seqfilters.dtd\">" << ENDL
+ << "<seqfilters>" << ENDL;
// set initial indent
QString indent = " ";
@@ -579,17 +586,17 @@
{
// section start tag
out << indent << "<section name=\"" << m_types.name(it->first)
- << "\">" << endl;
+ << "\">" << ENDL;
// persist the filter
it->second->save(indent, out);
// section end tag
- out << indent << "</section>" << endl;
+ out << indent << "</section>" << ENDL;
}
// output closing entity
- out << "</seqfilters>" << endl;
+ out << "</seqfilters>" << ENDL;
return true;
}
Modified: showeq/trunk/src/group.cpp
===================================================================
--- showeq/trunk/src/group.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/group.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -30,6 +30,13 @@
#include <QTextStream>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
GroupMgr::GroupMgr(SpawnShell* spawnShell,
Player* player,
QObject* parent, const char* name)
@@ -326,17 +333,17 @@
void GroupMgr::dumpInfo(QTextStream& out)
{
// dump general group manager information
- out << "[GroupMgr]" << endl;
- out << "Members: " << m_memberCount << endl;
- out << "MembersInZone: " << m_membersInZoneCount << endl;
- out << "Player: " << m_player->name() << endl;
- out << "GroupBonus: " << groupBonus() << endl;
- out << "GroupTotalLevels: " << totalLevels() << endl;
+ out << "[GroupMgr]" << ENDL;
+ out << "Members: " << m_memberCount << ENDL;
+ out << "MembersInZone: " << m_membersInZoneCount << ENDL;
+ out << "Player: " << m_player->name() << ENDL;
+ out << "GroupBonus: " << groupBonus() << ENDL;
+ out << "GroupTotalLevels: " << totalLevels() << ENDL;
out << "GroupAverageLevel: ";
if (m_membersInZoneCount)
- out << totalLevels()/m_membersInZoneCount << endl;
+ out << totalLevels()/m_membersInZoneCount << ENDL;
else
- out << totalLevels() << endl;
+ out << totalLevels() << ENDL;
// iterate over the group members
for (int i = 0; i < MAX_GROUP_MEMBERS; i++)
@@ -351,7 +358,7 @@
<< " " << m_members[i]->m_spawn->raceString()
<< " " << m_members[i]->m_spawn->classString();
- out << endl;
+ out << ENDL;
}
}
Modified: showeq/trunk/src/guild.cpp
===================================================================
--- showeq/trunk/src/guild.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/guild.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -34,6 +34,13 @@
#include <QDataStream>
#include <QTextStream>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
GuildMgr::GuildMgr(QString fn, QObject* parent, const char* name)
: QObject(parent)
{
@@ -223,7 +230,7 @@
{
if (itr->first == 0)
continue;
- guildtext << itr->first << "\t" << itr->second << endl;
+ guildtext << itr->first << "\t" << itr->second << ENDL;
}
guildsfile.close();
Modified: showeq/trunk/src/guildshell.cpp
===================================================================
--- showeq/trunk/src/guildshell.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/guildshell.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -31,6 +31,13 @@
#include <QDateTime>
#include <QTextStream>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// diagnostic defines
// #define GUILDSHELL_DIAG 1
@@ -211,7 +218,7 @@
if (classString(i).length() > maxClassNameLength)
maxClassNameLength = classString(i).length();
- out << "Guild has " << m_members.count() << " members: " << endl;
+ out << "Guild has " << m_members.count() << " members: " << ENDL;
int nameFieldWidth = - m_maxNameLength;
int classFieldWidth = - maxClassNameLength;
@@ -224,7 +231,7 @@
.arg("P", 1)
.arg("Last On", -24)
.arg("Zone", -18);
- out << " Public Note" << endl;
+ out << " Public Note" << ENDL;
QString zone;
while (it.hasNext())
@@ -245,7 +252,7 @@
.arg(dt.toString(dateFormat), -24)
.arg(zone, -18);
- out << " " << member->publicNote() << endl;
+ out << " " << member->publicNote() << ENDL;
}
}
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -94,6 +94,13 @@
#include <QDesktopWidget>
#include <QStyleFactory>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
// this define is used to diagnose the order with which zone packets are rcvd
#define ZONE_ORDER_DIAG
@@ -3553,11 +3560,11 @@
// open the output data stream
QTextStream out(&outText, QIODevice::WriteOnly);
- out << "Map window layout info:" << endl;
- out << "-----------------------" << endl;
+ out << "Map window layout info:" << ENDL;
+ out << "-----------------------" << ENDL;
//FIXME out << *this;
- out << "FIXME" << endl;
- out << "-----------------------" << endl;
+ out << "FIXME" << ENDL;
+ out << "-----------------------" << ENDL;
seqInfo(outText.toLatin1().data());
}
@@ -3698,7 +3705,7 @@
out << "Spellbook of " << m_player->name() << " a level "
<< m_player->level() << " " << m_player->raceString()
<< " " << m_player->classString()
- << endl;
+ << ENDL;
uint8_t playerClass = m_player->classVal();
@@ -3728,7 +3735,7 @@
spell_name(spellid).toLatin1().data());
}
- out << txt << endl;
+ out << txt << ENDL;
}
}
@@ -5044,7 +5051,7 @@
QTextStream out(&mobPathFile);
// map header line
out << m_zoneMgr->longZoneName() << ","
- << m_zoneMgr->shortZoneName() << ",0,0" << endl;
+ << m_zoneMgr->shortZoneName() << ",0,0" << ENDL;
// iterate over the spawns adding their paths to the file
ItemConstIterator it(m_spawnShell->getConstMap(tSpawn));
@@ -5098,7 +5105,7 @@
<< "," << trackPoint->y()
<< "," << trackPoint->z();
}
- out << endl;
+ out << ENDL;
}
void EQInterface::toggle_net_real_time_thread(bool realtime)
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -83,6 +83,13 @@
#include <QTextStream>
#include <QMouseEvent>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// Macros
//#define DEBUG
@@ -787,32 +794,32 @@
void MapMgr::dumpInfo(QTextStream& out)
{
- out << "[MapMgr]" << endl;
- out << "DefaultLineColor: " << m_curLineColor << endl;
- out << "DefaultLineName: " << m_curLineName << endl;
- out << "DefaultLocationColor: " << m_curLocationColor << endl;
- out << "ImageLoaded: " << m_mapData.imageLoaded() << endl;
- out << "ZoneShortName: " << m_mapData.zoneShortName() << endl;
- out << "ZoneLongName: " << m_mapData.zoneLongName() << endl;
+ out << "[MapMgr]" << ENDL;
+ out << "DefaultLineColor: " << m_curLineColor << ENDL;
+ out << "DefaultLineName: " << m_curLineName << ENDL;
+ out << "DefaultLocationColor: " << m_curLocationColor << ENDL;
+ out << "ImageLoaded: " << m_mapData.imageLoaded() << ENDL;
+ out << "ZoneShortName: " << m_mapData.zoneShortName() << ENDL;
+ out << "ZoneLongName: " << m_mapData.zoneLongName() << ENDL;
out << "boundingRect: top(" << m_mapData.boundingRect().top()
<< ") bottom(" << m_mapData.boundingRect().bottom()
<< ") left(" << m_mapData.boundingRect().left()
- << ") right(" << m_mapData.boundingRect().right() << ") " << endl;
+ << ") right(" << m_mapData.boundingRect().right() << ") " << ENDL;
out << "size: width(" << m_mapData.size().width()
- << ") height(" << m_mapData.size().height() << ")" << endl;
- out << "ZoneZEM: " << m_mapData.zoneZEM() << endl;
- out << "numLayers: " << m_mapData.numLayers() << endl;
+ << ") height(" << m_mapData.size().height() << ")" << ENDL;
+ out << "ZoneZEM: " << m_mapData.zoneZEM() << ENDL;
+ out << "numLayers: " << m_mapData.numLayers() << ENDL;
for (int i = 0; i < m_mapData.numLayers(); ++i)
{
- out << "Layer " << i << ":" << endl;
- out << "\tMapFileName: " << m_mapData.mapLayer(i)->fileName() << endl;
- out << "\tMapLoaded: " << m_mapData.mapLayer(i)->mapLoaded() << endl;
- out << "\tLLines: " << m_mapData.mapLayer(i)->lLines().count() << endl;
- out << "\tMLines: " << m_mapData.mapLayer(i)->mLines().count() << endl;
- out << "\tLocations: " << m_mapData.mapLayer(i)->locations().count() << endl;
+ out << "Layer " << i << ":" << ENDL;
+ out << "\tMapFileName: " << m_mapData.mapLayer(i)->fileName() << ENDL;
+ out << "\tMapLoaded: " << m_mapData.mapLayer(i)->mapLoaded() << ENDL;
+ out << "\tLLines: " << m_mapData.mapLayer(i)->lLines().count() << ENDL;
+ out << "\tMLines: " << m_mapData.mapLayer(i)->mLines().count() << ENDL;
+ out << "\tLocations: " << m_mapData.mapLayer(i)->locations().count() << ENDL;
}
- out << "Aggros: " << m_mapData.aggros().count() << endl;
- out << endl;
+ out << "Aggros: " << m_mapData.aggros().count() << ENDL;
+ out << ENDL;
}
//----------------------------------------------------------------------
@@ -3000,82 +3007,82 @@
void Map::dumpInfo(QTextStream& out)
{
- out << "[" << preferenceName() << "]" << endl;
- out << "Caption: " << windowTitle() << endl;
- out << "AnimateSpawnMovement: " << m_animate << endl;
- out << "VelocityLines: " << m_showVelocityLines << endl;
- out << "SpawnDepthFilter: " << m_showVelocityLines << endl;
- out << "FrameRate: " << m_frameRate << endl;
+ out << "[" << preferenceName() << "]" << ENDL;
+ out << "Caption: " << windowTitle() << ENDL;
+ out << "AnimateSpawnMovement: " << m_animate << ENDL;
+ out << "VelocityLines: " << m_showVelocityLines << ENDL;
+ out << "SpawnDepthFilter: " << m_showVelocityLines << ENDL;
+ out << "FrameRate: " << m_frameRate << ENDL;
#ifdef DEBUG
- out << "ShowDebugInfo: " << m_showDebugInfo << endl;
+ out << "ShowDebugInfo: " << m_showDebugInfo << ENDL;
#endif
- out << "ShowPlayer: " << m_showPlayer << endl;
- out << "ShowPlayerBackground: " << m_showPlayerBackground << endl;
- out << "ShowPlayerView: " << m_showPlayerView << endl;
- out << "ShowDroppedItems: " << m_showDrops << endl;
- out << "ShowDoors: " << m_showDoors << endl;
- out << "ShowSpawns: " << m_showSpawns << endl;
- out << "ShowFiltered: " << m_showFiltered << endl;
- out << "HighlightConsideredSpawns: " << m_highlightConsideredSpawns << endl;
- out << "ShowTooltips: " << m_showTooltips << endl;
- out << "WalkPathShowSelect: " << m_walkpathshowselect << endl;
- out << "FOVStyle: " << m_fovStyle << endl;
- out << "FOVMode: " << m_fovMode << endl;
- out << "FOVColor: " << m_fovColor.name() << endl;
+ out << "ShowPlayer: " << m_showPlayer << ENDL;
+ out << "ShowPlayerBackground: " << m_showPlayerBackground << ENDL;
+ out << "ShowPlayerView: " << m_showPlayerView << ENDL;
+ out << "ShowDroppedItems: " << m_showDrops << ENDL;
+ out << "ShowDoors: " << m_showDoors << ENDL;
+ out << "ShowSpawns: " << m_showSpawns << ENDL;
+ out << "ShowFiltered: " << m_showFiltered << ENDL;
+ out << "HighlightConsideredSpawns: " << m_highlightConsideredSpawns << ENDL;
+ out << "ShowTooltips: " << m_showTooltips << ENDL;
+ out << "WalkPathShowSelect: " << m_walkpathshowselect << ENDL;
+ out << "FOVStyle: " << m_fovStyle << ENDL;
+ out << "FOVMode: " << m_fovMode << ENDL;
+ out << "FOVColor: " << m_fovColor.name() << ENDL;
- out << endl;
- out << "[" << preferenceName() << " Parameters]" << endl;
- out << "MapLineStyle: " << m_param.mapLineStyle() << endl;
- out << "ShowMapPoints: " << m_param.showLocations() << endl;
- out << "ShowMapLines: " << m_param.showLines() << endl;
- out << "ShowGridLines: " << m_param.showGridLines() << endl;
- out << "ShowGridTicks: " << m_param.showGridTicks() << endl;
- out << "ShowBackgroundImage: " << m_param.showBackgroundImage() << endl;
- out << "GridResolution: " << m_param.gridResolution() << endl;
- out << "GridTickColor: " << m_param.gridTickColor().name() << endl;
- out << "GridLineColor: " << m_param.gridLineColor().name() << endl;
- out << "BackgroundColor: " << m_param.backgroundColor().name() << endl;
- out << "HeadRoom: " << m_param.headRoom() << endl;
- out << "FloorRoom: " << m_param.floorRoom() << endl;
+ out << ENDL;
+ out << "[" << preferenceName() << " Parameters]" << ENDL;
+ out << "MapLineStyle: " << m_param.mapLineStyle() << ENDL;
+ out << "ShowMapPoints: " << m_param.showLocations() << ENDL;
+ out << "ShowMapLines: " << m_param.showLines() << ENDL;
+ out << "ShowGridLines: " << m_param.showGridLines() << ENDL;
+ out << "ShowGridTicks: " << m_param.showGridTicks() << ENDL;
+ out << "ShowBackgroundImage: " << m_param.showBackgroundImage() << ENDL;
+ out << "GridResolution: " << m_param.gridResolution() << ENDL;
+ out << "GridTickColor: " << m_param.gridTickColor().name() << ENDL;
+ out << "GridLineColor: " << m_param.gridLineColor().name() << ENDL;
+ out << "BackgroundColor: " << m_param.backgroundColor().name() << ENDL;
+ out << "HeadRoom: " << m_param.headRoom() << ENDL;
+ out << "FloorRoom: " << m_param.floorRoom() << ENDL;
- out << endl;
+ out << ENDL;
m_mapIcons->dumpInfo(out);
- out << "[" << preferenceName() << " State]" << endl;
+ out << "[" << preferenceName() << " State]" << ENDL;
out << "screenLength: width(" << m_param.screenLength().width()
- << ") height(" << m_param.screenLength().height() << ")" << endl;
+ << ") height(" << m_param.screenLength().height() << ")" << ENDL;
out << "screenBounds: top(" << m_param.screenBounds().top()
<< ") bottom(" << m_param.screenBounds().bottom()
<< ") left(" << m_param.screenBounds().left()
- << ") right(" << m_param.screenBounds().right() << ") " << endl;
+ << ") right(" << m_param.screenBounds().right() << ") " << ENDL;
out << "screenCenter: x(" << m_param.screenCenter().x()
- << ") y(" << m_param.screenCenter().y() << ")" << endl;
+ << ") y(" << m_param.screenCenter().y() << ")" << ENDL;
out << "zoomMapLength: width(" << m_param.zoomMapLength().width()
- << ") height(" << m_param.zoomMapLength().height() << ")" << endl;
- out << "panOffsetX: " << m_param.panOffsetX() << endl;
- out << "panOffsetY: " << m_param.panOffsetY() << endl;
- out << "zoom: " << m_param.zoom() << endl;
- out << "ratio: " << m_param.ratio() << endl;
+ << ") height(" << m_param.zoomMapLength().height() << ")" << ENDL;
+ out << "panOffsetX: " << m_param.panOffsetX() << ENDL;
+ out << "panOffsetY: " << m_param.panOffsetY() << ENDL;
+ out << "zoom: " << m_param.zoom() << ENDL;
+ out << "ratio: " << m_param.ratio() << ENDL;
out << "ratioIFixPt: " << m_param.ratioIFixPt()
- << " (q = " << MapParameters::qFormat << ")" << endl;
+ << " (q = " << MapParameters::qFormat << ")" << ENDL;
out << "player: x(" << m_param.player().x()
<< ") y(" << m_param.player().y()
- << ") z(" << m_param.player().z() << ")" << endl;
+ << ") z(" << m_param.player().z() << ")" << ENDL;
out << "playerOffset: x(" << m_param.playerOffset().x()
- << ") y(" << m_param.playerOffset().y() << ")" << endl;
- out << "scaledFOVDistance: " << m_scaledFOVDistance << endl;
- out << "playerHeadRoom: " << m_param.playerHeadRoom() << endl;
- out << "playerFloorRoom: " << m_param.playerFloorRoom() << endl;
- out << "FollowMode: " << m_followMode << endl;
- out << "MapPanning: " << m_mapPanning << endl;
- out << "PvP: " << m_pvp << endl;
- out << "DeityPvP: " << m_deityPvP << endl;
- out << "RacePvP: " << m_racePvP << endl;
- out << "CacheAlwaysRepaint: " << m_mapCache.alwaysRepaint() << endl;
- out << endl;
+ << ") y(" << m_param.playerOffset().y() << ")" << ENDL;
+ out << "scaledFOVDistance: " << m_scaledFOVDistance << ENDL;
+ out << "playerHeadRoom: " << m_param.playerHeadRoom() << ENDL;
+ out << "playerFloorRoom: " << m_param.playerFloorRoom() << ENDL;
+ out << "FollowMode: " << m_followMode << ENDL;
+ out << "MapPanning: " << m_mapPanning << ENDL;
+ out << "PvP: " << m_pvp << ENDL;
+ out << "DeityPvP: " << m_deityPvP << ENDL;
+ out << "RacePvP: " << m_racePvP << ENDL;
+ out << "CacheAlwaysRepaint: " << m_mapCache.alwaysRepaint() << ENDL;
+ out << ENDL;
#ifdef DEBUG
- out << "[" << preferenceName() << " Statistics]" << endl;
+ out << "[" << preferenceName() << " Statistics]" << ENDL;
if (m_showDebugInfo)
{
long totalTime = 0;
@@ -3085,16 +3092,16 @@
fps = float(maxFrameTimes) / (totalTime / 1000.0);
- out << "Actual FPS: " << fps << endl;
+ out << "Actual FPS: " << fps << ENDL;
}
- out << "Paint Count: " << m_paintCount << endl;
- out << "Cache Paint Count: " << m_mapCache.paintCount() << endl;
+ out << "Paint Count: " << m_paintCount << ENDL;
+ out << "Cache Paint Count: " << m_mapCache.paintCount() << ENDL;
out << "Average Cache Paints per Map Paint: " <<
- double(m_mapCache.paintCount()) / double(m_paintCount) << endl;
+ double(m_mapCache.paintCount()) / double(m_paintCount) << ENDL;
out << "Average Paint Time: "
<< double(m_paintTimeSum) / double(m_paintCount)
- << " milliseconds " << endl;
- out << endl;
+ << " milliseconds " << ENDL;
+ out << ENDL;
#endif // DEBUG
}
@@ -5267,22 +5274,22 @@
void MapFrame::dumpInfo(QTextStream& out)
{
// first dump information about the map frame
- out << "[" << preferenceName() << "]" << endl;
- out << "Caption: " << windowTitle() << endl;
- out << "ShowStatusBox: " << m_topControlBox->isVisible() << endl;
- out << "ShowZoom: " << m_zoomBox->isVisible() << endl;
- out << "ShowPlayerLocation: " << m_playerLocationBox->isVisible() << endl;
- out << "ShowMouseLocation: " << m_mouseLocationBox->isVisible() << endl;
- out << "ShowFilter: " << m_filterBox->isVisible() << endl;
- out << "ShowControlBox: " << m_bottomControlBox->isVisible() << endl;
- out << "ShowFrameRate: " << m_frameRateBox->isVisible() << endl;
- out << "ShowLayersControl: " << m_layersBox->isVisible() << endl;
- out << "ShowPanControls: " << m_panBox->isVisible() << endl;
- out << "ShowDepthFilterControls: " << m_depthControlBox->isVisible() << endl;
- out << "CurrentFilter: '" << m_lastFilter << "'" << endl;
- out << "RuntimeFilterFlag: " << m_runtimeFilterFlag << endl;
- out << "RuntimeFilterFlagMask: " << m_runtimeFilterFlagMask << endl;
- out << endl;
+ out << "[" << preferenceName() << "]" << ENDL;
+ out << "Caption: " << windowTitle() << ENDL;
+ out << "ShowStatusBox: " << m_topControlBox->isVisible() << ENDL;
+ out << "ShowZoom: " << m_zoomBox->isVisible() << ENDL;
+ out << "ShowPlayerLocation: " << m_playerLocationBox->isVisible() << ENDL;
+ out << "ShowMouseLocation: " << m_mouseLocationBox->isVisible() << ENDL;
+ out << "ShowFilter: " << m_filterBox->isVisible() << ENDL;
+ out << "ShowControlBox: " << m_bottomControlBox->isVisible() << ENDL;
+ out << "ShowFrameRate: " << m_frameRateBox->isVisible() << ENDL;
+ out << "ShowLayersControl: " << m_layersBox->isVisible() << ENDL;
+ out << "ShowPanControls: " << m_panBox->isVisible() << ENDL;
+ out << "ShowDepthFilterControls: " << m_depthControlBox->isVisible() << ENDL;
+ out << "CurrentFilter: '" << m_lastFilter << "'" << ENDL;
+ out << "RuntimeFilterFlag: " << m_runtimeFilterFlag << ENDL;
+ out << "RuntimeFilterFlagMask: " << m_runtimeFilterFlagMask << ENDL;
+ out << ENDL;
// dump information about the map
if (m_map)
Modified: showeq/trunk/src/mapicon.cpp
===================================================================
--- showeq/trunk/src/mapicon.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/mapicon.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -34,6 +34,13 @@
#include <QTextStream>
#include <QPolygon>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// constants
static const QString iconSizeNames[] =
@@ -822,11 +829,11 @@
void MapIcons::dumpInfo(QTextStream& out)
{
- out << "[" << preferenceName() << " MapIcons]" << endl;
- out << "ShowSpawnNames: " << m_showSpawnNames << endl;
- out << "FOVDistance: " << m_fovDistance << endl;
- out << "DrawSize: " << m_drawSize << endl;
- out << endl;
+ out << "[" << preferenceName() << " MapIcons]" << ENDL;
+ out << "ShowSpawnNames: " << m_showSpawnNames << ENDL;
+ out << "FOVDistance: " << m_fovDistance << ENDL;
+ out << "DrawSize: " << m_drawSize << ENDL;
+ out << ENDL;
}
const QString& MapIcons::iconTypeName(MapIconType type)
Modified: showeq/trunk/src/messagewindow.cpp
===================================================================
--- showeq/trunk/src/messagewindow.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/messagewindow.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -48,6 +48,13 @@
#include <QMouseEvent>
#include <QEvent>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// MessageBrowser
MessageBrowser::MessageBrowser(QWidget* parent, const char* name)
@@ -907,7 +914,7 @@
{
QTextStream stream( &file );
- stream << m_messageWindow->toPlainText() << endl;
+ stream << m_messageWindow->toPlainText() << ENDL;
}
}
Modified: showeq/trunk/src/packetinfo.cpp
===================================================================
--- showeq/trunk/src/packetinfo.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/packetinfo.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -38,6 +38,13 @@
#include "everquest.h"
#include "diagnosticmessages.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// Macros
@@ -329,9 +336,9 @@
out.setFieldAlignment(QTextStream::AlignLeft);
// print document header
- out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl
- << "<!DOCTYPE seqopcodes SYSTEM \"seqopcodes.dtd\">" << endl
- << "<seqopcodes>" << endl;
+ out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << ENDL
+ << "<!DOCTYPE seqopcodes SYSTEM \"seqopcodes.dtd\">" << ENDL
+ << "<seqopcodes>" << ENDL;
// set initial indent
QString indent = " ";
@@ -374,7 +381,7 @@
out << " implicitlen=\"" << currentOPCode->implicitLen() << "\"";
if (!currentOPCode->updated().isEmpty())
out << " updated=\"" << currentOPCode->updated() << "\"";
- out << ">" << endl;
+ out << ">" << ENDL;
// increase the indent
indent += " ";
@@ -383,7 +390,7 @@
QStringList comments = currentOPCode->comments();
for (QStringList::Iterator cit = comments.begin();
cit != comments.end(); ++cit)
- out << indent << "<comment>" << *cit << "</comment>" << endl;
+ out << indent << "<comment>" << *cit << "</comment>" << ENDL;
QByteArray dirStr;
QByteArray sztStr;
@@ -401,7 +408,7 @@
<< "\" typename=\"" << currentPayload->typeName()
<< "\" sizechecktype=\""
<< sztStrs[currentPayload->sizeCheckType()]
- << "\"/>" << endl;
+ << "\"/>" << ENDL;
}
// decrease the indent
@@ -408,11 +415,11 @@
indent.remove(0, 4);
// close the opcode entity
- out << indent << "</opcode>" << endl;
+ out << indent << "</opcode>" << ENDL;
}
// output closing entity
- out << "</seqopcodes>" << endl;
+ out << "</seqopcodes>" << ENDL;
return true;
}
Modified: showeq/trunk/src/packetlog.cpp
===================================================================
--- showeq/trunk/src/packetlog.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/packetlog.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -29,6 +29,13 @@
#include "decode.h"
#include "diagnosticmessages.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// PacketLog
PacketLog::PacketLog(EQPacket& packet, const QString& fname,
@@ -143,10 +150,10 @@
// data direction and size
m_out << ((dir == DIR_Server) ? "[Server->Client] " : "[Client->Server] ")
- << "[Size: " << QString::number(len) << "]" << endl;
+ << "[Size: " << QString::number(len) << "]" << ENDL;
// output opcode info
- m_out << opCodeToString(opcode) << endl;
+ m_out << opCodeToString(opcode) << ENDL;
flush();
@@ -154,7 +161,7 @@
if (len)
outputData(len, data);
else
- m_out << endl;
+ m_out << ENDL;
flush();
}
@@ -182,10 +189,10 @@
// data direction and size
m_out << ((dir == DIR_Server) ? "[Server->Client] " : "[Client->Server] ")
- << "[Size: " << QString::number(len) << "]" << endl;
+ << "[Size: " << QString::number(len) << "]" << ENDL;
// output opcode info
- m_out << opCodeToString(opcode) << endl;
+ m_out << opCodeToString(opcode) << ENDL;
if (opcodeEntry)
{
@@ -213,7 +220,7 @@
}
}
- m_out << endl;
+ m_out << ENDL;
}
flush();
@@ -222,7 +229,7 @@
if (len)
outputData(len, data);
else
- m_out << endl;
+ m_out << ENDL;
flush();
}
@@ -247,7 +254,7 @@
<< " [" << sourceStr << ":" << QString::number(packet.getSourcePort())
<< "->" << destStr << ":" << QString::number(packet.getDestPort())
<< "] [Size: " << QString::number(packet.getUDPPayloadLength()) << "]"
- << endl;
+ << ENDL;
uint16_t calcedCRC;
@@ -270,18 +277,18 @@
if (packet.hasCRC())
{
- m_out << " [CRC ok]" << endl;
+ m_out << " [CRC ok]" << ENDL;
}
- m_out << endl;
+ m_out << ENDL;
}
else
{
m_out << "[BAD CRC (" << QString::number(calcedCRC, 16)
<< " != " << QString::number(packet.crc(), 16)
- << ")! Sessions crossed or unitialized or non-EQ packet! ]" << endl;
+ << ")! Sessions crossed or unitialized or non-EQ packet! ]" << ENDL;
m_out << "[SessionKey: " << QString::number(packet.getSessionKey(), 16) <<
- "]" << endl;
+ "]" << ENDL;
}
flush();
@@ -291,7 +298,7 @@
outputData(packet.getUDPPayloadLength(),
(const uint8_t*)packet.getUDPPayload());
else
- m_out << endl;
+ m_out << ENDL;
flush();
}
Modified: showeq/trunk/src/sortitem.cpp
===================================================================
--- showeq/trunk/src/sortitem.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/sortitem.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -27,6 +27,13 @@
#include "util.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
// This code used to be used to sort the old format item databases
// It is now a test program for use with regression testing the functions
// that provide printable names
@@ -42,7 +49,7 @@
int dp = 8; // decimal precision
int i, j;
- out << "Skills:" << endl;
+ out << "Skills:" << ENDL;
for (i = 0; i <=74; ++i)
out << format.arg(i, dp).arg(i, hp, 16).arg(skill_name(i));
out << "\n\n";
Modified: showeq/trunk/src/spawnshell.cpp
===================================================================
--- showeq/trunk/src/spawnshell.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/spawnshell.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -47,6 +47,14 @@
#include <climits>
#include <cmath>
+
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// useful macro definitions
@@ -394,7 +402,7 @@
if (!it.value())
break;
- out << it.value()->dumpString() << endl;
+ out << it.value()->dumpString() << ENDL;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|