Gui: Replace C cast

This commit is contained in:
marioalexis
2022-06-17 12:00:26 -03:00
committed by Chris Hennes
parent 209c78d43e
commit ff1b4eff05
36 changed files with 156 additions and 152 deletions

View File

@@ -72,7 +72,7 @@ void WidgetFactoryInst::destruct ()
*/
QWidget* WidgetFactoryInst::createWidget (const char* sName, QWidget* parent) const
{
auto w = (QWidget*)Produce(sName);
auto w = static_cast<QWidget*>(Produce(sName));
// this widget class is not registered
if (!w) {
@@ -217,7 +217,7 @@ PrefPageUiProducer::~PrefPageUiProducer()
void* PrefPageUiProducer::Produce () const
{
QWidget* page = new Gui::Dialog::PreferenceUiForm(fn);
return (void*)page;
return static_cast<void*>(page);
}
// ----------------------------------------------------
@@ -476,7 +476,7 @@ void PyResource::load(const char* name)
throw Base::ValueError("Invalid widget.");
if (w->inherits("QDialog")) {
myDlg = (QDialog*)w;
myDlg = static_cast<QDialog*>(w);
}
else {
myDlg = new ContainerDialog(w);