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
(2) |
Sep
(11) |
Oct
(6) |
Nov
(9) |
Dec
(4) |
| 2026 |
Jan
(5) |
Feb
(6) |
Mar
(3) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <cn...@us...> - 2023-03-15 21:11:43
|
Revision: 1365
http://sourceforge.net/p/seq/svn/1365
Author: cn187
Date: 2023-03-15 21:11:41 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Release 6.3.0
- Update to version 6.3.0
- Features:
- Map related
- Multilayer map support with automatic conversion
- Mouse scroll adjusts map zoom
- Other miscellaneous map fixes
- Interface related
- Themes are no longer forced by ShowEQ
- Support for using system-installed Qt themes, including dark themes
- Miscellaneous Qt5 fixes
- Reliability related
- Additional packet filtering to reduce session disconnects due to
random LAN traffic
- Session tracking is now enabled by default
- Support for EQ Patch 03/15/23
- Struct and opcode updates
Modified Paths:
--------------
showeq/trunk/ChangeLog
showeq/trunk/conf/zoneopcodes.xml
showeq/trunk/configure.in
showeq/trunk/src/everquest.h
Modified: showeq/trunk/ChangeLog
===================================================================
--- showeq/trunk/ChangeLog 2023-03-15 18:31:09 UTC (rev 1364)
+++ showeq/trunk/ChangeLog 2023-03-15 21:11:41 UTC (rev 1365)
@@ -1,3 +1,22 @@
+cn187 (03/15/23)
+----------------
+- Update to version 6.3.0
+ - Features:
+ - Map related
+ - Multilayer map support with automatic conversion
+ - Mouse scroll adjusts map zoom
+ - Other miscellaneous map fixes
+ - Interface related
+ - Themes are no longer forced by ShowEQ
+ - Support for using system-installed Qt themes, including dark themes
+ - Miscellaneous Qt5 fixes
+ - Reliability related
+ - Additional packet filtering to reduce session disconnects due to
+ random LAN traffic
+ - Session tracking is now enabled by default
+- Support for EQ Patch 03/15/23
+- Struct and opcode updates
+
cn187 (02/19/23)
- Update to version 6.2.18
- Support for EQ Patch 02/15/23
Modified: showeq/trunk/conf/zoneopcodes.xml
===================================================================
--- showeq/trunk/conf/zoneopcodes.xml 2023-03-15 18:31:09 UTC (rev 1364)
+++ showeq/trunk/conf/zoneopcodes.xml 2023-03-15 21:11:41 UTC (rev 1365)
@@ -3,127 +3,127 @@
<seqopcodes>
<!-- Critical opcodes used directly by ShowEQ -->
- <opcode id="473a" name="OP_PlayerProfile" updated="02/15/23">
+ <opcode id="00e1" name="OP_PlayerProfile" updated="03/15/23">
<comment>CharProfileCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="6d25" name="OP_ZoneEntry" updated="02/15/23">
+ <opcode id="3bea" name="OP_ZoneEntry" updated="03/15/23">
<comment>ZoneEntryCode</comment>
<payload dir="client" typename="ClientZoneEntryStruct" sizechecktype="match"/>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="732c" name="OP_TimeOfDay" updated="02/15/23">
+ <opcode id="3103" name="OP_TimeOfDay" updated="03/15/23">
<comment>TimeOfDayCode</comment>
<payload dir="server" typename="timeOfDayStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1548" name="OP_NewZone" updated="02/15/23">
+ <opcode id="5652" name="OP_NewZone" updated="03/15/23">
<comment>NewZoneCode</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="307e" name="OP_SpawnDoor" updated="02/15/23">
+ <opcode id="4a75" name="OP_SpawnDoor" updated="03/15/23">
<comment>DoorSpawnsCode</comment>
<payload dir="server" typename="doorStruct" sizechecktype="modulus"/>
</opcode>
- <opcode id="4e0c" name="OP_GroundSpawn" updated="02/15/23">
+ <opcode id="2ca5" name="OP_GroundSpawn" updated="03/15/23">
<comment>MakeDropCode</comment>
<payload dir="server" typename="makeDropStruct" sizechecktype="none"/>
<payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="5300" name="OP_SendZonePoints" updated="02/15/23">
+ <opcode id="71eb" name="OP_SendZonePoints" updated="03/15/23">
<comment>Coords in a zone that will port you to another zone</comment>
<payload dir="server" typename="zonePointsStruct" sizechecktype="none"/>
</opcode>
- <opcode id="c4d1" name="OP_AAExpUpdate" updated="02/15/23">
+ <opcode id="2df7" name="OP_AAExpUpdate" updated="03/15/23">
<comment>Receiving AA experience. Also when percent to AA changes.</comment>
<payload dir="server" typename="altExpUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="3e6f" name="OP_ExpUpdate" updated="12/08/22">
+ <opcode id="4ec9" name="OP_ExpUpdate" updated="03/15/23">
<comment>ExpUpdateCode</comment>
<payload dir="server" typename="expUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="4448" name="OP_GuildMOTD" updated="02/15/23">
+ <opcode id="6161" name="OP_GuildMOTD" updated="03/15/23">
<comment>GuildMOTD</comment>
<payload dir="server" typename="guildMOTDStruct" sizechecktype="none"/>
</opcode>
- <opcode id="58b3" name="OP_ClientUpdate" updated="02/15/23">
+ <opcode id="3ea0" name="OP_ClientUpdate" updated="03/15/23">
<comment>Position updates</comment>
<payload dir="server" typename="playerSpawnPosStruct" sizechecktype="match"/>
<payload dir="both" typename="playerSelfPosStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0077" name="OP_NpcMoveUpdate" updated="02/15/23">
+ <opcode id="72b4" name="OP_NpcMoveUpdate" updated="03/15/23">
<comment>Position updates</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="5a0c" name="OP_MobUpdate" updated="02/15/23">
+ <opcode id="1f22" name="OP_MobUpdate" updated="03/15/23">
<comment>MobUpdateCode</comment>
<payload dir="both" typename="spawnPositionUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="2c95" name="OP_DeleteSpawn" updated="02/15/23">
+ <opcode id="6a87" name="OP_DeleteSpawn" updated="03/15/23">
<comment>DeleteSpawnCode</comment>
<payload dir="both" typename="deleteSpawnStruct" sizechecktype="match"/>
</opcode>
- <opcode id="58e2" name="OP_RemoveSpawn" updated="02/15/23">
+ <opcode id="5d66" name="OP_RemoveSpawn" updated="03/15/23">
<comment>Remove spawn from zone</comment>
<payload dir="both" typename="removeSpawnStruct" sizechecktype="none"/>
</opcode>
- <opcode id="0a43" name="OP_Death" updated="02/15/23">
+ <opcode id="370b" name="OP_Death" updated="03/15/23">
<comment>old NewCorpseCode</comment>
<payload dir="server" typename="newCorpseStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0349" name="OP_WearChange" updated="12/08/22">
+ <opcode id="3d60" name="OP_WearChange" updated="03/15/23">
<comment>SpawnUpdateCode</comment>
<payload dir="both" typename="SpawnUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="7882" name="OP_SpawnAppearance" updated="02/15/23">
+ <opcode id="190d" name="OP_SpawnAppearance" updated="03/15/23">
<comment>SpawnAppearanceCode</comment>
<payload dir="both" typename="spawnAppearanceStruct" sizechecktype="match"/>
</opcode>
- <opcode id="31b1" name="OP_Stamina" updated="12/08/22">
+ <opcode id="2890" name="OP_Stamina" updated="03/15/23">
<comment>Server updating on hunger/thirst</comment>
<payload dir="server" typename="staminaStruct" sizechecktype="match"/>
</opcode>
- <opcode id="281f" name="OP_HPUpdate" updated="12/08/22">
+ <opcode id="143b" name="OP_HPUpdate" updated="03/15/23">
<comment>NpcHpUpdateCode Update HP % of a PC or NPC</comment>
<payload dir="both" typename="hpNpcUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="30b3" name="OP_GuildMemberUpdate" updated="02/15/23">
+ <opcode id="acd6" name="OP_GuildMemberUpdate" updated="03/15/23">
<comment>Info regarding guild members</comment>
<payload dir="server" typename="GuildMemberUpdate" sizechecktype="match"/>
</opcode>
- <opcode id="5bce" name="OP_ClickObject" updated="02/15/23">
+ <opcode id="5c5f" name="OP_ClickObject" updated="03/15/23">
<comment>Items dropped on the ground</comment>
<payload dir="both" typename="remDropStruct" sizechecktype="match"/>
</opcode>
- <opcode id="5bda" name="OP_Action" updated="02/15/23">
+ <opcode id="0254" name="OP_Action" updated="03/15/23">
<comment>Spells cast etc</comment>
<payload dir="both" typename="actionStruct" sizechecktype="match"/>
<payload dir="both" typename="actionAltStruct" sizechecktype="match"/>
</opcode>
- <opcode id="399b" name="OP_Action2" updated="02/15/23">
+ <opcode id="5738" name="OP_Action2" updated="03/15/23">
<comment>Combat actions i.e. bash, kick etc</comment>
<payload dir="both" typename="action2Struct" sizechecktype="match"/>
</opcode>
- <opcode id="5f99" name="OP_Consider" updated="02/15/23">
+ <opcode id="30ff" name="OP_Consider" updated="03/15/23">
<comment>ConsiderCode</comment>
<payload dir="both" typename="considerStruct" sizechecktype="match"/>
</opcode>
- <opcode id="635c" name="OP_TargetMouse" updated="02/15/23">
+ <opcode id="429b" name="OP_TargetMouse" updated="03/15/23">
<comment>Targeting a person - old ClientTargetCode</comment>
<payload dir="both" typename="clientTargetStruct" sizechecktype="match"/>
</opcode>
- <opcode id="3056" name="OP_SpawnRename" updated="12/08/22">
+ <opcode id="1753" name="OP_SpawnRename" updated="03/15/23">
<comment>Spawns getting renamed after initial NewSpawn</comment>
<payload dir="server" typename="spawnRenameStruct" sizechecktype="match"/>
</opcode>
- <opcode id="5d3a" name="OP_Illusion" updated="12/08/22">
+ <opcode id="66cf" name="OP_Illusion" updated="03/15/23">
<comment>Spawn being illusioned (changing forms)</comment>
<payload dir="both" typename="spawnIllusionStruct" sizechecktype="match"/>
</opcode>
- <opcode id="62bc" name="OP_Shroud" updated="12/08/22">
+ <opcode id="6802" name="OP_Shroud" updated="03/15/23">
<comment>Server putting players into shroud form</comment>
<payload dir="server" typename="spawnShroudSelf" sizechecktype="none"/>
</opcode>
- <opcode id="5e6a" name="OP_ZoneChange" updated="02/15/23">
+ <opcode id="6505" name="OP_ZoneChange" updated="03/15/23">
<comment>old ZoneChangeCode</comment>
<payload dir="both" typename="zoneChangeStruct" sizechecktype="match"/>
</opcode>
@@ -163,55 +163,55 @@
<comment>Group leader change</comment>
<payload dir="server" typename="groupLeaderChangeStruct" sizechecktype="match"/>
</opcode>
- <opcode id="03db" name="OP_Buff" updated="12/08/22">
+ <opcode id="2577" name="OP_Buff" updated="03/15/23">
<comment>old BuffDropCode</comment>
<payload dir="both" typename="buffStruct" sizechecktype="match"/>
</opcode>
- <opcode id="62af" name="OP_BeginCast" updated="12/08/22">
+ <opcode id="496a" name="OP_BeginCast" updated="03/15/23">
<comment>BeginCastCode</comment>
<payload dir="both" typename="beginCastStruct" sizechecktype="match"/>
</opcode>
- <opcode id="ffff" name="OP_CastSpell" updated="12/08/22">
+ <opcode id="135a" name="OP_CastSpell" updated="03/15/23">
<comment>StartCastCode</comment>
<payload dir="both" typename="startCastStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1736" name="OP_SwapSpell" updated="12/08/22">
+ <opcode id="790c" name="OP_SwapSpell" updated="03/15/23">
<comment>TradeSpellBookSlotsCode</comment>
<payload dir="both" typename="tradeSpellBookSlotsStruct" sizechecktype="match"/>
</opcode>
- <opcode id="46b7" name="OP_MemorizeSpell" updated="12/08/22">
+ <opcode id="3ac4" name="OP_MemorizeSpell" updated="03/15/23">
<comment>MemSpellCode</comment>
<payload dir="both" typename="memSpellStruct" sizechecktype="match"/>
</opcode>
- <opcode id="2283" name="OP_InspectAnswer" updated="12/08/22">
+ <opcode id="2b2a" name="OP_InspectAnswer" updated="03/15/23">
<comment>InspectDataCode</comment>
<payload dir="both" typename="inspectDataStruct" sizechecktype="match"/>
</opcode>
- <opcode id="17bb" name="OP_Emote" updated="12/08/22">
+ <opcode id="3d46" name="OP_Emote" updated="03/15/23">
<comment>EmoteTextCode</comment>
<payload dir="both" typename="emoteTextStruct" sizechecktype="none"/>
</opcode>
- <opcode id="2bcb" name="OP_SimpleMessage" updated="02/15/23">
+ <opcode id="56b5" name="OP_SimpleMessage" updated="03/15/23">
<comment>SimpleMessageCode</comment>
<payload dir="server" typename="simpleMessageStruct" sizechecktype="match"/>
</opcode>
- <opcode id="48c6" name="OP_FormattedMessage" updated="02/15/23">
+ <opcode id="4cb1" name="OP_FormattedMessage" updated="03/15/23">
<comment>FormattedMessageCode i.e. pet dismissed etc</comment>
<payload dir="server" typename="formattedMessageStruct" sizechecktype="none"/>
</opcode>
- <opcode id="2cdb" name="OP_CommonMessage" updated="02/15/23">
+ <opcode id="3a60" name="OP_CommonMessage" updated="03/15/23">
<comment>ChannelMessageCode i.e. /tell /ooc /shout etc</comment>
<payload dir="both" typename="channelMessageStruct" sizechecktype="none"/>
</opcode>
- <opcode id="25a6" name="OP_SpecialMesg" updated="02/15/23">
+ <opcode id="2268" name="OP_SpecialMesg" updated="03/15/23">
<comment>Communicate textual info to client including hail responses etc</comment>
<payload dir="server" typename="specialMessageStruct" sizechecktype="none"/>
</opcode>
- <opcode id="7c52" name="OP_RandomReq" updated="12/08/22">
+ <opcode id="3ad0" name="OP_RandomReq" updated="03/15/23">
<comment>RandomReqCode</comment>
<payload dir="client" typename="randomReqStruct" sizechecktype="match"/>
</opcode>
- <opcode id="3dfe" name="OP_RandomReply" updated="12/08/22">
+ <opcode id="6a90" name="OP_RandomReply" updated="03/15/23">
<comment>RandomCode</comment>
<payload dir="server" typename="randomStruct" sizechecktype="match"/>
</opcode>
@@ -223,36 +223,36 @@
<comment>Server replying with deny information after /deny</comment>
<payload dir="server" typename="consentResponseStruct" sizechecktype="match"/>
</opcode>
- <opcode id="2a0d" name="OP_ManaChange" updated="12/08/22">
+ <opcode id="52e3" name="OP_ManaChange" updated="03/15/23">
<comment>Mana change. Bards send this up with no size. Casters receive this for mana updates.</comment>
<payload dir="server" typename="manaDecrementStruct" sizechecktype="match"/>
<payload dir="client" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="3764" name="OP_BazaarSearchRequest" updated="12/08/22">
+ <opcode id="1155" name="OP_BazaarSearchRequest" updated="03/15/23">
<comment>Bazaar search request </comment>
<payload dir="client" typename="bazaarSearchQueryStruct" sizechecktype="none"/>
</opcode>
- <opcode id="4925" name="OP_BazaarSearchResponse" updated="12/08/22">
+ <opcode id="7c10" name="OP_BazaarSearchResponse" updated="03/15/23">
<comment>Bazaar search Response - Struct incorrect </comment>
<payload dir="server" typename="bazaarSearchResponseStruct" sizechecktype="modulus"/>
</opcode>
- <opcode id="4f39" name="OP_MoneyOnCorpse" updated="12/08/22">
+ <opcode id="0321" name="OP_MoneyOnCorpse" updated="03/15/23">
<comment>MoneyOnCorpseCode</comment>
<payload dir="server" typename="moneyOnCorpseStruct" sizechecktype="match"/>
</opcode>
- <opcode id="68f3" name="OP_SkillUpdate" updated="12/08/22">
+ <opcode id="1f4b" name="OP_SkillUpdate" updated="03/15/23">
<comment>Skill up code</comment>
<payload dir="server" typename="skillIncStruct" sizechecktype="match"/>
</opcode>
- <opcode id="7300" name="OP_LevelUpdate" updated="12/08/22">
+ <opcode id="4f00" name="OP_LevelUpdate" updated="03/15/23">
<comment>LevelUpUpdateCode</comment>
<payload dir="server" typename="levelUpUpdateStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1d43" name="OP_DzSwitchInfo" updated="12/08/22">
+ <opcode id="031c" name="OP_DzSwitchInfo" updated="03/15/23">
<comment>Expedition compass etc</comment>
<payload dir="server" typename="dzSwitchInfo" sizechecktype="none"/>
</opcode>
- <opcode id="17b6" name="OP_DzInfo" updated="12/08/22">
+ <opcode id="6092" name="OP_DzInfo" updated="03/15/23">
<comment>Expedition Information</comment>
<payload dir="server" typename="dzInfo" sizechecktype="match"/>
</opcode>
@@ -260,11 +260,11 @@
<comment>Environmental Damage</comment>
<payload dir="client" typename="environmentDamageStruct" sizechecktype="match"/>
</opcode>
- <opcode id="1d40" name="OP_SetRunMode" updated="12/08/22">
+ <opcode id="16d5" name="OP_SetRunMode" updated="03/15/23">
<comment>old cRunToggleCode</comment>
<payload dir="client" typename="cRunToggleStruct" sizechecktype="match"/>
</opcode>
- <opcode id="0700" name="OP_Trader" updated="12/08/22">
+ <opcode id="5693" name="OP_Trader" updated="03/15/23">
<comment>PC's turning trader on and off</comment>
<payload dir="server" typename="bazaarTraderRequest" sizechecktype="match"/>
</opcode>
@@ -307,15 +307,15 @@
<comment>List of group members - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="1829" name="OP_GuildMemberList" updated="02/15/23">
+ <opcode id="627e" name="OP_GuildMemberList" updated="03/15/23">
<comment>List of guild members - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="72ef" name="OP_ManaUpdate" updated="12/08/22">
+ <opcode id="3d67" name="OP_ManaUpdate" updated="03/15/23">
<comment>Mana Update opcode - 10 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="1a74" name="OP_EndUpdate" updated="12/08/22">
+ <opcode id="5581" name="OP_EndUpdate" updated="03/15/23">
<comment>Endurance Update opcode - 10 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
@@ -367,7 +367,7 @@
<comment>Fellowship information - 2576 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="5cb9" name="OP_ExpandedGuildInfo" updated="02/15/23">
+ <opcode id="01ba" name="OP_ExpandedGuildInfo" updated="03/15/23">
<comment>Guild ranks and other misc guild data - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
@@ -535,11 +535,11 @@
<comment>Listing of all guilds. Can be triggered by /lfg search?</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="259b" name="OP_GuildsInZoneList" updated="12/08/22">
+ <opcode id="234f" name="OP_GuildsInZoneList" updated="03/15/23">
<comment>Listing of guild names present in the current zone. Generally seen on zoning</comment>
<payload dir="server" typename="guildsInZoneListStruct" sizechecktype="none"/>
</opcode>
- <opcode id="6bd2" name="OP_NewGuildInZone" updated="12/08/22">
+ <opcode id="b989" name="OP_NewGuildInZone" updated="03/15/23">
<comment>An additional guild name has appeared in the current zone. Seen when a guilded player enters the current zone</comment>
<payload dir="server" typename="newGuildInZoneStruct" sizechecktype="none"/>
</opcode>
@@ -595,7 +595,7 @@
<comment>Free to play nags and other data - Variable length</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
- <opcode id="6107" name="OP_Find" updated="02/15/23">
+ <opcode id="5d51" name="OP_Find" updated="03/15/23">
<comment>Find window data - 112 bytes</comment>
<payload dir="server" typename="uint8_t" sizechecktype="none"/>
</opcode>
Modified: showeq/trunk/configure.in
===================================================================
--- showeq/trunk/configure.in 2023-03-15 18:31:09 UTC (rev 1364)
+++ showeq/trunk/configure.in 2023-03-15 21:11:41 UTC (rev 1365)
@@ -2,7 +2,7 @@
dnl $Id$ $Name$
AC_PREREQ(2.59)
-AC_INIT(showeq, 6.2.18)
+AC_INIT(showeq, 6.3.0)
AC_CONFIG_SRCDIR(src/main.cpp)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
Modified: showeq/trunk/src/everquest.h
===================================================================
--- showeq/trunk/src/everquest.h 2023-03-15 18:31:09 UTC (rev 1364)
+++ showeq/trunk/src/everquest.h 2023-03-15 21:11:41 UTC (rev 1365)
@@ -1115,26 +1115,29 @@
struct
{
- signed deltaY:13; // change in y
signed x:19; // x coord (1st loc value)
+ signed deltaZ:13; // change in z
- signed y:19; // y coord (2nd loc value)
- unsigned padding01:13;
-
- signed z:19; // z coord (3rd loc value)
+ signed deltaHeading:10; // change in heading
unsigned pitch:12; // pitch (up/down heading)
- unsigned padding02:1;
+ unsigned padding01:10;
unsigned heading:12; // heading
signed animation:10; // current animation
- signed deltaHeading:10; // change in heading
+ unsigned padding02:10;
- signed deltaZ:13; // change in z
+ signed deltaY:13; // change in y
signed deltaX:13; // change in x
- unsigned padding04:6;
+ unsigned padding03:6;
+ signed y:19; // y coord (2nd loc value)
+ unsigned padding04:13;
+
+ signed z:19; // z coord (3rd loc value)
+ unsigned padding05:13;
+
};
- int32_t posData[5];
+ int32_t posData[6];
};
/*0000*/ union
@@ -2383,7 +2386,7 @@
/*
** Player Position Update
-** Length: 24 Octets
+** Length: 28 Octets
** OpCode: PlayerPosCode
*/
struct playerSpawnPosStruct
@@ -2391,29 +2394,32 @@
/*0000*/ uint16_t spawnId;
/*0002*/ uint16_t spawnId2;
/*0004*/
- signed deltaY:13; // change in y
signed x:19; // x coord (1st loc value)
+ signed deltaZ:13; // change in z
/*0008*/
- signed y:19; // y coord (2nd loc value)
- unsigned padding01:13;
+ signed deltaHeading:10; // change in heading
+ unsigned pitch:12; // pitch (up/down heading)
+ unsigned padding01:10;
/*0012*/
- signed z:19; // z coord (3rd loc value)
- unsigned pitch:12; // pitch (up/down heading)
- unsigned padding02:1;
-/*0016*/
unsigned heading:12; // heading
signed animation:10; // current animation
- signed deltaHeading:10; // change in heading
+ unsigned padding02:10;
+/*0016*/
+ signed deltaY:13; // change in y
+ signed deltaX:13; // change in x
+ unsigned padding03:6;
/*0020*/
- signed deltaZ:13; // change in z
- signed deltaX:13; // change in x
- unsigned padding04:6;
+ signed y:19; // y coord (2nd loc value)
+ unsigned padding04:13;
/*0024*/
+ signed z:19; // z coord (3rd loc value)
+ unsigned padding05:13;
+/*0028*/
};
/*
** Self Position Update
-** Length: 42 Octets
+** Length: 46 Octets
** OpCode: PlayerPosCode
*/
struct playerSelfPosStruct
@@ -2422,28 +2428,30 @@
/*0002*/ uint16_t spawnId; // Player's spawn id
/*0004*/ uint16_t unknown0004; // ***Placeholder
/*0006*/
- signed deltaHeading:10; // change in heading
- unsigned padding0:22;
+ float deltaZ; // change in z
/*0010*/
- float deltaZ; // change in z
+ unsigned heading:12; // heading
+ unsigned padding01:20;
/*0014*/
- float deltaX; // change in x
+ float deltaY; // change in y
/*0018*/
- signed animation:10; // current animation
unsigned pitch:12; // pitch (up/down heading)
- unsigned padding3:10;
+ unsigned padding03:20;
/*0022*/
float z; // z coord (3rd loc value)
/*0026*/
float y; // y coord (2nd loc value)
/*0030*/
- float deltaY; // change in y
+ signed deltaHeading:10; // change in heading
+ unsigned padding06:22;
/*0034*/
- unsigned heading:12; // heading
- unsigned padding7:20;
+ float x; // x coord (1st loc value)
/*0038*/
- float x; // x coord (1st loc value)
+ float deltaX; // change in x
/*0042*/
+ signed animation:10; // current animation
+ unsigned padding09:22;
+/*0046*/
};
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:31:11
|
Revision: 1364
http://sourceforge.net/p/seq/svn/1364
Author: cn187
Date: 2023-03-15 18:31:09 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Apply changes from trunk
Modified Paths:
--------------
showeq/branches/cn187_devel/ChangeLog
Modified: showeq/branches/cn187_devel/ChangeLog
===================================================================
--- showeq/branches/cn187_devel/ChangeLog 2023-03-15 18:27:39 UTC (rev 1363)
+++ showeq/branches/cn187_devel/ChangeLog 2023-03-15 18:31:09 UTC (rev 1364)
@@ -22,7 +22,19 @@
- Update to version 6.2.15
- Support EQ Patch 12/06/22
- Struct and opcode updates
+- Add zones/races for Night of Shadows
+- Fix save/restore of message filter visibility preferences
+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
+- Fix for LDON objects (Newby)
+
BlueAdept (11/17/22)
----------------
- Update to version 6.2.12
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:27:42
|
Revision: 1363
http://sourceforge.net/p/seq/svn/1363
Author: cn187
Date: 2023-03-15 18:27:39 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
When adding new location, use current line color
Modified Paths:
--------------
showeq/trunk/src/map.cpp
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:27:31 UTC (rev 1362)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:27:39 UTC (rev 1363)
@@ -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...> - 2023-03-15 18:27:34
|
Revision: 1362
http://sourceforge.net/p/seq/svn/1362
Author: cn187
Date: 2023-03-15 18:27:31 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix map colors not getting saved correctly
Modified Paths:
--------------
showeq/trunk/src/mapcore.cpp
Modified: showeq/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2023-03-15 18:27:24 UTC (rev 1361)
+++ showeq/trunk/src/mapcore.cpp 2023-03-15 18:27:31 UTC (rev 1362)
@@ -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...> - 2023-03-15 18:27:26
|
Revision: 1361
http://sourceforge.net/p/seq/svn/1361
Author: cn187
Date: 2023-03-15 18:27:24 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Add ability to zoom map via mouse wheel
Modified Paths:
--------------
showeq/trunk/src/map.cpp
showeq/trunk/src/map.h
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:27:13 UTC (rev 1360)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:27:24 UTC (rev 1361)
@@ -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/trunk/src/map.h
===================================================================
--- showeq/trunk/src/map.h 2023-03-15 18:27:13 UTC (rev 1360)
+++ showeq/trunk/src/map.h 2023-03-15 18:27:24 UTC (rev 1361)
@@ -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...> - 2023-03-15 18:27:16
|
Revision: 1360
http://sourceforge.net/p/seq/svn/1360
Author: cn187
Date: 2023-03-15 18:27:13 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Allow creating new map layers for editing
Modified Paths:
--------------
showeq/trunk/src/map.cpp
showeq/trunk/src/map.h
showeq/trunk/src/mapcore.cpp
showeq/trunk/src/mapcore.h
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:26:59 UTC (rev 1359)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:27:13 UTC (rev 1360)
@@ -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/trunk/src/map.h
===================================================================
--- showeq/trunk/src/map.h 2023-03-15 18:26:59 UTC (rev 1359)
+++ showeq/trunk/src/map.h 2023-03-15 18:27:13 UTC (rev 1360)
@@ -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/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2023-03-15 18:26:59 UTC (rev 1359)
+++ showeq/trunk/src/mapcore.cpp 2023-03-15 18:27:13 UTC (rev 1360)
@@ -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/trunk/src/mapcore.h
===================================================================
--- showeq/trunk/src/mapcore.h 2023-03-15 18:26:59 UTC (rev 1359)
+++ showeq/trunk/src/mapcore.h 2023-03-15 18:27:13 UTC (rev 1360)
@@ -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...> - 2023-03-15 18:27:01
|
Revision: 1359
http://sourceforge.net/p/seq/svn/1359
Author: cn187
Date: 2023-03-15 18:26:59 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Allow loading of up to 9 map layers
Modified Paths:
--------------
showeq/trunk/src/map.cpp
showeq/trunk/src/mapcore.cpp
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:26:51 UTC (rev 1358)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:26:59 UTC (rev 1359)
@@ -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/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2023-03-15 18:26:51 UTC (rev 1358)
+++ showeq/trunk/src/mapcore.cpp 2023-03-15 18:26:59 UTC (rev 1359)
@@ -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...> - 2023-03-15 18:26:56
|
Revision: 1358
http://sourceforge.net/p/seq/svn/1358
Author: cn187
Date: 2023-03-15 18:26:51 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Move edit layer selection to its own submenu
Modified Paths:
--------------
showeq/trunk/src/map.cpp
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:26:44 UTC (rev 1357)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:26:51 UTC (rev 1358)
@@ -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...> - 2023-03-15 18:26:47
|
Revision: 1357
http://sourceforge.net/p/seq/svn/1357
Author: cn187
Date: 2023-03-15 18:26:44 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fixes for dark mode color propagation
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
showeq/trunk/src/interface.h
showeq/trunk/src/spawnlist.cpp
showeq/trunk/src/spawnlist.h
showeq/trunk/src/spawnlist2.cpp
showeq/trunk/src/spawnlist2.h
showeq/trunk/src/spawnlistcommon.cpp
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:26:37 UTC (rev 1356)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:26:44 UTC (rev 1357)
@@ -5755,11 +5755,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)
@@ -5775,6 +5778,8 @@
}
}
+ emit styleChanged();
+
return currentStyleName;
}
@@ -5967,6 +5972,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);
}
@@ -6004,6 +6011,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/trunk/src/interface.h
===================================================================
--- showeq/trunk/src/interface.h 2023-03-15 18:26:37 UTC (rev 1356)
+++ showeq/trunk/src/interface.h 2023-03-15 18:26:44 UTC (rev 1357)
@@ -237,6 +237,8 @@
void spellMessage(QString&);
void restoreFonts();
+ void styleChanged();
+
// Decoder signals
void theKey(uint64_t);
void backfillPlayer(charProfileStruct *);
Modified: showeq/trunk/src/spawnlist.cpp
===================================================================
--- showeq/trunk/src/spawnlist.cpp 2023-03-15 18:26:37 UTC (rev 1356)
+++ showeq/trunk/src/spawnlist.cpp 2023-03-15 18:26:44 UTC (rev 1357)
@@ -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/trunk/src/spawnlist.h
===================================================================
--- showeq/trunk/src/spawnlist.h 2023-03-15 18:26:37 UTC (rev 1356)
+++ showeq/trunk/src/spawnlist.h 2023-03-15 18:26:44 UTC (rev 1357)
@@ -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/trunk/src/spawnlist2.cpp
===================================================================
--- showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:26:37 UTC (rev 1356)
+++ showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:26:44 UTC (rev 1357)
@@ -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/trunk/src/spawnlist2.h
===================================================================
--- showeq/trunk/src/spawnlist2.h 2023-03-15 18:26:37 UTC (rev 1356)
+++ showeq/trunk/src/spawnlist2.h 2023-03-15 18:26:44 UTC (rev 1357)
@@ -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/trunk/src/spawnlistcommon.cpp
===================================================================
--- showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:26:37 UTC (rev 1356)
+++ showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:26:44 UTC (rev 1357)
@@ -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...> - 2023-03-15 18:26:39
|
Revision: 1356
http://sourceforge.net/p/seq/svn/1356
Author: cn187
Date: 2023-03-15 18:26:37 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Don't show Qt5 build-in context menu on top of our own menus
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
showeq/trunk/src/interface.h
showeq/trunk/src/seqwindow.cpp
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:26:27 UTC (rev 1355)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:26:37 UTC (rev 1356)
@@ -6455,6 +6455,11 @@
dw->setAllowedAreas(Qt::NoDockWidgetArea);
}
+void EQInterface::contextMenuEvent(QContextMenuEvent* event)
+{
+ event->ignore();
+}
+
#ifndef QMAKEBUILD
#include "interface.moc"
#endif
Modified: showeq/trunk/src/interface.h
===================================================================
--- showeq/trunk/src/interface.h 2023-03-15 18:26:27 UTC (rev 1355)
+++ showeq/trunk/src/interface.h 2023-03-15 18:26:37 UTC (rev 1356)
@@ -345,6 +345,8 @@
QStringList enumerateDevices();
QString promptForNetDevice();
+ virtual void contextMenuEvent(QContextMenuEvent* event) override;
+
public:
Player* m_player;
MapMgr* mapMgr(void) { return m_mapMgr; }
Modified: showeq/trunk/src/seqwindow.cpp
===================================================================
--- showeq/trunk/src/seqwindow.cpp 2023-03-15 18:26:27 UTC (rev 1355)
+++ showeq/trunk/src/seqwindow.cpp 2023-03-15 18:26:37 UTC (rev 1356)
@@ -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...> - 2023-03-15 18:26:31
|
Revision: 1355
http://sourceforge.net/p/seq/svn/1355
Author: cn187
Date: 2023-03-15 18:26:27 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix calls to QString::asprintf
Modified Paths:
--------------
showeq/trunk/src/bazaarlog.cpp
showeq/trunk/src/category.cpp
showeq/trunk/src/combatlog.cpp
showeq/trunk/src/editor.cpp
showeq/trunk/src/eqstr.cpp
showeq/trunk/src/interface.cpp
showeq/trunk/src/map.cpp
showeq/trunk/src/mapicon.cpp
showeq/trunk/src/messageshell.cpp
showeq/trunk/src/netdiag.cpp
showeq/trunk/src/packet.cpp
showeq/trunk/src/packetinfo.cpp
showeq/trunk/src/packetlog.cpp
showeq/trunk/src/packetstream.cpp
showeq/trunk/src/seqlistview.cpp
showeq/trunk/src/skilllist.cpp
showeq/trunk/src/spawn.cpp
showeq/trunk/src/spawnlist.cpp
showeq/trunk/src/spawnlist2.cpp
showeq/trunk/src/spawnlistcommon.cpp
showeq/trunk/src/spawnmonitor.cpp
showeq/trunk/src/spawnpointlist.cpp
showeq/trunk/src/spellshell.cpp
showeq/trunk/src/statlist.cpp
showeq/trunk/src/util.cpp
showeq/trunk/src/xmlpreferences.cpp
showeq/trunk/src/zonemgr.cpp
Modified: showeq/trunk/src/bazaarlog.cpp
===================================================================
--- showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -77,7 +77,7 @@
merchant_name = merchant->name().toLatin1().data();
QString csv;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- csv.asprintf("1^%d^%d^%d^%s^%s",
+ csv = QString::asprintf("1^%d^%d^%d^%s^%s",
int(time(NULL)),resp.price,resp.count,
merchant_name, name);
m_out << csv << ENDL;
Modified: showeq/trunk/src/category.cpp
===================================================================
--- showeq/trunk/src/category.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/category.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -338,7 +338,7 @@
for(i = 1; i <= tMaxNumCategories; i++)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- prefBaseName.asprintf("Category%d_", i);
+ prefBaseName = QString::asprintf("Category%d_", i);
#else
prefBaseName.sprintf("Category%d_", i);
#endif
@@ -391,7 +391,7 @@
break;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- prefBaseName.asprintf("Category%d_", count++);
+ prefBaseName = QString::asprintf("Category%d_", count++);
#else
prefBaseName.sprintf("Category%d_", count++);
#endif
@@ -409,7 +409,7 @@
while (count <= tMaxNumCategories)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- prefBaseName.asprintf("Category%d_", count++);
+ prefBaseName = QString::asprintf("Category%d_", count++);
#else
prefBaseName.sprintf("Category%d_", count++);
#endif
Modified: showeq/trunk/src/combatlog.cpp
===================================================================
--- showeq/trunk/src/combatlog.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/combatlog.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -632,7 +632,7 @@
{
// this is a normal skill
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s_type.asprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType);
+ s_type = QString::asprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType);
#else
s_type.sprintf("%s(%d)", skill_name(iType).toLatin1().data(), iType);
#endif
@@ -641,7 +641,7 @@
case 231: // Non Melee Damage
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s_type.asprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell);
+ s_type = QString::asprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell);
#else
s_type.sprintf("Spell: %s(%d)", spell_name(iSpell).toLatin1().data(), iSpell);
#endif
@@ -654,7 +654,7 @@
// -11 Killing Blow with MoR
// -8 Killing Blow with Ro? (45pt) (mage)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s_type.asprintf("Damage Shield: (%d)", iType);
+ s_type = QString::asprintf("Damage Shield: (%d)", iType);
#else
s_type.sprintf("Damage Shield: (%d)", iType);
#endif
Modified: showeq/trunk/src/editor.cpp
===================================================================
--- showeq/trunk/src/editor.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/editor.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -161,7 +161,7 @@
setWindowTitle( fileName );
QString s;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- s.asprintf( "Opened %s", fileName );
+ s = QString::asprintf( "Opened %s", fileName );
#else
s.sprintf( "Opened %s", fileName );
#endif
Modified: showeq/trunk/src/eqstr.cpp
===================================================================
--- showeq/trunk/src/eqstr.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/eqstr.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -144,7 +144,7 @@
uint32_t arg_len;
unsigned char *cp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "Unknown: %04x:", formatid);
+ tempStr = QString::asprintf( "Unknown: %04x:", formatid);
#else
tempStr.sprintf( "Unknown: %04x:", formatid);
#endif
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -3127,7 +3127,7 @@
int i = winnum - mapCaptionBase;
if (i)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- title.asprintf("Map %d", i);
+ title = QString::asprintf("Map %d", i);
#else
title.sprintf("Map %d", i);
#endif
@@ -3727,7 +3727,7 @@
if (spell)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- txt.asprintf("%.3d %.2d %.2d %#4.04x %02d\t%s",
+ txt = QString::asprintf("%.3d %.2d %.2d %#4.04x %02d\t%s",
i, ((i / 8) + 1), ((i % 8) + 1),
spellid, spell->level(playerClass),
spell->name().toLatin1().data());
@@ -3741,7 +3741,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- txt.asprintf("%.3d %.2d %.2d %#4.04x \t%s",
+ txt = QString::asprintf("%.3d %.2d %.2d %#4.04x \t%s",
i, ((i / 8) + 1), ((i % 8) + 1),
spellid,
spell_name(spellid).toLatin1().data());
@@ -4698,7 +4698,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("New Level: %u", level);
+ tempStr = QString::asprintf("New Level: %u", level);
#else
tempStr.sprintf("New Level: %u", level);
#endif
@@ -4727,7 +4727,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Mobs: %d", num);
+ tempStr = QString::asprintf("Mobs: %d", num);
#else
tempStr.sprintf("Mobs: %d", num);
#endif
@@ -4745,7 +4745,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Run Speed: %3.6f", speed);
+ tempStr = QString::asprintf("Run Speed: %3.6f", speed);
#else
tempStr.sprintf("Run Speed: %3.6f", speed);
#endif
@@ -4783,13 +4783,13 @@
num -= m_initialcount;
if (num && delta)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Pkt: %d (%2.1f)", num, (float) (num<<10) / (float) delta);
+ tempStr = QString::asprintf("Pkt: %d (%2.1f)", num, (float) (num<<10) / (float) delta);
#else
tempStr.sprintf("Pkt: %d (%2.1f)", num, (float) (num<<10) / (float) delta);
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Pkt: %d", num);
+ tempStr = QString::asprintf("Pkt: %d", num);
#else
tempStr.sprintf("Pkt: %d", num);
#endif
@@ -4848,7 +4848,7 @@
float percentZEM = ((float)(m_zoneMgr->zoneExpMultiplier()-0.75)/0.75)*100;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ZEM: %3.2f%%", percentZEM);
+ tempStr = QString::asprintf("ZEM: %3.2f%%", percentZEM);
#else
tempStr.sprintf("ZEM: %3.2f%%", percentZEM);
#endif
@@ -4864,7 +4864,7 @@
float percentZEM = ((float)(m_zoneMgr->zoneExpMultiplier()-0.75)/0.75)*100;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ZEM: %3.2f%%", percentZEM);
+ tempStr = QString::asprintf("ZEM: %3.2f%%", percentZEM);
#else
tempStr.sprintf("ZEM: %3.2f%%", percentZEM);
#endif
@@ -4879,7 +4879,7 @@
emit newZoneName(shortZoneName);
float percentZEM = ((float)(m_zoneMgr->zoneExpMultiplier()-0.75)/0.75)*100;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ZEM: %3.2f%%", percentZEM);
+ tempStr = QString::asprintf("ZEM: %3.2f%%", percentZEM);
#else
tempStr.sprintf("ZEM: %3.2f%%", percentZEM);
#endif
@@ -5009,7 +5009,7 @@
QString string("");
if (spawn != 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%d: %s:%d (%d/%d) Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
+ string = QString::asprintf("%d: %s:%d (%d/%d) Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
item->id(),
item->name().toUtf8().data(),
spawn->level(), spawn->HP(),
@@ -5023,7 +5023,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%d: %s: Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
+ string = QString::asprintf("%d: %s: Pos:", // "%d/%d/%d (%d) %s %s Item:%s",
item->id(),
item->name().toUtf8().data());
#else
@@ -5088,7 +5088,7 @@
{
QString fileName;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- fileName.asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
+ fileName = QString::asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#else
fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#endif
@@ -5110,7 +5110,7 @@
{
QString fileName;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- fileName.asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
+ fileName = QString::asprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#else
fileName.sprintf("%s_mobpath.map", m_zoneMgr->shortZoneName().toLatin1().data());
#endif
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -4218,7 +4218,7 @@
p.setPen( Qt::yellow );
QString ts;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- ts.asprintf( "(%d, %d)",
+ ts = QString::asprintf( "(%d, %d)",
(int)(param.screenCenterX() * param.ratioX()),
(int)(param.screenCenterY() * param.ratioY()));
#else
@@ -4228,7 +4228,7 @@
#endif
p.drawText( 10, 8, ts );
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- ts.asprintf( "(%d, %d)",
+ ts = QString::asprintf( "(%d, %d)",
(int)((param.screenCenterX() - param.screenLength().width()) *
param.ratioX()),
(int)((param.screenCenterY() - param.screenLength().height()) *
@@ -4244,7 +4244,7 @@
// show frame times
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- ts.asprintf( "%2.0ffps/%dms", fps, drawTime);
+ ts = QString::asprintf( "%2.0ffps/%dms", fps, drawTime);
#else
ts.sprintf( "%2.0ffps/%dms", fps, drawTime);
#endif
@@ -4327,7 +4327,7 @@
if ( secs > 0 )
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- remaining.asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
+ remaining = QString::asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#else
remaining.sprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#endif
@@ -4349,7 +4349,7 @@
QString string;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("SpawnPoint: %s\n"
+ string = QString::asprintf("SpawnPoint: %s\n"
"%.3s/Z: %5d/%5d/%5d\n"
"Last: %s\n"
"Spawned: %s\t Remaining: %s\t Count: %d",
@@ -4399,7 +4399,7 @@
QString guild;
if (!spawn->guildTag().isEmpty())
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- guild.asprintf("<%s>", spawn->guildTag().toLatin1().data());
+ guild = QString::asprintf("<%s>", spawn->guildTag().toLatin1().data());
#else
guild.sprintf("<%s>", spawn->guildTag().toLatin1().data());
#endif
@@ -4431,7 +4431,7 @@
lastName = "";
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%s %s%s\n"
+ string = QString::asprintf("%s %s%s\n"
"Level: %2d\tHP: %s\t %.3s/Z: %5d/%5d/%5d\n"
"Race: %s\t Class: %s",
spawn->transformedName().toUtf8().data(),
@@ -4472,7 +4472,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("%s\n"
+ string = QString::asprintf("%s\n"
"%.3s/Z: %5d/%5d/%5d\n"
"Race: %s\t Class: %s",
item->transformedName().toUtf8().data(),
@@ -5251,7 +5251,7 @@
{
QString cursorPos;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- cursorPos.asprintf(" %+5hd, %+5hd", y, x);
+ cursorPos = QString::asprintf(" %+5hd, %+5hd", y, x);
#else
cursorPos.sprintf(" %+5hd, %+5hd", y, x);
#endif
@@ -5263,7 +5263,7 @@
{
QString playerPos;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- playerPos.asprintf(" %+5hd, %+5hd, %+5hd", y, x, z);
+ playerPos = QString::asprintf(" %+5hd, %+5hd, %+5hd", y, x, z);
#else
playerPos.sprintf(" %+5hd, %+5hd, %+5hd", y, x, z);
#endif
Modified: showeq/trunk/src/mapicon.cpp
===================================================================
--- showeq/trunk/src/mapicon.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/mapicon.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -1113,7 +1113,7 @@
QString spawnNameText;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- spawnNameText.asprintf("%2d: %s",
+ spawnNameText = QString::asprintf("%2d: %s",
spawn->level(),
spawn->name().toLatin1().data());
#else
@@ -1233,7 +1233,7 @@
QString spawnNameText;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- spawnNameText.asprintf("sp:%s %s (%d)",
+ spawnNameText = QString::asprintf("sp:%s %s (%d)",
sp->name().toLatin1().data(),
sp->last().toLatin1().data(),
sp->count());
Modified: showeq/trunk/src/messageshell.cpp
===================================================================
--- showeq/trunk/src/messageshell.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/messageshell.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -107,7 +107,7 @@
if ((cmsg->target[0] != 0) && target)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' -> '%s' - %s {%s}",
+ tempStr = QString::asprintf( "'%s' -> '%s' - %s {%s}",
cmsg->sender,
cmsg->target,
cmsg->message,
@@ -125,7 +125,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' - %s {%s}",
+ tempStr = QString::asprintf( "'%s' - %s {%s}",
cmsg->sender,
cmsg->message,
language_name(cmsg->language).toLatin1().data()
@@ -144,7 +144,7 @@
if ((cmsg->target[0] != 0) && target)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' -> '%s' - %s",
+ tempStr = QString::asprintf( "'%s' -> '%s' - %s",
cmsg->sender,
cmsg->target,
cmsg->message
@@ -160,7 +160,7 @@
else
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "'%s' - %s",
+ tempStr = QString::asprintf( "'%s' - %s",
cmsg->sender,
cmsg->message
);
@@ -385,7 +385,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Request random number between %d and %d",
+ tempStr = QString::asprintf("Request random number between %d and %d",
randr->bottom,
randr->top);
#else
@@ -403,7 +403,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Random number %d rolled between %d and %d by %s",
+ tempStr = QString::asprintf("Random number %d rolled between %d and %d by %s",
randr->result,
randr->bottom,
randr->top,
@@ -437,7 +437,7 @@
if (strnlen(inspt->itemNames[inp], 64) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("He has %s (icn:%i)", inspt->itemNames[inp], inspt->icons[inp]);
+ tempStr = QString::asprintf("He has %s (icn:%i)", inspt->itemNames[inp], inspt->icons[inp]);
#else
tempStr.sprintf("He has %s (icn:%i)", inspt->itemNames[inp], inspt->icons[inp]);
#endif
@@ -448,7 +448,7 @@
if (strnlen(inspt->mytext, 200) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("His info: %s", inspt->mytext);
+ tempStr = QString::asprintf("His info: %s", inspt->mytext);
#else
tempStr.sprintf("His info: %s", inspt->mytext);
#endif
@@ -583,7 +583,7 @@
default:
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "Unknown Spell Event ( %s ) - '",
+ tempStr = QString::asprintf( "Unknown Spell Event ( %s ) - '",
client ?
"Client --> Server" :
"Server --> Client"
@@ -612,7 +612,7 @@
if (mem->param1 != 4)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%s%s', slot %d.",
+ tempStr = QString::asprintf("%s%s', slot %d.",
tempStr.toLatin1().data(),
spellName.toLatin1().data(),
mem->slotId);
@@ -654,7 +654,7 @@
if (tempStr == "" || tempStr.isEmpty())
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("UNKNOWN (ID: %d)", bcast->spawnId);
+ tempStr = QString::asprintf("UNKNOWN (ID: %d)", bcast->spawnId);
#else
tempStr.sprintf("UNKNOWN (ID: %d)", bcast->spawnId);
#endif
@@ -672,7 +672,7 @@
spellName = spell_name(bcast->spellId);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "%s%s' - Casting time is %g Second%s",
+ tempStr = QString::asprintf( "%s%s' - Casting time is %g Second%s",
tempStr.toLatin1().data(),
spellName.toLatin1().data(), casttime,
casttime == 1 ? "" : "s");
@@ -694,7 +694,7 @@
if (strlen(sf->message) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf( "Faded: %s", sf->message);
+ tempStr = QString::asprintf( "Faded: %s", sf->message);
#else
tempStr.sprintf( "Faded: %s", sf->message);
#endif
@@ -711,7 +711,7 @@
QString tempStr;
if (item != NULL)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%s(%d): %s",
+ tempStr = QString::asprintf("%s(%d): %s",
item->name().toLatin1().data(), icast->spawnId, icast->message);
#else
tempStr.sprintf("%s(%d): %s",
@@ -719,7 +719,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("spawn(%d): %s",
+ tempStr = QString::asprintf("spawn(%d): %s",
icast->spawnId, icast->message);
#else
tempStr.sprintf("spawn(%d): %s",
@@ -752,7 +752,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("You begin casting %s. Current Target is %s(%d)",
+ tempStr = QString::asprintf("You begin casting %s. Current Target is %s(%d)",
spellName.toLatin1().data(), targetName.toLatin1().data(),
cast->targetId);
#else
@@ -780,7 +780,7 @@
{
case GUA_Joined :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s has joined the group.", gmem->membername);
+ tempStr = QString::asprintf ("Update: %s has joined the group.", gmem->membername);
#else
tempStr.sprintf ("Update: %s has joined the group.", gmem->membername);
#endif
@@ -787,7 +787,7 @@
break;
case GUA_Left :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s has left the group.", gmem->membername);
+ tempStr = QString::asprintf ("Update: %s has left the group.", gmem->membername);
#else
tempStr.sprintf ("Update: %s has left the group.", gmem->membername);
#endif
@@ -794,7 +794,7 @@
break;
case GUA_LastLeft :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: The group has been disbanded when %s left.",
+ tempStr = QString::asprintf ("Update: The group has been disbanded when %s left.",
gmem->membername);
#else
tempStr.sprintf ("Update: The group has been disbanded when %s left.",
@@ -803,7 +803,7 @@
break;
case GUA_MakeLeader :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s is now the leader of the group.",
+ tempStr = QString::asprintf ("Update: %s is now the leader of the group.",
gmem->membername);
#else
tempStr.sprintf ("Update: %s is now the leader of the group.",
@@ -812,7 +812,7 @@
break;
case GUA_Started :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: %s has formed the group.", gmem->membername);
+ tempStr = QString::asprintf ("Update: %s has formed the group.", gmem->membername);
#else
tempStr.sprintf ("Update: %s has formed the group.", gmem->membername);
#endif
@@ -819,7 +819,7 @@
break;
default :
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Update: Unknown Update action:%d - %s - %s)",
+ tempStr = QString::asprintf ("Update: Unknown Update action:%d - %s - %s)",
gmem->action, gmem->yourname, gmem->membername);
#else
tempStr.sprintf ("Update: Unknown Update action:%d - %s - %s)",
@@ -837,13 +837,13 @@
if(dir == DIR_Client)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: You invite %s to join the group", gmem->invitee);
+ tempStr = QString::asprintf("Invite: You invite %s to join the group", gmem->invitee);
#else
tempStr.sprintf("Invite: You invite %s to join the group", gmem->invitee);
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s invites %s to join the group", gmem->inviter, gmem->invitee);
+ tempStr = QString::asprintf("Invite: %s invites %s to join the group", gmem->inviter, gmem->invitee);
#else
tempStr.sprintf("Invite: %s invites %s to join the group", gmem->inviter, gmem->invitee);
#endif
@@ -859,7 +859,7 @@
{
case 1:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s declines invite from %s (player is grouped)",
+ tempStr = QString::asprintf("Invite: %s declines invite from %s (player is grouped)",
gmem->membername, gmem->yourname);
#else
tempStr.sprintf("Invite: %s declines invite from %s (player is grouped)",
@@ -868,7 +868,7 @@
break;
case 3:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s declines invite from %s",
+ tempStr = QString::asprintf("Invite: %s declines invite from %s",
gmem->membername, gmem->yourname);
#else
tempStr.sprintf("Invite: %s declines invite from %s",
@@ -877,7 +877,7 @@
break;
default:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Invite: %s declines invite from %s (unknown reason: %i)",
+ tempStr = QString::asprintf("Invite: %s declines invite from %s (unknown reason: %i)",
gmem->membername, gmem->yourname, gmem->reason);
#else
tempStr.sprintf("Invite: %s declines invite from %s (unknown reason: %i)",
@@ -897,7 +897,7 @@
tempStr = "Follow: You have joined the group";
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Follow: %s has joined the group", gFollow->invitee);
+ tempStr = QString::asprintf("Follow: %s has joined the group", gFollow->invitee);
#else
tempStr.sprintf("Follow: %s has joined the group", gFollow->invitee);
#endif
@@ -910,7 +910,7 @@
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf ("Disband: %s disbands from the group", gmem->membername);
+ tempStr = QString::asprintf ("Disband: %s disbands from the group", gmem->membername);
#else
tempStr.sprintf ("Disband: %s disbands from the group", gmem->membername);
#endif
@@ -922,7 +922,7 @@
const groupLeaderChangeStruct *gmem = (const groupLeaderChangeStruct*)data;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Update: %s is now the leader of the group",
+ tempStr = QString::asprintf("Update: %s is now the leader of the group",
gmem->membername);
#else
tempStr.sprintf("Update: %s is now the leader of the group",
@@ -936,7 +936,7 @@
QString message;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("Name: '%s' Last: '%s'",
+ message = QString::asprintf("Name: '%s' Last: '%s'",
player->name, player->lastName);
#else
message.sprintf("Name: '%s' Last: '%s'",
@@ -945,7 +945,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("Level: %d", player->profile.level);
+ message = QString::asprintf("Level: %d", player->profile.level);
#else
message.sprintf("Level: %d", player->profile.level);
#endif
@@ -952,7 +952,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("PlayerMoney: P=%d G=%d S=%d C=%d",
+ message = QString::asprintf("PlayerMoney: P=%d G=%d S=%d C=%d",
player->profile.platinum, player->profile.gold,
player->profile.silver, player->profile.copper);
#else
@@ -963,7 +963,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("BankMoney: P=%d G=%d S=%d C=%d",
+ message = QString::asprintf("BankMoney: P=%d G=%d S=%d C=%d",
player->platinum_bank, player->gold_bank,
player->silver_bank, player->copper_bank);
#else
@@ -974,7 +974,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("CursorMoney: P=%d G=%d S=%d C=%d",
+ message = QString::asprintf("CursorMoney: P=%d G=%d S=%d C=%d",
player->profile.platinum_cursor, player->profile.gold_cursor,
player->profile.silver_cursor, player->profile.copper_cursor);
#else
@@ -985,7 +985,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("SharedMoney: P=%d",
+ message = QString::asprintf("SharedMoney: P=%d",
player->platinum_shared);
#else
message.sprintf("SharedMoney: P=%d",
@@ -994,7 +994,7 @@
m_messages->addMessage(MT_Player, message);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("DoN Crystals: Radiant=%d Ebon=%d",
+ message = QString::asprintf("DoN Crystals: Radiant=%d Ebon=%d",
player->currentRadCrystals, player->currentEbonCrystals);
#else
message.sprintf("DoN Crystals: Radiant=%d Ebon=%d",
@@ -1046,13 +1046,13 @@
if(player->profile.buffs[buffnumber].duration == -1)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("You have buff %s (permanent).", spellName.toLatin1().data());
+ message = QString::asprintf("You have buff %s (permanent).", spellName.toLatin1().data());
#else
message.sprintf("You have buff %s (permanent).", spellName.toLatin1().data());
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- message.asprintf("You have buff %s duration left is %d in ticks.",
+ message = QString::asprintf("You have buff %s duration left is %d in ticks.",
#else
message.sprintf("You have buff %s duration left is %d in ticks.",
#endif
@@ -1081,7 +1081,7 @@
const skillIncStruct* skilli = (const skillIncStruct*)data;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Skill: %s has increased (%d)",
+ tempStr = QString::asprintf("Skill: %s has increased (%d)",
skill_name(skilli->skillId).toLatin1().data(),
skilli->value);
#else
@@ -1097,7 +1097,7 @@
const levelUpUpdateStruct *levelup = (const levelUpUpdateStruct *)data;
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("NewLevel: %d", levelup->level);
+ tempStr = QString::asprintf("NewLevel: %d", levelup->level);
#else
tempStr.sprintf("NewLevel: %d", levelup->level);
#endif
@@ -1198,7 +1198,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Exp: Set: %u total, with %u (%u/330) into level with %u left, where 1/330 = %u",
+ tempStr = QString::asprintf("Exp: Set: %u total, with %u (%u/330) into level with %u left, where 1/330 = %u",
totalExp, (totalExp - minExpLevel), totalTick,
(maxExpLevel - totalExp), tickExpLevel);
#else
@@ -1225,7 +1225,7 @@
uint32_t needKills = leftExp / newExp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Exp: New: %u, %u (%u/330) into level with %u left [~%u kills]",
+ tempStr = QString::asprintf("Exp: New: %u, %u (%u/330) into level with %u left [~%u kills]",
newExp, (totalExp - minExpLevel), totalTick,
leftExp, needKills);
#else
@@ -1236,7 +1236,7 @@
}
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("Exp: New: < %u, %u (%u/330) into level with %u left",
+ tempStr = QString::asprintf("Exp: New: < %u, %u (%u/330) into level with %u left",
tickExpLevel, (totalExp - minExpLevel), totalTick,
leftExp);
#else
@@ -1254,7 +1254,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ExpAA: Set: %u total, with %u aapoints",
+ tempStr = QString::asprintf("ExpAA: Set: %u total, with %u aapoints",
totalExp, aaPoints);
#else
tempStr.sprintf("ExpAA: Set: %u total, with %u aapoints",
@@ -1275,7 +1275,7 @@
// ie. a > 1/330'th experience increment.
if (newExp)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ExpAA: %u, %u (%u/330) with %u left",
+ tempStr = QString::asprintf("ExpAA: %u, %u (%u/330) with %u left",
newExp, totalExp, totalTick, maxExp - totalExp);
#else
tempStr.sprintf("ExpAA: %u, %u (%u/330) with %u left",
@@ -1283,7 +1283,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("ExpAA: < %u, %u (%u/330) with %u left",
+ tempStr = QString::asprintf("ExpAA: < %u, %u (%u/330) with %u left",
tickExp, totalExp, totalTick, maxExp - totalExp);
#else
tempStr.sprintf("ExpAA: < %u, %u (%u/330) with %u left",
@@ -1361,7 +1361,7 @@
// extra info if it is a spawn
if (spawn)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- spawnInfo.asprintf(" LVL %d, HP %d/%d",
+ spawnInfo = QString::asprintf(" LVL %d, HP %d/%d",
spawn->level(), spawn->HP(), spawn->maxHP());
#else
spawnInfo.sprintf(" LVL %d, HP %d/%d",
Modified: showeq/trunk/src/netdiag.cpp
===================================================================
--- showeq/trunk/src/netdiag.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/netdiag.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -220,7 +220,7 @@
{
QString disp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- disp.asprintf("%4.4x", seq);
+ disp = QString::asprintf("%4.4x", seq);
#else
disp.sprintf("%4.4x", seq);
#endif
@@ -231,7 +231,7 @@
{
QString disp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- disp.asprintf("%4.4x", seq);
+ disp = QString::asprintf("%4.4x", seq);
#else
disp.sprintf("%4.4x", seq);
#endif
@@ -250,7 +250,7 @@
{
case 2:
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf(":%d",
+ tmp = QString::asprintf(":%d",
m_packet->clientPort());
#else
tmp.sprintf(":%d",
@@ -274,7 +274,7 @@
disp = print_addr(addr);
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf(":%d", clientPort);
+ tmp = QString::asprintf(":%d", clientPort);
#else
tmp.sprintf(":%d", clientPort);
#endif
@@ -345,7 +345,7 @@
int delta = mTime() - m_packetStartTime[stream];
if (numdelta && delta)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%2.1f",
+ tempStr = QString::asprintf("%2.1f",
(float) (numdelta<<10) / (float) delta);
#else
tempStr.sprintf("%2.1f",
@@ -353,7 +353,7 @@
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("0.0");
+ tempStr = QString::asprintf("0.0");
#else
tempStr.sprintf("0.0");
#endif
@@ -379,7 +379,7 @@
QString paddr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- paddr.asprintf ( "%d.%d.%d.%d",
+ paddr = QString::asprintf ( "%d.%d.%d.%d",
addr & 0x000000ff,
(addr & 0x0000ff00) >> 8,
(addr & 0x00ff0000) >> 16,
Modified: showeq/trunk/src/packet.cpp
===================================================================
--- showeq/trunk/src/packet.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packet.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -818,19 +818,19 @@
if (speed == 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("Playback speed set Fast as possible");
+ string = QString::asprintf("Playback speed set Fast as possible");
#else
string.sprintf("Playback speed set Fast as possible");
#endif
else if (speed < 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("Playback paused (']' to resume)");
+ string = QString::asprintf("Playback paused (']' to resume)");
#else
string.sprintf("Playback paused (']' to resume)");
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- string.asprintf("Playback speed set to %d", speed);
+ string = QString::asprintf("Playback speed set to %d", speed);
#else
string.sprintf("Playback speed set to %d", speed);
#endif
Modified: showeq/trunk/src/packetinfo.cpp
===================================================================
--- showeq/trunk/src/packetinfo.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packetinfo.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -375,7 +375,7 @@
// output the current opcode
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- opcodeString.asprintf("%04x", currentOPCode->opcode());
+ opcodeString = QString::asprintf("%04x", currentOPCode->opcode());
#else
opcodeString.sprintf("%04x", currentOPCode->opcode());
#endif
Modified: showeq/trunk/src/packetlog.cpp
===================================================================
--- showeq/trunk/src/packetlog.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packetlog.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -55,7 +55,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("[OPCode: %#.04x]", opCode);
+ tempStr = QString::asprintf("[OPCode: %#.04x]", opCode);
#else
tempStr.sprintf("[OPCode: %#.04x]", opCode);
#endif
@@ -92,7 +92,7 @@
paddr = "client";
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- paddr.asprintf( "%d.%d.%d.%d",
+ paddr = QString::asprintf( "%d.%d.%d.%d",
addr & 0x000000ff,
(addr & 0x0000ff00) >> 8,
(addr & 0x00ff0000) >> 16,
Modified: showeq/trunk/src/packetstream.cpp
===================================================================
--- showeq/trunk/src/packetstream.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/packetstream.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -164,7 +164,7 @@
// construct a name for the dispatch
QString dispatchName(256, '\0');
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- dispatchName.asprintf("PacketDispatch:%s:%s:%d:%s:%d",
+ dispatchName = QString::asprintf("PacketDispatch:%s:%s:%d:%s:%d",
objectName().toLatin1().data(), opcodeName.toLatin1().data(),
payload->dir(), payload->typeName().toLatin1().data(),
payload->sizeCheckType());
@@ -472,7 +472,7 @@
{
QString tempStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%s (%#04x) (dataLen: %lu) doesn't match:",
+ tempStr = QString::asprintf("%s (%#04x) (dataLen: %lu) doesn't match:",
opcodeEntry->name().toLatin1().data(),
opcodeEntry->opcode(), len);
#else
Modified: showeq/trunk/src/seqlistview.cpp
===================================================================
--- showeq/trunk/src/seqlistview.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/seqlistview.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -147,7 +147,7 @@
QString tempStr, tempStr2;
if (header()->count() > 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr.asprintf("%d", header()->logicalIndex(0));
+ tempStr = QString::asprintf("%d", header()->logicalIndex(0));
#else
tempStr.sprintf("%d", header()->logicalIndex(0));
#endif
@@ -154,7 +154,7 @@
for(i=1; i < header()->count(); i++)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tempStr2.asprintf(":%d", header()->logicalIndex(i));
+ tempStr2 = QString::asprintf(":%d", header()->logicalIndex(i));
#else
tempStr2.sprintf(":%d", header()->logicalIndex(i));
#endif
Modified: showeq/trunk/src/skilllist.cpp
===================================================================
--- showeq/trunk/src/skilllist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/skilllist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -110,7 +110,7 @@
QString str;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf("%3d", value);
+ str = QString::asprintf("%3d", value);
#else
str.sprintf("%3d", value);
#endif
@@ -142,7 +142,7 @@
QString str;
/* Update skill value with new value */
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf ("%3d", value);
+ str = QString::asprintf ("%3d", value);
#else
str.sprintf ("%3d", value);
#endif
@@ -195,7 +195,7 @@
str = " NA";
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf ("%3d", value);
+ str = QString::asprintf ("%3d", value);
#else
str.sprintf ("%3d", value);
#endif
@@ -231,7 +231,7 @@
/* Update skill value with new value */
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- str.asprintf ("%3d", value);
+ str = QString::asprintf ("%3d", value);
#else
str.sprintf ("%3d", value);
#endif
Modified: showeq/trunk/src/spawn.cpp
===================================================================
--- showeq/trunk/src/spawn.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawn.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -188,7 +188,7 @@
{
QString item_str;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- item_str.asprintf("U%04x", item);
+ item_str = QString::asprintf("U%04x", item);
#else
item_str.sprintf("U%04x", item);
#endif
@@ -253,7 +253,7 @@
{
QString buff;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d",
+ buff = QString::asprintf("Name:%s:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d",
transformedName().toUtf8().data(),
raceString().toUtf8().data(),
classString().toUtf8().data(),
@@ -911,7 +911,7 @@
QString buff;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("Name:%s:Level:%d:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:"
+ buff = QString::asprintf("Name:%s:Level:%d:Race:%s:Class:%s:NPC:%d:X:%d:Y:%d:Z:%d:"
"Light:%s:Deity:%s:RTeam:%d:DTeam:%d:Type:%s:LastName:%s:Guild:%s:Spawn:%s:",
name.toUtf8().data(),
level(),
@@ -1105,7 +1105,7 @@
(int16_t)(d->z * 10.0));
setHeading((int8_t)lrintf(d->heading));
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- m_name.asprintf("Door: %s (%d) ", d->name, d->doorId);
+ m_name = QString::asprintf("Door: %s (%d) ", d->name, d->doorId);
#else
m_name.sprintf("Door: %s (%d) ", d->name, d->doorId);
#endif
Modified: showeq/trunk/src/spawnlist.cpp
===================================================================
--- showeq/trunk/src/spawnlist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnlist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -161,7 +161,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", litem->item()->calcDist2DInt(x, y));
+ buff = QString::asprintf("%5d", litem->item()->calcDist2DInt(x, y));
#else
buff.sprintf("%5d", litem->item()->calcDist2DInt(x, y));
#endif
@@ -179,7 +179,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5.1f", litem->item()->calcDist(x, y, z));
+ buff = QString::asprintf("%5.1f", litem->item()->calcDist(x, y, z));
#else
buff.sprintf("%5.1f", litem->item()->calcDist(x, y, z));
#endif
Modified: showeq/trunk/src/spawnlist2.cpp
===================================================================
--- showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -566,7 +566,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", litem->item()->calcDist2DInt(x, y));
+ buff = QString::asprintf("%5d", litem->item()->calcDist2DInt(x, y));
#else
buff.sprintf("%5d", litem->item()->calcDist2DInt(x, y));
#endif
@@ -588,7 +588,7 @@
if (litem->type() != tUnknown)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5.1f", litem->item()->calcDist(x, y, z));
+ buff = QString::asprintf("%5.1f", litem->item()->calcDist(x, y, z));
#else
buff.sprintf("%5.1f", litem->item()->calcDist(x, y, z));
#endif
Modified: showeq/trunk/src/spawnlistcommon.cpp
===================================================================
--- showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -191,7 +191,7 @@
{
// Level
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%2d", spawn->level());
+ buff = QString::asprintf("%2d", spawn->level());
#else
buff.sprintf("%2d", spawn->level());
#endif
@@ -202,7 +202,7 @@
{
// Hitpoints
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", spawn->HP());
+ buff = QString::asprintf("%5d", spawn->HP());
#else
buff.sprintf("%5d", spawn->HP());
#endif
@@ -210,7 +210,7 @@
// Maximum Hitpoints
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", spawn->maxHP());
+ buff = QString::asprintf("%5d", spawn->maxHP());
#else
buff.sprintf("%5d", spawn->maxHP());
#endif
@@ -241,7 +241,7 @@
{
// X position
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", showeq_params->retarded_coords ?
+ buff = QString::asprintf("%5d", showeq_params->retarded_coords ?
(int)item()->y() : (int)item()->x());
#else
buff.sprintf("%5d", showeq_params->retarded_coords ?
@@ -251,7 +251,7 @@
// Y position
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", showeq_params->retarded_coords ?
+ buff = QString::asprintf("%5d", showeq_params->retarded_coords ?
(int)item()->x() : (int)item()->y());
#else
buff.sprintf("%5d", showeq_params->retarded_coords ?
@@ -261,7 +261,7 @@
// Z position
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", item()->z());
+ buff = QString::asprintf("%5d", item()->z());
#else
buff.sprintf("%5d", item()->z());
#endif
@@ -272,7 +272,7 @@
{
//buff.sprintf("%5d", player->calcDist2DInt(*item()));
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", item()->getIDistanceToPlayer());
+ buff = QString::asprintf("%5d", item()->getIDistanceToPlayer());
#else
buff.sprintf("%5d", item()->getIDistanceToPlayer());
#endif
@@ -281,7 +281,7 @@
{
//buff.sprintf("%5.1f", player->calcDist(*item()));
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5.1f", item()->getFDistanceToPlayer());
+ buff = QString::asprintf("%5.1f", item()->getFDistanceToPlayer());
#else
buff.sprintf("%5.1f", item()->getFDistanceToPlayer());
#endif
@@ -293,7 +293,7 @@
{
// Id
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buff.asprintf("%5d", item()->id());
+ buff = QString::asprintf("%5d", item()->id());
#else
buff.sprintf("%5d", item()->id());
#endif
@@ -325,7 +325,7 @@
// update childcount in header
QString temp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- temp.asprintf("%s (%d)",
+ temp = QString::asprintf("%s (%d)",
name.toLatin1().data(), childCount());
#else
temp.sprintf("%s (%d)",
Modified: showeq/trunk/src/spawnmonitor.cpp
===================================================================
--- showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -57,7 +57,7 @@
{
QString t;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- t.asprintf( "%d%d%d", x, y, z );
+ t = QString::asprintf( "%d%d%d", x, y, z );
#else
t.sprintf( "%d%d%d", x, y, z );
#endif
Modified: showeq/trunk/src/spawnpointlist.cpp
===================================================================
--- showeq/trunk/src/spawnpointlist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spawnpointlist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -77,7 +77,7 @@
if ( secs > 0 )
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmpStr.asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
+ tmpStr = QString::asprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#else
tmpStr.sprintf( "%2ld:%02ld", secs / 60, secs % 60 );
#endif
@@ -348,7 +348,7 @@
def = sp->last();
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- def.asprintf("%d/%d/%d '%s'",
+ def = QString::asprintf("%d/%d/%d '%s'",
sp->x(), sp->y(), sp->z(), def.toLatin1().data());
#else
def.sprintf("%d/%d/%d '%s'",
Modified: showeq/trunk/src/spellshell.cpp
===================================================================
--- showeq/trunk/src/spellshell.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/spellshell.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -77,7 +77,7 @@
d %= 3600;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- text.asprintf("%02d:%02d:%02d", h, d / 60, d % 60);
+ text = QString::asprintf("%02d:%02d:%02d", h, d / 60, d % 60);
#else
text.sprintf("%02d:%02d:%02d", h, d / 60, d % 60);
#endif
Modified: showeq/trunk/src/statlist.cpp
===================================================================
--- showeq/trunk/src/statlist.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/statlist.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -58,7 +58,7 @@
for (int nloop = 0; nloop < LIST_MAXLIST; nloop++)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- statPrefName.asprintf("show%s", statNames[nloop]);
+ statPrefName = QString::asprintf("show%s", statNames[nloop]);
#else
statPrefName.sprintf("show%s", statNames[nloop]);
#endif
@@ -248,7 +248,7 @@
QString statPrefName;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- statPrefName.asprintf("show%s", statNames[stat]);
+ statPrefName = QString::asprintf("show%s", statNames[stat]);
#else
statPrefName.sprintf("show%s", statNames[stat]);
#endif
Modified: showeq/trunk/src/util.cpp
===================================================================
--- showeq/trunk/src/util.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/util.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -84,13 +84,13 @@
threeDigits = number % 1000L;
if (oldstring.isEmpty())
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buffer.asprintf("%u", threeDigits);
+ buffer = QString::asprintf("%u", threeDigits);
#else
buffer.sprintf("%u", threeDigits);
#endif
else
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- buffer.asprintf("%03u", threeDigits);
+ buffer = QString::asprintf("%03u", threeDigits);
#else
buffer.sprintf("%03u", threeDigits);
#endif
@@ -348,7 +348,7 @@
{
QString mat_str;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- mat_str.asprintf("U%02x", material);
+ mat_str = QString::asprintf("U%02x", material);
#else
mat_str.sprintf("U%02x", material);
#endif
@@ -433,7 +433,7 @@
QString skill_name;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- skill_name.asprintf("U0x%2.2x", skill);
+ skill_name = QString::asprintf("U0x%2.2x", skill);
#else
skill_name.sprintf("U0x%2.2x", skill);
#endif
@@ -497,7 +497,7 @@
QString tmp;
// generate a string containing only the unknown flags
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf("U0x%8.8x", (equipableSlots & (~ 0x003fffff)));
+ tmp = QString::asprintf("U0x%8.8x", (equipableSlots & (~ 0x003fffff)));
#else
tmp.sprintf("U0x%8.8x", (equipableSlots & (~ 0x003fffff)));
#endif
@@ -532,7 +532,7 @@
{
QString tmp;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmp.asprintf("Unknown faction: %d", faction);
+ tmp = QString::asprintf("Unknown faction: %d", faction);
#else
tmp.sprintf("Unknown faction: %d", faction);
#endif
@@ -754,7 +754,7 @@
if (uiDivisor == 1000 && (uiCopper / uiDivisor) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%d Platinum", uiCopper / uiDivisor);
+ qsMoney = QString::asprintf("%d Platinum", uiCopper / uiDivisor);
#else
qsMoney.sprintf("%d Platinum", uiCopper / uiDivisor);
#endif
@@ -767,7 +767,7 @@
if (uiDivisor == 100 && (uiCopper / uiDivisor) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%s%s%d Gold", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
+ qsMoney = QString::asprintf("%s%s%d Gold", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#else
qsMoney.sprintf("%s%s%d Gold", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#endif
@@ -780,7 +780,7 @@
if (uiDivisor == 10 && (uiCopper / uiDivisor) > 0)
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%s%s%d Silver", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
+ qsMoney = QString::asprintf("%s%s%d Silver", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#else
qsMoney.sprintf("%s%s%d Silver", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
#endif
@@ -792,7 +792,7 @@
if (uiDivisor == 1 && uiCopper != 0)
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- qsMoney.asprintf("%s%s%d Copper", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper);
+ qsMoney = QString::asprintf("%s%s%d Copper", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper);
#else
qsMoney.sprintf("%s%s%d Copper", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper);
#endif
Modified: showeq/trunk/src/xmlpreferences.cpp
===================================================================
--- showeq/trunk/src/xmlpreferences.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/xmlpreferences.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -53,7 +53,7 @@
m_defaultsSections()
{
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- m_templateDoc.asprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+ m_templateDoc = QString::asprintf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
"<!DOCTYPE %s SYSTEM \"%s\">\n"
"<seqpreferences version=\"%1.1f\">\n"
"<!-- ============================================================= -->"
Modified: showeq/trunk/src/zonemgr.cpp
===================================================================
--- showeq/trunk/src/zonemgr.cpp 2023-03-15 18:26:16 UTC (rev 1354)
+++ showeq/trunk/src/zonemgr.cpp 2023-03-15 18:26:27 UTC (rev 1355)
@@ -105,7 +105,7 @@
seqDebug("ZoneMgr::zoneNameFromID: zone name not found: zoneId=%d", zoneId);
QString tmpStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmpStr.asprintf("unk_zone_%d", zoneId);
+ tmpStr = QString::asprintf("unk_zone_%d", zoneId);
#else
tmpStr.sprintf("unk_zone_%d", zoneId);
#endif
@@ -124,7 +124,7 @@
seqDebug("ZoneMgr::zoneLongNameFromID: zone name not found: zoneId=%d", zoneId);
QString tmpStr;
#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
- tmpStr.asprintf("unk_zone_%d", zoneId);
+ tmpStr = QString::asprintf("unk_zone_%d", zoneId);
#else
tmpStr.sprintf("unk_zone_%d", zoneId);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:26:19
|
Revision: 1354
http://sourceforge.net/p/seq/svn/1354
Author: cn187
Date: 2023-03-15 18:26:16 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix Qt deprecation warnings about QFlags being initialized with 0
Modified Paths:
--------------
showeq/trunk/src/messagewindow.cpp
showeq/trunk/src/seqlistview.h
showeq/trunk/src/seqwindow.h
Modified: showeq/trunk/src/messagewindow.cpp
===================================================================
--- showeq/trunk/src/messagewindow.cpp 2023-03-15 18:26:08 UTC (rev 1353)
+++ showeq/trunk/src/messagewindow.cpp 2023-03-15 18:26:16 UTC (rev 1354)
@@ -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/trunk/src/seqlistview.h
===================================================================
--- showeq/trunk/src/seqlistview.h 2023-03-15 18:26:08 UTC (rev 1353)
+++ showeq/trunk/src/seqlistview.h 2023-03-15 18:26:16 UTC (rev 1354)
@@ -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/trunk/src/seqwindow.h
===================================================================
--- showeq/trunk/src/seqwindow.h 2023-03-15 18:26:08 UTC (rev 1353)
+++ showeq/trunk/src/seqwindow.h 2023-03-15 18:26:16 UTC (rev 1354)
@@ -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...> - 2023-03-15 18:26:11
|
Revision: 1353
http://sourceforge.net/p/seq/svn/1353
Author: cn187
Date: 2023-03-15 18:26:08 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix Qt deprecation warnings about QString::sprintf
Modified Paths:
--------------
showeq/trunk/src/bazaarlog.cpp
showeq/trunk/src/category.cpp
showeq/trunk/src/combatlog.cpp
showeq/trunk/src/editor.cpp
showeq/trunk/src/eqstr.cpp
showeq/trunk/src/interface.cpp
showeq/trunk/src/map.cpp
showeq/trunk/src/mapicon.cpp
showeq/trunk/src/messageshell.cpp
showeq/trunk/src/netdiag.cpp
showeq/trunk/src/packet.cpp
showeq/trunk/src/packetinfo.cpp
showeq/trunk/src/packetlog.cpp
showeq/trunk/src/packetstream.cpp
showeq/trunk/src/seqlistview.cpp
showeq/trunk/src/skilllist.cpp
showeq/trunk/src/spawn.cpp
showeq/trunk/src/spawnlist.cpp
showeq/trunk/src/spawnlist2.cpp
showeq/trunk/src/spawnlistcommon.cpp
showeq/trunk/src/spawnmonitor.cpp
showeq/trunk/src/spawnpointlist.cpp
showeq/trunk/src/spellshell.cpp
showeq/trunk/src/statlist.cpp
showeq/trunk/src/util.cpp
showeq/trunk/src/xmlpreferences.cpp
showeq/trunk/src/zonemgr.cpp
Modified: showeq/trunk/src/bazaarlog.cpp
===================================================================
--- showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/category.cpp
===================================================================
--- showeq/trunk/src/category.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/category.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/combatlog.cpp
===================================================================
--- showeq/trunk/src/combatlog.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/combatlog.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/editor.cpp
===================================================================
--- showeq/trunk/src/editor.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/editor.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/eqstr.cpp
===================================================================
--- showeq/trunk/src/eqstr.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/eqstr.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/mapicon.cpp
===================================================================
--- showeq/trunk/src/mapicon.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/mapicon.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/messageshell.cpp
===================================================================
--- showeq/trunk/src/messageshell.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/messageshell.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/netdiag.cpp
===================================================================
--- showeq/trunk/src/netdiag.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/netdiag.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/packet.cpp
===================================================================
--- showeq/trunk/src/packet.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/packet.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/packetinfo.cpp
===================================================================
--- showeq/trunk/src/packetinfo.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/packetinfo.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/packetlog.cpp
===================================================================
--- showeq/trunk/src/packetlog.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/packetlog.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/packetstream.cpp
===================================================================
--- showeq/trunk/src/packetstream.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/packetstream.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/seqlistview.cpp
===================================================================
--- showeq/trunk/src/seqlistview.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/seqlistview.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/skilllist.cpp
===================================================================
--- showeq/trunk/src/skilllist.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/skilllist.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/spawn.cpp
===================================================================
--- showeq/trunk/src/spawn.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/spawn.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/spawnlist.cpp
===================================================================
--- showeq/trunk/src/spawnlist.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/spawnlist.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/spawnlist2.cpp
===================================================================
--- showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/spawnlist2.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/spawnlistcommon.cpp
===================================================================
--- showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/spawnlistcommon.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/spawnmonitor.cpp
===================================================================
--- showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/spawnpointlist.cpp
===================================================================
--- showeq/trunk/src/spawnpointlist.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/spawnpointlist.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/spellshell.cpp
===================================================================
--- showeq/trunk/src/spellshell.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/spellshell.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/statlist.cpp
===================================================================
--- showeq/trunk/src/statlist.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/statlist.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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/trunk/src/util.cpp
===================================================================
--- showeq/trunk/src/util.cpp 2023-03-15 18:25:55 UTC (rev 1352)
+++ showeq/trunk/src/util.cpp 2023-03-15 18:26:08 UTC (rev 1353)
@@ -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 & (~ 0x003fffff)));
+#else
tmp.sprintf("U0x%8.8x", (equipableSlots & (~ 0x003fffff)));
+#endif
slot_str += tmp;
}
@@ -511,7 +531,11 @@
else
{
QString tmp;
+#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
+ tmp.asprintf("Unknown faction: %d", faction);
+#else
tmp.sprintf("Unknown faction: %d", faction);
+#endif
return tmp;
}
}
@@ -729,7 +753,11 @@
if (uiDivisor == 1000 && (uiCopper / uiDivisor) > 0)
{
+#if (QT_VERSION >= QT_VERSION_CHECK(5,5,0))
+ qsMoney.asprintf("%d Platinum", uiCopper / uiDivisor);
+#else
qsMoney.sprintf("%d Platinum", uiCopper / uiDivisor);
+#endif
bNeedComma = true;
uiCopper -= ((uiCopper / uiDivisor) * uiDivisor);
}
@@ -738,7 +766,11 @@
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);
+#else
qsMoney.sprintf("%s%s%d Gold", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
+#endif
bNeedComma = true;
uiCopper -= ((uiCopper / uiDivisor) * uiDivisor);
}
@@ -747,7 +779,11 @@
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);
+#else
qsMoney.sprintf("%s%s%d Silver", qsMoney.toLatin1().data(), bNeedComma ? ", " : "", uiCopper / uiDivisor);
+#endif
...
[truncated message content] |
|
From: <cn...@us...> - 2023-03-15 18:25:57
|
Revision: 1352
http://sourceforge.net/p/seq/svn/1352
Author: cn187
Date: 2023-03-15 18:25:55 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix Qt deprecation warnings about endl
Modified Paths:
--------------
showeq/trunk/src/bazaarlog.cpp
showeq/trunk/src/filter.cpp
showeq/trunk/src/group.cpp
showeq/trunk/src/guild.cpp
showeq/trunk/src/guildshell.cpp
showeq/trunk/src/interface.cpp
showeq/trunk/src/map.cpp
showeq/trunk/src/mapicon.cpp
showeq/trunk/src/messagewindow.cpp
showeq/trunk/src/packetinfo.cpp
showeq/trunk/src/packetlog.cpp
showeq/trunk/src/sortitem.cpp
showeq/trunk/src/spawnshell.cpp
Modified: showeq/trunk/src/bazaarlog.cpp
===================================================================
--- showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/bazaarlog.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -27,6 +27,13 @@
#include "spawnshell.h"
#include "diagnosticmessages.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
BazaarLog::BazaarLog(EQPacket& packet, const QString& fname,
QObject* parent, SpawnShell& shell, const char* name)
: SEQLogger(fname, parent, name),
@@ -72,7 +79,7 @@
csv.sprintf("1^%d^%d^%d^%s^%s",
int(time(NULL)),resp.price,resp.count,
merchant_name, name);
- m_out << csv << endl;
+ m_out << csv << ENDL;
}
flush();
Modified: showeq/trunk/src/filter.cpp
===================================================================
--- showeq/trunk/src/filter.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/filter.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -36,6 +36,13 @@
#define MAXLEN 5000
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//#define DEBUG_FILTER
//----------------------------------------------------------------------
@@ -229,7 +236,7 @@
out << "/>";
}
- out << "</oldfilter>" << endl;
+ out << "</oldfilter>" << ENDL;
return true;
}
@@ -565,9 +572,9 @@
out.setFieldAlignment(QTextStream::AlignLeft);
// print document header
- out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl
- << "<!DOCTYPE seqfilters SYSTEM \"seqfilters.dtd\">" << endl
- << "<seqfilters>" << endl;
+ out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << ENDL
+ << "<!DOCTYPE seqfilters SYSTEM \"seqfilters.dtd\">" << ENDL
+ << "<seqfilters>" << ENDL;
// set initial indent
QString indent = " ";
@@ -579,17 +586,17 @@
{
// section start tag
out << indent << "<section name=\"" << m_types.name(it->first)
- << "\">" << endl;
+ << "\">" << ENDL;
// persist the filter
it->second->save(indent, out);
// section end tag
- out << indent << "</section>" << endl;
+ out << indent << "</section>" << ENDL;
}
// output closing entity
- out << "</seqfilters>" << endl;
+ out << "</seqfilters>" << ENDL;
return true;
}
Modified: showeq/trunk/src/group.cpp
===================================================================
--- showeq/trunk/src/group.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/group.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -30,6 +30,13 @@
#include <QTextStream>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
GroupMgr::GroupMgr(SpawnShell* spawnShell,
Player* player,
QObject* parent, const char* name)
@@ -326,17 +333,17 @@
void GroupMgr::dumpInfo(QTextStream& out)
{
// dump general group manager information
- out << "[GroupMgr]" << endl;
- out << "Members: " << m_memberCount << endl;
- out << "MembersInZone: " << m_membersInZoneCount << endl;
- out << "Player: " << m_player->name() << endl;
- out << "GroupBonus: " << groupBonus() << endl;
- out << "GroupTotalLevels: " << totalLevels() << endl;
+ out << "[GroupMgr]" << ENDL;
+ out << "Members: " << m_memberCount << ENDL;
+ out << "MembersInZone: " << m_membersInZoneCount << ENDL;
+ out << "Player: " << m_player->name() << ENDL;
+ out << "GroupBonus: " << groupBonus() << ENDL;
+ out << "GroupTotalLevels: " << totalLevels() << ENDL;
out << "GroupAverageLevel: ";
if (m_membersInZoneCount)
- out << totalLevels()/m_membersInZoneCount << endl;
+ out << totalLevels()/m_membersInZoneCount << ENDL;
else
- out << totalLevels() << endl;
+ out << totalLevels() << ENDL;
// iterate over the group members
for (int i = 0; i < MAX_GROUP_MEMBERS; i++)
@@ -351,7 +358,7 @@
<< " " << m_members[i]->m_spawn->raceString()
<< " " << m_members[i]->m_spawn->classString();
- out << endl;
+ out << ENDL;
}
}
Modified: showeq/trunk/src/guild.cpp
===================================================================
--- showeq/trunk/src/guild.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/guild.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -34,6 +34,13 @@
#include <QDataStream>
#include <QTextStream>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
GuildMgr::GuildMgr(QString fn, QObject* parent, const char* name)
: QObject(parent)
{
@@ -223,7 +230,7 @@
{
if (itr->first == 0)
continue;
- guildtext << itr->first << "\t" << itr->second << endl;
+ guildtext << itr->first << "\t" << itr->second << ENDL;
}
guildsfile.close();
Modified: showeq/trunk/src/guildshell.cpp
===================================================================
--- showeq/trunk/src/guildshell.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/guildshell.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -31,6 +31,13 @@
#include <QDateTime>
#include <QTextStream>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// diagnostic defines
// #define GUILDSHELL_DIAG 1
@@ -211,7 +218,7 @@
if (classString(i).length() > maxClassNameLength)
maxClassNameLength = classString(i).length();
- out << "Guild has " << m_members.count() << " members: " << endl;
+ out << "Guild has " << m_members.count() << " members: " << ENDL;
int nameFieldWidth = - m_maxNameLength;
int classFieldWidth = - maxClassNameLength;
@@ -224,7 +231,7 @@
.arg("P", 1)
.arg("Last On", -24)
.arg("Zone", -18);
- out << " Public Note" << endl;
+ out << " Public Note" << ENDL;
QString zone;
while (it.hasNext())
@@ -245,7 +252,7 @@
.arg(dt.toString(dateFormat), -24)
.arg(zone, -18);
- out << " " << member->publicNote() << endl;
+ out << " " << member->publicNote() << ENDL;
}
}
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -94,6 +94,13 @@
#include <QDesktopWidget>
#include <QStyleFactory>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
// this define is used to diagnose the order with which zone packets are rcvd
#define ZONE_ORDER_DIAG
@@ -3553,11 +3560,11 @@
// open the output data stream
QTextStream out(&outText, QIODevice::WriteOnly);
- out << "Map window layout info:" << endl;
- out << "-----------------------" << endl;
+ out << "Map window layout info:" << ENDL;
+ out << "-----------------------" << ENDL;
//FIXME out << *this;
- out << "FIXME" << endl;
- out << "-----------------------" << endl;
+ out << "FIXME" << ENDL;
+ out << "-----------------------" << ENDL;
seqInfo(outText.toLatin1().data());
}
@@ -3698,7 +3705,7 @@
out << "Spellbook of " << m_player->name() << " a level "
<< m_player->level() << " " << m_player->raceString()
<< " " << m_player->classString()
- << endl;
+ << ENDL;
uint8_t playerClass = m_player->classVal();
@@ -3728,7 +3735,7 @@
spell_name(spellid).toLatin1().data());
}
- out << txt << endl;
+ out << txt << ENDL;
}
}
@@ -5044,7 +5051,7 @@
QTextStream out(&mobPathFile);
// map header line
out << m_zoneMgr->longZoneName() << ","
- << m_zoneMgr->shortZoneName() << ",0,0" << endl;
+ << m_zoneMgr->shortZoneName() << ",0,0" << ENDL;
// iterate over the spawns adding their paths to the file
ItemConstIterator it(m_spawnShell->getConstMap(tSpawn));
@@ -5098,7 +5105,7 @@
<< "," << trackPoint->y()
<< "," << trackPoint->z();
}
- out << endl;
+ out << ENDL;
}
void EQInterface::toggle_net_real_time_thread(bool realtime)
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -83,6 +83,13 @@
#include <QTextStream>
#include <QMouseEvent>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// Macros
//#define DEBUG
@@ -787,32 +794,32 @@
void MapMgr::dumpInfo(QTextStream& out)
{
- out << "[MapMgr]" << endl;
- out << "DefaultLineColor: " << m_curLineColor << endl;
- out << "DefaultLineName: " << m_curLineName << endl;
- out << "DefaultLocationColor: " << m_curLocationColor << endl;
- out << "ImageLoaded: " << m_mapData.imageLoaded() << endl;
- out << "ZoneShortName: " << m_mapData.zoneShortName() << endl;
- out << "ZoneLongName: " << m_mapData.zoneLongName() << endl;
+ out << "[MapMgr]" << ENDL;
+ out << "DefaultLineColor: " << m_curLineColor << ENDL;
+ out << "DefaultLineName: " << m_curLineName << ENDL;
+ out << "DefaultLocationColor: " << m_curLocationColor << ENDL;
+ out << "ImageLoaded: " << m_mapData.imageLoaded() << ENDL;
+ out << "ZoneShortName: " << m_mapData.zoneShortName() << ENDL;
+ out << "ZoneLongName: " << m_mapData.zoneLongName() << ENDL;
out << "boundingRect: top(" << m_mapData.boundingRect().top()
<< ") bottom(" << m_mapData.boundingRect().bottom()
<< ") left(" << m_mapData.boundingRect().left()
- << ") right(" << m_mapData.boundingRect().right() << ") " << endl;
+ << ") right(" << m_mapData.boundingRect().right() << ") " << ENDL;
out << "size: width(" << m_mapData.size().width()
- << ") height(" << m_mapData.size().height() << ")" << endl;
- out << "ZoneZEM: " << m_mapData.zoneZEM() << endl;
- out << "numLayers: " << m_mapData.numLayers() << endl;
+ << ") height(" << m_mapData.size().height() << ")" << ENDL;
+ out << "ZoneZEM: " << m_mapData.zoneZEM() << ENDL;
+ out << "numLayers: " << m_mapData.numLayers() << ENDL;
for (int i = 0; i < m_mapData.numLayers(); ++i)
{
- out << "Layer " << i << ":" << endl;
- out << "\tMapFileName: " << m_mapData.mapLayer(i)->fileName() << endl;
- out << "\tMapLoaded: " << m_mapData.mapLayer(i)->mapLoaded() << endl;
- out << "\tLLines: " << m_mapData.mapLayer(i)->lLines().count() << endl;
- out << "\tMLines: " << m_mapData.mapLayer(i)->mLines().count() << endl;
- out << "\tLocations: " << m_mapData.mapLayer(i)->locations().count() << endl;
+ out << "Layer " << i << ":" << ENDL;
+ out << "\tMapFileName: " << m_mapData.mapLayer(i)->fileName() << ENDL;
+ out << "\tMapLoaded: " << m_mapData.mapLayer(i)->mapLoaded() << ENDL;
+ out << "\tLLines: " << m_mapData.mapLayer(i)->lLines().count() << ENDL;
+ out << "\tMLines: " << m_mapData.mapLayer(i)->mLines().count() << ENDL;
+ out << "\tLocations: " << m_mapData.mapLayer(i)->locations().count() << ENDL;
}
- out << "Aggros: " << m_mapData.aggros().count() << endl;
- out << endl;
+ out << "Aggros: " << m_mapData.aggros().count() << ENDL;
+ out << ENDL;
}
//----------------------------------------------------------------------
@@ -3000,82 +3007,82 @@
void Map::dumpInfo(QTextStream& out)
{
- out << "[" << preferenceName() << "]" << endl;
- out << "Caption: " << windowTitle() << endl;
- out << "AnimateSpawnMovement: " << m_animate << endl;
- out << "VelocityLines: " << m_showVelocityLines << endl;
- out << "SpawnDepthFilter: " << m_showVelocityLines << endl;
- out << "FrameRate: " << m_frameRate << endl;
+ out << "[" << preferenceName() << "]" << ENDL;
+ out << "Caption: " << windowTitle() << ENDL;
+ out << "AnimateSpawnMovement: " << m_animate << ENDL;
+ out << "VelocityLines: " << m_showVelocityLines << ENDL;
+ out << "SpawnDepthFilter: " << m_showVelocityLines << ENDL;
+ out << "FrameRate: " << m_frameRate << ENDL;
#ifdef DEBUG
- out << "ShowDebugInfo: " << m_showDebugInfo << endl;
+ out << "ShowDebugInfo: " << m_showDebugInfo << ENDL;
#endif
- out << "ShowPlayer: " << m_showPlayer << endl;
- out << "ShowPlayerBackground: " << m_showPlayerBackground << endl;
- out << "ShowPlayerView: " << m_showPlayerView << endl;
- out << "ShowDroppedItems: " << m_showDrops << endl;
- out << "ShowDoors: " << m_showDoors << endl;
- out << "ShowSpawns: " << m_showSpawns << endl;
- out << "ShowFiltered: " << m_showFiltered << endl;
- out << "HighlightConsideredSpawns: " << m_highlightConsideredSpawns << endl;
- out << "ShowTooltips: " << m_showTooltips << endl;
- out << "WalkPathShowSelect: " << m_walkpathshowselect << endl;
- out << "FOVStyle: " << m_fovStyle << endl;
- out << "FOVMode: " << m_fovMode << endl;
- out << "FOVColor: " << m_fovColor.name() << endl;
+ out << "ShowPlayer: " << m_showPlayer << ENDL;
+ out << "ShowPlayerBackground: " << m_showPlayerBackground << ENDL;
+ out << "ShowPlayerView: " << m_showPlayerView << ENDL;
+ out << "ShowDroppedItems: " << m_showDrops << ENDL;
+ out << "ShowDoors: " << m_showDoors << ENDL;
+ out << "ShowSpawns: " << m_showSpawns << ENDL;
+ out << "ShowFiltered: " << m_showFiltered << ENDL;
+ out << "HighlightConsideredSpawns: " << m_highlightConsideredSpawns << ENDL;
+ out << "ShowTooltips: " << m_showTooltips << ENDL;
+ out << "WalkPathShowSelect: " << m_walkpathshowselect << ENDL;
+ out << "FOVStyle: " << m_fovStyle << ENDL;
+ out << "FOVMode: " << m_fovMode << ENDL;
+ out << "FOVColor: " << m_fovColor.name() << ENDL;
- out << endl;
- out << "[" << preferenceName() << " Parameters]" << endl;
- out << "MapLineStyle: " << m_param.mapLineStyle() << endl;
- out << "ShowMapPoints: " << m_param.showLocations() << endl;
- out << "ShowMapLines: " << m_param.showLines() << endl;
- out << "ShowGridLines: " << m_param.showGridLines() << endl;
- out << "ShowGridTicks: " << m_param.showGridTicks() << endl;
- out << "ShowBackgroundImage: " << m_param.showBackgroundImage() << endl;
- out << "GridResolution: " << m_param.gridResolution() << endl;
- out << "GridTickColor: " << m_param.gridTickColor().name() << endl;
- out << "GridLineColor: " << m_param.gridLineColor().name() << endl;
- out << "BackgroundColor: " << m_param.backgroundColor().name() << endl;
- out << "HeadRoom: " << m_param.headRoom() << endl;
- out << "FloorRoom: " << m_param.floorRoom() << endl;
+ out << ENDL;
+ out << "[" << preferenceName() << " Parameters]" << ENDL;
+ out << "MapLineStyle: " << m_param.mapLineStyle() << ENDL;
+ out << "ShowMapPoints: " << m_param.showLocations() << ENDL;
+ out << "ShowMapLines: " << m_param.showLines() << ENDL;
+ out << "ShowGridLines: " << m_param.showGridLines() << ENDL;
+ out << "ShowGridTicks: " << m_param.showGridTicks() << ENDL;
+ out << "ShowBackgroundImage: " << m_param.showBackgroundImage() << ENDL;
+ out << "GridResolution: " << m_param.gridResolution() << ENDL;
+ out << "GridTickColor: " << m_param.gridTickColor().name() << ENDL;
+ out << "GridLineColor: " << m_param.gridLineColor().name() << ENDL;
+ out << "BackgroundColor: " << m_param.backgroundColor().name() << ENDL;
+ out << "HeadRoom: " << m_param.headRoom() << ENDL;
+ out << "FloorRoom: " << m_param.floorRoom() << ENDL;
- out << endl;
+ out << ENDL;
m_mapIcons->dumpInfo(out);
- out << "[" << preferenceName() << " State]" << endl;
+ out << "[" << preferenceName() << " State]" << ENDL;
out << "screenLength: width(" << m_param.screenLength().width()
- << ") height(" << m_param.screenLength().height() << ")" << endl;
+ << ") height(" << m_param.screenLength().height() << ")" << ENDL;
out << "screenBounds: top(" << m_param.screenBounds().top()
<< ") bottom(" << m_param.screenBounds().bottom()
<< ") left(" << m_param.screenBounds().left()
- << ") right(" << m_param.screenBounds().right() << ") " << endl;
+ << ") right(" << m_param.screenBounds().right() << ") " << ENDL;
out << "screenCenter: x(" << m_param.screenCenter().x()
- << ") y(" << m_param.screenCenter().y() << ")" << endl;
+ << ") y(" << m_param.screenCenter().y() << ")" << ENDL;
out << "zoomMapLength: width(" << m_param.zoomMapLength().width()
- << ") height(" << m_param.zoomMapLength().height() << ")" << endl;
- out << "panOffsetX: " << m_param.panOffsetX() << endl;
- out << "panOffsetY: " << m_param.panOffsetY() << endl;
- out << "zoom: " << m_param.zoom() << endl;
- out << "ratio: " << m_param.ratio() << endl;
+ << ") height(" << m_param.zoomMapLength().height() << ")" << ENDL;
+ out << "panOffsetX: " << m_param.panOffsetX() << ENDL;
+ out << "panOffsetY: " << m_param.panOffsetY() << ENDL;
+ out << "zoom: " << m_param.zoom() << ENDL;
+ out << "ratio: " << m_param.ratio() << ENDL;
out << "ratioIFixPt: " << m_param.ratioIFixPt()
- << " (q = " << MapParameters::qFormat << ")" << endl;
+ << " (q = " << MapParameters::qFormat << ")" << ENDL;
out << "player: x(" << m_param.player().x()
<< ") y(" << m_param.player().y()
- << ") z(" << m_param.player().z() << ")" << endl;
+ << ") z(" << m_param.player().z() << ")" << ENDL;
out << "playerOffset: x(" << m_param.playerOffset().x()
- << ") y(" << m_param.playerOffset().y() << ")" << endl;
- out << "scaledFOVDistance: " << m_scaledFOVDistance << endl;
- out << "playerHeadRoom: " << m_param.playerHeadRoom() << endl;
- out << "playerFloorRoom: " << m_param.playerFloorRoom() << endl;
- out << "FollowMode: " << m_followMode << endl;
- out << "MapPanning: " << m_mapPanning << endl;
- out << "PvP: " << m_pvp << endl;
- out << "DeityPvP: " << m_deityPvP << endl;
- out << "RacePvP: " << m_racePvP << endl;
- out << "CacheAlwaysRepaint: " << m_mapCache.alwaysRepaint() << endl;
- out << endl;
+ << ") y(" << m_param.playerOffset().y() << ")" << ENDL;
+ out << "scaledFOVDistance: " << m_scaledFOVDistance << ENDL;
+ out << "playerHeadRoom: " << m_param.playerHeadRoom() << ENDL;
+ out << "playerFloorRoom: " << m_param.playerFloorRoom() << ENDL;
+ out << "FollowMode: " << m_followMode << ENDL;
+ out << "MapPanning: " << m_mapPanning << ENDL;
+ out << "PvP: " << m_pvp << ENDL;
+ out << "DeityPvP: " << m_deityPvP << ENDL;
+ out << "RacePvP: " << m_racePvP << ENDL;
+ out << "CacheAlwaysRepaint: " << m_mapCache.alwaysRepaint() << ENDL;
+ out << ENDL;
#ifdef DEBUG
- out << "[" << preferenceName() << " Statistics]" << endl;
+ out << "[" << preferenceName() << " Statistics]" << ENDL;
if (m_showDebugInfo)
{
long totalTime = 0;
@@ -3085,16 +3092,16 @@
fps = float(maxFrameTimes) / (totalTime / 1000.0);
- out << "Actual FPS: " << fps << endl;
+ out << "Actual FPS: " << fps << ENDL;
}
- out << "Paint Count: " << m_paintCount << endl;
- out << "Cache Paint Count: " << m_mapCache.paintCount() << endl;
+ out << "Paint Count: " << m_paintCount << ENDL;
+ out << "Cache Paint Count: " << m_mapCache.paintCount() << ENDL;
out << "Average Cache Paints per Map Paint: " <<
- double(m_mapCache.paintCount()) / double(m_paintCount) << endl;
+ double(m_mapCache.paintCount()) / double(m_paintCount) << ENDL;
out << "Average Paint Time: "
<< double(m_paintTimeSum) / double(m_paintCount)
- << " milliseconds " << endl;
- out << endl;
+ << " milliseconds " << ENDL;
+ out << ENDL;
#endif // DEBUG
}
@@ -5267,22 +5274,22 @@
void MapFrame::dumpInfo(QTextStream& out)
{
// first dump information about the map frame
- out << "[" << preferenceName() << "]" << endl;
- out << "Caption: " << windowTitle() << endl;
- out << "ShowStatusBox: " << m_topControlBox->isVisible() << endl;
- out << "ShowZoom: " << m_zoomBox->isVisible() << endl;
- out << "ShowPlayerLocation: " << m_playerLocationBox->isVisible() << endl;
- out << "ShowMouseLocation: " << m_mouseLocationBox->isVisible() << endl;
- out << "ShowFilter: " << m_filterBox->isVisible() << endl;
- out << "ShowControlBox: " << m_bottomControlBox->isVisible() << endl;
- out << "ShowFrameRate: " << m_frameRateBox->isVisible() << endl;
- out << "ShowLayersControl: " << m_layersBox->isVisible() << endl;
- out << "ShowPanControls: " << m_panBox->isVisible() << endl;
- out << "ShowDepthFilterControls: " << m_depthControlBox->isVisible() << endl;
- out << "CurrentFilter: '" << m_lastFilter << "'" << endl;
- out << "RuntimeFilterFlag: " << m_runtimeFilterFlag << endl;
- out << "RuntimeFilterFlagMask: " << m_runtimeFilterFlagMask << endl;
- out << endl;
+ out << "[" << preferenceName() << "]" << ENDL;
+ out << "Caption: " << windowTitle() << ENDL;
+ out << "ShowStatusBox: " << m_topControlBox->isVisible() << ENDL;
+ out << "ShowZoom: " << m_zoomBox->isVisible() << ENDL;
+ out << "ShowPlayerLocation: " << m_playerLocationBox->isVisible() << ENDL;
+ out << "ShowMouseLocation: " << m_mouseLocationBox->isVisible() << ENDL;
+ out << "ShowFilter: " << m_filterBox->isVisible() << ENDL;
+ out << "ShowControlBox: " << m_bottomControlBox->isVisible() << ENDL;
+ out << "ShowFrameRate: " << m_frameRateBox->isVisible() << ENDL;
+ out << "ShowLayersControl: " << m_layersBox->isVisible() << ENDL;
+ out << "ShowPanControls: " << m_panBox->isVisible() << ENDL;
+ out << "ShowDepthFilterControls: " << m_depthControlBox->isVisible() << ENDL;
+ out << "CurrentFilter: '" << m_lastFilter << "'" << ENDL;
+ out << "RuntimeFilterFlag: " << m_runtimeFilterFlag << ENDL;
+ out << "RuntimeFilterFlagMask: " << m_runtimeFilterFlagMask << ENDL;
+ out << ENDL;
// dump information about the map
if (m_map)
Modified: showeq/trunk/src/mapicon.cpp
===================================================================
--- showeq/trunk/src/mapicon.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/mapicon.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -34,6 +34,13 @@
#include <QTextStream>
#include <QPolygon>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// constants
static const QString iconSizeNames[] =
@@ -822,11 +829,11 @@
void MapIcons::dumpInfo(QTextStream& out)
{
- out << "[" << preferenceName() << " MapIcons]" << endl;
- out << "ShowSpawnNames: " << m_showSpawnNames << endl;
- out << "FOVDistance: " << m_fovDistance << endl;
- out << "DrawSize: " << m_drawSize << endl;
- out << endl;
+ out << "[" << preferenceName() << " MapIcons]" << ENDL;
+ out << "ShowSpawnNames: " << m_showSpawnNames << ENDL;
+ out << "FOVDistance: " << m_fovDistance << ENDL;
+ out << "DrawSize: " << m_drawSize << ENDL;
+ out << ENDL;
}
const QString& MapIcons::iconTypeName(MapIconType type)
Modified: showeq/trunk/src/messagewindow.cpp
===================================================================
--- showeq/trunk/src/messagewindow.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/messagewindow.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -48,6 +48,13 @@
#include <QMouseEvent>
#include <QEvent>
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// MessageBrowser
MessageBrowser::MessageBrowser(QWidget* parent, const char* name)
@@ -907,7 +914,7 @@
{
QTextStream stream( &file );
- stream << m_messageWindow->toPlainText() << endl;
+ stream << m_messageWindow->toPlainText() << ENDL;
}
}
Modified: showeq/trunk/src/packetinfo.cpp
===================================================================
--- showeq/trunk/src/packetinfo.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/packetinfo.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -38,6 +38,13 @@
#include "everquest.h"
#include "diagnosticmessages.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// Macros
@@ -329,9 +336,9 @@
out.setFieldAlignment(QTextStream::AlignLeft);
// print document header
- out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl
- << "<!DOCTYPE seqopcodes SYSTEM \"seqopcodes.dtd\">" << endl
- << "<seqopcodes>" << endl;
+ out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << ENDL
+ << "<!DOCTYPE seqopcodes SYSTEM \"seqopcodes.dtd\">" << ENDL
+ << "<seqopcodes>" << ENDL;
// set initial indent
QString indent = " ";
@@ -374,7 +381,7 @@
out << " implicitlen=\"" << currentOPCode->implicitLen() << "\"";
if (!currentOPCode->updated().isEmpty())
out << " updated=\"" << currentOPCode->updated() << "\"";
- out << ">" << endl;
+ out << ">" << ENDL;
// increase the indent
indent += " ";
@@ -383,7 +390,7 @@
QStringList comments = currentOPCode->comments();
for (QStringList::Iterator cit = comments.begin();
cit != comments.end(); ++cit)
- out << indent << "<comment>" << *cit << "</comment>" << endl;
+ out << indent << "<comment>" << *cit << "</comment>" << ENDL;
QByteArray dirStr;
QByteArray sztStr;
@@ -401,7 +408,7 @@
<< "\" typename=\"" << currentPayload->typeName()
<< "\" sizechecktype=\""
<< sztStrs[currentPayload->sizeCheckType()]
- << "\"/>" << endl;
+ << "\"/>" << ENDL;
}
// decrease the indent
@@ -408,11 +415,11 @@
indent.remove(0, 4);
// close the opcode entity
- out << indent << "</opcode>" << endl;
+ out << indent << "</opcode>" << ENDL;
}
// output closing entity
- out << "</seqopcodes>" << endl;
+ out << "</seqopcodes>" << ENDL;
return true;
}
Modified: showeq/trunk/src/packetlog.cpp
===================================================================
--- showeq/trunk/src/packetlog.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/packetlog.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -29,6 +29,13 @@
#include "decode.h"
#include "diagnosticmessages.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// PacketLog
PacketLog::PacketLog(EQPacket& packet, const QString& fname,
@@ -143,10 +150,10 @@
// data direction and size
m_out << ((dir == DIR_Server) ? "[Server->Client] " : "[Client->Server] ")
- << "[Size: " << QString::number(len) << "]" << endl;
+ << "[Size: " << QString::number(len) << "]" << ENDL;
// output opcode info
- m_out << opCodeToString(opcode) << endl;
+ m_out << opCodeToString(opcode) << ENDL;
flush();
@@ -154,7 +161,7 @@
if (len)
outputData(len, data);
else
- m_out << endl;
+ m_out << ENDL;
flush();
}
@@ -182,10 +189,10 @@
// data direction and size
m_out << ((dir == DIR_Server) ? "[Server->Client] " : "[Client->Server] ")
- << "[Size: " << QString::number(len) << "]" << endl;
+ << "[Size: " << QString::number(len) << "]" << ENDL;
// output opcode info
- m_out << opCodeToString(opcode) << endl;
+ m_out << opCodeToString(opcode) << ENDL;
if (opcodeEntry)
{
@@ -213,7 +220,7 @@
}
}
- m_out << endl;
+ m_out << ENDL;
}
flush();
@@ -222,7 +229,7 @@
if (len)
outputData(len, data);
else
- m_out << endl;
+ m_out << ENDL;
flush();
}
@@ -247,7 +254,7 @@
<< " [" << sourceStr << ":" << QString::number(packet.getSourcePort())
<< "->" << destStr << ":" << QString::number(packet.getDestPort())
<< "] [Size: " << QString::number(packet.getUDPPayloadLength()) << "]"
- << endl;
+ << ENDL;
uint16_t calcedCRC;
@@ -270,18 +277,18 @@
if (packet.hasCRC())
{
- m_out << " [CRC ok]" << endl;
+ m_out << " [CRC ok]" << ENDL;
}
- m_out << endl;
+ m_out << ENDL;
}
else
{
m_out << "[BAD CRC (" << QString::number(calcedCRC, 16)
<< " != " << QString::number(packet.crc(), 16)
- << ")! Sessions crossed or unitialized or non-EQ packet! ]" << endl;
+ << ")! Sessions crossed or unitialized or non-EQ packet! ]" << ENDL;
m_out << "[SessionKey: " << QString::number(packet.getSessionKey(), 16) <<
- "]" << endl;
+ "]" << ENDL;
}
flush();
@@ -291,7 +298,7 @@
outputData(packet.getUDPPayloadLength(),
(const uint8_t*)packet.getUDPPayload());
else
- m_out << endl;
+ m_out << ENDL;
flush();
}
Modified: showeq/trunk/src/sortitem.cpp
===================================================================
--- showeq/trunk/src/sortitem.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/sortitem.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -27,6 +27,13 @@
#include "util.h"
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
// This code used to be used to sort the old format item databases
// It is now a test program for use with regression testing the functions
// that provide printable names
@@ -42,7 +49,7 @@
int dp = 8; // decimal precision
int i, j;
- out << "Skills:" << endl;
+ out << "Skills:" << ENDL;
for (i = 0; i <=74; ++i)
out << format.arg(i, dp).arg(i, hp, 16).arg(skill_name(i));
out << "\n\n";
Modified: showeq/trunk/src/spawnshell.cpp
===================================================================
--- showeq/trunk/src/spawnshell.cpp 2023-03-15 18:25:44 UTC (rev 1351)
+++ showeq/trunk/src/spawnshell.cpp 2023-03-15 18:25:55 UTC (rev 1352)
@@ -47,6 +47,14 @@
#include <climits>
#include <cmath>
+
+#pragma message("Once our minimum supported Qt version is greater than 5.14, this check can be removed and ENDL replaced with Qt::endl")
+#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
+#define ENDL Qt::endl
+#else
+#define ENDL endl
+#endif
+
//----------------------------------------------------------------------
// useful macro definitions
@@ -394,7 +402,7 @@
if (!it.value())
break;
- out << it.value()->dumpString() << endl;
+ out << it.value()->dumpString() << ENDL;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:25:46
|
Revision: 1351
http://sourceforge.net/p/seq/svn/1351
Author: cn187
Date: 2023-03-15 18:25:44 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix Qt deprecation warnings about QString::null
Modified Paths:
--------------
showeq/trunk/src/combatlog.cpp
showeq/trunk/src/experiencelog.cpp
showeq/trunk/src/map.cpp
showeq/trunk/src/messagefilterdialog.cpp
showeq/trunk/src/spawnmonitor.cpp
showeq/trunk/src/xmlpreferences.h
Modified: showeq/trunk/src/combatlog.cpp
===================================================================
--- showeq/trunk/src/combatlog.cpp 2023-03-15 18:25:26 UTC (rev 1350)
+++ showeq/trunk/src/combatlog.cpp 2023-03-15 18:25:44 UTC (rev 1351)
@@ -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/trunk/src/experiencelog.cpp
===================================================================
--- showeq/trunk/src/experiencelog.cpp 2023-03-15 18:25:26 UTC (rev 1350)
+++ showeq/trunk/src/experiencelog.cpp 2023-03-15 18:25:44 UTC (rev 1351)
@@ -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/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:25:26 UTC (rev 1350)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:25:44 UTC (rev 1351)
@@ -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/trunk/src/messagefilterdialog.cpp
===================================================================
--- showeq/trunk/src/messagefilterdialog.cpp 2023-03-15 18:25:26 UTC (rev 1350)
+++ showeq/trunk/src/messagefilterdialog.cpp 2023-03-15 18:25:44 UTC (rev 1351)
@@ -46,7 +46,7 @@
{
public:
MessageFilterListBoxText(QListWidget * listbox,
- const QString & text = QString::null,
+ const QString & text = "",
uint32_t data = 0);
virtual ~MessageFilterListBoxText();
Modified: showeq/trunk/src/spawnmonitor.cpp
===================================================================
--- showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:25:26 UTC (rev 1350)
+++ showeq/trunk/src/spawnmonitor.cpp 2023-03-15 18:25:44 UTC (rev 1351)
@@ -44,7 +44,7 @@
m_diffTime(diffTime),
m_count(count),
m_name( name ),
- m_last( QString::null ),
+ m_last( "" ),
m_lastID(spawnID)
{
}
Modified: showeq/trunk/src/xmlpreferences.h
===================================================================
--- showeq/trunk/src/xmlpreferences.h 2023-03-15 18:25:26 UTC (rev 1350)
+++ showeq/trunk/src/xmlpreferences.h 2023-03-15 18:25:44 UTC (rev 1351)
@@ -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: <cn...@us...> - 2023-03-15 18:25:35
|
Revision: 1350
http://sourceforge.net/p/seq/svn/1350
Author: cn187
Date: 2023-03-15 18:25:26 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Remove default theme from seqdef.xml to accept system default
Modified Paths:
--------------
showeq/trunk/conf/seqdef.xml
Modified: showeq/trunk/conf/seqdef.xml
===================================================================
--- showeq/trunk/conf/seqdef.xml 2023-03-15 18:25:17 UTC (rev 1349)
+++ showeq/trunk/conf/seqdef.xml 2023-03-15 18:25:26 UTC (rev 1350)
@@ -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: <cn...@us...> - 2023-03-15 18:25:21
|
Revision: 1349
http://sourceforge.net/p/seq/svn/1349
Author: cn187
Date: 2023-03-15 18:25:17 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Qt4 compatibility fix for style enum change
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:25:07 UTC (rev 1348)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:25:17 UTC (rev 1349)
@@ -1447,7 +1447,11 @@
QStringList availableStyles = QStyleFactory::keys();
+#if QT_VERSION >= 0x050000
availableStyles.sort(Qt::CaseInsensitive);
+#else
+ availableStyles.sort();
+#endif
QString currentStyleName = qApp->style()->objectName();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:25:14
|
Revision: 1348
http://sourceforge.net/p/seq/svn/1348
Author: cn187
Date: 2023-03-15 18:25:07 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Enumerate available Qt styles
* Instead of hard-coding styles which may or may not be available,
enumerate available styles and an allow the user to choose from those.
* Code now relies on style name instead of arbitrary integer ID. Modified
preference loading/saving code to provide backwards-compatibile
transition.
* Do not force a default style. If no style is saved to preferences, use
whatever style Qt defaults to. This should help with look-and-feel on
systems that know how to style Qt apps to match their native themes.
* Remove miscellaneous palette and font overrides for various themes.
Most notibly, the CDE style will look more like the other styles,
rather than being green.
Modified Paths:
--------------
showeq/trunk/src/interface.cpp
showeq/trunk/src/interface.h
Modified: showeq/trunk/src/interface.cpp
===================================================================
--- showeq/trunk/src/interface.cpp 2023-03-15 18:24:57 UTC (rev 1347)
+++ showeq/trunk/src/interface.cpp 2023-03-15 18:25:07 UTC (rev 1348)
@@ -92,6 +92,7 @@
#include <QMenu>
#include <QWidgetAction>
#include <QDesktopWidget>
+#include <QStyleFactory>
// this define is used to diagnose the order with which zone packets are rcvd
#define ZONE_ORDER_DIAG
@@ -1444,41 +1445,44 @@
QMenu* pStyleMenu = new QMenu("&Style");
pInterfaceMenu->addMenu(pStyleMenu);
- tmpAction = pStyleMenu->addAction( "Plastique");
- tmpAction->setCheckable(true);
- tmpAction->setData(1);
- ActionList_StyleMenu.append(tmpAction);
+ QStringList availableStyles = QStyleFactory::keys();
- tmpAction = pStyleMenu->addAction( "Windows (Default)");
- tmpAction->setCheckable(true);
- tmpAction->setData(2);
- ActionList_StyleMenu.append(tmpAction);
+ availableStyles.sort(Qt::CaseInsensitive);
- tmpAction = pStyleMenu->addAction( "CDE");
- tmpAction->setCheckable(true);
- tmpAction->setData(3);
- ActionList_StyleMenu.append(tmpAction);
+ QString currentStyleName = qApp->style()->objectName();
- tmpAction = pStyleMenu->addAction( "CDE Polished");
- tmpAction->setCheckable(true);
- tmpAction->setData(4);
- ActionList_StyleMenu.append(tmpAction);
+ QStringList::Iterator styleItr = availableStyles.begin();
- tmpAction = pStyleMenu->addAction( "Motif");
- tmpAction->setCheckable(true);
- tmpAction->setData(5);
- ActionList_StyleMenu.append(tmpAction);
+ while (styleItr != availableStyles.end()) {
- tmpAction = pStyleMenu->addAction( "Cleanlooks");
- tmpAction->setCheckable(true);
- tmpAction->setData(6);
- ActionList_StyleMenu.append(tmpAction);
+ tmpAction = pStyleMenu->addAction(*styleItr);
+ tmpAction->setCheckable(true);
+ if (currentStyleName.toLower() == (*styleItr).toLower())
+ tmpAction->setChecked(true);
+
+ tmpAction->setData(*styleItr);
+ ActionList_StyleMenu.append(tmpAction);
+
+ ++styleItr;
+ }
+
connect (pStyleMenu, SIGNAL(triggered(QAction*)), this,
SLOT(selectTheme(QAction*)));
- setTheme(pSEQPrefs->getPrefInt("Theme", section, 2));
+ QString themeName = pSEQPrefs->getPrefString("ThemeName", section, "");
+ //Use the text name if there is one. If not, fall back to old numeric id. If no
+ //numeric id, then just use whatever Qt started with (no forced default)
+ if (!themeName.isEmpty())
+ {
+ setTheme(themeName);
+ } else {
+ int themeId = pSEQPrefs->getPrefInt("Theme", section, -1);
+ if (themeId >= 0)
+ setTheme(themeId);
+ }
+
// Interface -> Status Bar
QMenu* statusBarMenu = new QMenu("&Status Bar");
pInterfaceMenu->addMenu(statusBarMenu);
@@ -5659,19 +5663,28 @@
m_terminal->setUseColor(enable);
}
-int EQInterface::setTheme(int id)
+QString EQInterface::setTheme(QString name)
{
static QFont OrigFont = qApp->font();
static QPalette OrigPalette = qApp->palette();;
+ QString currentStyleName = qApp->style()->objectName();
+
+ QStringList availableStyles = QStyleFactory::keys();
+
+ if (!availableStyles.contains(name, Qt::CaseInsensitive))
+ return currentStyleName;
+
+ qApp->setStyle(QStyleFactory::create(name));
+
MenuActionList::Iterator iter;
- int theme = 2;
+
for ( iter = ActionList_StyleMenu.begin(); iter != ActionList_StyleMenu.end(); ++iter)
{
- if ((*iter)->data().value<int>() == id)
+ if ((*iter)->data().value<QString>().toLower() == name.toLower())
{
(*iter)->setChecked(true);
- theme = (*iter)->data().value<int>();
+ currentStyleName = (*iter)->data().value<QString>();
}
else
{
@@ -5679,86 +5692,61 @@
}
}
- switch ( theme )
+ return currentStyleName;
+}
+
+int EQInterface::setTheme(int id)
+{
+
+ int current_theme = 2;
+
+ MenuActionList::Iterator iter;
+
+ for ( iter = ActionList_StyleMenu.begin(); iter != ActionList_StyleMenu.end(); ++iter)
{
- case 1: // plastique
- {
- QPalette p( QColor( 239, 239, 239 ) );
- qApp->setStyle("plastique");
- qApp->setPalette(p);
+ if ((*iter)->isChecked())
+ current_theme = (*iter)->data().value<int>();
}
- break;
- case 2: // windows
+
+ QString new_theme;
+
+ switch ( id )
{
- qApp->setStyle("windows");
- qApp->setFont( OrigFont );
- qApp->setPalette(OrigPalette);
+ case 1: // plastique
+ new_theme = "plastique";
+ break;
+ case 2: // windows
+ new_theme = "windows";
+ break;
+ case 3: // cde
+ case 4: // cde polished
+ new_theme = "cde";
+ break;
+ case 5: // motif
+ new_theme = "motif";
+ break;
+ case 6: // cleanlooks
+ new_theme = "cleanlooks";
+ break;
+ default: // system default
+ return current_theme;
+ break;
}
- break;
- case 3: // cde
- case 4: // cde polished
- {
- QPalette p( QColor( 75, 123, 130 ) );
- qApp->setStyle("cde");
- p.setColor( QPalette::Active, QPalette::Base, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Inactive, QPalette::Base, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Disabled, QPalette::Base, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Active, QPalette::Highlight, Qt::white );
- p.setColor( QPalette::Active, QPalette::HighlightedText, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Inactive, QPalette::Highlight, Qt::white );
- p.setColor( QPalette::Inactive, QPalette::HighlightedText, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Disabled, QPalette::Highlight, Qt::white );
- p.setColor( QPalette::Disabled, QPalette::HighlightedText, QColor( 55, 77, 78 ) );
- p.setColor( QPalette::Active, QPalette::Foreground, Qt::white );
- p.setColor( QPalette::Active, QPalette::Text, Qt::white );
- p.setColor( QPalette::Active, QPalette::ButtonText, Qt::white );
- p.setColor( QPalette::Inactive, QPalette::Foreground, Qt::white );
- p.setColor( QPalette::Inactive, QPalette::Text, Qt::white );
- p.setColor( QPalette::Inactive, QPalette::ButtonText, Qt::white );
- p.setColor( QPalette::Disabled, QPalette::Foreground, Qt::lightGray );
- p.setColor( QPalette::Disabled, QPalette::Text, Qt::lightGray );
- p.setColor( QPalette::Disabled, QPalette::ButtonText, Qt::lightGray );
- qApp->setPalette(p);
- qApp->setFont( QFont( "times", OrigFont.pointSize() ) );
- }
- break;
- case 5: // motif
- {
- QPalette p( QColor( 192, 192, 192 ) );
- qApp->setStyle("motif");
- qApp->setPalette(p);
- qApp->setFont( OrigFont );
- }
- break;
- case 6: // cleanlooks
- {
- //QPalette p( QColor( 192, 192, 192 ) );
- qApp->setStyle("cleanlooks");
- qApp->setPalette(OrigPalette);
- qApp->setFont( OrigFont );
- }
- break;
- default: // system default
- {
- QPalette p( QColor( 192, 192, 192 ) );
- qApp->setStyle("motif");
- qApp->setPalette(p);
- qApp->setFont( OrigFont );
- theme = 2;
- }
- break;
- }
- // make sure the windows that override the application font, do so
+ QString set_theme = setTheme(new_theme);
+
emit restoreFonts();
- return theme;
+ if (new_theme.toLower() == set_theme.toLower())
+ return id;
+ else
+ return current_theme;
}
void EQInterface::selectTheme(QAction* selection)
{
- int theme = setTheme(selection->data().value<int>());
- pSEQPrefs->setPrefInt("Theme", "Interface", theme);
+ QString theme = setTheme(selection->data().value<QString>());
+ pSEQPrefs->setPrefString("ThemeName", "Interface", theme);
}
void EQInterface::showMap(int i)
Modified: showeq/trunk/src/interface.h
===================================================================
--- showeq/trunk/src/interface.h 2023-03-15 18:24:57 UTC (rev 1347)
+++ showeq/trunk/src/interface.h 2023-03-15 18:25:07 UTC (rev 1348)
@@ -317,6 +317,7 @@
protected:
bool getMonitorOpCodeList(const QString& title, QString& opcodeList);
+ QString setTheme(QString name);
int setTheme(int id);
void loadFormatStrings();
void showMap(int mapNum);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:25:00
|
Revision: 1347
http://sourceforge.net/p/seq/svn/1347
Author: cn187
Date: 2023-03-15 18:24:57 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Honor depth filtered setting when drawing map locations
Modified Paths:
--------------
showeq/trunk/src/mapcore.cpp
Modified: showeq/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2023-03-15 18:24:47 UTC (rev 1346)
+++ showeq/trunk/src/mapcore.cpp 2023-03-15 18:24:57 UTC (rev 1347)
@@ -2238,6 +2238,10 @@
{
MapLocation* currentLoc = *lit;
+ if (param.mapLineStyle() == tMap_DepthFiltered && currentLoc->heightSet() &&
+ !inRoom(param.playerHeadRoom(), param.playerFloorRoom(), currentLoc->z()))
+ continue; // outside of range, continue to the next location
+
// set the color
QColor color(currentLoc->color());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:24:52
|
Revision: 1346
http://sourceforge.net/p/seq/svn/1346
Author: cn187
Date: 2023-03-15 18:24:47 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Only check disconnected sessionId when session tracking is enabled
Modified Paths:
--------------
showeq/trunk/src/packetstream.cpp
Modified: showeq/trunk/src/packetstream.cpp
===================================================================
--- showeq/trunk/src/packetstream.cpp 2023-03-15 18:24:39 UTC (rev 1345)
+++ showeq/trunk/src/packetstream.cpp 2023-03-15 18:24:47 UTC (rev 1346)
@@ -1144,17 +1144,16 @@
break;
case OP_SessionDisconnect:
{
-
- // When session tracking isn't enabled, random UDP traffic on the LAN can
- // cause unexpected session disconnects if the packet payload happens
- // to start with the same bytes as the OP_SessionDisconnect netOp.
- //
- // So check the sessionId in the disconnect packet, and only process
- // it if it matches the current sessionId.
- SessionDisconnectStruct* disconnect = (SessionDisconnectStruct*) packet.payload();
- uint32_t disconnectedSessionId = eqntohuint32((uint8_t*)&(disconnect->sessionId));
- if (m_sessionId != disconnectedSessionId) {
- break;
+ if (m_session_tracking_enabled)
+ {
+ // Check the sessionId in the disconnect packet, and only process
+ // it if it matches the current sessionId.
+ SessionDisconnectStruct* disconnect = (SessionDisconnectStruct*) packet.payload();
+ uint32_t disconnectedSessionId = eqntohuint32((uint8_t*)&(disconnect->sessionId));
+ if (m_sessionId != disconnectedSessionId)
+ {
+ break;
+ }
}
#if defined(PACKET_PROCESS_DIAG) || defined(PACKET_SESSION_DIAG)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:24:42
|
Revision: 1345
http://sourceforge.net/p/seq/svn/1345
Author: cn187
Date: 2023-03-15 18:24:39 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Enable session tracking by default
Modified Paths:
--------------
showeq/trunk/conf/seqdef.xml
Modified: showeq/trunk/conf/seqdef.xml
===================================================================
--- showeq/trunk/conf/seqdef.xml 2023-03-15 18:24:31 UTC (rev 1344)
+++ showeq/trunk/conf/seqdef.xml 2023-03-15 18:24:39 UTC (rev 1345)
@@ -34,7 +34,7 @@
<comment>Give up waiting for seq arq after cache fills to this size. Don't set this too low, otherwise showeq will artificially skip packets, minimum is 32, modem users may want to set 512, dsl and cable users may choose 256 or less</comment>
</property>
<property name="SessionTracking" >
- <bool value="false" />
+ <bool value="true" />
<comment>enable/disable session tracking</comment>
</property>
<property name="WorldOPCodes" >
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:24:34
|
Revision: 1344
http://sourceforge.net/p/seq/svn/1344
Author: cn187
Date: 2023-03-15 18:24:31 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Check sessionId before processing disconnect packet
Random UDP traffic on the LAN can cause unexpectes session disconnects if
the packet payload happens to start with the SessionDisconnect net
opcode.
By checking the sessionId in the disconnect packet against the current
sessionId, we can ignore packets that look like disconnect packets but
really aren't.
This also means that users who have enabled "session tracking" for the
sole purpose of reducing random disconnects may be able to disable it if
they don't otherwise need it.
Modified Paths:
--------------
showeq/trunk/src/everquest.h
showeq/trunk/src/packetstream.cpp
Modified: showeq/trunk/src/everquest.h
===================================================================
--- showeq/trunk/src/everquest.h 2023-03-15 18:24:23 UTC (rev 1343)
+++ showeq/trunk/src/everquest.h 2023-03-15 18:24:31 UTC (rev 1344)
@@ -414,12 +414,14 @@
* Session disconnect on a stream. This is the server telling the client to
* close a stream.
*
- * Size: 8 Octets
+ * Size: 9 Octets
*/
struct SessionDisconnectStruct
{
-/*0000*/ uint8_t unknown[8];
-/*0008*/
+/*0000*/ uint8_t unknown0000;
+/*0001*/ uint32_t sessionId;
+/*0005*/ uint8_t unknown[4];
+/*0009*/
};
/*
Modified: showeq/trunk/src/packetstream.cpp
===================================================================
--- showeq/trunk/src/packetstream.cpp 2023-03-15 18:24:23 UTC (rev 1343)
+++ showeq/trunk/src/packetstream.cpp 2023-03-15 18:24:31 UTC (rev 1344)
@@ -1144,6 +1144,19 @@
break;
case OP_SessionDisconnect:
{
+
+ // When session tracking isn't enabled, random UDP traffic on the LAN can
+ // cause unexpected session disconnects if the packet payload happens
+ // to start with the same bytes as the OP_SessionDisconnect netOp.
+ //
+ // So check the sessionId in the disconnect packet, and only process
+ // it if it matches the current sessionId.
+ SessionDisconnectStruct* disconnect = (SessionDisconnectStruct*) packet.payload();
+ uint32_t disconnectedSessionId = eqntohuint32((uint8_t*)&(disconnect->sessionId));
+ if (m_sessionId != disconnectedSessionId) {
+ break;
+ }
+
#if defined(PACKET_PROCESS_DIAG) || defined(PACKET_SESSION_DIAG)
seqDebug("EQPacket: SessionDisconnect found %s:%u->%s:%u, resetting expected seq, stream %s (%d) (session tracking %s)",
((EQUDPIPPacketFormat&) packet).getIPv4SourceA().ascii(),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:24:26
|
Revision: 1343
http://sourceforge.net/p/seq/svn/1343
Author: cn187
Date: 2023-03-15 18:24:23 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Adjust colors on load of SOE formatted map
When an SOE formatted map is loaded, automatically adjust colors in the
same way that colors were adjusted by the mapconvert script. This
should make the SOE-formatted maps easier to see/read on SEQ's dark map
background.
Note: the original colors are preserved if the map is saved back to the
SOE format after modification.
Modified Paths:
--------------
showeq/trunk/src/mapcore.cpp
showeq/trunk/src/mapcore.h
Modified: showeq/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2023-03-15 18:24:14 UTC (rev 1342)
+++ showeq/trunk/src/mapcore.cpp 2023-03-15 18:24:23 UTC (rev 1343)
@@ -1066,15 +1066,21 @@
if (!currentLineM ||
!currentLineM->point(checkPoint).isEqual(x2, y2, z2) ||
- (currentLineM->color().red() != r) ||
- (currentLineM->color().green() != g) ||
- (currentLineM->color().blue() != b))
+ (
+ ((currentLineM->color().red() != r) ||
+ (currentLineM->color().green() != g) ||
+ (currentLineM->color().blue() != b)) &&
+ ((currentLineM->origColor().red() != r) ||
+ (currentLineM->origColor().green() != g) ||
+ (currentLineM->origColor().blue() != b))
+ ))
{
numPoints = 0;
// create an M line (start with 2 points because of SOE's lame
// format).
- currentLineM = new MapLineM("soe", QColor(r, g, b), 2);
+ currentLineM = new MapLineM("soe", getMapConvertColor(r, g, b), 2);
+ currentLineM->setOrigColor(QColor(r, g, b));
// set the first point
currentLineM->setPoint(numPoints++, x2, y2, z2);
@@ -1135,8 +1141,10 @@
name.replace("_", " ");
// add it to the list of locations
- layer->locations().append(new MapLocation(name, QColor(r, g, b),
- x1, y1, z1));
+ MapLocation* loc = new MapLocation(name, getMapConvertColor(r, g, b),
+ x1, y1, z1);
+ loc->setOrigColor(QColor(r, g, b));
+ layer->locations().append(loc);
// adjust map boundaries
quickCheckPos(x1, y1);
@@ -1323,7 +1331,7 @@
currentLineL = *mlit;
z1 = float(currentLineL->z());
- const QColor& color = currentLineL->color();
+ const QColor& color = currentLineL->origColor().isValid() ? currentLineL->color() : currentLineL->origColor();
r = color.red();
g = color.green();
b = color.blue();
@@ -1354,7 +1362,7 @@
for (; mmit != m_mapLayers[layerNum]->mLines().end(); ++mmit)
{
currentLineM = *mmit;
- const QColor& color = currentLineM->color();
+ const QColor& color = currentLineM->origColor().isValid() ? currentLineM->color() : currentLineM->origColor();
r = color.red();
g = color.green();
b = color.blue();
@@ -1382,7 +1390,7 @@
for (; lit != m_mapLayers[layerNum]->locations().end(); ++lit)
{
currentLoc = *lit;
- const QColor& color = currentLoc->color();
+ const QColor& color = currentLoc->origColor().isValid() ? currentLoc->color() : currentLoc->origColor();
// convert spaces to underscores
name = currentLoc->name();
Modified: showeq/trunk/src/mapcore.h
===================================================================
--- showeq/trunk/src/mapcore.h 2023-03-15 18:24:14 UTC (rev 1342)
+++ showeq/trunk/src/mapcore.h 2023-03-15 18:24:23 UTC (rev 1343)
@@ -406,15 +406,19 @@
const QString& name() const { return m_name; }
const QColor& color() const { return m_color; }
+ const QColor& origColor() const { return m_origColor; }
QString colorName() const;
void setName(const QString& name) { m_name = name; }
void setColor(const QString& color) { m_color = color; }
+ void setOrigColor(const QColor& color) { m_origColor = color; }
+
private:
QString m_name;
QString m_colorName;
QColor m_color;
+ QColor m_origColor;
};
inline QString MapCommon::colorName() const
@@ -727,4 +731,85 @@
(z >= floorRoom));
}
+inline QString getMapConvertColor(const unsigned short r, const unsigned short g,
+ const unsigned short b)
+{
+ //adjust, convert, and return colors based on Razzle's original mapconvert script
+ //This adjusts the SOE map colors to colors that work for SEQs default color scheme
+
+ QString sColor[64] = {
+ "Black", //0
+ "DarkRed", //1
+ "FireBrick", //2
+ "Red", //3
+ "DarkGreen", //4
+ "Orange", //5
+ "DarkOrange", //6
+ "DarkOrange", //7
+ "Green", //8
+ "Chartreuse", //9
+ "Gold", //10
+ "Gold", //11
+ "Green", //12
+ "Chartreuse", //13
+ "Goldenrod", //14
+ "Yellow", //15
+ "DarkBlue", //16
+ "Magenta", //17
+ "DeepPink", //18
+ "DeepPink", //19
+ "DarkCyan", //20
+ "Grey", //21
+ "IndianRed", //22
+ "LightCoral", //23
+ "SpringGreen", //24
+ "LightGreen", //25
+ "DarkKhaki", //26
+ "Khaki", //27
+ "SpringGreen", //28
+ "PaleGreen", //29
+ "DarkOliveGreen",//30
+ "Khaki", //31
+ "MediumBlue", //32
+ "DarkViolet", //33
+ "Magenta", //34
+ "Maroon", //35
+ "RoyalBlue", //36
+ "SlateBlue", //37
+ "Orchid", //38
+ "HotPink", //39
+ "Turquoise", //40
+ "SkyBlue", //41
+ "Snow", //42
+ "LightPink", //43
+ "Cyan", //44
+ "Aquamarine", //45
+ "DarkSeaGreen", //46
+ "Beige", //47
+ "Blue", //48
+ "Purple", //49
+ "Purple", //50
+ "Magenta", //51
+ "DodgerBlue", //52
+ "SlateBlue", //53
+ "MediumPurple", //54
+ "Orchid", //55
+ "DeepSkyBlue", //56
+ "LightBlue", //57
+ "Plum", //58
+ "Cyan", //59
+ "CadetBlue", //60
+ "PaleTurquoise",//61
+ "LightCyan", //62
+ "White" //63
+ };
+
+ unsigned short color = floor(r/80) + floor(g/80)*4 + floor(b/80)*16;
+
+ if (color == 0) return sColor[63];
+
+ return sColor[color];
+}
+
+
#endif // _MAPCORE_H
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:24:16
|
Revision: 1342
http://sourceforge.net/p/seq/svn/1342
Author: cn187
Date: 2023-03-15 18:24:14 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Remove commented-out map optimization code
Modified Paths:
--------------
showeq/trunk/src/map.cpp
showeq/trunk/src/map.h
showeq/trunk/src/mapcore.cpp
showeq/trunk/src/mapcore.h
Modified: showeq/trunk/src/map.cpp
===================================================================
--- showeq/trunk/src/map.cpp 2023-03-15 18:24:02 UTC (rev 1341)
+++ showeq/trunk/src/map.cpp 2023-03-15 18:24:14 UTC (rev 1342)
@@ -1089,20 +1089,6 @@
addMenu(subMenu);
- /*
- subMenu = new QMenu;
- subMenu->setCheckable(true);
- m_id_mapOptimization_Memory = subMenu->insertItem("Memory");
- subMenu->setItemParameter(m_id_mapOptimization_Memory, tMap_MemoryOptim);
- m_id_mapOptimization_Normal = subMenu->insertItem("Normal");
- subMenu->setItemParameter(m_id_mapOptimization_Normal, tMap_NormalOptim);
- m_id_mapOptimization_Best = subMenu->insertItem("Speed");
- subMenu->setItemParameter(m_id_mapOptimization_Best, tMap_BestOptim);
- connect(subMenu, SIGNAL(activated(int)),
- this, SLOT(select_mapOptimization(int)));
- m_id_mapOptimization = insertItem("Map Optimization", subMenu);
- */
-
m_action_gridTickColor = addAction("Grid Tick Color...", this,
SLOT(select_gridTickColor()));
@@ -1313,14 +1299,7 @@
#ifdef DEBUG
m_action_debugInfo->setChecked(m_map->showDebugInfo());
#endif
- /*
- MapOptimizationMethod method = m_map->mapOptimization();
- setItemChecked(m_id_mapOptimization_Memory, (method == tMap_MemoryOptim));
- setItemChecked(m_id_mapOptimization_Normal, (method == tMap_NormalOptim));
- setItemChecked(m_id_mapOptimization_Best, (method == tMap_BestOptim));
- */
-
m_drawSizeSpinBox->setValue(m_mapIcons->drawSize());
m_fovSpinBox->setValue(m_mapIcons->fovDistance());
@@ -1552,13 +1531,6 @@
m_map->setShowInstanceLocationMarker(!m_map->showInstanceLocationMarker());
}
-/*
-void MapMenu::select_mapOptimization(int itemId)
-{
- m_map->setMapOptimization((MapOptimizationMethod)itemParameter(itemId));
-}
-*/
-
void MapMenu::select_gridTickColor()
{
QString name = QString("ShowEQ - ") + m_map->preferenceName()
@@ -1832,11 +1804,6 @@
tmpPrefString = "FloorRoom";
m_param.setFloorRoom(pSEQPrefs->getPrefInt(tmpPrefString, prefString, 75));
- /*
- tmpPrefString = "OptimizeMethod";
- m_param.setMapOptimizationMethod((MapOptimizationMethod)pSEQPrefs->getPrefInt(tmpPrefString, prefString, (int)tMap_NormalOptim));
- */
-
tmpPrefString = "ZoomDefault";
m_param.setZoomDefault(pSEQPrefs->getPrefInt(tmpPrefString, prefString, 1));
@@ -1922,7 +1889,6 @@
// Setup offscreen image
m_offscreen = QPixmap(m_param.screenLength());
-// m_offscreen.setOptimization(m_param.pixmapOptimizationMethod());
m_mapTip = new MapLabel( this );
this->setMouseTracking( true );
@@ -2791,21 +2757,6 @@
refreshMap ();
}
-/*
-void Map::setMapOptimization(MapOptimizationMethod method)
-{
- // set the general optimization method
- m_param.setMapOptimizationMethod(method);
-
- QString tmpPrefString = "OptimizeMethod";
- pSEQPrefs->setPrefInt(tmpPrefString, preferenceName(),
- (int)m_param.mapOptimizationMethod());
-
- // set the offscreen images optimization method
- m_offscreen.setOptimization(m_param.pixmapOptimizationMethod());
-}
-*/
-
void Map::setZoom(int val)
{
if (m_player->id() != 1)
@@ -3086,7 +3037,6 @@
out << "BackgroundColor: " << m_param.backgroundColor().name() << endl;
out << "HeadRoom: " << m_param.headRoom() << endl;
out << "FloorRoom: " << m_param.floorRoom() << endl;
-// out << "OptimizeMethod: " << (int)m_param.mapOptimizationMethod() << endl;
out << endl;
m_mapIcons->dumpInfo(out);
Modified: showeq/trunk/src/map.h
===================================================================
--- showeq/trunk/src/map.h 2023-03-15 18:24:02 UTC (rev 1341)
+++ showeq/trunk/src/map.h 2023-03-15 18:24:14 UTC (rev 1342)
@@ -275,7 +275,6 @@
void toggle_cacheChanges();
void toggle_zoneSafePoint();
void toggle_instanceLocationMarker();
- //void select_mapOptimization(int itemId);
void select_gridTickColor();
void select_gridLineColor();
void select_backgroundColor();
@@ -335,12 +334,6 @@
#ifdef DEBUG
QAction* m_action_debugInfo;
#endif
- /*
- int m_id_mapOptimization;
- int m_id_mapOptimization_Memory;
- int m_id_mapOptimization_Normal;
- int m_id_mapOptimization_Best;
- */
QAction* m_action_gridTickColor;
QAction* m_action_gridLineColor;
QAction* m_action_backgroundColor;
@@ -398,10 +391,6 @@
void setZEM (unsigned char newZEM);
// old methods
- /*
- MapOptimizationMethod getMapOptimization(void)
- { return m_param.mapOptimizationMethod(); }
- */
MapMenu* menu();
@@ -440,7 +429,6 @@
bool showInstanceLocationMarker() const { return m_showInstanceLocationMarker; }
MapLineStyle mapLineStyle() { return m_param.mapLineStyle(); }
- //MapOptimizationMethod mapOptimization() { return m_param.mapOptimizationMethod(); }
int zoom() const { return m_param.zoom(); }
int zoomDefault() const { return m_param.zoomDefault(); }
int panOffsetX() const { return m_param.panOffsetX(); }
@@ -540,7 +528,6 @@
void setRacePvP(bool val);
void setMapLineStyle(MapLineStyle style);
- //void setMapOptimization(MapOptimizationMethod method);
void setZoom(int val);
void setZoomDefault(int val);
void setPanOffsetX(int val);
Modified: showeq/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2023-03-15 18:24:02 UTC (rev 1341)
+++ showeq/trunk/src/mapcore.cpp 2023-03-15 18:24:14 UTC (rev 1342)
@@ -82,7 +82,6 @@
m_showLines = true;
m_showGridLines = true;
m_showGridTicks = true;
- //m_optimization = tMap_NormalOptim;
reset();
}
@@ -234,34 +233,6 @@
m_curPlayerOffset.setY(calcYOffset(m_curPlayer.y()));
}
-#if 0
-QPixmap::Optimization MapParameters::pixmapOptimizationMethod()
-{
- switch (m_optimization)
- {
- case tMap_MemoryOptim:
- return QPixmap::MemoryOptim;
- case tMap_NoOptim:
- return QPixmap::NoOptim;
- case tMap_NormalOptim:
- return QPixmap::NormalOptim;
- case tMap_BestOptim:
- return QPixmap::BestOptim;
- case tMap_DefaultOptim:
- default:
- return QPixmap::DefaultOptim;
- }
- /* Optimization Methods:
- DefaultOptim - A pixmap with this optimization mode set always has the default optimization type
- - default optimization type for qPixMap is NormalOptim
- NoOptim - no optimization (currently the same as MemoryOptim).
- MemoryOptim - optimize for minimal memory use.
- NormalOptim - optimize for typical usage. Often uses more memory than MemoryOptim, and often faster.
- BestOptim - optimize for pixmaps that are drawn very often and where performance is critical.
- Generally uses more memory than NormalOptim and may provide a little better speed
- */
-}
-#endif
void MapParameters::setPlayer(const MapPoint& pos)
{
@@ -2364,12 +2335,6 @@
// increment paint count
m_paintCount++;
#endif
- /*
- // set pixmap optimization if it's changed
- if (m_lastParam.mapOptimizationMethod() !=
- param.mapOptimizationMethod())
- m_mapImage.setOptimization(param.pixmapOptimizationMethod());
- */
// make sure the map is the correct size
m_mapImage = QPixmap(param.screenLength());
Modified: showeq/trunk/src/mapcore.h
===================================================================
--- showeq/trunk/src/mapcore.h 2023-03-15 18:24:02 UTC (rev 1341)
+++ showeq/trunk/src/mapcore.h 2023-03-15 18:24:14 UTC (rev 1342)
@@ -75,22 +75,6 @@
tMap_FadedFloors,
};
-/*
- * QT4 no longer allows the user to set the pixmap optimization.
- * As a result, all of the pixmap optimization code is being commented out
- * and can be deleted once it's determined to not unexpectedly break
- * anything. - cn187
- */
-/*
-enum MapOptimizationMethod
-{
- tMap_MemoryOptim = 0,
- tMap_NormalOptim = 1,
- tMap_BestOptim = 2,
- tMap_DefaultOptim = 3,
- tMap_NoOptim = 4,
-};
-*/
//----------------------------------------------------------------------
// constants
@@ -141,10 +125,6 @@
const QFont& font() const { return m_font; }
int16_t headRoom() const { return m_headRoom; }
int16_t floorRoom() const { return m_floorRoom; }
- /*
- MapOptimizationMethod mapOptimizationMethod() { return m_optimization; }
- QPixmap::Optimization pixmapOptimizationMethod();
- */
MapLineStyle mapLineStyle() { return m_mapLineStyle; }
bool fadeFloors() const { return (m_mapLineStyle == tMap_FadedFloors); }
bool depthFiltering() const { return (m_mapLineStyle == tMap_DepthFiltered); }
@@ -183,10 +163,6 @@
void setScreenSize(const QSize& size);
void setBackgroundColor(const QColor& color) { m_backgroundColor = color; }
void setFont(const QFont& font) { m_font = font; }
- /*
- void setMapOptimizationMethod(MapOptimizationMethod method)
- { m_optimization = method; }
- */
void setMapLineStyle(MapLineStyle style) { m_mapLineStyle = style; }
void setShowBackgroundImage(bool val) { m_showBackgroundImage = val; }
void setShowLocations(bool val) { m_showLocations = val; }
@@ -232,7 +208,6 @@
MapPoint m_targetPoint;
bool m_targetPointSet;
- //MapOptimizationMethod m_optimization;
MapLineStyle m_mapLineStyle;
bool m_showBackgroundImage;
bool m_showLocations;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cn...@us...> - 2023-03-15 18:24:10
|
Revision: 1341
http://sourceforge.net/p/seq/svn/1341
Author: cn187
Date: 2023-03-15 18:24:02 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Fix issue with console map name display
Modified Paths:
--------------
showeq/trunk/src/mapcore.cpp
Modified: showeq/trunk/src/mapcore.cpp
===================================================================
--- showeq/trunk/src/mapcore.cpp 2023-03-15 18:23:54 UTC (rev 1340)
+++ showeq/trunk/src/mapcore.cpp 2023-03-15 18:24:02 UTC (rev 1341)
@@ -545,13 +545,11 @@
return;
- const char* filename = fileName.toLatin1().data();
-
QFile mapFile(fileName);
if (!mapFile.open(QIODevice::ReadOnly))
{
- seqWarn("Error opening map file '%s'!", filename);
+ seqWarn("Error opening map file '%s'!", fileName.toLatin1().data());
return;
}
@@ -592,7 +590,7 @@
if (!count)
{
seqWarn("Error, no fields in first line of map file '%s'",
- filename);
+ fileName.toLatin1().data());
return;
}
@@ -599,7 +597,7 @@
if (count < 2)
{
seqWarn("Error, too few fields in first line of map file '%s'",
- filename);
+ fileName.toLatin1().data());
return;
}
@@ -658,7 +656,7 @@
if (count < 3)
{
seqWarn("Error reading M line %d on map '%s'! %d is too few fields",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
continue;
}
@@ -669,7 +667,7 @@
if (linePoints < 2)
{
seqWarn("M Line %d in map '%s' only had %d points, not loading.",
- filelines, filename, linePoints );
+ filelines, fileName.toLatin1().data(), linePoints );
continue;
}
@@ -686,7 +684,7 @@
if (!ok)
{
seqWarn("Error reading number of points on line %d in map '%s'!",
- filelines, filename);
+ filelines, fileName.toLatin1().data());
continue;
}
@@ -693,7 +691,7 @@
if ((specifiedLinePoints != linePoints) && (specifiedLinePoints != 0))
{
seqWarn("M Line %d in map '%s' has %d points as opposed to the %d points it specified!",
- filelines, filename, linePoints, specifiedLinePoints);
+ filelines, fileName.toLatin1().data(), linePoints, specifiedLinePoints);
}
// create an M line
@@ -739,7 +737,7 @@
if (count < 3)
{
seqWarn("Error reading L line %d on map '%s'! %d is too few fields",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
continue;
}
@@ -750,7 +748,7 @@
if (linePoints < 2)
{
seqWarn("L Line %d in map '%s' only had %d points, not loading.",
- filelines, filename, linePoints);
+ filelines, fileName.toLatin1().data(), linePoints);
continue;
}
@@ -767,7 +765,7 @@
if (!ok)
{
seqWarn("Error reading number of points on line %d in map '%s'!",
- filelines, filename);
+ filelines, fileName.toLatin1().data());
continue;
}
@@ -774,7 +772,7 @@
if ((specifiedLinePoints != linePoints) && (specifiedLinePoints != 0))
{
seqWarn("L Line %d in map '%s' has %d points as opposed to the %d points it specified!",
- filelines, filename, linePoints, specifiedLinePoints);
+ filelines, fileName.toLatin1().data(), linePoints, specifiedLinePoints);
}
// create the appropriate style L line depending on if the global
@@ -827,7 +825,7 @@
if (count < 4)
{
seqWarn("Error reading P line %d on map '%s'! %d is too few fields",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
continue;
}
@@ -866,7 +864,7 @@
if (count < 2)
{
seqWarn("Line %d in map '%s' has an A record with too few fields (%d)!",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
break;
}
@@ -874,7 +872,7 @@
if (name.isEmpty())
{
seqWarn("Line %d in map '%s' has an A marker with no Name expression!",
- filelines, filename);
+ filelines, fileName.toLatin1().data());
break;
}
rangeVal = (*fit++).toUShort();
@@ -881,7 +879,7 @@
if (!rangeVal)
{
seqWarn("Line %d in map '%s' has an A marker with no or 0 Range radius!",
- filelines, filename);
+ filelines, fileName.toLatin1().data());
break;
}
@@ -898,7 +896,7 @@
if (count < 1)
{
seqWarn("Line %d in map '%s' has an H record with too few fields (%d)!",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
break;
}
@@ -907,7 +905,7 @@
if (!ok)
{
seqWarn("Line %d in map '%s' has an H marker with invalid Z!",
- filelines, filename);
+ filelines, fileName.toLatin1().data());
break;
}
globHeightSet = true;
@@ -924,7 +922,7 @@
if (count < 1)
{
seqWarn("Line %d in map '%s' has a Z record with too few fields (%d)!",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
break;
}
@@ -932,7 +930,7 @@
if (!ok)
{
seqWarn("Line %d in map '%s' has an Z marker with invalid ZEM!",
- filelines, filename);
+ filelines, fileName.toLatin1().data());
break;
}
#ifdef DEBUGMAPLOAD
@@ -951,7 +949,7 @@
layer->setMapLoaded(true);
m_imageLoaded = false;
- QString imageFileName = filename;
+ QString imageFileName = fileName;
imageFileName.truncate(imageFileName.lastIndexOf('.'));
imageFileName += ".pgm";
@@ -961,7 +959,7 @@
seqInfo("Loaded map image: '%s'", imageFileName.toLatin1().data());
}
- seqInfo("Loaded map: '%s'", filename);
+ seqInfo("Loaded map: '%s'", fileName.toLatin1().data());
}
void MapData::loadSOEMap(const QString& fileName, bool import)
@@ -994,13 +992,11 @@
if (fileName.contains("/.txt") != 0)
return;
- const char* filename = fileName.toLatin1().data();
-
QFile mapFile(fileName);
if (!mapFile.open(QIODevice::ReadOnly))
{
- seqWarn("Error opening map file '%s'!", filename);
+ seqWarn("Error opening map file '%s'!", fileName.toLatin1().data());
return;
}
@@ -1083,7 +1079,7 @@
if (count != 9)
{
seqWarn("Error reading L line %d on map '%s'! %d is an incorrect field count!",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
continue;
}
@@ -1150,7 +1146,7 @@
if (count != 8)
{
seqWarn("Error reading L line %d on map '%s'! %d is an incorrect field count!",
- filelines, filename, count);
+ filelines, fileName.toLatin1().data(), count);
continue;
}
@@ -1186,7 +1182,7 @@
layer->setMapLoaded(true);
m_imageLoaded = false;
- QString imageFileName = filename;
+ QString imageFileName = fileName;
imageFileName.truncate(imageFileName.lastIndexOf('.'));
imageFileName += ".pgm";
@@ -1196,7 +1192,7 @@
seqInfo("Loaded map image: '%s'", imageFileName.toLatin1().data());
}
- seqInfo("Loaded SOE map: '%s'", filename);
+ seqInfo("Loaded SOE map: '%s'", fileName.toLatin1().data());
}
void MapData::saveMap(const QString& fileName, const uint8_t layerNum) const
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|