|
From: <cn...@us...> - 2024-08-19 01:31:22
|
Revision: 1512
http://sourceforge.net/p/seq/svn/1512
Author: cn187
Date: 2024-08-19 01:31:19 +0000 (Mon, 19 Aug 2024)
Log Message:
-----------
Fix miscellaneous compiler warnings
Modified Paths:
--------------
showeq/branches/cn187_devel/src/combatlog.cpp
showeq/branches/cn187_devel/src/editor.cpp
showeq/branches/cn187_devel/src/experiencelog.cpp
showeq/branches/cn187_devel/src/interface.cpp
showeq/branches/cn187_devel/src/map.cpp
showeq/branches/cn187_devel/src/mapcore.cpp
showeq/branches/cn187_devel/src/mapicondialog.ui
showeq/branches/cn187_devel/src/messagewindow.cpp
showeq/branches/cn187_devel/src/spawnlistcommon.cpp
showeq/branches/cn187_devel/src/spawnpointlist.cpp
showeq/branches/cn187_devel/src/xmlconv.cpp
Modified: showeq/branches/cn187_devel/src/combatlog.cpp
===================================================================
--- showeq/branches/cn187_devel/src/combatlog.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/combatlog.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -1074,6 +1074,21 @@
void CombatWindow::clearMob()
{
+#if (QT_VERSION >= QT_VERSION_CHECK(4,2,0))
+ switch( QMessageBox::information( this, "ShowEQ",
+ "This function will clear all data listed on the mob "
+ "tab. Do you want to continue?",
+ QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel))
+ {
+ case QMessageBox::Ok:
+ qDeleteAll(m_combat_mob_list);
+ m_combat_mob_list.clear();
+ updateMob();
+ break;
+ default:
+ break;
+ }
+#else
switch( QMessageBox::information( this, "ShowEQ",
"This function will clear all data listed on the mob "
"tab. Do you want to continue?",
@@ -1087,10 +1102,26 @@
default:
break;
}
+#endif
}
void CombatWindow::clearOffense()
{
+#if (QT_VERSION >= QT_VERSION_CHECK(4,2,0))
+ switch( QMessageBox::information( this, "ShowEQ",
+ "This function will clear all data listed on the offense "
+ "tab. Do you want to continue?",
+ QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel))
+ {
+ case QMessageBox::Ok:
+ qDeleteAll(m_combat_offense_list);
+ m_combat_offense_list.clear();
+ updateOffense();
+ break;
+ default:
+ break;
+ }
+#else
switch( QMessageBox::information( this, "ShowEQ",
"This function will clear all data listed on the offense "
"tab. Do you want to continue?",
@@ -1104,6 +1135,7 @@
default:
break;
}
+#endif
}
void CombatWindow::clear(void)
Modified: showeq/branches/cn187_devel/src/editor.cpp
===================================================================
--- showeq/branches/cn187_devel/src/editor.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/editor.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -173,9 +173,30 @@
return;
}
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 2, 0))
switch( QMessageBox::information( this, "ShowEQ Editor",
"The document has been changed since "
"the last save.",
+ QMessageBox::Save |
+ QMessageBox::Cancel |
+ QMessageBox::Discard,
+ QMessageBox::Save)) {
+ case QMessageBox::Save:
+ save();
+ ce->accept();
+ break;
+ case QMessageBox::Cancel:
+ default: // just for sanity
+ ce->ignore();
+ break;
+ case QMessageBox::Discard:
+ ce->accept();
+ break;
+ }
+#else
+ switch( QMessageBox::information( this, "ShowEQ Editor",
+ "The document has been changed since "
+ "the last save.",
"Save Now", "Cancel", "Lose Changes",
0, 1 ) ) {
case 0:
@@ -187,9 +208,10 @@
ce->ignore();
break;
case 2:
- ce->accept();
- break;
- }
+ ce->accept();
+ break;
+ }
+#endif
}
#ifndef QMAKEBUILD
Modified: showeq/branches/cn187_devel/src/experiencelog.cpp
===================================================================
--- showeq/branches/cn187_devel/src/experiencelog.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/experiencelog.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -670,6 +670,15 @@
void ExperienceWindow::viewClear()
{
+#if (QT_VERSION >= QT_VERSION_CHECK(4,2,0))
+ if (QMessageBox::information(this, "ShowEQ",
+ "This function will clear all data listed in the experience "
+ "log. Do you want to continue?",
+ QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel) == QMessageBox::Ok)
+ {
+ clear();
+ }
+#else
if (QMessageBox::information( this, "ShowEQ",
"This function will clear all data listed in the experience "
"log. Do you want to continue?",
@@ -677,6 +686,7 @@
{
clear();
}
+#endif
}
void ExperienceWindow::clear(void)
Modified: showeq/branches/cn187_devel/src/interface.cpp
===================================================================
--- showeq/branches/cn187_devel/src/interface.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/interface.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -1254,8 +1254,28 @@
// File Menu
QMenu* pFileMenu = new QMenu("&File");
menuBar()->addMenu(pFileMenu);
- pFileMenu->addAction("&Save Preferences", this, SLOT(savePrefs()),
- Qt::CTRL|Qt::Key_S);
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
+ pFileMenu->addAction("&Save Preferences", Qt::CTRL|Qt::Key_S, this, SLOT(savePrefs()));
+ pFileMenu->addAction("Open &Map", Qt::Key_F1, m_mapMgr, SLOT(loadMap()));
+ pFileMenu->addAction("&Import &Map", m_mapMgr, SLOT(importMap()));
+ pFileMenu->addAction("Sa&ve Map", Qt::Key_F2, m_mapMgr, SLOT(saveMap()));
+ pFileMenu->addAction("Save SOE Map", m_mapMgr, SLOT(saveSOEMap()));
+ pFileMenu->addAction("Reload Guilds File", m_guildmgr, SLOT(readGuildList()));
+ pFileMenu->addAction("Save Guilds File", m_guildmgr, SLOT(writeGuildList()));
+ pFileMenu->addAction("Add Spawn Category", Qt::ALT|Qt::Key_C, this, SLOT(addCategory()));
+ pFileMenu->addAction("Rebuild SpawnList", Qt::ALT|Qt::Key_R, this, SLOT(rebuildSpawnList()));
+ pFileMenu->addAction("Reload Categories", Qt::CTRL|Qt::Key_R, this, SLOT(reloadCategories()));
+ pFileMenu->addAction("Select Next", Qt::CTRL|Qt::Key_Right, this, SLOT(selectNext()));
+ pFileMenu->addAction("Select Prev", Qt::CTRL|Qt::Key_Left, this, SLOT(selectPrev()));
+ pFileMenu->addAction("Save Selected Spawns Path", this, SLOT(saveSelectedSpawnPath(void)));
+ pFileMenu->addAction("Save NPC Spawn Paths", this, SLOT(saveSpawnPaths(void)));
+ if (m_packet->playbackPackets() != PLAYBACK_OFF)
+ {
+ pFileMenu->addAction("Inc Playback Speed", Qt::CTRL|Qt::Key_X, m_packet, SLOT(incPlayback()));
+ pFileMenu->addAction("Dec Playback Speed", Qt::CTRL|Qt::Key_Z, m_packet, SLOT(decPlayback()));
+ }
+#else
+ pFileMenu->addAction("&Save Preferences", this, SLOT(savePrefs()), Qt::CTRL|Qt::Key_S);
pFileMenu->addAction("Open &Map", m_mapMgr, SLOT(loadMap()), Qt::Key_F1);
pFileMenu->addAction("&Import &Map", m_mapMgr, SLOT(importMap()));
pFileMenu->addAction("Sa&ve Map", m_mapMgr, SLOT(saveMap()), Qt::Key_F2);
@@ -1282,6 +1302,7 @@
pFileMenu->addAction("Dec Playback Speed", m_packet, SLOT(decPlayback()),
Qt::CTRL|Qt::Key_Z);
}
+#endif
pFileMenu->addAction("&Quit", qApp, SLOT(quit()));
}
@@ -1960,6 +1981,39 @@
QMenu* pLogMenu = new QMenu("Lo&g");
m_netMenu->addMenu(pLogMenu);
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
+ m_action_log_AllPackets = pLogMenu->addAction("All Packets", Qt::Key_F5,
+ this, SLOT(toggle_log_AllPackets()));
+ m_action_log_AllPackets->setCheckable(true);
+ m_action_log_AllPackets->setChecked(m_globalLog != 0);
+
+ m_action_log_WorldData = pLogMenu->addAction("World Data", Qt::Key_F6,
+ this, SLOT(toggle_log_WorldData()));
+ m_action_log_WorldData->setCheckable(true);
+ m_action_log_WorldData->setChecked(m_worldLog != 0);
+
+ m_action_log_ZoneData = pLogMenu->addAction("Zone Data", Qt::Key_F7,
+ this, SLOT(toggle_log_ZoneData()));
+ m_action_log_ZoneData->setCheckable(true);
+ m_action_log_ZoneData->setChecked(m_zoneLog != 0);
+
+ m_action_log_UnknownData = pLogMenu->addAction("Unknown Data", Qt::Key_F8,
+ this, SLOT(toggle_log_UnknownData()));
+ m_action_log_UnknownData->setCheckable(true);
+ m_action_log_UnknownData->setChecked(m_unknownZoneLog != 0);
+
+ m_action_view_UnknownData = pLogMenu->addAction("View Unknown Data", Qt::Key_F9,
+ this, SLOT(toggle_view_UnknownData()));
+ m_action_view_UnknownData->setCheckable(true);
+ m_action_view_UnknownData->setChecked(pSEQPrefs->getPrefBool("ViewUnknown",
+ "PacketLogging", false));
+
+ m_action_log_RawData = pLogMenu->addAction("Raw Data", Qt::Key_F10,
+ this, SLOT(toggle_log_RawData()));
+ m_action_log_RawData->setCheckable(true);
+ m_action_log_RawData->setChecked(pSEQPrefs->getPrefBool("LogRawPackets",
+ "PacketLogging", false));
+#else
m_action_log_AllPackets = pLogMenu->addAction("All Packets", this,
SLOT(toggle_log_AllPackets()), Qt::Key_F5);
m_action_log_AllPackets->setCheckable(true);
@@ -1991,6 +2045,7 @@
m_action_log_RawData->setCheckable(true);
m_action_log_RawData->setChecked(pSEQPrefs->getPrefBool("LogRawPackets",
"PacketLogging", false));
+#endif
m_filterZoneDataMenu = new QMenu("Filter Zone Data");
pLogMenu->addMenu(m_filterZoneDataMenu);
@@ -2008,6 +2063,18 @@
QMenu* pOpCodeMenu = new QMenu("OpCode Monitor");
m_netMenu->addMenu(pOpCodeMenu);
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
+ m_action_opcode_monitor = pOpCodeMenu->addAction("&OpCode Monitoring",
+ Qt::CTRL|Qt::ALT|Qt::Key_O,
+ this, SLOT(toggle_opcode_monitoring()));
+ m_action_opcode_monitor->setCheckable(true);
+ m_action_opcode_monitor->setChecked(m_opcodeMonitorLog != 0);
+
+ pOpCodeMenu->addAction("&Reload Monitored OpCode List...",
+ Qt::CTRL|Qt::ALT|Qt::Key_R,
+ this,
+ SLOT(set_opcode_monitored_list()));
+#else
m_action_opcode_monitor = pOpCodeMenu->addAction("&OpCode Monitoring", this,
SLOT(toggle_opcode_monitoring()), Qt::CTRL|Qt::ALT|Qt::Key_O);
m_action_opcode_monitor->setCheckable(true);
@@ -2015,6 +2082,7 @@
pOpCodeMenu->addAction("&Reload Monitored OpCode List...", this,
SLOT(set_opcode_monitored_list()), Qt::CTRL|Qt::ALT|Qt::Key_R);
+#endif
QString section = "OpCodeMonitoring";
@@ -2133,6 +2201,22 @@
QMenu* filterMenu = new QMenu("Fi<ers");
menuBar()->addMenu(filterMenu);
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
+ filterMenu->addAction("&Reload Filters", Qt::Key_F3, m_filterMgr, SLOT(loadFilters()));
+ filterMenu->addAction("&Save Filters", Qt::Key_F4, m_filterMgr, SLOT(saveFilters()));
+ filterMenu->addAction("&Edit Filters", this, SLOT(launch_editor_filters()));
+ filterMenu->addAction("&Edit Filters XML", this, SLOT(launch_editor_filters()));
+ filterMenu->addAction("Select Fil&ter File", this, SLOT(select_filter_file()));
+
+ filterMenu->addAction("Reload &Zone Filters", Qt::SHIFT|Qt::Key_F3,
+ m_filterMgr, SLOT(loadZoneFilters()));
+ filterMenu->addAction("S&ave Zone Filters", Qt::SHIFT|Qt::Key_F4,
+ m_filterMgr, SLOT(saveZoneFilters()));
+ filterMenu->addAction("Edit Zone Filters", this,
+ SLOT(launch_filterlistwindow_zoneFilters()));
+ filterMenu->addAction("Edit Zone Fi<ers XML", this,
+ SLOT(launch_editor_zoneFilters()));
+#else
filterMenu->addAction("&Reload Filters", m_filterMgr, SLOT(loadFilters()),
Qt::Key_F3);
filterMenu->addAction("&Save Filters", m_filterMgr, SLOT(saveFilters()),
@@ -2149,6 +2233,7 @@
SLOT(launch_filterlistwindow_zoneFilters()));
filterMenu->addAction("Edit Zone Fi<ers XML", this,
SLOT(launch_editor_zoneFilters()));
+#endif
filterMenu->addAction("Re&filter Spawns", m_spawnShell, SLOT(refilterSpawns()));
@@ -2621,7 +2706,25 @@
// Debug menu
QMenu* pDebugMenu = new QMenu("&Debug");
menuBar()->addMenu(pDebugMenu);
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
pDebugMenu->addAction("List I&nterface", this, SLOT(listInterfaceInfo()));
+ pDebugMenu->addAction("List S&pawns", Qt::ALT|Qt::CTRL|Qt::Key_P, this, SLOT(listSpawns()));
+ pDebugMenu->addAction("List &Drops", Qt::ALT|Qt::CTRL|Qt::Key_D, this, SLOT(listDrops()));
+ pDebugMenu->addAction("List &Map Info", Qt::ALT|Qt::CTRL|Qt::Key_M, this, SLOT(listMapInfo()));
+ pDebugMenu->addAction("List G&uild Info", m_guildmgr, SLOT(listGuildInfo()));
+ pDebugMenu->addAction("List &Group", Qt::ALT|Qt::CTRL|Qt::Key_G, this, SLOT(listGroup()));
+ pDebugMenu->addAction("List Guild M&embers", Qt::ALT|Qt::CTRL|Qt::Key_E, this, SLOT(listGuild()));
+ pDebugMenu->addAction("Dump Spawns", Qt::ALT|Qt::SHIFT|Qt::CTRL|Qt::Key_P, this, SLOT(dumpSpawns()));
+ pDebugMenu->addAction("Dump Drops", Qt::ALT|Qt::SHIFT|Qt::CTRL|Qt::Key_D, this, SLOT(dumpDrops()));
+ pDebugMenu->addAction("Dump Map Info", Qt::ALT|Qt::SHIFT|Qt::CTRL|Qt::Key_M, this, SLOT(dumpMapInfo()));
+ pDebugMenu->addAction("Dump Guild Info", this , SLOT(dumpGuildInfo()));
+ pDebugMenu->addAction("Dump SpellBook Info", this , SLOT(dumpSpellBook()));
+ pDebugMenu->addAction("Dump Group", Qt::ALT|Qt::CTRL|Qt::SHIFT|Qt::Key_G, this, SLOT(dumpGroup()));
+ pDebugMenu->addAction("Dump Guild Members", Qt::ALT|Qt::CTRL|Qt::SHIFT|Qt::Key_E, this, SLOT(dumpGuild()));
+ pDebugMenu->addAction("List &Filters", Qt::ALT|Qt::CTRL|Qt::Key_F, m_filterMgr, SLOT(listFilters()));
+ pDebugMenu->addAction("List &Zone Filters", m_filterMgr, SLOT(listZoneFilters()));
+#else
+ pDebugMenu->addAction("List I&nterface", this, SLOT(listInterfaceInfo()));
pDebugMenu->addAction("List S&pawns", this, SLOT(listSpawns()), Qt::ALT|Qt::CTRL|Qt::Key_P);
pDebugMenu->addAction("List &Drops", this, SLOT(listDrops()), Qt::ALT|Qt::CTRL|Qt::Key_D);
pDebugMenu->addAction("List &Map Info", this, SLOT(listMapInfo()), Qt::ALT|Qt::CTRL|Qt::Key_M);
@@ -2637,8 +2740,7 @@
pDebugMenu->addAction("Dump Guild Members", this, SLOT(dumpGuild()), Qt::ALT|Qt::CTRL|Qt::SHIFT|Qt::Key_E);
pDebugMenu->addAction("List &Filters", m_filterMgr, SLOT(listFilters()), Qt::ALT|Qt::CTRL|Qt::Key_F);
pDebugMenu->addAction("List &Zone Filters", m_filterMgr, SLOT(listZoneFilters()));
-
-
+#endif
}
void EQInterface::createStatusBar() {
@@ -3941,6 +4043,7 @@
EQInterface::launch_filterlistwindow_filters(void)
{
FilterListWindow * ew = new FilterListWindow(m_filterMgr->filterFile(), this);
+ ew->show();
}
void
@@ -3955,6 +4058,7 @@
EQInterface::launch_filterlistwindow_zoneFilters(void)
{
FilterListWindow * ew = new FilterListWindow(m_filterMgr->zoneFilterFile(), this);
+ ew->show();
}
void
Modified: showeq/branches/cn187_devel/src/map.cpp
===================================================================
--- showeq/branches/cn187_devel/src/map.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/map.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -2155,7 +2155,11 @@
if (m_mapMgr->mapData().waypointActive())
{
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
+ QPoint clickpoint(m_param.invertXOffset(me->position().x()), m_param.invertYOffset(me->position().y()));
+#else
QPoint clickpoint(m_param.invertXOffset(me->x()), m_param.invertYOffset(me->y()));
+#endif
const MapPoint* closest_wp = m_mapMgr->mapData().closestWaypointToPoint2D(clickpoint, dist);
if (closest_wp)
{
Modified: showeq/branches/cn187_devel/src/mapcore.cpp
===================================================================
--- showeq/branches/cn187_devel/src/mapcore.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/mapcore.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -1723,7 +1723,7 @@
if (wp_dist < closest_dist)
{
closest_dist = wp_dist;
- closest_wp = wp_itr;
+ closest_wp = &(*wp_itr);
}
}
return closest_wp;
@@ -1741,7 +1741,7 @@
if (wp_dist < closest_dist)
{
closest_dist = wp_dist;
- closest_wp = wp_itr;
+ closest_wp = &(*wp_itr);
}
}
return closest_wp;
Modified: showeq/branches/cn187_devel/src/mapicondialog.ui
===================================================================
(Binary files differ)
Modified: showeq/branches/cn187_devel/src/messagewindow.cpp
===================================================================
--- showeq/branches/cn187_devel/src/messagewindow.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/messagewindow.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -659,6 +659,17 @@
SLOT(messageFilterDialog()));
m_menu->addSeparator();
+#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
+ m_menu->addAction("&Find...", Qt::CTRL|Qt::Key_F, this, SLOT(findDialog()));
+ m_menu->addSeparator();
+
+ m_action_lockText = m_menu->addAction("&Lock Text", Qt::CTRL|Qt::Key_L,
+ this, SLOT(toggleLockedText()));
+ m_action_lockText->setCheckable(true);
+ m_action_lockText->setChecked(m_lockedText);
+ m_menu->addAction("Refresh Messages...", Qt::CTRL|Qt::Key_R, this, SLOT(refreshMessages()));
+ m_menu->addAction("Save Message Text...", Qt::CTRL|Qt::Key_S, this, SLOT(saveText()));
+#else
m_menu->addAction("&Find...", this, SLOT(findDialog()), Qt::CTRL|Qt::Key_F);
m_menu->addSeparator();
@@ -670,6 +681,8 @@
SLOT(refreshMessages()), Qt::CTRL|Qt::Key_R);
m_menu->addAction("Save Message Text...", this, SLOT(saveText()),
Qt::CTRL|Qt::Key_S);
+#endif
+
m_menu->addSeparator();
tmpAction = m_menu->addAction("&Display Type", this,
Modified: showeq/branches/cn187_devel/src/spawnlistcommon.cpp
===================================================================
--- showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/spawnlistcommon.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -708,6 +708,13 @@
void SpawnListMenu::delete_category()
{
+#if (QT_VERSION >= QT_VERSION_CHECK(4,2,0))
+ QMessageBox mb(QMessageBox::NoIcon, "Are you sure?",
+ "Are you sure you wish to delete category "
+ + m_currentCategory->name() + "?",
+ QMessageBox::Yes | QMessageBox::No,
+ m_spawnlist);
+#else
// confirm that the user wants to delete the category
QMessageBox mb("Are you sure?",
"Are you sure you wish to delete category "
@@ -717,7 +724,8 @@
QMessageBox::No | QMessageBox::Default | QMessageBox::Escape,
QMessageBox::NoButton,
m_spawnlist);
-
+#endif
+
// if user chose yes, then delete the category
if (mb.exec() == QMessageBox::Yes)
m_categoryMgr->remCategory(m_currentCategory);
Modified: showeq/branches/cn187_devel/src/spawnpointlist.cpp
===================================================================
--- showeq/branches/cn187_devel/src/spawnpointlist.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/spawnpointlist.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -366,7 +366,13 @@
sp->x(), sp->y(), sp->z(), def.toLatin1().data());
#endif
- // confirm that the user wants to delete the category
+#if (QT_VERSION >= QT_VERSION_CHECK(4,2,0))
+ QMessageBox mb(QMessageBox::NoIcon, "Are you sure?",
+ "Are you sure you wish to delete spawn point "
+ + def + "?",
+ QMessageBox::Yes | QMessageBox::No,
+ this);
+#else
QMessageBox mb("Are you sure?",
"Are you sure you wish to delete spawn point "
+ def + "?",
@@ -375,6 +381,7 @@
QMessageBox::No | QMessageBox::Default | QMessageBox::Escape,
QMessageBox::NoButton,
this);
+#endif
// if user chose eys, then delete the spawn point
if (mb.exec() == QMessageBox::Yes)
@@ -389,7 +396,12 @@
void SpawnPointList::clearItems(void)
{
- // confirm that the user wants to delete the category
+#if (QT_VERSION >= QT_VERSION_CHECK(4,2,0))
+ QMessageBox mb(QMessageBox::NoIcon, "Are you sure?",
+ "Are you sure you wish to clear all the spawn points?",
+ QMessageBox::Yes | QMessageBox::No,
+ this);
+#else
QMessageBox mb("Are you sure?",
"Are you sure you wish to clear all the spawn points?",
QMessageBox::NoIcon,
@@ -397,7 +409,8 @@
QMessageBox::No | QMessageBox::Default | QMessageBox::Escape,
QMessageBox::NoButton,
this);
-
+#endif
+
// if user chose eys, then clear the spawn points
if (mb.exec() == QMessageBox::Yes)
m_spawnMonitor->clear();
Modified: showeq/branches/cn187_devel/src/xmlconv.cpp
===================================================================
--- showeq/branches/cn187_devel/src/xmlconv.cpp 2024-08-19 01:31:12 UTC (rev 1511)
+++ showeq/branches/cn187_devel/src/xmlconv.cpp 2024-08-19 01:31:19 UTC (rev 1512)
@@ -268,11 +268,7 @@
QStringList stringList;
QDomElement stringElement;
-#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
- for (int i = 0; i < stringNodeList.length(); i++)
-#else
- for (unsigned int i = 0; i < stringNodeList.length(); i++)
-#endif
+ for (int i = 0; i < stringNodeList.count(); i++)
{
stringElement = stringNodeList.item(i).toElement();
if (!stringElement.hasAttribute("value"))
@@ -464,11 +460,7 @@
case QMetaType::QStringList:
{
e.setTagName("stringlist");
-#if (QT_VERSION >= QT_VERSION_CHECK(5,0,0))
int j;
-#else
- unsigned int j;
-#endif
QDomNode n;
QDomNodeList stringNodeList = e.elementsByTagName("string");
@@ -477,7 +469,7 @@
QStringList::Iterator it = stringList.begin();
for (j = 0;
- ((j < stringNodeList.length()) && (it != stringList.end()));
+ ((j < stringNodeList.count()) && (it != stringList.end()));
j++)
{
// get the current string element
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|