Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 38bb4a31 authored by Tomas Mecir's avatar Tomas Mecir

more porting from qt3

parent 50a7af7d
......@@ -28,7 +28,6 @@
CMapFilter::CMapFilter(CMapManager *manager)
{
mapManager = manager;
directionCmdQueue.setAutoDelete(false);
}
CMapFilter::~CMapFilter()
......@@ -49,7 +48,7 @@ QString CMapFilter::processCommand (const QString &command)
newStr += executeAfterCommand (command);
if (mapManager->getMapData()->validRoomCheck)
directionCmdQueue.enqueue(new QString (command));
directionCmdQueue.append (command);
else
mapManager->movePlayerBy(command);
return newStr;
......@@ -99,10 +98,9 @@ QString CMapFilter::executeAfterCommand (const QString &command)
/** This method is called when output is sent to the mud */
void CMapFilter::processServerOutput(const QString &s)
{
QString *dirCmd=directionCmdQueue.dequeue();
if (!directionCmdQueue.isEmpty()) {
QString dirCmd = directionCmdQueue.takeFirst();
if ((dirCmd!=NULL))
{
if (mapManager->getActiveView()->getFollowMode())
{
bool movePlayer = true;
......@@ -126,10 +124,8 @@ void CMapFilter::processServerOutput(const QString &s)
}
if (movePlayer)
mapManager->movePlayerBy(*dirCmd);
mapManager->movePlayerBy(dirCmd);
}
delete dirCmd;
}
}
......@@ -19,8 +19,8 @@
#ifndef CMAPFILTER_H
#define CMAPFILTER_H
#include <q3ptrqueue.h>
#include <qstring.h>
#include <QString>
#include <QStringList>
class CMapManager;
......@@ -45,7 +45,7 @@ private:
private:
CMapManager *mapManager;
Q3PtrQueue<QString> directionCmdQueue;
QStringList directionCmdQueue;
};
#endif
......@@ -25,7 +25,7 @@
</property>
<item>
<widget class="QTabWidget" name="TextTabs">
<widget class="QWidget" name="tab">
<widget class="QWidget" name="tab1">
<attribute name="title">
<string>&amp;Font</string>
</attribute>
......@@ -167,7 +167,7 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<widget class="QWidget" name="tab2">
<attribute name="title">
<string>S&amp;ize</string>
</attribute>
......@@ -377,7 +377,7 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<widget class="QWidget" name="tab3">
<attribute name="title">
<string>Text</string>
</attribute>
......@@ -416,7 +416,7 @@
</widget>
</item>
<item>
<widget class="Q3Frame" name="fraPreview">
<widget class="QFrame" name="fraPreview">
<property name="minimumSize">
<size>
<width>300</width>
......
......@@ -20,8 +20,8 @@
#include "../../cmapcommand.h"
#include <q3valuelist.h>
#include <qpoint.h>
#include <QLinkedList>
#include <QPoint>
class CMapManager;
......@@ -49,7 +49,7 @@ private:
QPoint pos;
int labelPos;
};
typedef Q3ValueList<struct elemProp> PropList;
typedef QLinkedList<struct elemProp> PropList;
PropList elements;
CMapManager *m_mapManager;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment