mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 16:49:54 +00:00
silenced a coverity warning
This commit is contained in:
parent
7b8e6f9dda
commit
706df3f881
2 changed files with 13 additions and 10 deletions
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue