mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:23:53 +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();
|
||||
|
||||
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
|
||||
delete OEngine::Physic::BulletShapeManager::getSingletonPtr();
|
||||
|
|
|
@ -138,17 +138,19 @@ bool CSVWorld::TableSubView::eventFilter (QObject* object, QEvent* event)
|
|||
{
|
||||
if (event->type() == QEvent::Drop)
|
||||
{
|
||||
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)
|
||||
if (QDropEvent* drop = dynamic_cast<QDropEvent*>(event))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue