Changed: #1193 Fix typos in comments/code.

This commit is contained in:
dnk-88 2011-09-02 01:29:19 +03:00
parent 1304bfe56a
commit eed98daa6a
14 changed files with 68 additions and 68 deletions

View file

@ -97,7 +97,7 @@ public:
_AttrbDlg[k]->init(); _AttrbDlg[k]->init();
} }
static const char * const operators[] = static const char *const operators[] =
{ {
QT_TR_NOOP("Select Arg1"), QT_TR_NOOP("Select Arg1"),
QT_TR_NOOP("Select Arg2"), QT_TR_NOOP("Select Arg2"),

View file

@ -141,7 +141,7 @@ public:
float getAnimLength(std::string name); float getAnimLength(std::string name);
/// Get slot infomation /// Get slot infomation
void setSlotInfo(uint num, CSlotInfo& slotInfo) void setSlotInfo(uint num, CSlotInfo &slotInfo)
{ {
_SlotInfo[num] = slotInfo; _SlotInfo[num] = slotInfo;
} }

View file

@ -135,7 +135,7 @@ bool CGraphicsViewport::winEvent(MSG *message, long *result)
{ {
winProc proc = (winProc)driver->getWindowProc(); winProc proc = (winProc)driver->getWindowProc();
// TODO: shouldn't it return false like the others? // TODO: shouldn't it return false like the others?
// see macEvent() and x11Event() below // see macEvent() and x11Event() below
return proc(driver, message->hwnd, message->message, message->wParam, message->lParam); return proc(driver, message->hwnd, message->message, message->wParam, message->lParam);
} }
@ -163,7 +163,7 @@ bool CGraphicsViewport::macEvent(EventHandlerCallRef caller, EventRef event)
} }
} }
// return false to let Qt handle the event as well, // return false to let Qt handle the event as well,
// else the widget would never get focus // else the widget would never get focus
return false; return false;
} }
@ -184,7 +184,7 @@ bool CGraphicsViewport::x11Event(XEvent *event)
} }
} }
// return false to let Qt handle the event as well, // return false to let Qt handle the event as well,
// else the widget would never get focus // else the widget would never get focus
// TODO: test me please, i have no linux at hand (rti) // TODO: test me please, i have no linux at hand (rti)
return false; return false;

View file

@ -59,7 +59,7 @@ public:
CGraphicsViewport(QWidget *parent); CGraphicsViewport(QWidget *parent);
virtual ~CGraphicsViewport(); virtual ~CGraphicsViewport();
virtual QPaintEngine* paintEngine() const virtual QPaintEngine *paintEngine() const
{ {
return NULL; return NULL;
} }

View file

@ -161,7 +161,7 @@ bool HoverPoints::eventFilter(QObject *object, QEvent *event)
case QEvent::TouchBegin: case QEvent::TouchBegin:
case QEvent::TouchUpdate: case QEvent::TouchUpdate:
{ {
const QTouchEvent *const touchEvent = static_cast<const QTouchEvent*>(event); const QTouchEvent *const touchEvent = static_cast<const QTouchEvent *>(event);
const QList<QTouchEvent::TouchPoint> points = touchEvent->touchPoints(); const QList<QTouchEvent::TouchPoint> points = touchEvent->touchPoints();
const qreal pointSize = qMax(m_pointSize.width(), m_pointSize.height()); const qreal pointSize = qMax(m_pointSize.width(), m_pointSize.height());
Q_FOREACH (const QTouchEvent::TouchPoint &touchPoint, points) Q_FOREACH (const QTouchEvent::TouchPoint &touchPoint, points)

View file

@ -91,7 +91,7 @@ QString CMorphMeshDialog::getShapeDescStr(uint shapeIndex, sint numVerts) const
} }
else else
{ {
QString error = qobject_cast<CMeshWidget*>(QObject::parent())->getShapeErrorString(numVerts); QString error = qobject_cast<CMeshWidget *>(QObject::parent())->getShapeErrorString(numVerts);
QString result = _CM->getShape(shapeIndex).c_str() + QString(" (%1)").arg(error); QString result = _CM->getShape(shapeIndex).c_str() + QString(" (%1)").arg(error);
return result; return result;
} }

View file

