You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(18) |
Oct
(11) |
Nov
(9) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(6) |
Mar
|
Apr
(10) |
May
(38) |
Jun
(15) |
Jul
(32) |
Aug
|
Sep
(17) |
Oct
(11) |
Nov
|
Dec
(14) |
2006 |
Jan
(2) |
Feb
(5) |
Mar
(3) |
Apr
(2) |
May
(3) |
Jun
(7) |
Jul
|
Aug
|
Sep
(3) |
Oct
(2) |
Nov
(6) |
Dec
(3) |
2007 |
Jan
|
Feb
(17) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
(11) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
(6) |
Jul
|
Aug
|
Sep
(6) |
Oct
(4) |
Nov
(1) |
Dec
|
2009 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
|
May
(4) |
Jun
(3) |
Jul
|
Aug
(5) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
(6) |
2010 |
Jan
|
Feb
(6) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(8) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(5) |
2013 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(2) |
Aug
(2) |
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(2) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
(4) |
Aug
(5) |
Sep
|
Oct
(2) |
Nov
(5) |
Dec
(2) |
2015 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(2) |
Sep
(2) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
2017 |
Jan
(2) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
(2) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2018 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(2) |
Jun
(2) |
Jul
(8) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(4) |
Dec
(6) |
2019 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(4) |
May
(2) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(2) |
Oct
(13) |
Nov
(6) |
Dec
(4) |
2020 |
Jan
(7) |
Feb
(7) |
Mar
(7) |
Apr
(8) |
May
(5) |
Jun
(3) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(37) |
Nov
(30) |
Dec
(8) |
2021 |
Jan
(14) |
Feb
(9) |
Mar
(7) |
Apr
(17) |
May
(3) |
Jun
(10) |
Jul
(7) |
Aug
(3) |
Sep
(3) |
Oct
(4) |
Nov
(15) |
Dec
(22) |
2022 |
Jan
(3) |
Feb
(3) |
Mar
(3) |
Apr
(3) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(5) |
Sep
(6) |
Oct
(4) |
Nov
(34) |
Dec
(17) |
2023 |
Jan
(3) |
Feb
(3) |
Mar
(29) |
Apr
(2) |
May
(18) |
Jun
(12) |
Jul
(12) |
Aug
(2) |
Sep
(7) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
2024 |
Jan
(2) |
Feb
(10) |
Mar
(17) |
Apr
(6) |
May
(3) |
Jun
(9) |
Jul
(22) |
Aug
(48) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(8) |
2025 |
Jan
(3) |
Feb
(2) |
Mar
(9) |
Apr
(7) |
May
(3) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <cn...@us...> - 2022-11-30 01:41:38
|
Revision: 1312 http://sourceforge.net/p/seq/svn/1312 Author: cn187 Date: 2022-11-30 01:41:37 +0000 (Wed, 30 Nov 2022) Log Message: ----------- Delete branch created by mistake Removed Paths: ------------- showeq/branches/v6_3_0rc1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-30 01:28:36
|
Revision: 1311 http://sourceforge.net/p/seq/svn/1311 Author: cn187 Date: 2022-11-30 01:28:35 +0000 (Wed, 30 Nov 2022) Log Message: ----------- Create branch v6_3_0rc1 Added Paths: ----------- showeq/branches/v6_3_0rc1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-30 01:08:32
|
Revision: 1310 http://sourceforge.net/p/seq/svn/1310 Author: cn187 Date: 2022-11-30 01:08:31 +0000 (Wed, 30 Nov 2022) Log Message: ----------- Delete tag created by mistake Removed Paths: ------------- showeq/tags/v6_3_0rc1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-30 01:05:35
|
Revision: 1309 http://sourceforge.net/p/seq/svn/1309 Author: cn187 Date: 2022-11-30 01:05:30 +0000 (Wed, 30 Nov 2022) Log Message: ----------- Create tag v6_3_0rc1 Added Paths: ----------- showeq/tags/v6_3_0rc1/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-30 00:07:56
|
Revision: 1308 http://sourceforge.net/p/seq/svn/1308 Author: cn187 Date: 2022-11-30 00:07:47 +0000 (Wed, 30 Nov 2022) Log Message: ----------- Create tag v6_2_14 Added Paths: ----------- showeq/tags/v6_2_14/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-30 00:06:04
|
Revision: 1307 http://sourceforge.net/p/seq/svn/1307 Author: cn187 Date: 2022-11-30 00:06:02 +0000 (Wed, 30 Nov 2022) Log Message: ----------- Historical checkin for 11/29/22 - Fix for spawns with auras Version to 6.2.14 Modified Paths: -------------- showeq/trunk/ChangeLog showeq/trunk/configure.in Modified: showeq/trunk/ChangeLog =================================================================== --- showeq/trunk/ChangeLog 2022-11-29 23:58:39 UTC (rev 1306) +++ showeq/trunk/ChangeLog 2022-11-30 00:06:02 UTC (rev 1307) @@ -1,3 +1,8 @@ +cn187 (11/29/22) +---------------- +- Update to version 6.2.14 +- fix for spawns with auras + BlueAdept (11/20/22) ---------------- - Update to version 6.2.13 Modified: showeq/trunk/configure.in =================================================================== --- showeq/trunk/configure.in 2022-11-29 23:58:39 UTC (rev 1306) +++ showeq/trunk/configure.in 2022-11-30 00:06:02 UTC (rev 1307) @@ -2,7 +2,7 @@ dnl $Id$ $Name$ AC_PREREQ(2.59) -AC_INIT(showeq, 6.2.13) +AC_INIT(showeq, 6.2.14) AC_CONFIG_SRCDIR(src/main.cpp) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_SYSTEM This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 23:58:40
|
Revision: 1306 http://sourceforge.net/p/seq/svn/1306 Author: cn187 Date: 2022-11-29 23:58:39 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Adjust fillSpawnStruct to handle variable-length auras Modified Paths: -------------- showeq/trunk/src/spawnshell.cpp Modified: showeq/trunk/src/spawnshell.cpp =================================================================== --- showeq/trunk/src/spawnshell.cpp 2022-11-29 23:34:33 UTC (rev 1305) +++ showeq/trunk/src/spawnshell.cpp 2022-11-29 23:58:39 UTC (rev 1306) @@ -689,7 +689,14 @@ netStream.readText(); // skip 3 variable len strings netStream.readText(); netStream.readText(); - netStream.skipBytes(54); // and 54 static bytes + netStream.skipBytes(50); // and 50 static bytes + + //the next byte indicates how many DWORDs to skip, and + //includes the DWORD that the byte is part of + uint8_t skip = netStream.readUInt8(); + netStream.skipBytes(3); //to complete DWORD + --skip; //we just skipped the first dword + netStream.skipBytes(skip * sizeof(uint32_t)); } spawn->charProperties = netStream.readUInt8(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 23:34:36
|
Revision: 1305 http://sourceforge.net/p/seq/svn/1305 Author: cn187 Date: 2022-11-29 23:34:33 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Don't show Qt5 build-in context menu on top of our own menus Modified Paths: -------------- showeq/branches/cn187_devel/src/interface.cpp showeq/branches/cn187_devel/src/interface.h showeq/branches/cn187_devel/src/seqwindow.cpp Modified: showeq/branches/cn187_devel/src/interface.cpp =================================================================== --- showeq/branches/cn187_devel/src/interface.cpp 2022-11-29 23:34:25 UTC (rev 1304) +++ showeq/branches/cn187_devel/src/interface.cpp 2022-11-29 23:34:33 UTC (rev 1305) @@ -6453,6 +6453,11 @@ dw->setAllowedAreas(Qt::NoDockWidgetArea); } +void EQInterface::contextMenuEvent(QContextMenuEvent* event) +{ + event->ignore(); +} + #ifndef QMAKEBUILD #include "interface.moc" #endif Modified: showeq/branches/cn187_devel/src/interface.h =================================================================== --- showeq/branches/cn187_devel/src/interface.h 2022-11-29 23:34:25 UTC (rev 1304) +++ showeq/branches/cn187_devel/src/interface.h 2022-11-29 23:34:33 UTC (rev 1305) @@ -347,6 +347,8 @@ QStringList enumerateDevices(); QString promptForNetDevice(); + virtual void contextMenuEvent(QContextMenuEvent* event) override; + public: Player* m_player; MapMgr* mapMgr(void) { return m_mapMgr; } Modified: showeq/branches/cn187_devel/src/seqwindow.cpp =================================================================== --- showeq/branches/cn187_devel/src/seqwindow.cpp 2022-11-29 23:34:25 UTC (rev 1304) +++ showeq/branches/cn187_devel/src/seqwindow.cpp 2022-11-29 23:34:33 UTC (rev 1305) @@ -104,9 +104,14 @@ { QMenu* popupMenu = menu(); if (popupMenu) + { popupMenu->popup(mapToGlobal(e->pos())); + e->accept(); + } else + { QDockWidget::mousePressEvent(e); + } } else QDockWidget::mousePressEvent(e); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 23:34:27
|
Revision: 1304 http://sourceforge.net/p/seq/svn/1304 Author: cn187 Date: 2022-11-29 23:34:25 +0000 (Tue, 29 Nov 2022) Log Message: ----------- When adding new location, use current line color Modified Paths: -------------- showeq/branches/cn187_devel/src/map.cpp Modified: showeq/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-29 23:33:58 UTC (rev 1303) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-29 23:34:25 UTC (rev 1304) @@ -688,9 +688,15 @@ // if the user clicked ok, and actually gave a name, add it if (ok && !name.isEmpty()) - m_mapData.addLocation(name, m_curLocationColor, - QPoint(point.x(), point.y())); - + { + //m_curLocationColor doesn't get set anywhere, so for now, we'll + //use whatever the current line color is. Maybe we'll add selecting + //a separate location color later. TODO + m_mapData.addLocation(name, m_curLineColor, QPoint(point.x(), point.y())); + } + + emit mapUpdated(); + #ifdef DEBUGMAP seqDebug("addLocation(): Location x added at %d/%d", point.x(), point.y()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 23:34:01
|
Revision: 1303 http://sourceforge.net/p/seq/svn/1303 Author: cn187 Date: 2022-11-29 23:33:58 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Fix map colors not getting saved correctly Modified Paths: -------------- showeq/branches/cn187_devel/src/mapcore.cpp Modified: showeq/branches/cn187_devel/src/mapcore.cpp =================================================================== --- showeq/branches/cn187_devel/src/mapcore.cpp 2022-11-29 23:33:51 UTC (rev 1302) +++ showeq/branches/cn187_devel/src/mapcore.cpp 2022-11-29 23:33:58 UTC (rev 1303) @@ -1332,7 +1332,7 @@ currentLineL = *mlit; z1 = float(currentLineL->z()); - const QColor& color = currentLineL->origColor().isValid() ? currentLineL->color() : currentLineL->origColor(); + const QColor& color = currentLineL->color().isValid() ? currentLineL->color() : currentLineL->origColor(); r = color.red(); g = color.green(); b = color.blue(); @@ -1363,7 +1363,7 @@ for (; mmit != m_mapLayers[layerNum]->mLines().end(); ++mmit) { currentLineM = *mmit; - const QColor& color = currentLineM->origColor().isValid() ? currentLineM->color() : currentLineM->origColor(); + const QColor& color = currentLineM->color().isValid() ? currentLineM->color() : currentLineM->origColor(); r = color.red(); g = color.green(); b = color.blue(); @@ -1391,7 +1391,8 @@ for (; lit != m_mapLayers[layerNum]->locations().end(); ++lit) { currentLoc = *lit; - const QColor& color = currentLoc->origColor().isValid() ? currentLoc->color() : currentLoc->origColor(); + //TODO why is this zero? + const QColor& color = currentLoc->color().isValid() ? currentLoc->color() : currentLoc->origColor(); // convert spaces to underscores name = currentLoc->name(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 23:33:52
|
Revision: 1302 http://sourceforge.net/p/seq/svn/1302 Author: cn187 Date: 2022-11-29 23:33:51 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Add ability to zoom map via mouse wheel Modified Paths: -------------- showeq/branches/cn187_devel/src/map.cpp showeq/branches/cn187_devel/src/map.h Modified: showeq/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-29 04:00:43 UTC (rev 1301) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-29 23:33:51 UTC (rev 1302) @@ -2077,6 +2077,36 @@ } } + +void Map::wheelEvent( QWheelEvent * ev) +{ + int deltaY = 0; + +#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0)) + deltaY = ev->angleDelta().y(); +#else + deltaY = ev->delta(); +#endif + + //y is verticle, x is horizontal + //we only handle vertical scroll for zoom in/out. + //ignore anything else so it can be handled by parent. + if (deltaY > 0) + { + setZoom(zoom() + 1); + ev->accept(); + return; + } + else if (deltaY < 0) + { + setZoom(zoom() - 1); + ev->accept(); + return; + } + + ev->ignore(); +} + void Map::zoomIn() { #ifdef DEBUGMAP Modified: showeq/branches/cn187_devel/src/map.h =================================================================== --- showeq/branches/cn187_devel/src/map.h 2022-11-29 04:00:43 UTC (rev 1301) +++ showeq/branches/cn187_devel/src/map.h 2022-11-29 23:33:51 UTC (rev 1302) @@ -578,6 +578,7 @@ void mouseMoveEvent( QMouseEvent* ); void mouseReleaseEvent( QMouseEvent *); void mouseDoubleClickEvent( QMouseEvent *); + void wheelEvent( QWheelEvent *); void resizeEvent (QResizeEvent *); void paintMap (QPainter *); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 04:00:45
|
Revision: 1301 http://sourceforge.net/p/seq/svn/1301 Author: cn187 Date: 2022-11-29 04:00:43 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Allow creating new map layers for editing Modified Paths: -------------- showeq/branches/cn187_devel/src/map.cpp showeq/branches/cn187_devel/src/map.h showeq/branches/cn187_devel/src/mapcore.cpp showeq/branches/cn187_devel/src/mapcore.h Modified: showeq/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-29 04:00:35 UTC (rev 1300) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-29 04:00:43 UTC (rev 1301) @@ -599,6 +599,16 @@ } } +void MapMgr::createNewLayer() +{ + m_mapData.createNewLayer(); + // signal that the map has been loaded + // note, the layers are populated in order, so the highest layer + // number (0-indexed) will be the one we just loaded + if (m_mapData.mapLayer(m_mapData.numLayers()-1)->mapLoaded()) + emit mapLoaded(); +} + void MapMgr::addItem(const Item* item) { if ((item == NULL) || (item->type() != tSpawn)) @@ -880,6 +890,9 @@ * - cn187 */ + m_action_createNewLayer = subMenu->addAction( + QString("Create New Layer\t"), m_map, SLOT(createNewLayer())); + QMenu* layerMenu = new QMenu("Select Edit Layer"); m_editLayerSpinBox = new QSpinBox(layerMenu); QWidgetAction* editLayerAction = new QWidgetAction(layerMenu); @@ -3205,6 +3218,11 @@ } } +void Map::createNewLayer() +{ + m_mapMgr->createNewLayer(); +} + void Map::addLocation(void) { #ifdef DEBUGMAP Modified: showeq/branches/cn187_devel/src/map.h =================================================================== --- showeq/branches/cn187_devel/src/map.h 2022-11-29 04:00:35 UTC (rev 1300) +++ showeq/branches/cn187_devel/src/map.h 2022-11-29 04:00:43 UTC (rev 1301) @@ -177,6 +177,7 @@ bool import = false, bool force = false); void saveMap(void); void saveSOEMap(void); + void createNewLayer(); // Spawn Handling void addItem(const Item* item); @@ -296,6 +297,7 @@ QAction* m_action_followMenu_Player; QAction* m_action_followMenu_Spawn; QAction* m_action_followMenu_None; + QAction* m_action_createNewLayer; QAction* m_action_addLocation; QAction* m_action_startLine; QAction* m_action_addLinePoint; @@ -469,6 +471,7 @@ void toggleMapLayerVisibility(QAction* layer); // map editing + void createNewLayer(); void addLocation(); void startLine(); void addLinePoint(); Modified: showeq/branches/cn187_devel/src/mapcore.cpp =================================================================== --- showeq/branches/cn187_devel/src/mapcore.cpp 2022-11-29 04:00:35 UTC (rev 1300) +++ showeq/branches/cn187_devel/src/mapcore.cpp 2022-11-29 04:00:43 UTC (rev 1301) @@ -37,6 +37,7 @@ #include <cerrno> +#include <QDateTime> #include <QPainter> #include <QString> #include <QStringList> @@ -1414,6 +1415,38 @@ seqInfo("Saved SOE map: '%s'", fileName.toLatin1().data()); } +void MapData::createNewLayer() +{ + MapLayer* layer = new MapLayer(); + QString fileName; + + if (m_mapLayers.count()) + { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + fileName = QString::asprintf("%s_%d.map", m_zoneShortName.toLatin1().data(), m_mapLayers.count()); +#else + fileName.sprintf("%s_%d.map", m_zoneShortName.toLatin1().data(), m_mapLayers.count()); +#endif + } + else + { + QDateTime now = QDateTime::currentDateTime(); + QString timestamp = now.toString("yyyyMMdd-hhmmss"); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + fileName = QString::asprintf("%s.map", timestamp.toLatin1().data()); +#else + fileName.sprintf("%s.map", timestamp.toLatin1().data()); +#endif + m_zoneLongName = timestamp; + m_zoneShortName = m_zoneLongName; + } + + layer->setFileName(fileName); + m_mapLayers.append(layer); + layer->setMapLoaded(true); + seqInfo("Create layer: '%s'", fileName.toLatin1().data()); +} + bool MapData::isAggro(const QString& name, uint16_t* range) const { MapAggro* aggro; Modified: showeq/branches/cn187_devel/src/mapcore.h =================================================================== --- showeq/branches/cn187_devel/src/mapcore.h 2022-11-29 04:00:35 UTC (rev 1300) +++ showeq/branches/cn187_devel/src/mapcore.h 2022-11-29 04:00:43 UTC (rev 1301) @@ -553,6 +553,7 @@ void loadSOEMap(const QString& fileName, bool import = false); void saveMap(const QString& fileName, const uint8_t layerNum) const; void saveSOEMap(const QString& fileName, const uint8_t layerNum) const; + void createNewLayer(); // accessors const QString& zoneShortName() const { return m_zoneShortName; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 04:00:38
|
Revision: 1300 http://sourceforge.net/p/seq/svn/1300 Author: cn187 Date: 2022-11-29 04:00:35 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Allow loading of up to 9 map layers Modified Paths: -------------- showeq/branches/cn187_devel/src/map.cpp showeq/branches/cn187_devel/src/mapcore.cpp Modified: showeq/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-29 02:57:00 UTC (rev 1299) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-29 04:00:35 UTC (rev 1300) @@ -409,7 +409,7 @@ // add other layers QFileInfo fileInfo; - for (int i = 1; i < 4; ++i) + for (int i = 1; i < 10; ++i) { fileInfo = m_dataLocMgr->findExistingFile("maps", shortZoneName + "_" + QString::number(i) + extension); Modified: showeq/branches/cn187_devel/src/mapcore.cpp =================================================================== --- showeq/branches/cn187_devel/src/mapcore.cpp 2022-11-29 02:57:00 UTC (rev 1299) +++ showeq/branches/cn187_devel/src/mapcore.cpp 2022-11-29 04:00:35 UTC (rev 1300) @@ -1004,7 +1004,7 @@ // use the file base name as the zone long/short name, it isn't perfect, // but neither is this file format QFileInfo fileInfo(fileName); - QRegExp reStripTrailer("_[1-3]"); + QRegExp reStripTrailer("_[1-9]"); m_zoneLongName = fileInfo.baseName().remove(reStripTrailer); m_zoneShortName = m_zoneLongName; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 02:57:02
|
Revision: 1299 http://sourceforge.net/p/seq/svn/1299 Author: cn187 Date: 2022-11-29 02:57:00 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Move edit layer selection to its own submenu Modified Paths: -------------- showeq/branches/cn187_devel/src/map.cpp Modified: showeq/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-29 01:20:49 UTC (rev 1298) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-29 02:57:00 UTC (rev 1299) @@ -880,16 +880,12 @@ * - cn187 */ - QWidget* tmpWidget = new QWidget(subMenu); - QHBoxLayout* tmpLayout = new QHBoxLayout(tmpWidget); - tmpLayout->setContentsMargins(1, 1, 1, 1); - m_editLayerSpinBox = new QSpinBox(tmpWidget); - QLabel* tmpLabel = new QLabel("Edit Layer:", tmpWidget); - tmpLayout->addWidget(tmpLabel); - tmpLayout->addWidget(m_editLayerSpinBox); - QWidgetAction* tmpWidgetAction = new QWidgetAction(subMenu); - tmpWidgetAction->setDefaultWidget(tmpWidget); - subMenu->addAction(tmpWidgetAction); + QMenu* layerMenu = new QMenu("Select Edit Layer"); + m_editLayerSpinBox = new QSpinBox(layerMenu); + QWidgetAction* editLayerAction = new QWidgetAction(layerMenu); + editLayerAction->setDefaultWidget(m_editLayerSpinBox); + layerMenu->addAction(editLayerAction); + subMenu->addMenu(layerMenu); m_editLayerSpinBox->setMinimum(0); m_editLayerSpinBox->setSingleStep(1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-29 01:20:51
|
Revision: 1298 http://sourceforge.net/p/seq/svn/1298 Author: cn187 Date: 2022-11-29 01:20:49 +0000 (Tue, 29 Nov 2022) Log Message: ----------- Fixes for dark mode color propagation Modified Paths: -------------- showeq/branches/cn187_devel/src/interface.cpp showeq/branches/cn187_devel/src/interface.h showeq/branches/cn187_devel/src/spawnlist.cpp showeq/branches/cn187_devel/src/spawnlist.h showeq/branches/cn187_devel/src/spawnlist2.cpp showeq/branches/cn187_devel/src/spawnlist2.h showeq/branches/cn187_devel/src/spawnlistcommon.cpp Modified: showeq/branches/cn187_devel/src/interface.cpp =================================================================== --- showeq/branches/cn187_devel/src/interface.cpp 2022-11-27 23:36:11 UTC (rev 1297) +++ showeq/branches/cn187_devel/src/interface.cpp 2022-11-29 01:20:49 UTC (rev 1298) @@ -5744,11 +5744,14 @@ QStringList availableStyles = QStyleFactory::keys(); - if (!availableStyles.contains(name, Qt::CaseInsensitive)) - return currentStyleName; + if (!availableStyles.contains(name, Qt::CaseInsensitive)) + return currentStyleName; - qApp->setStyle(QStyleFactory::create(name)); + qApp->setPalette(OrigPalette); + QStyle* newStyle = QStyleFactory::create(name); + qApp->setStyle(newStyle); + MenuActionList::Iterator iter; for ( iter = ActionList_StyleMenu.begin(); iter != ActionList_StyleMenu.end(); ++iter) @@ -5764,6 +5767,8 @@ } } + emit styleChanged(); + return currentStyleName; } @@ -5956,6 +5961,8 @@ connect(this, SIGNAL(restoreFonts(void)), m_spawnList, SLOT(restoreFont(void))); + connect(this, SIGNAL(styleChanged()), m_spawnList, SLOT(styleChanged())); + // insert its menu into the window menu insertWindowMenu(m_spawnList); } @@ -5993,6 +6000,8 @@ connect(this, SIGNAL(restoreFonts(void)), m_spawnList2, SLOT(restoreFont(void))); + connect(this, SIGNAL(styleChanged()), m_spawnList2, SLOT(styleChanged())); + // insert its menu into the window menu insertWindowMenu(m_spawnList2); } Modified: showeq/branches/cn187_devel/src/interface.h =================================================================== --- showeq/branches/cn187_devel/src/interface.h 2022-11-27 23:36:11 UTC (rev 1297) +++ showeq/branches/cn187_devel/src/interface.h 2022-11-29 01:20:49 UTC (rev 1298) @@ -237,6 +237,8 @@ void spellMessage(QString&); void restoreFonts(); + void styleChanged(); + // Decoder signals void theKey(uint64_t); void backfillPlayer(charProfileStruct *); Modified: showeq/branches/cn187_devel/src/spawnlist.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlist.cpp 2022-11-27 23:36:11 UTC (rev 1297) +++ showeq/branches/cn187_devel/src/spawnlist.cpp 2022-11-29 01:20:49 UTC (rev 1298) @@ -50,6 +50,7 @@ #include <cmath> #include <regex.h> #include <QMenu> +#include <QApplication> // ------------------------------------------------------ SpawnList::SpawnList(Player* player, @@ -1106,6 +1107,29 @@ } } +void SpawnList::styleChanged() +{ + QColor fg = qApp->palette().color(QPalette::WindowText); + + SEQListViewItemIterator it(this); + while (*it) + { + SpawnListItem* litem = (SpawnListItem*)*it; + litem->pickTextColor(litem->item(), m_player, fg); + ++it; + } + + //go back and do the categories, so we keep their configured colors + QHash<void*, SpawnListItem*>::iterator cit; + for (cit = m_categoryListItems.begin(); cit != m_categoryListItems.end(); ++cit) + { + Category* cat = (Category*)cit.key(); + SpawnListItem* litem = (SpawnListItem*)cit.value(); + fg = cat->color(); + litem->pickTextColor(litem->item(), m_player, fg); + } +} + QString SpawnList::filterString(const Item* item, int flags) { if (item == NULL) Modified: showeq/branches/cn187_devel/src/spawnlist.h =================================================================== --- showeq/branches/cn187_devel/src/spawnlist.h 2022-11-27 23:36:11 UTC (rev 1297) +++ showeq/branches/cn187_devel/src/spawnlist.h 2022-11-29 01:20:49 UTC (rev 1298) @@ -116,10 +116,12 @@ void delCategory(const Category* cat); void clearedCategories(void); void loadedCategories(void); - + void rebuildSpawnList(); void playerLevelChanged(uint8_t); - + + void styleChanged(); + private slots: void selChanged(); @@ -138,6 +140,7 @@ Player *m_player; SpawnShell* m_spawnShell; +private: // category pointer used as keys to look up the associated SpawnListItem QHash<void*, SpawnListItem*> m_categoryListItems; @@ -158,11 +161,13 @@ virtual QMenu* menu(); SpawnList* spawnList() { return m_spawnList; } + protected: + SpawnList* m_spawnList; + public slots: virtual void savePrefs(void); + void styleChanged() { m_spawnList->styleChanged(); } - protected: - SpawnList* m_spawnList; }; #endif // SPAWNLIST_H Modified: showeq/branches/cn187_devel/src/spawnlist2.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlist2.cpp 2022-11-27 23:36:11 UTC (rev 1297) +++ showeq/branches/cn187_devel/src/spawnlist2.cpp 2022-11-29 01:20:49 UTC (rev 1298) @@ -1017,6 +1017,22 @@ #endif } +void SpawnListWindow2::styleChanged() +{ + SEQListViewItemIterator it(m_spawnList); + + QColor fg = palette().color(QPalette::WindowText); + + while (*it) + { + SpawnListItem* litem = (SpawnListItem*)*it; + litem->pickTextColor(litem->item(), m_player, fg); + + ++it; + } +} + + #ifndef QMAKEBUILD #include "spawnlist2.moc" #endif Modified: showeq/branches/cn187_devel/src/spawnlist2.h =================================================================== --- showeq/branches/cn187_devel/src/spawnlist2.h 2022-11-27 23:36:11 UTC (rev 1297) +++ showeq/branches/cn187_devel/src/spawnlist2.h 2022-11-29 01:20:49 UTC (rev 1298) @@ -91,6 +91,10 @@ void rebuildSpawnList(void); void refresh(void); virtual void savePrefs(void); + + + void styleChanged(); + private slots: // category combo box signals void categorySelected(int index); Modified: showeq/branches/cn187_devel/src/spawnlistcommon.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2022-11-27 23:36:11 UTC (rev 1297) +++ showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2022-11-29 01:20:49 UTC (rev 1298) @@ -38,6 +38,7 @@ #include <cstring> +#include <QApplication> #include <QFontDialog> #include <QInputDialog> #include <QMessageBox> @@ -47,7 +48,8 @@ SpawnListItem::SpawnListItem(SEQListViewItem *parent) : SEQListViewItem(parent) { - m_textColor = Qt::black; + m_textColor = qApp->palette().color(QPalette::WindowText); + m_item = NULL; m_npc = 0; } @@ -54,7 +56,8 @@ SpawnListItem::SpawnListItem(SEQListView *parent) : SEQListViewItem(parent) { - m_textColor = Qt::black; + m_textColor = qApp->palette().color(QPalette::WindowText); + m_item = NULL; m_npc = 0; } @@ -352,12 +355,22 @@ Player* player, QColor def) { + + QColor fg = qApp->palette().color(QPalette::WindowText); + QColor bg = qApp->palette().color(QPalette::Base); + + //Black is the parameter default, so if it's black, we should use the + //foreground color instead. That way we won't wind up with black text by + //default when using dark themesf + if (def == Qt::black) + def = fg; + if (item == NULL) { m_textColor = def; return; } - + const Spawn* spawn = NULL; if ((item->type() == tSpawn) || (item->type() == tPlayer)) spawn = (const Spawn*)item; @@ -367,7 +380,7 @@ m_textColor = def; return; } - + switch (spawn->typeflag()) { case 65: @@ -417,8 +430,8 @@ // color by consider difficulty m_textColor = player->pickConColor(spawn->level()); - if (m_textColor == Qt::white) - m_textColor = Qt::black; + if (m_textColor == Qt::white || m_textColor == Qt::black) + m_textColor = def; if (m_textColor == Qt::yellow) m_textColor = QColor(206,151,33); } // end pickTextColor This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-27 23:36:14
|
Revision: 1297 http://sourceforge.net/p/seq/svn/1297 Author: cn187 Date: 2022-11-27 23:36:11 +0000 (Sun, 27 Nov 2022) Log Message: ----------- Fix calls to QString::asprintf Modified Paths: -------------- showeq/branches/cn187_devel/src/bazaarlog.cpp showeq/branches/cn187_devel/src/category.cpp showeq/branches/cn187_devel/src/combatlog.cpp showeq/branches/cn187_devel/src/editor.cpp showeq/branches/cn187_devel/src/eqstr.cpp showeq/branches/cn187_devel/src/interface.cpp showeq/branches/cn187_devel/src/map.cpp showeq/branches/cn187_devel/src/mapicon.cpp showeq/branches/cn187_devel/src/messageshell.cpp showeq/branches/cn187_devel/src/netdiag.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/seqlistview.cpp showeq/branches/cn187_devel/src/skilllist.cpp showeq/branches/cn187_devel/src/spawn.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/spawnmonitor.cpp showeq/branches/cn187_devel/src/spawnpointlist.cpp showeq/branches/cn187_devel/src/spellshell.cpp showeq/branches/cn187_devel/src/statlist.cpp showeq/branches/cn187_devel/src/util.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 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/bazaarlog.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/category.cpp =================================================================== --- showeq/branches/cn187_devel/src/category.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/category.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/combatlog.cpp =================================================================== --- showeq/branches/cn187_devel/src/combatlog.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/combatlog.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/editor.cpp =================================================================== --- showeq/branches/cn187_devel/src/editor.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/editor.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/eqstr.cpp =================================================================== --- showeq/branches/cn187_devel/src/eqstr.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/eqstr.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/interface.cpp =================================================================== --- showeq/branches/cn187_devel/src/interface.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/interface.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/mapicon.cpp =================================================================== --- showeq/branches/cn187_devel/src/mapicon.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/mapicon.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/messageshell.cpp =================================================================== --- showeq/branches/cn187_devel/src/messageshell.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/messageshell.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/netdiag.cpp =================================================================== --- showeq/branches/cn187_devel/src/netdiag.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/netdiag.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/packet.cpp =================================================================== --- showeq/branches/cn187_devel/src/packet.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/packet.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/packetinfo.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetinfo.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/packetinfo.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/packetlog.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetlog.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/packetlog.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/packetstream.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetstream.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/packetstream.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/seqlistview.cpp =================================================================== --- showeq/branches/cn187_devel/src/seqlistview.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/seqlistview.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/skilllist.cpp =================================================================== --- showeq/branches/cn187_devel/src/skilllist.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/skilllist.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/spawn.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawn.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/spawn.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/spawnlist.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlist.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/spawnlist.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/spawnlist2.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlist2.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/spawnlist2.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/spawnlistcommon.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/spawnmonitor.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnmonitor.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/spawnmonitor.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/spawnpointlist.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnpointlist.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/spawnpointlist.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/spellshell.cpp =================================================================== --- showeq/branches/cn187_devel/src/spellshell.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/spellshell.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/statlist.cpp =================================================================== --- showeq/branches/cn187_devel/src/statlist.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/statlist.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/util.cpp =================================================================== --- showeq/branches/cn187_devel/src/util.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/util.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/xmlpreferences.cpp =================================================================== --- showeq/branches/cn187_devel/src/xmlpreferences.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/xmlpreferences.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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/branches/cn187_devel/src/zonemgr.cpp =================================================================== --- showeq/branches/cn187_devel/src/zonemgr.cpp 2022-11-27 16:02:47 UTC (rev 1296) +++ showeq/branches/cn187_devel/src/zonemgr.cpp 2022-11-27 23:36:11 UTC (rev 1297) @@ -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. |
From: <cn...@us...> - 2022-11-27 16:02:49
|
Revision: 1296 http://sourceforge.net/p/seq/svn/1296 Author: cn187 Date: 2022-11-27 16:02:47 +0000 (Sun, 27 Nov 2022) Log Message: ----------- Fix Qt deprecation warnings about QFlags being initialized with 0 Modified Paths: -------------- showeq/branches/cn187_devel/src/messagewindow.cpp showeq/branches/cn187_devel/src/seqlistview.h showeq/branches/cn187_devel/src/seqwindow.h Modified: showeq/branches/cn187_devel/src/messagewindow.cpp =================================================================== --- showeq/branches/cn187_devel/src/messagewindow.cpp 2022-11-27 06:29:04 UTC (rev 1295) +++ showeq/branches/cn187_devel/src/messagewindow.cpp 2022-11-27 16:02:47 UTC (rev 1296) @@ -166,7 +166,7 @@ { // perform a find in the message window, starting at the current position // using the settings from the checkboxes. - QTextDocument::FindFlags options = 0; + QTextDocument::FindFlags options; if (m_matchCase->isChecked()) options |= QTextDocument::FindCaseSensitively; if (m_wholeWords->isChecked()) options |= QTextDocument::FindWholeWords; if (m_findBackwards->isChecked()) options |= QTextDocument::FindBackward; Modified: showeq/branches/cn187_devel/src/seqlistview.h =================================================================== --- showeq/branches/cn187_devel/src/seqlistview.h 2022-11-27 06:29:04 UTC (rev 1295) +++ showeq/branches/cn187_devel/src/seqlistview.h 2022-11-27 16:02:47 UTC (rev 1296) @@ -45,7 +45,7 @@ SEQListView(const QString prefName, QWidget* parent = 0, const char* name = 0, - Qt::WindowFlags f = 0); + Qt::WindowFlags f = Qt::Widget); ~SEQListView(); const QString& preferenceName() const { return m_preferenceName; } Modified: showeq/branches/cn187_devel/src/seqwindow.h =================================================================== --- showeq/branches/cn187_devel/src/seqwindow.h 2022-11-27 06:29:04 UTC (rev 1295) +++ showeq/branches/cn187_devel/src/seqwindow.h 2022-11-27 16:02:47 UTC (rev 1296) @@ -43,7 +43,7 @@ public: SEQWindow(const QString prefName, const QString caption, - QWidget* parent = 0, const char* name = 0, Qt::WindowFlags f = 0); + QWidget* parent = 0, const char* name = 0, Qt::WindowFlags f = Qt::Widget); ~SEQWindow(); virtual QMenu* menu(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-27 06:29:06
|
Revision: 1295 http://sourceforge.net/p/seq/svn/1295 Author: cn187 Date: 2022-11-27 06:29:04 +0000 (Sun, 27 Nov 2022) Log Message: ----------- Adjust fillSpawnStruct to handle variable-length aura sections Modified Paths: -------------- showeq/branches/cn187_devel/src/spawnshell.cpp Modified: showeq/branches/cn187_devel/src/spawnshell.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnshell.cpp 2022-11-27 06:18:00 UTC (rev 1294) +++ showeq/branches/cn187_devel/src/spawnshell.cpp 2022-11-27 06:29:04 UTC (rev 1295) @@ -697,7 +697,14 @@ netStream.readText(); // skip 3 variable len strings netStream.readText(); netStream.readText(); - netStream.skipBytes(58); // and 58 static bytes + netStream.skipBytes(50); // and 50 static bytes + + //the next byte indicates how many DWORDs to skip, and + //includes the DWORD that the byte is part of + uint8_t skip = netStream.readUInt8(); + netStream.skipBytes(3); //to complete DWORD + --skip; //we just skipped the first dword + netStream.skipBytes(skip * sizeof(uint32_t)); } spawn->charProperties = netStream.readUInt8(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cn...@us...> - 2022-11-27 06:18:03
|
Revision: 1294 http://sourceforge.net/p/seq/svn/1294 Author: cn187 Date: 2022-11-27 06:18:00 +0000 (Sun, 27 Nov 2022) Log Message: ----------- Fix Qt deprecation warnings about QString::sprintf Modified Paths: -------------- showeq/branches/cn187_devel/src/bazaarlog.cpp showeq/branches/cn187_devel/src/category.cpp showeq/branches/cn187_devel/src/combatlog.cpp showeq/branches/cn187_devel/src/editor.cpp showeq/branches/cn187_devel/src/eqstr.cpp showeq/branches/cn187_devel/src/interface.cpp showeq/branches/cn187_devel/src/map.cpp showeq/branches/cn187_devel/src/mapicon.cpp showeq/branches/cn187_devel/src/messageshell.cpp showeq/branches/cn187_devel/src/netdiag.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/seqlistview.cpp showeq/branches/cn187_devel/src/skilllist.cpp showeq/branches/cn187_devel/src/spawn.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/spawnmonitor.cpp showeq/branches/cn187_devel/src/spawnpointlist.cpp showeq/branches/cn187_devel/src/spellshell.cpp showeq/branches/cn187_devel/src/statlist.cpp showeq/branches/cn187_devel/src/util.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 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/bazaarlog.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -76,10 +76,17 @@ if (merchant) 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", + int(time(NULL)),resp.price,resp.count, + merchant_name, name); + m_out << csv << ENDL; +#else csv.sprintf("1^%d^%d^%d^%s^%s", int(time(NULL)),resp.price,resp.count, merchant_name, name); m_out << csv << ENDL; +#endif } flush(); Modified: showeq/branches/cn187_devel/src/category.cpp =================================================================== --- showeq/branches/cn187_devel/src/category.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/category.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -337,7 +337,11 @@ QString tempStr; for(i = 1; i <= tMaxNumCategories; i++) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + prefBaseName.asprintf("Category%d_", i); +#else prefBaseName.sprintf("Category%d_", i); +#endif // attempt to pull a button title from the preferences tempStr = prefBaseName + "Name"; @@ -386,7 +390,11 @@ if (!curCategory) break; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + prefBaseName.asprintf("Category%d_", count++); +#else prefBaseName.sprintf("Category%d_", count++); +#endif pSEQPrefs->setPrefString(prefBaseName + "Name", section, curCategory->name()); pSEQPrefs->setPrefString(prefBaseName + "Filter", section, @@ -400,7 +408,11 @@ QColor black("black"); while (count <= tMaxNumCategories) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + prefBaseName.asprintf("Category%d_", count++); +#else prefBaseName.sprintf("Category%d_", count++); +#endif pSEQPrefs->setPrefString(prefBaseName + "Name", section, ""); pSEQPrefs->setPrefString(prefBaseName + "Filter", section, ""); pSEQPrefs->setPrefString(prefBaseName + "FilterOut", section, ""); Modified: showeq/branches/cn187_devel/src/combatlog.cpp =================================================================== --- showeq/branches/cn187_devel/src/combatlog.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/combatlog.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -631,12 +631,20 @@ case 52: // Tiger Claw { // 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); +#else s_type.sprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType); +#endif break; } 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); +#else s_type.sprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell); +#endif break; } default: // Damage Shield? @@ -645,7 +653,11 @@ // 248 Flameshield of Ro? (45pt) (mage) // -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); +#else s_type.sprintf("Damage Shield: (%d)", iType); +#endif break; } } Modified: showeq/branches/cn187_devel/src/editor.cpp =================================================================== --- showeq/branches/cn187_devel/src/editor.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/editor.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -160,7 +160,11 @@ e->document()->setModified( false ); setWindowTitle( fileName ); QString s; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + s.asprintf( "Opened %s", fileName ); +#else s.sprintf( "Opened %s", fileName ); +#endif statusBar()->showMessage( s, 2000 ); } Modified: showeq/branches/cn187_devel/src/eqstr.cpp =================================================================== --- showeq/branches/cn187_devel/src/eqstr.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/eqstr.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -143,7 +143,11 @@ { uint32_t arg_len; unsigned char *cp; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf( "Unknown: %04x:", formatid); +#else tempStr.sprintf( "Unknown: %04x:", formatid); +#endif cp = (unsigned char *) arguments; while (cp < ((unsigned char *) &arguments[argsLen] - sizeof(uint32_t)*sizeof(unsigned char))) { arg_len = (cp[0] << 0) | (cp[1] << 8) | (cp[2] << 16) | (cp[3] << 24); Modified: showeq/branches/cn187_devel/src/interface.cpp =================================================================== --- showeq/branches/cn187_devel/src/interface.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/interface.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -3126,7 +3126,11 @@ { int i = winnum - mapCaptionBase; if (i) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + title.asprintf("Map %d", i); +#else title.sprintf("Map %d", i); +#endif else title = "Map"; @@ -3722,17 +3726,31 @@ if (spell) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + txt.asprintf("%.3d %.2d %.2d %#4.04x %02d\t%s", + i, ((i / 8) + 1), ((i % 8) + 1), + spellid, spell->level(playerClass), + spell->name().toLatin1().data()); +#else txt.sprintf("%.3d %.2d %.2d %#4.04x %02d\t%s", i, ((i / 8) + 1), ((i % 8) + 1), spellid, spell->level(playerClass), spell->name().toLatin1().data()); +#endif } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + txt.asprintf("%.3d %.2d %.2d %#4.04x \t%s", + i, ((i / 8) + 1), ((i % 8) + 1), + spellid, + spell_name(spellid).toLatin1().data()); +#else txt.sprintf("%.3d %.2d %.2d %#4.04x \t%s", i, ((i / 8) + 1), ((i % 8) + 1), spellid, spell_name(spellid).toLatin1().data()); +#endif } out << txt << ENDL; @@ -4679,7 +4697,11 @@ void EQInterface::levelChanged(uint8_t level) { QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("New Level: %u", level); +#else tempStr.sprintf("New Level: %u", level); +#endif if (m_stsbarStatus) m_stsbarStatus->setText(tempStr); } @@ -4704,7 +4726,11 @@ lastupdate = mTime(); QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("Mobs: %d", num); +#else tempStr.sprintf("Mobs: %d", num); +#endif m_stsbarSpawns->setText(tempStr); } @@ -4718,7 +4744,11 @@ lastupdate = mTime(); QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("Run Speed: %3.6f", speed); +#else tempStr.sprintf("Run Speed: %3.6f", speed); +#endif m_stsbarSpeed->setText(tempStr); } @@ -4752,9 +4782,17 @@ int delta = mTime() - m_packetStartTime; 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); +#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); +#else tempStr.sprintf("Pkt: %d", num); +#endif m_stsbarPkt->setText(tempStr); } @@ -4809,7 +4847,11 @@ emit newZoneName(shortZoneName); 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); +#else tempStr.sprintf("ZEM: %3.2f%%", percentZEM); +#endif if (m_stsbarZEM) m_stsbarZEM->setText(tempStr); } @@ -4821,7 +4863,11 @@ stsMessage(""); 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); +#else tempStr.sprintf("ZEM: %3.2f%%", percentZEM); +#endif if (m_stsbarZEM) m_stsbarZEM->setText(tempStr); } @@ -4832,7 +4878,11 @@ stsMessage("- Busy Zoning -"); 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); +#else tempStr.sprintf("ZEM: %3.2f%%", percentZEM); +#endif if (m_stsbarZEM) m_stsbarZEM->setText(tempStr); } @@ -4958,15 +5008,29 @@ // construct a message for the status message display 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", + item->id(), + item->name().toUtf8().data(), + spawn->level(), spawn->HP(), + spawn->maxHP()); +#else string.sprintf("%d: %s:%d (%d/%d) Pos:", // "%d/%d/%d (%d) %s %s Item:%s", item->id(), item->name().toUtf8().data(), spawn->level(), spawn->HP(), spawn->maxHP()); +#endif else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + string.asprintf("%d: %s: Pos:", // "%d/%d/%d (%d) %s %s Item:%s", + item->id(), + item->name().toUtf8().data()); +#else string.sprintf("%d: %s: Pos:", // "%d/%d/%d (%d) %s %s Item:%s", item->id(), item->name().toUtf8().data()); +#endif if (showeq_params->retarded_coords) string += QString::number(item->y()) + "/" @@ -5023,7 +5087,11 @@ void EQInterface::saveSelectedSpawnPath(void) { QString fileName; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + fileName.asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data()); +#else fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data()); +#endif QFileInfo fileInfo = m_dataLocationMgr->findWriteFile("maps", fileName, false); @@ -5041,7 +5109,11 @@ void EQInterface::saveSpawnPaths(void) { QString fileName; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + fileName.asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data()); +#else fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data()); +#endif QFileInfo fileInfo = m_dataLocationMgr->findWriteFile("maps", fileName, false); Modified: showeq/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -4217,19 +4217,37 @@ // show coords of upper left corner and lower right corner p.setPen( Qt::yellow ); QString ts; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + ts.asprintf( "(%d, %d)", + (int)(param.screenCenterX() * param.ratioX()), + (int)(param.screenCenterY() * param.ratioY())); +#else ts.sprintf( "(%d, %d)", (int)(param.screenCenterX() * param.ratioX()), (int)(param.screenCenterY() * param.ratioY())); +#endif p.drawText( 10, 8, ts ); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + ts.asprintf( "(%d, %d)", + (int)((param.screenCenterX() - param.screenLength().width()) * + param.ratioX()), + (int)((param.screenCenterY() - param.screenLength().height()) * + param.ratioY())); +#else ts.sprintf( "(%d, %d)", (int)((param.screenCenterX() - param.screenLength().width()) * param.ratioX()), (int)((param.screenCenterY() - param.screenLength().height()) * param.ratioY())); +#endif p.drawText( width() - 90, height() - 14, ts ); // show frame times +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + ts.asprintf( "%2.0ffps/%dms", fps, drawTime); +#else ts.sprintf( "%2.0ffps/%dms", fps, drawTime); +#endif p.drawText( this->width() - 60, 8, ts ); } @@ -4308,7 +4326,11 @@ long secs = sp->secsLeft(); if ( secs > 0 ) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + remaining.asprintf( "%2ld:%02ld", secs / 60, secs % 60 ); +#else remaining.sprintf( "%2ld:%02ld", secs / 60, secs % 60 ); +#endif else remaining = "now"; } @@ -4326,6 +4348,21 @@ spawned += dateTime.time().toString(); QString string; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + string.asprintf("SpawnPoint: %s\n" + "%.3s/Z: %5d/%5d/%5d\n" + "Last: %s\n" + "Spawned: %s\t Remaining: %s\t Count: %d", + 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().toLatin1().data(), + spawned.toLatin1().data(), + remaining.toLatin1().data(), + sp->count()); +#else string.sprintf("SpawnPoint: %s\n" "%.3s/Z: %5d/%5d/%5d\n" "Last: %s\n" @@ -4339,7 +4376,9 @@ spawned.toLatin1().data(), remaining.toLatin1().data(), sp->count()); +#endif + m_mapTip->setText( string ); QPoint popPoint = mapToGlobal(event->pos()); m_mapTip->popup(QPoint(popPoint.x() + 15, popPoint.y() + 15)); @@ -4359,7 +4398,11 @@ { QString guild; if (!spawn->guildTag().isEmpty()) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + guild.asprintf("<%s>", spawn->guildTag().toLatin1().data()); +#else guild.sprintf("<%s>", spawn->guildTag().toLatin1().data()); +#endif else if (spawn->guildID()) guild = QString::number(spawn->guildID()); else @@ -4387,6 +4430,21 @@ else lastName = ""; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + string.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(), + lastName.toUtf8().data(), + guild.toLatin1().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().toLatin1().data(), + spawn->classString().toLatin1().data()); +#else string.sprintf("%s %s%s\n" "Level: %2d\tHP: %s\t %.3s/Z: %5d/%5d/%5d\n" "Race: %s\t Class: %s", @@ -4400,6 +4458,7 @@ item->z(), spawn->raceString().toLatin1().data(), spawn->classString().toLatin1().data()); +#endif if (m_deityPvP) string += " Deity: " + spawn->deityName(); @@ -4412,6 +4471,18 @@ } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + string.asprintf("%s\n" + "%.3s/Z: %5d/%5d/%5d\n" + "Race: %s\t Class: %s", + item->transformedName().toUtf8().data(), + showeq_params->retarded_coords ? "Y/X" : "X/Y", + showeq_params->retarded_coords ? item->y() : item->x(), + showeq_params->retarded_coords ? item->x() : item->y(), + item->z(), + item->raceString().toLatin1().data(), + item->classString().toLatin1().data()); +#else string.sprintf("%s\n" "%.3s/Z: %5d/%5d/%5d\n" "Race: %s\t Class: %s", @@ -4422,7 +4493,9 @@ item->z(), item->raceString().toLatin1().data(), item->classString().toLatin1().data()); +#endif + if ((door) && (door->zonePoint() != 0xFFFFFFFF)) { const zonePointStruct* zp = m_zoneMgr->zonePoint(door->zonePoint()); @@ -5177,7 +5250,11 @@ void MapFrame::mouseLocation(int16_t x, int16_t y) { QString cursorPos; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + cursorPos.asprintf(" %+5hd, %+5hd", y, x); +#else cursorPos.sprintf(" %+5hd, %+5hd", y, x); +#endif m_mouseLocation->setText(cursorPos); } @@ -5185,7 +5262,11 @@ int16_t Dx, int16_t Dy, int16_t Dz, int32_t degrees) { QString playerPos; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + playerPos.asprintf(" %+5hd, %+5hd, %+5hd", y, x, z); +#else playerPos.sprintf(" %+5hd, %+5hd, %+5hd", y, x, z); +#endif m_playerLocation->setText(playerPos); } Modified: showeq/branches/cn187_devel/src/mapicon.cpp =================================================================== --- showeq/branches/cn187_devel/src/mapicon.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/mapicon.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -1112,9 +1112,15 @@ { QString spawnNameText; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + spawnNameText.asprintf("%2d: %s", + spawn->level(), + spawn->name().toLatin1().data()); +#else spawnNameText.sprintf("%2d: %s", spawn->level(), spawn->name().toLatin1().data()); +#endif QFontMetrics fm(param.font()); int width = fm.width(spawnNameText); @@ -1226,10 +1232,17 @@ { QString spawnNameText; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + spawnNameText.asprintf("sp:%s %s (%d)", + sp->name().toLatin1().data(), + sp->last().toLatin1().data(), + sp->count()); +#else spawnNameText.sprintf("sp:%s %s (%d)", sp->name().toLatin1().data(), sp->last().toLatin1().data(), sp->count()); +#endif QFontMetrics fm(param.font()); int width = fm.width(spawnNameText); Modified: showeq/branches/cn187_devel/src/messageshell.cpp =================================================================== --- showeq/branches/cn187_devel/src/messageshell.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/messageshell.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -106,6 +106,14 @@ { if ((cmsg->target[0] != 0) && target) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf( "'%s' -> '%s' - %s {%s}", + cmsg->sender, + cmsg->target, + cmsg->message, + language_name(cmsg->language).toLatin1().data() + ); +#else tempStr.sprintf( "'%s' -> '%s' - %s {%s}", cmsg->sender, cmsg->target, @@ -112,14 +120,23 @@ cmsg->message, language_name(cmsg->language).toLatin1().data() ); +#endif } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf( "'%s' - %s {%s}", + cmsg->sender, + cmsg->message, + language_name(cmsg->language).toLatin1().data() + ); +#else tempStr.sprintf( "'%s' - %s {%s}", cmsg->sender, cmsg->message, language_name(cmsg->language).toLatin1().data() ); +#endif } } else // Don't show common, its obvious @@ -126,18 +143,33 @@ { if ((cmsg->target[0] != 0) && target) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf( "'%s' -> '%s' - %s", + cmsg->sender, + cmsg->target, + cmsg->message + ); +#else tempStr.sprintf( "'%s' -> '%s' - %s", cmsg->sender, cmsg->target, cmsg->message ); +#endif } else { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf( "'%s' - %s", + cmsg->sender, + cmsg->message + ); +#else tempStr.sprintf( "'%s' - %s", cmsg->sender, cmsg->message ); +#endif } } @@ -352,9 +384,15 @@ const randomReqStruct* randr = (const randomReqStruct*)data; QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("Request random number between %d and %d", + randr->bottom, + randr->top); +#else tempStr.sprintf("Request random number between %d and %d", randr->bottom, randr->top); + #endif m_messages->addMessage(MT_Random, tempStr); } @@ -364,11 +402,19 @@ const randomStruct* randr = (const randomStruct*)data; QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("Random number %d rolled between %d and %d by %s", + randr->result, + randr->bottom, + randr->top, + randr->name); +#else tempStr.sprintf("Random number %d rolled between %d and %d by %s", randr->result, randr->bottom, randr->top, randr->name); +#endif m_messages->addMessage(MT_Random, tempStr); } @@ -390,7 +436,11 @@ { 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]); +#else tempStr.sprintf("He has %s (icn:%i)", inspt->itemNames[inp], inspt->icons[inp]); +#endif m_messages->addMessage(MT_Inspect, tempStr); } } @@ -397,7 +447,11 @@ if (strnlen(inspt->mytext, 200) > 0) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("His info: %s", inspt->mytext); +#else tempStr.sprintf("His info: %s", inspt->mytext); +#endif m_messages->addMessage(MT_Inspect, tempStr); } } @@ -528,11 +582,19 @@ default: { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf( "Unknown Spell Event ( %s ) - '", + client ? + "Client --> Server" : + "Server --> Client" + ); +#else tempStr.sprintf( "Unknown Spell Event ( %s ) - '", client ? "Client --> Server" : "Server --> Client" ); +#endif break; } } @@ -549,10 +611,17 @@ spellName = spell_name(mem->spellId); if (mem->param1 != 4) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("%s%s', slot %d.", + tempStr.toLatin1().data(), + spellName.toLatin1().data(), + mem->slotId); +#else tempStr.sprintf("%s%s', slot %d.", tempStr.toLatin1().data(), spellName.toLatin1().data(), mem->slotId); +#endif else { @@ -584,7 +653,11 @@ tempStr = item->name(); if (tempStr == "" || tempStr.isEmpty()) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("UNKNOWN (ID: %d)", bcast->spawnId); +#else tempStr.sprintf("UNKNOWN (ID: %d)", bcast->spawnId); +#endif tempStr += " has begun casting '"; } @@ -598,10 +671,17 @@ else 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.toLatin1().data(), + spellName.toLatin1().data(), casttime, + casttime == 1 ? "" : "s"); +#else tempStr.sprintf( "%s%s' - Casting time is %g Second%s", tempStr.toLatin1().data(), spellName.toLatin1().data(), casttime, casttime == 1 ? "" : "s"); +#endif m_messages->addMessage(MT_Spell, tempStr); } @@ -613,7 +693,11 @@ if (strlen(sf->message) > 0) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf( "Faded: %s", sf->message); +#else tempStr.sprintf( "Faded: %s", sf->message); +#endif m_messages->addMessage(MT_Spell, tempStr); } @@ -626,11 +710,21 @@ QString tempStr; if (item != NULL) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("%s(%d): %s", + item->name().toLatin1().data(), icast->spawnId, icast->message); +#else tempStr.sprintf("%s(%d): %s", item->name().toLatin1().data(), icast->spawnId, icast->message); +#endif else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("spawn(%d): %s", + icast->spawnId, icast->message); +#else tempStr.sprintf("spawn(%d): %s", icast->spawnId, icast->message); +#endif m_messages->addMessage(MT_Spell, tempStr); } @@ -657,9 +751,15 @@ QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("You begin casting %s. Current Target is %s(%d)", + spellName.toLatin1().data(), targetName.toLatin1().data(), + cast->targetId); +#else tempStr.sprintf("You begin casting %s. Current Target is %s(%d)", spellName.toLatin1().data(), targetName.toLatin1().data(), cast->targetId); +#endif m_messages->addMessage(MT_Spell, tempStr); } @@ -679,25 +779,52 @@ switch (gmem->action) { case GUA_Joined : +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf ("Update: %s has joined the group.", gmem->membername); +#else tempStr.sprintf ("Update: %s has joined the group.", gmem->membername); +#endif break; case GUA_Left : +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf ("Update: %s has left the group.", gmem->membername); +#else tempStr.sprintf ("Update: %s has left the group.", gmem->membername); +#endif break; case GUA_LastLeft : +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf ("Update: The group has been disbanded when %s left.", + gmem->membername); +#else tempStr.sprintf ("Update: The group has been disbanded when %s left.", gmem->membername); +#endif break; case GUA_MakeLeader : +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf ("Update: %s is now the leader of the group.", + gmem->membername); +#else tempStr.sprintf ("Update: %s is now the leader of the group.", gmem->membername); +#endif break; case GUA_Started : +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf ("Update: %s has formed the group.", gmem->membername); +#else tempStr.sprintf ("Update: %s has formed the group.", gmem->membername); +#endif break; default : +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf ("Update: Unknown Update action:%d - %s - %s)", + gmem->action, gmem->yourname, gmem->membername); +#else tempStr.sprintf ("Update: Unknown Update action:%d - %s - %s)", gmem->action, gmem->yourname, gmem->membername); +#endif } m_messages->addMessage(MT_Group, tempStr); @@ -709,9 +836,17 @@ QString tempStr; 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); +#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); +#else tempStr.sprintf("Invite: %s invites %s to join the group", gmem->inviter, gmem->invitee); +#endif m_messages->addMessage(MT_Group, tempStr); } @@ -723,16 +858,31 @@ switch(gmem->reason) { case 1: +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.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)", gmem->membername, gmem->yourname); +#endif break; case 3: +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("Invite: %s declines invite from %s", + gmem->membername, gmem->yourname); +#else tempStr.sprintf("Invite: %s declines invite from %s", gmem->membername, gmem->yourname); +#endif break; default: +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.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)", gmem->membername, gmem->yourname, gmem->reason); +#endif break; } m_messages->addMessage(MT_Group, tempStr); @@ -746,7 +896,11 @@ if(!strcmp(gFollow->invitee, m_player->name().toLatin1().data())) 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); +#else tempStr.sprintf("Follow: %s has joined the group", gFollow->invitee); +#endif m_messages->addMessage(MT_Group, tempStr); } @@ -755,7 +909,11 @@ const groupDisbandStruct* gmem = (const groupDisbandStruct*)data; QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf ("Disband: %s disbands from the group", gmem->membername); +#else tempStr.sprintf ("Disband: %s disbands from the group", gmem->membername); +#endif m_messages->addMessage(MT_Group, tempStr); } @@ -763,8 +921,13 @@ { 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", + gmem->membername); +#else tempStr.sprintf("Update: %s is now the leader of the group", gmem->membername); +#endif m_messages->addMessage(MT_Group, tempStr); } @@ -772,34 +935,71 @@ { QString message; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + message.asprintf("Name: '%s' Last: '%s'", + player->name, player->lastName); +#else message.sprintf("Name: '%s' Last: '%s'", player->name, player->lastName); +#endif m_messages->addMessage(MT_Player, message); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + message.asprintf("Level: %d", player->profile.level); +#else message.sprintf("Level: %d", player->profile.level); +#endif 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", + player->profile.platinum, player->profile.gold, + player->profile.silver, player->profile.copper); +#else message.sprintf("PlayerMoney: P=%d G=%d S=%d C=%d", player->profile.platinum, player->profile.gold, player->profile.silver, player->profile.copper); +#endif 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", + player->platinum_bank, player->gold_bank, + player->silver_bank, player->copper_bank); +#else message.sprintf("BankMoney: P=%d G=%d S=%d C=%d", player->platinum_bank, player->gold_bank, player->silver_bank, player->copper_bank); +#endif 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", + player->profile.platinum_cursor, player->profile.gold_cursor, + player->profile.silver_cursor, player->profile.copper_cursor); +#else message.sprintf("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); +#endif m_messages->addMessage(MT_Player, message); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + message.asprintf("SharedMoney: P=%d", + player->platinum_shared); +#else message.sprintf("SharedMoney: P=%d", player->platinum_shared); +#endif m_messages->addMessage(MT_Player, message); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + message.asprintf("DoN Crystals: Radiant=%d Ebon=%d", + player->currentRadCrystals, player->currentEbonCrystals); +#else message.sprintf("DoN Crystals: Radiant=%d Ebon=%d", player->currentRadCrystals, player->currentEbonCrystals); +#endif m_messages->addMessage(MT_Player, message); // charProfileStruct.exp hasn't been found @@ -845,9 +1045,17 @@ spellName = spell_name(player->profile.buffs[buffnumber].spellid); 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()); +#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.", +#else message.sprintf("You have buff %s duration left is %d in ticks.", +#endif spellName.toLatin1().data(), player->profile.buffs[buffnumber].duration); m_messages->addMessage(MT_Player, message); @@ -872,9 +1080,15 @@ { const skillIncStruct* skilli = (const skillIncStruct*)data; QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("Skill: %s has increased (%d)", + skill_name(skilli->skillId).toLatin1().data(), + skilli->value); +#else tempStr.sprintf("Skill: %s has increased (%d)", skill_name(skilli->skillId).toLatin1().data(), skilli->value); +#endif m_messages->addMessage(MT_Player, tempStr); } @@ -882,7 +1096,11 @@ { const levelUpUpdateStruct *levelup = (const levelUpUpdateStruct *)data; QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("NewLevel: %d", levelup->level); +#else tempStr.sprintf("NewLevel: %d", levelup->level); +#endif m_messages->addMessage(MT_Player, tempStr); } @@ -979,9 +1197,15 @@ uint32_t tickExpLevel) { 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", + totalExp, (totalExp - minExpLevel), totalTick, + (maxExpLevel - totalExp), tickExpLevel); +#else tempStr.sprintf("Exp: Set: %u total, with %u (%u/330) into level with %u left, where 1/330 = %u", totalExp, (totalExp - minExpLevel), totalTick, (maxExpLevel - totalExp), tickExpLevel); +#endif m_messages->addMessage(MT_Player, tempStr); } @@ -1000,14 +1224,26 @@ // calculate the number of this type of kill needed to level. 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]", + newExp, (totalExp - minExpLevel), totalTick, + leftExp, needKills); +#else tempStr.sprintf("Exp: New: %u, %u (%u/330) into level with %u left [~%u kills]", newExp, (totalExp - minExpLevel), totalTick, leftExp, needKills); +#endif } else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("Exp: New: < %u, %u (%u/330) into level with %u left", + tickExpLevel, (totalExp - minExpLevel), totalTick, + leftExp); +#else tempStr.sprintf("Exp: New: < %u, %u (%u/330) into level with %u left", tickExpLevel, (totalExp - minExpLevel), totalTick, leftExp); +#endif m_messages->addMessage(MT_Player, tempStr); } @@ -1017,8 +1253,13 @@ uint32_t aaPoints) { QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("ExpAA: Set: %u total, with %u aapoints", + totalExp, aaPoints); +#else tempStr.sprintf("ExpAA: Set: %u total, with %u aapoints", totalExp, aaPoints); +#endif m_messages->addMessage(MT_Player, tempStr); } @@ -1033,11 +1274,21 @@ // only can display certain things if new experience is greater then 0, // 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", + newExp, totalExp, totalTick, maxExp - totalExp); +#else tempStr.sprintf("ExpAA: %u, %u (%u/330) with %u left", newExp, totalExp, totalTick, maxExp - totalExp); +#endif else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.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", tickExp, totalExp, totalTick, maxExp - totalExp); +#endif m_messages->addMessage(MT_Player, tempStr); } @@ -1109,8 +1360,13 @@ // 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", + spawn->level(), spawn->HP(), spawn->maxHP()); +#else spawnInfo.sprintf(" LVL %d, HP %d/%d", spawn->level(), spawn->HP(), spawn->maxHP()); +#endif // use appropriate format depending on coordinate ordering if (!showeq_params->retarded_coords) Modified: showeq/branches/cn187_devel/src/netdiag.cpp =================================================================== --- showeq/branches/cn187_devel/src/netdiag.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/netdiag.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -219,7 +219,11 @@ void NetDiag::seqReceive(int seq, int stream) { QString disp; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + disp.asprintf("%4.4x", seq); +#else disp.sprintf("%4.4x", seq); +#endif m_seqCur[stream]->setText(disp); } @@ -226,7 +230,11 @@ void NetDiag::seqExpect(int seq, int stream) { QString disp; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + disp.asprintf("%4.4x", seq); +#else disp.sprintf("%4.4x", seq); +#endif m_seqExp[stream]->setText(disp); } @@ -241,8 +249,13 @@ switch (sessionState) { case 2: +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tmp.asprintf(":%d", + m_packet->clientPort()); +#else tmp.sprintf(":%d", m_packet->clientPort()); +#endif disp += tmp; break; case 1: @@ -260,7 +273,11 @@ uint32_t addr = m_packet->clientAddr(); disp = print_addr(addr); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tmp.asprintf(":%d", clientPort); +#else tmp.sprintf(":%d", clientPort); +#endif disp += tmp; @@ -327,10 +344,19 @@ m_packetRecent[stream]->setText(QString::number(num)); int delta = mTime() - m_packetStartTime[stream]; if (numdelta && delta) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("%2.1f", + (float) (numdelta<<10) / (float) delta); +#else tempStr.sprintf("%2.1f", (float) (numdelta<<10) / (float) delta); +#endif else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("0.0"); +#else tempStr.sprintf("0.0"); +#endif m_packetAvg[stream]->setText(tempStr); } @@ -352,6 +378,14 @@ #endif /* DEBUG_PACKET */ QString paddr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + paddr.asprintf ( "%d.%d.%d.%d", + addr & 0x000000ff, + (addr & 0x0000ff00) >> 8, + (addr & 0x00ff0000) >> 16, + (addr & 0xff000000) >> 24 + ); +#else paddr.sprintf ( "%d.%d.%d.%d", addr & 0x000000ff, (addr & 0x0000ff00) >> 8, @@ -358,6 +392,7 @@ (addr & 0x00ff0000) >> 16, (addr & 0xff000000) >> 24 ); +#endif return paddr; } Modified: showeq/branches/cn187_devel/src/packet.cpp =================================================================== --- showeq/branches/cn187_devel/src/packet.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/packet.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -817,11 +817,23 @@ QString string(""); if (speed == 0) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + string.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)"); +#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); +#else string.sprintf("Playback speed set to %d", speed); +#endif emit stsMessage(string, 5000); Modified: showeq/branches/cn187_devel/src/packetinfo.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetinfo.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/packetinfo.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -374,7 +374,11 @@ currentOPCode = oit->second; // output the current opcode +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + opcodeString.asprintf("%04x", currentOPCode->opcode()); +#else opcodeString.sprintf("%04x", currentOPCode->opcode()); +#endif out << indent << "<opcode id=\"" << opcodeString << "\" name=\"" << currentOPCode->name() << "\""; if (currentOPCode->implicitLen()) Modified: showeq/branches/cn187_devel/src/packetlog.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetlog.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/packetlog.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -54,7 +54,11 @@ inline QString opCodeToString(uint16_t opCode) { QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("[OPCode: %#.04x]", opCode); +#else tempStr.sprintf("[OPCode: %#.04x]", opCode); +#endif // Flags are gone? Combined and implicit don't make sense anymore and // nothing is compressed or encrypted at this point... @@ -87,11 +91,19 @@ if (addr == m_packet.clientAddr()) paddr = "client"; else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + paddr.asprintf( "%d.%d.%d.%d", + addr & 0x000000ff, + (addr & 0x0000ff00) >> 8, + (addr & 0x00ff0000) >> 16, + (addr & 0xff000000) >> 24); +#else paddr.sprintf( "%d.%d.%d.%d", addr & 0x000000ff, (addr & 0x0000ff00) >> 8, (addr & 0x00ff0000) >> 16, (addr & 0xff000000) >> 24); +#endif return paddr; } Modified: showeq/branches/cn187_devel/src/packetstream.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetstream.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/packetstream.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -163,11 +163,19 @@ { // 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", + objectName().toLatin1().data(), opcodeName.toLatin1().data(), + payload->dir(), payload->typeName().toLatin1().data(), + payload->sizeCheckType()); +#else dispatchName.sprintf("PacketDispatch:%s:%s:%d:%s:%d", objectName().toLatin1().data(), opcodeName.toLatin1().data(), payload->dir(), payload->typeName().toLatin1().data(), payload->sizeCheckType()); +#endif + // create new dispatch object dispatch = new EQPacketDispatch(this, dispatchName.toLatin1().data()); @@ -463,9 +471,15 @@ if (!found && !opcodeEntry->isEmpty()) { QString tempStr; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("%s (%#04x) (dataLen: %lu) doesn't match:", + opcodeEntry->name().toLatin1().data(), + opcodeEntry->opcode(), len); +#else tempStr.sprintf("%s (%#04x) (dataLen: %lu) doesn't match:", opcodeEntry->name().toLatin1().data(), opcodeEntry->opcode(), len); +#endif pit.toFront(); while (pit.hasNext()) Modified: showeq/branches/cn187_devel/src/seqlistview.cpp =================================================================== --- showeq/branches/cn187_devel/src/seqlistview.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/seqlistview.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -146,10 +146,18 @@ // save the column order QString tempStr, tempStr2; if (header()->count() > 0) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr.asprintf("%d", header()->logicalIndex(0)); +#else tempStr.sprintf("%d", header()->logicalIndex(0)); +#endif for(i=1; i < header()->count(); i++) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tempStr2.asprintf(":%d", header()->logicalIndex(i)); +#else tempStr2.sprintf(":%d", header()->logicalIndex(i)); +#endif tempStr += tempStr2; } pSEQPrefs->setPrefString("ColumnOrder", preferenceName(), tempStr); Modified: showeq/branches/cn187_devel/src/skilllist.cpp =================================================================== --- showeq/branches/cn187_devel/src/skilllist.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/skilllist.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -109,7 +109,11 @@ #endif QString str; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + str.asprintf("%3d", value); +#else str.sprintf("%3d", value); +#endif /* If the skill is not added yet, look up the correct skill namd and add it * to the list @@ -137,7 +141,11 @@ QString str; /* Update skill value with new value */ +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + str.asprintf ("%3d", value); +#else str.sprintf ("%3d", value); +#endif // create skill entry if needed or set the value of the existing item if (!m_skillList[skillId]) @@ -186,7 +194,11 @@ if (value == 00) str = " NA"; else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + str.asprintf ("%3d", value); +#else str.sprintf ("%3d", value); +#endif // If the language is not added yet, look up the correct skill namd and // add it to the list @@ -218,7 +230,11 @@ QString str; /* Update skill value with new value */ +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + str.asprintf ("%3d", value); +#else str.sprintf ("%3d", value); +#endif // create language entry if needed or set the value of the existing item if (!m_languageList[langId]) Modified: showeq/branches/cn187_devel/src/spawn.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawn.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/spawn.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -187,7 +187,11 @@ else { QString item_str; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + item_str.asprintf("U%04x", item); +#else item_str.sprintf("U%04x", item); +#endif return item_str; } } @@ -248,11 +252,19 @@ QString Item::filterString() const { 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", + transformedName().toUtf8().data(), + raceString().toUtf8().data(), + classString().toUtf8().data(), + NPC(), x(), y(), z()); +#else buff.sprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d", transformedName().toUtf8().data(), raceString().toUtf8().data(), classString().toUtf8().data(), NPC(), x(), y(), z()); +#endif return buff; } @@ -898,6 +910,25 @@ QString name = transformedName(); 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:" + "Light:%s:Deity:%s:RTeam:%d:DTeam:%d:Type:%s:LastName:%s:Guild:%s:Spawn:%s:", + name.toUtf8().data(), + level(), + raceString().toUtf8().data(), + classString().toUtf8().data(), + ((NPC() == 10) ? 0 : NPC()), + x(), y(), z(), + lightName().toUtf8().data(), + deityName().toUtf8().data(), + raceTeam(), + deityTeam(), + typeString().toUtf8().data(), + lastName().toUtf8().data(), + guildTag().toUtf8().data(), + spawnTimeStr ().replace (":", ".").toUtf8 ().data () + ); +#else buff.sprintf("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(), @@ -915,6 +946,7 @@ guildTag().toUtf8().data(), spawnTimeStr ().replace (":", ".").toUtf8 ().data () ); +#endif if (gm()) buff += QString("GM:") + QString::number(gm()) + ":"; @@ -1072,7 +1104,11 @@ (int16_t)(d->y), (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); +#else m_name.sprintf("Door: %s (%d) ", d->name, d->doorId); +#endif setZonePoint(d->zonePoint); updateLast(); } Modified: showeq/branches/cn187_devel/src/spawnlist.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlist.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/spawnlist.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -160,7 +160,11 @@ if (litem->type() != tUnknown) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", litem->item()->calcDist2DInt(x, y)); +#else buff.sprintf("%5d", litem->item()->calcDist2DInt(x, y)); +#endif litem->setText(tSpawnColDist, buff); } ++it; @@ -174,7 +178,11 @@ litem = (SpawnListItem*)*it; if (litem->type() != tUnknown) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5.1f", litem->item()->calcDist(x, y, z)); +#else buff.sprintf("%5.1f", litem->item()->calcDist(x, y, z)); +#endif litem->setText(tSpawnColDist, buff); } ++it; Modified: showeq/branches/cn187_devel/src/spawnlist2.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlist2.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/spawnlist2.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -565,7 +565,11 @@ if (litem->type() != tUnknown) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", litem->item()->calcDist2DInt(x, y)); +#else buff.sprintf("%5d", litem->item()->calcDist2DInt(x, y)); +#endif litem->setText(tSpawnColDist, buff); } @@ -583,7 +587,11 @@ if (litem->type() != tUnknown) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5.1f", litem->item()->calcDist(x, y, z)); +#else buff.sprintf("%5.1f", litem->item()->calcDist(x, y, z)); +#endif litem->setText(tSpawnColDist, buff); } Modified: showeq/branches/cn187_devel/src/spawnlistcommon.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -190,7 +190,11 @@ if (changeType & tSpawnChangedLevel) { // Level +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%2d", spawn->level()); +#else buff.sprintf("%2d", spawn->level()); +#endif setText(tSpawnColLevel, buff); } @@ -197,11 +201,19 @@ if (changeType & tSpawnChangedHP) { // Hitpoints +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", spawn->HP()); +#else buff.sprintf("%5d", spawn->HP()); +#endif setText(tSpawnColHP, buff); // Maximum Hitpoints +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", spawn->maxHP()); +#else buff.sprintf("%5d", spawn->maxHP()); +#endif setText(tSpawnColMaxHP, buff); } @@ -228,17 +240,31 @@ if (changeType & tSpawnChangedPosition) { // X position +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", showeq_params->retarded_coords ? + (int)item()->y() : (int)item()->x()); +#else buff.sprintf("%5d", showeq_params->retarded_coords ? (int)item()->y() : (int)item()->x()); +#endif setText(tSpawnColXPos, buff); // Y position +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", showeq_params->retarded_coords ? + (int)item()->x() : (int)item()->y()); +#else buff.sprintf("%5d", showeq_params->retarded_coords ? (int)item()->x() : (int)item()->y()); +#endif setText(tSpawnColYPos, buff); // Z position +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", item()->z()); +#else buff.sprintf("%5d", item()->z()); +#endif setText(tSpawnColZPos, buff); // Distance @@ -245,12 +271,20 @@ if (!showeq_params->fast_machine) { //buff.sprintf("%5d", player->calcDist2DInt(*item())); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", item()->getIDistanceToPlayer()); +#else buff.sprintf("%5d", item()->getIDistanceToPlayer()); +#endif } else { //buff.sprintf("%5.1f", player->calcDist(*item())); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5.1f", item()->getFDistanceToPlayer()); +#else buff.sprintf("%5.1f", item()->getFDistanceToPlayer()); +#endif } setText(tSpawnColDist, buff); } @@ -258,7 +292,11 @@ if (changeType == tSpawnChangedALL) { // Id +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buff.asprintf("%5d", item()->id()); +#else buff.sprintf("%5d", item()->id()); +#endif setText(tSpawnColID, buff); // Race @@ -286,8 +324,14 @@ { // update childcount in header QString temp; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + temp.asprintf("%s (%d)", + name.toLatin1().data(), childCount()); +#else temp.sprintf("%s (%d)", name.toLatin1().data(), childCount()); +#endif + setText(tSpawnColName, temp); } // end if spawn should be in this category Modified: showeq/branches/cn187_devel/src/spawnmonitor.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnmonitor.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/spawnmonitor.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -56,7 +56,11 @@ QString SpawnPoint::key( int x, int y, int z) { QString t; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + t.asprintf( "%d%d%d", x, y, z ); +#else t.sprintf( "%d%d%d", x, y, z ); +#endif return t; } Modified: showeq/branches/cn187_devel/src/spawnpointlist.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnpointlist.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/spawnpointlist.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -76,7 +76,11 @@ long secs = m_spawnPoint->secsLeft(); if ( secs > 0 ) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + tmpStr.asprintf( "%2ld:%02ld", secs / 60, secs % 60 ); +#else tmpStr.sprintf( "%2ld:%02ld", secs / 60, secs % 60 ); +#endif else tmpStr = " now"; // spaces followed by now } @@ -343,8 +347,13 @@ if (def.isEmpty()) def = sp->last(); +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + def.asprintf("%d/%d/%d '%s'", + sp->x(), sp->y(), sp->z(), def.toLatin1().data()); +#else def.sprintf("%d/%d/%d '%s'", sp->x(), sp->y(), sp->z(), def.toLatin1().data()); +#endif // confirm that the user wants to delete the category QMessageBox mb("Are you sure?", Modified: showeq/branches/cn187_devel/src/spellshell.cpp =================================================================== --- showeq/branches/cn187_devel/src/spellshell.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/spellshell.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -76,7 +76,11 @@ int h = d / 3600; d %= 3600; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + text.asprintf("%02d:%02d:%02d", h, d / 60, d % 60); +#else text.sprintf("%02d:%02d:%02d", h, d / 60, d % 60); +#endif return text; } Modified: showeq/branches/cn187_devel/src/statlist.cpp =================================================================== --- showeq/branches/cn187_devel/src/statlist.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/statlist.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -57,7 +57,11 @@ QString statPrefName; for (int nloop = 0; nloop < LIST_MAXLIST; nloop++) { +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + statPrefName.asprintf("show%s", statNames[nloop]); +#else statPrefName.sprintf("show%s", statNames[nloop]); +#endif m_showStat[nloop] = pSEQPrefs->getPrefBool(statPrefName, preferenceName(), false); updateStat(nloop); @@ -243,7 +247,11 @@ m_showStat[stat] = enabled; QString statPrefName; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + statPrefName.asprintf("show%s", statNames[stat]); +#else statPrefName.sprintf("show%s", statNames[stat]); +#endif pSEQPrefs->setPrefBool(statPrefName, "StatList", m_showStat[stat]); Modified: showeq/branches/cn187_devel/src/util.cpp =================================================================== --- showeq/branches/cn187_devel/src/util.cpp 2022-11-27 06:17:35 UTC (rev 1293) +++ showeq/branches/cn187_devel/src/util.cpp 2022-11-27 06:18:00 UTC (rev 1294) @@ -83,9 +83,17 @@ threeDigits = number % 1000L; if (oldstring.isEmpty()) +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buffer.asprintf("%u", threeDigits); +#else buffer.sprintf("%u", threeDigits); +#endif else +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + buffer.asprintf("%03u", threeDigits); +#else buffer.sprintf("%03u", threeDigits); +#endif if (oldstring.isEmpty()) newstring = buffer; @@ -339,7 +347,11 @@ else { QString mat_str; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + mat_str.asprintf("U%02x", material); +#else mat_str.sprintf("U%02x", material); +#endif return mat_str; } } @@ -420,7 +432,11 @@ } QString skill_name; +#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0)) + skill_name.asprintf("U0x%2.2x", skill); +#else skill_name.sprintf("U0x%2.2x", skill); +#endif return skill_name; } @@ -480,7 +496,11 @@ { 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 & (~ 0x0... [truncated message content] |
From: <cn...@us...> - 2022-11-27 06:17:46
|
Revision: 1293 http://sourceforge.net/p/seq/svn/1293 Author: cn187 Date: 2022-11-27 06:17:35 +0000 (Sun, 27 Nov 2022) Log Message: ----------- Fix Qt deprecation warnings about endl Modified Paths: -------------- showeq/branches/cn187_devel/src/bazaarlog.cpp showeq/branches/cn187_devel/src/filter.cpp showeq/branches/cn187_devel/src/group.cpp showeq/branches/cn187_devel/src/guild.cpp showeq/branches/cn187_devel/src/guildshell.cpp showeq/branches/cn187_devel/src/interface.cpp showeq/branches/cn187_devel/src/map.cpp showeq/branches/cn187_devel/src/mapicon.cpp showeq/branches/cn187_devel/src/messagewindow.cpp showeq/branches/cn187_devel/src/packetinfo.cpp showeq/branches/cn187_devel/src/packetlog.cpp showeq/branches/cn187_devel/src/sortitem.cpp showeq/branches/cn187_devel/src/spawnshell.cpp Modified: showeq/branches/cn187_devel/src/bazaarlog.cpp =================================================================== --- showeq/branches/cn187_devel/src/bazaarlog.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/bazaarlog.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/filter.cpp =================================================================== --- showeq/branches/cn187_devel/src/filter.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/filter.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/group.cpp =================================================================== --- showeq/branches/cn187_devel/src/group.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/group.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/guild.cpp =================================================================== --- showeq/branches/cn187_devel/src/guild.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/guild.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/guildshell.cpp =================================================================== --- showeq/branches/cn187_devel/src/guildshell.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/guildshell.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/interface.cpp =================================================================== --- showeq/branches/cn187_devel/src/interface.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/interface.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/mapicon.cpp =================================================================== --- showeq/branches/cn187_devel/src/mapicon.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/mapicon.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/messagewindow.cpp =================================================================== --- showeq/branches/cn187_devel/src/messagewindow.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/messagewindow.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/packetinfo.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetinfo.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/packetinfo.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/packetlog.cpp =================================================================== --- showeq/branches/cn187_devel/src/packetlog.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/packetlog.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/sortitem.cpp =================================================================== --- showeq/branches/cn187_devel/src/sortitem.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/sortitem.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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/branches/cn187_devel/src/spawnshell.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnshell.cpp 2022-11-27 06:17:27 UTC (rev 1292) +++ showeq/branches/cn187_devel/src/spawnshell.cpp 2022-11-27 06:17:35 UTC (rev 1293) @@ -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. |
From: <cn...@us...> - 2022-11-27 06:17:29
|
Revision: 1292 http://sourceforge.net/p/seq/svn/1292 Author: cn187 Date: 2022-11-27 06:17:27 +0000 (Sun, 27 Nov 2022) Log Message: ----------- Fix Qt deprecation warnings about QString::null Modified Paths: -------------- showeq/branches/cn187_devel/src/combatlog.cpp showeq/branches/cn187_devel/src/experiencelog.cpp showeq/branches/cn187_devel/src/map.cpp showeq/branches/cn187_devel/src/messagefilterdialog.cpp showeq/branches/cn187_devel/src/spawnmonitor.cpp showeq/branches/cn187_devel/src/xmlpreferences.h Modified: showeq/branches/cn187_devel/src/combatlog.cpp =================================================================== --- showeq/branches/cn187_devel/src/combatlog.cpp 2022-11-25 18:59:37 UTC (rev 1291) +++ showeq/branches/cn187_devel/src/combatlog.cpp 2022-11-27 06:17:27 UTC (rev 1292) @@ -1062,7 +1062,7 @@ switch( QMessageBox::information( this, "ShowEQ", "This function will clear all data listed on the mob " "tab. Do you want to continue?", - "&OK", "&Cancel", QString::null, 1, 1 ) ) + "&OK", "&Cancel", "", 1, 1 ) ) { case 0: qDeleteAll(m_combat_mob_list); @@ -1079,7 +1079,7 @@ switch( QMessageBox::information( this, "ShowEQ", "This function will clear all data listed on the offense " "tab. Do you want to continue?", - "&OK", "&Cancel", QString::null, 1, 1 ) ) + "&OK", "&Cancel", "", 1, 1 ) ) { case 0: qDeleteAll(m_combat_offense_list); Modified: showeq/branches/cn187_devel/src/experiencelog.cpp =================================================================== --- showeq/branches/cn187_devel/src/experiencelog.cpp 2022-11-25 18:59:37 UTC (rev 1291) +++ showeq/branches/cn187_devel/src/experiencelog.cpp 2022-11-27 06:17:27 UTC (rev 1292) @@ -664,7 +664,7 @@ if (QMessageBox::information( this, "ShowEQ", "This function will clear all data listed in the experience " "log. Do you want to continue?", - "&OK", "&Cancel", QString::null, 1, 1) == 0) + "&OK", "&Cancel", "", 1, 1) == 0) { clear(); } Modified: showeq/branches/cn187_devel/src/map.cpp =================================================================== --- showeq/branches/cn187_devel/src/map.cpp 2022-11-25 18:59:37 UTC (rev 1291) +++ showeq/branches/cn187_devel/src/map.cpp 2022-11-27 06:17:27 UTC (rev 1292) @@ -667,7 +667,7 @@ QString name = QInputDialog::getText(parent, "Location Name", "Please enter a location name", QLineEdit::Normal, - QString::null, &ok); + "", &ok); // if the user clicked ok, and actually gave a name, add it if (ok && !name.isEmpty()) Modified: showeq/branches/cn187_devel/src/messagefilterdialog.cpp =================================================================== --- showeq/branches/cn187_devel/src/messagefilterdialog.cpp 2022-11-25 18:59:37 UTC (rev 1291) +++ showeq/branches/cn187_devel/src/messagefilterdialog.cpp 2022-11-27 06:17:27 UTC (rev 1292) @@ -46,7 +46,7 @@ { public: MessageFilterListBoxText(QListWidget * listbox, - const QString & text = QString::null, + const QString & text = "", uint32_t data = 0); virtual ~MessageFilterListBoxText(); Modified: showeq/branches/cn187_devel/src/spawnmonitor.cpp =================================================================== --- showeq/branches/cn187_devel/src/spawnmonitor.cpp 2022-11-25 18:59:37 UTC (rev 1291) +++ showeq/branches/cn187_devel/src/spawnmonitor.cpp 2022-11-27 06:17:27 UTC (rev 1292) @@ -44,7 +44,7 @@ m_diffTime(diffTime), m_count(count), m_name( name ), - m_last( QString::null ), + m_last( "" ), m_lastID(spawnID) { } Modified: showeq/branches/cn187_devel/src/xmlpreferences.h =================================================================== --- showeq/branches/cn187_devel/src/xmlpreferences.h 2022-11-25 18:59:37 UTC (rev 1291) +++ showeq/branches/cn187_devel/src/xmlpreferences.h 2022-11-27 06:17:27 UTC (rev 1292) @@ -104,7 +104,7 @@ // getPref{} methods retrieve the current value of a preference QString getPrefString(const QString& inName, const QString& inSection, - const QString& outDefault = QString::null, + const QString& outDefault = "", Persistence pers = Any); int getPrefInt(const QString& inName, const QString& inSection, int def = -1, Persistence pers = Any); @@ -153,7 +153,7 @@ // setPref{} methods set the current value of a preference void setPrefString(const QString& inName, const QString& inSection, - const QString& inValue = QString::null, + const QString& inValue = "", Persistence pers = User); void setPrefInt(const QString& inName, const QString& inSection, int inValue, Persistence pers = User); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: cn187 <cn...@us...> - 2022-11-25 19:43:19
|
Testing to see if it's possible to send to the commits mailing list. If it is, I'd like to configure the CI/CD pipeline to send some messages there. |
From: <cn...@us...> - 2022-11-25 18:59:39
|
Revision: 1291 http://sourceforge.net/p/seq/svn/1291 Author: cn187 Date: 2022-11-25 18:59:37 +0000 (Fri, 25 Nov 2022) Log Message: ----------- Remove default theme from seqdef.xml to accept system default Modified Paths: -------------- showeq/branches/cn187_devel/conf/seqdef.xml Modified: showeq/branches/cn187_devel/conf/seqdef.xml =================================================================== --- showeq/branches/cn187_devel/conf/seqdef.xml 2022-11-21 00:21:56 UTC (rev 1290) +++ showeq/branches/cn187_devel/conf/seqdef.xml 2022-11-25 18:59:37 UTC (rev 1291) @@ -2435,10 +2435,6 @@ <bool value="false" /> <comment>Display time in unix time (seconds since 1970)</comment> </property> - <property name="Theme" > - <int value="2" /> - <comment>0=Motif, 1=CDE, 2=Windows, 3=Platinum</comment> - </property> <property name="ShowMap" > <bool value="true" /> <comment>Display Map</comment> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2022-11-21 00:21:57
|
Revision: 1290 http://sourceforge.net/p/seq/svn/1290 Author: theblueadept Date: 2022-11-21 00:21:56 +0000 (Mon, 21 Nov 2022) Log Message: ----------- Tag for release 6.2.13 Added Paths: ----------- showeq/tags/v6_2_13/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <the...@us...> - 2022-11-21 00:21:15
|
Revision: 1289 http://sourceforge.net/p/seq/svn/1289 Author: theblueadept Date: 2022-11-21 00:21:13 +0000 (Mon, 21 Nov 2022) Log Message: ----------- Historical checkin for 11/20/22 - Fix for LDON objects (Newby) Version to 6.2.13 Modified Paths: -------------- showeq/trunk/ChangeLog showeq/trunk/configure.in showeq/trunk/src/spawnshell.cpp Modified: showeq/trunk/ChangeLog =================================================================== --- showeq/trunk/ChangeLog 2022-11-20 22:00:32 UTC (rev 1288) +++ showeq/trunk/ChangeLog 2022-11-21 00:21:13 UTC (rev 1289) @@ -1,3 +1,8 @@ +BlueAdept (11/20/22) +---------------- +- Update to version 6.2.13 +- Fix for LDON objects (Newby) + BlueAdept (11/17/22) ---------------- - Update to version 6.2.12 Modified: showeq/trunk/configure.in =================================================================== --- showeq/trunk/configure.in 2022-11-20 22:00:32 UTC (rev 1288) +++ showeq/trunk/configure.in 2022-11-21 00:21:13 UTC (rev 1289) @@ -2,7 +2,7 @@ dnl $Id$ $Name$ AC_PREREQ(2.59) -AC_INIT(showeq, 6.2.12) +AC_INIT(showeq, 6.2.13) AC_CONFIG_SRCDIR(src/main.cpp) AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_SYSTEM Modified: showeq/trunk/src/spawnshell.cpp =================================================================== --- showeq/trunk/src/spawnshell.cpp 2022-11-20 22:00:32 UTC (rev 1288) +++ showeq/trunk/src/spawnshell.cpp 2022-11-21 00:21:13 UTC (rev 1289) @@ -689,7 +689,7 @@ netStream.readText(); // skip 3 variable len strings netStream.readText(); netStream.readText(); - netStream.skipBytes(58); // and 58 static bytes + netStream.skipBytes(54); // and 54 static bytes } spawn->charProperties = netStream.readUInt8(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |