mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Merge remote-tracking branch 'upstream/coverity_scan' into HEAD
This commit is contained in:
commit
6146a3843c
@ -19,7 +19,7 @@ addons:
|
|||||||
description: "<Your project description here>"
|
description: "<Your project description here>"
|
||||||
notification_email: scrawl@baseoftrash.de
|
notification_email: scrawl@baseoftrash.de
|
||||||
build_command_prepend: "cmake ."
|
build_command_prepend: "cmake ."
|
||||||
build_command: "make -j4"
|
build_command: "make -j3"
|
||||||
branch_pattern: coverity_scan
|
branch_pattern: coverity_scan
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
|
@ -75,7 +75,8 @@ CS::Editor::~Editor ()
|
|||||||
mPidFile.close();
|
mPidFile.close();
|
||||||
|
|
||||||
if(mServer && boost::filesystem::exists(mPid))
|
if(mServer && boost::filesystem::exists(mPid))
|
||||||
remove(mPid.string().c_str()); // ignore any error
|
static_cast<void> ( // silence coverity warning
|
||||||
|
remove(mPid.string().c_str())); // ignore any error
|
||||||
|
|
||||||
// cleanup global resources used by OEngine
|
// cleanup global resources used by OEngine
|
||||||
delete OEngine::Physic::BulletShapeManager::getSingletonPtr();
|
delete OEngine::Physic::BulletShapeManager::getSingletonPtr();
|
||||||
|
@ -27,7 +27,7 @@ bool CSMFilter::ValueNode::test (const CSMWorld::IdTableBase& table, int row,
|
|||||||
QVariant data = table.data (index);
|
QVariant data = table.data (index);
|
||||||
|
|
||||||
if (data.type()!=QVariant::Double && data.type()!=QVariant::Bool && data.type()!=QVariant::Int &&
|
if (data.type()!=QVariant::Double && data.type()!=QVariant::Bool && data.type()!=QVariant::Int &&
|
||||||
data.type()!=QVariant::UInt && data.type()!=static_cast<QVariant::Type> (QMetaType::Float))
|
data.type()!=QVariant::UInt)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
double value = data.toDouble();
|
double value = data.toDouble();
|
||||||
|
@ -35,7 +35,8 @@ void CSVRender::Object::clear()
|
|||||||
{
|
{
|
||||||
mObject.setNull();
|
mObject.setNull();
|
||||||
|
|
||||||
clearSceneNode (mBase);
|
if (mBase)
|
||||||
|
clearSceneNode (mBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSVRender::Object::update()
|
void CSVRender::Object::update()
|
||||||
@ -156,11 +157,13 @@ CSVRender::Object::~Object()
|
|||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
if(mPhysics) // preview may not have physics enabled
|
|
||||||
mPhysics->removeObject(mBase->getName());
|
|
||||||
|
|
||||||
if (mBase)
|
if (mBase)
|
||||||
|
{
|
||||||
|
if(mPhysics) // preview may not have physics enabled
|
||||||
|
mPhysics->removeObject(mBase->getName());
|
||||||
|
|
||||||
mBase->getCreator()->destroySceneNode (mBase);
|
mBase->getCreator()->destroySceneNode (mBase);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSVRender::Object::referenceableDataChanged (const QModelIndex& topLeft,
|
bool CSVRender::Object::referenceableDataChanged (const QModelIndex& topLeft,
|
||||||
|
@ -138,17 +138,19 @@ bool CSVWorld::TableSubView::eventFilter (QObject* object, QEvent* event)
|
|||||||
{
|
{
|
||||||
if (event->type() == QEvent::Drop)
|
if (event->type() == QEvent::Drop)
|
||||||
{
|
{
|
||||||
QDropEvent* drop = dynamic_cast<QDropEvent*>(event);
|
if (QDropEvent* drop = dynamic_cast<QDropEvent*>(event))
|
||||||
const CSMWorld::TableMimeData* data = dynamic_cast<const CSMWorld::TableMimeData*>(drop->mimeData());
|
|
||||||
if (!data) // May happen when non-records (e.g. plain text) are dragged and dropped
|
|
||||||
return false;
|
|
||||||
|
|
||||||
bool handled = data->holdsType(CSMWorld::UniversalId::Type_Filter);
|
|
||||||
if (handled)
|
|
||||||
{
|
{
|
||||||
mFilterBox->setRecordFilter(data->returnMatching(CSMWorld::UniversalId::Type_Filter).getId());
|
const CSMWorld::TableMimeData* data = dynamic_cast<const CSMWorld::TableMimeData*>(drop->mimeData());
|
||||||
|
if (!data) // May happen when non-records (e.g. plain text) are dragged and dropped
|
||||||
|
return false;
|
||||||
|
|
||||||
|
bool handled = data->holdsType(CSMWorld::UniversalId::Type_Filter);
|
||||||
|
if (handled)
|
||||||
|
{
|
||||||
|
mFilterBox->setRecordFilter(data->returnMatching(CSMWorld::UniversalId::Type_Filter).getId());
|
||||||
|
}
|
||||||
|
return handled;
|
||||||
}
|
}
|
||||||
return handled;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -387,10 +387,9 @@ namespace Compiler
|
|||||||
if (get (c))
|
if (get (c))
|
||||||
{
|
{
|
||||||
/// \todo hack to allow a space in comparison operators (add option to disable)
|
/// \todo hack to allow a space in comparison operators (add option to disable)
|
||||||
if (c==' ')
|
if (c==' ' && !get (c))
|
||||||
get (c);
|
special = S_cmpEQ;
|
||||||
|
else if (c=='=')
|
||||||
if (c=='=')
|
|
||||||
special = S_cmpEQ;
|
special = S_cmpEQ;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -471,10 +470,9 @@ namespace Compiler
|
|||||||
if (get (c))
|
if (get (c))
|
||||||
{
|
{
|
||||||
/// \todo hack to allow a space in comparison operators (add option to disable)
|
/// \todo hack to allow a space in comparison operators (add option to disable)
|
||||||
if (c==' ')
|
if (c==' ' && !get (c))
|
||||||
get (c);
|
special = S_cmpLT;
|
||||||
|
else if (c=='=')
|
||||||
if (c=='=')
|
|
||||||
{
|
{
|
||||||
special = S_cmpLE;
|
special = S_cmpLE;
|
||||||
|
|
||||||
@ -495,10 +493,9 @@ namespace Compiler
|
|||||||
if (get (c))
|
if (get (c))
|
||||||
{
|
{
|
||||||
/// \todo hack to allow a space in comparison operators (add option to disable)
|
/// \todo hack to allow a space in comparison operators (add option to disable)
|
||||||
if (c==' ')
|
if (c==' ' && !get (c))
|
||||||
get (c);
|
special = S_cmpGT;
|
||||||
|
else if (c=='=')
|
||||||
if (c=='=')
|
|
||||||
{
|
{
|
||||||
special = S_cmpGE;
|
special = S_cmpGE;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user