tycho: quit using unnecessary casts

master
an 2019-07-03 23:22:15 -04:00
parent 91182c6015
commit f9722647af
3 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#include "tycho.h"
MapProps::MapProps(Project *parent) :
QDialog(static_cast<QWidget *>(parent)),
QDialog(parent),
m_mapModel(parent->mapModel())
{
setupUi(this);

View File

@ -1,7 +1,7 @@
#include "tycho.h"
MapView::MapView(Project *parent) :
QWidget(static_cast<QWidget *>(parent)),
QWidget(parent),
m_mapModel(parent->mapModel())
{
setupUi(this);

View File

@ -57,7 +57,7 @@ IProjectModel *Project::model() const
MapModel *Project::mapModel() const
{
return dynamic_cast<MapModel *>(m_model);
return qobject_cast<MapModel *>(m_model);
}
void Project::closeEvent(QCloseEvent *event)