@ -435,7 +435,7 @@ void CObjectViewer::setCurrentObject(const std::string &name)
nlinfo("set current entity %s", _CurrentInstance.c_str()); nlinfo("set current entity %s", _CurrentInstance.c_str());
} }
CEntity& CObjectViewer::getEntity(const std::string &name) CEntity &CObjectViewer::getEntity(const std::string &name)
{ {
if ( _Entities.count(name) == 0) nlerror("Entity %s not found", name.c_str()); if ( _Entities.count(name) == 0) nlerror("Entity %s not found", name.c_str());
EIT eit = _Entities.find (name); EIT eit = _Entities.find (name);

View file

@ -152,7 +152,7 @@ public:
/// Get entity from the scene /// Get entity from the scene
/// @return ref Entity /// @return ref Entity
CEntity& getEntity(const std::string &name); CEntity &getEntity(const std::string &name);
/// Get full list instances from the scene /// Get full list instances from the scene
/// @param listObj - ref of return list instances /// @param listObj - ref of return list instances

View file

@ -404,7 +404,7 @@ bool CParticleTreeModel::insertRows(NL3D::CPSLocated *loc, int position, const Q
bool CParticleTreeModel::insertRow(NL3D::CPSLocated *loc, uint32 index, int position, const QModelIndex &parent) bool CParticleTreeModel::insertRow(NL3D::CPSLocated *loc, uint32 index, int position, const QModelIndex &parent)
{ {
beginInsertRows(parent, position, position); beginInsertRows(parent, position, position);
createItemFromLocatedInstance(loc, index, static_cast<CParticleTreeItem *>(parent.internalPointer())); createItemFromLocatedInstance(loc, index, static_cast<CParticleTreeItem *>(parent.internalPointer()));
endInsertRows(); endInsertRows();
return true; return true;
} }
@ -424,7 +424,7 @@ bool CParticleTreeModel::removeRows(int position, const QModelIndex &parent)
removeRows(0, parent.child(position, 0)); removeRows(0, parent.child(position, 0));
beginRemoveRows(parent, position, position); beginRemoveRows(parent, position, position);
static_cast<CParticleTreeItem*>(parent.internalPointer())->deleteChild(position); static_cast<CParticleTreeItem *>(parent.internalPointer())->deleteChild(position);
endRemoveRows(); endRemoveRows();
return false; return false;
} }

View file

@ -46,7 +46,7 @@
namespace NLQT namespace NLQT
{ {
static const char * const LocatedBindable[] = static const char *const LocatedBindable[] =
{ {
QT_TR_NOOP("Point"), QT_TR_NOOP("Point"),
QT_TR_NOOP("LookAt"), QT_TR_NOOP("LookAt"),
@ -220,7 +220,7 @@ void CParticleWorkspaceDialog::touchPSState(CParticleTreeItem *item)
} }
} }
void CParticleWorkspaceDialog::clickedItem(const QModelIndex & index) void CParticleWorkspaceDialog::clickedItem(const QModelIndex &index)
{ {
if (_currentItem != 0) if (_currentItem != 0)
_treeModel->getOwnerNode(_currentItem)->getPSPointer()->setCurrentEditedElement(NULL); _treeModel->getOwnerNode(_currentItem)->getPSPointer()->setCurrentEditedElement(NULL);

View file

@ -59,7 +59,7 @@ Q_SIGNALS:
void changeActiveNode(); void changeActiveNode();
private Q_SLOTS: private Q_SLOTS:
void clickedItem(const QModelIndex & index); void clickedItem(const QModelIndex &index);
void customContextMenu(); void customContextMenu();
void setActiveNode(); void setActiveNode();

View file

@ -61,13 +61,13 @@ public:
} }
/// Sets the path which contains samples /// Sets the path which contains samples
void setSamplePath(std::string& path) void setSamplePath(std::string &path)
{ {
_SamplePath = NLMISC::CPath::standardizePath(path, true); _SamplePath = NLMISC::CPath::standardizePath(path, true);
} }
/// Sets the path which contains packed sheet /// Sets the path which contains packed sheet
void setPackedSheetPath(std::string& path) void setPackedSheetPath(std::string &path)
{ {
_PackedSheetPath = NLMISC::CPath::standardizePath(path, true); _PackedSheetPath = NLMISC::CPath::standardizePath(path, true);
} }
@ -88,13 +88,13 @@ public:
NLSOUND::USource *create(const std::string &soundName); NLSOUND::USource *create(const std::string &soundName);
/// Load the sound animation with the specified name /// Load the sound animation with the specified name
void loadAnimation(std::string& name) void loadAnimation(std::string &name)
{ {
_AnimManager->loadAnimation(name); _AnimManager->loadAnimation(name);
} }
/// Start playing a sound animation. /// Start playing a sound animation.
void playAnimation(std::string& name, float lastTime, float curTime, NLSOUND::CSoundContext &context); void playAnimation(std::string &name, float lastTime, float curTime, NLSOUND::CSoundContext &context);
// Update the sound animations. // Update the sound animations.
//static void updateAnimations(float lastTime, float curTime) { _AnimManager->update(lastTime, curTime); }; //static void updateAnimations(float lastTime, float curTime) { _AnimManager->update(lastTime, curTime); };

View file

@ -60,7 +60,7 @@ CVegetableApperancePage::CVegetableApperancePage(QWidget *parent)
connect(_ui.removePushButton, SIGNAL(clicked()), this, SLOT(removeColor())); connect(_ui.removePushButton, SIGNAL(clicked()), this, SLOT(removeColor()));
connect(_ui.getListPushButton, SIGNAL(clicked()), this, SLOT(getFromListColors())); connect(_ui.getListPushButton, SIGNAL(clicked()), this, SLOT(getFromListColors()));
connect(_ui.listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(browseColor(QListWidgetItem*))); connect(_ui.listWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(browseColor(QListWidgetItem *)));
setEnabled(false); setEnabled(false);
} }

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>337</width> <width>235</width>
<height>232</height> <height>293</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -130,7 +130,51 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4"> <item row="0" column="3">
<widget class="QToolButton" name="unloadToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>55</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Unload</string>
</property>
<property name="icon">
<iconset resource="object_viewer.qrc">
<normaloff>:/icons/ic_nel_particle_system_close.png</normaloff>:/icons/ic_nel_particle_system_close.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QToolButton" name="saveToolButton"> <widget class="QToolButton" name="saveToolButton">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -177,7 +221,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="5"> <item row="1" column="2">
<widget class="QToolButton" name="saveAsToolButton"> <widget class="QToolButton" name="saveAsToolButton">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
@ -221,50 +265,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="3">
<widget class="QToolButton" name="unloadToolButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>55</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>Unload</string>
</property>
<property name="icon">
<iconset resource="object_viewer.qrc">
<normaloff>:/icons/ic_nel_particle_system_close.png</normaloff>:/icons/ic_nel_particle_system_close.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>