aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/options/mkcreateinstanceproc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/options/mkcreateinstanceproc.sh')
-rwxr-xr-xsrc/modules/options/mkcreateinstanceproc.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/modules/options/mkcreateinstanceproc.sh b/src/modules/options/mkcreateinstanceproc.sh
index 1bd42fb2e..d1c33c518 100755
--- a/src/modules/options/mkcreateinstanceproc.sh
+++ b/src/modules/options/mkcreateinstanceproc.sh
@@ -54,10 +54,8 @@ cat >> OptionsInstanceManager.h <<EOF
#include "KviQString.h"
#include "KviIconManager.h"
-typedef struct _OptionsWidgetInstanceEntry OptionsWidgetInstanceEntry;
-
-typedef struct _OptionsWidgetInstanceEntry
+struct OptionsWidgetInstanceEntry
{
KviOptionsWidget * (*createProc)(QWidget *);
KviOptionsWidget * pWidget; // singleton
@@ -73,7 +71,7 @@ typedef struct _OptionsWidgetInstanceEntry
bool bIsNotContained;
KviPointerList<OptionsWidgetInstanceEntry> * pChildList;
bool bDoInsert; // a helper for OptionsDialog::fillListView()
-} OptionsWidgetInstanceEntry;
+};
class OptionsInstanceManager : public QObject
@@ -231,7 +229,7 @@ printclass()
echo "$3 e$1 = new OptionsWidgetInstanceEntry;" >> $TARGET
echo -n "$3 e$1->createProc = &class$2" >> $TARGET
echo "_createInstanceProc;" >> $TARGET
- echo "$3 e$1->pWidget = 0;" >> $TARGET
+ echo "$3 e$1->pWidget = nullptr;" >> $TARGET
echo "$3 e$1->szClassName = g_szClassName_$2;" >> $TARGET
echo "$3 e$1->eIcon = KVI_OPTIONS_WIDGET_ICON_$2;" >> $TARGET
@@ -290,7 +288,7 @@ addchildren()
NEXTLEVEL=`expr $1 + 1`
addchildren $NEXTLEVEL $achild "$3 "
else
- echo "$3 e$1->pChildList = 0;" >> $TARGET
+ echo "$3 e$1->pChildList = nullptr;" >> $TARGET
fi
done
fi
@@ -318,7 +316,7 @@ void OptionsInstanceManager::deleteInstanceTree(KviPointerList<OptionsWidgetInst
{
disconnect(pEntry->pWidget,SIGNAL(destroyed()),this,SLOT(widgetDestroyed()));
delete pEntry->pWidget->parent();
- pEntry->pWidget = 0;
+ pEntry->pWidget = nullptr;
} else {
qDebug("Ops...i have deleted the options dialog ?");
}
@@ -339,14 +337,14 @@ OptionsInstanceManager::~OptionsInstanceManager()
void OptionsInstanceManager::cleanup(KviModule *)
{
deleteInstanceTree(m_pInstanceTree);
- m_pInstanceTree = 0;
+ m_pInstanceTree = nullptr;
}
void OptionsInstanceManager::widgetDestroyed()
{
OptionsWidgetInstanceEntry * pEntry = findInstanceEntry(sender(),m_pInstanceTree);
if(pEntry)
- pEntry->pWidget = 0;
+ pEntry->pWidget = nullptr;
if(g_iOptionWidgetInstances > 0)
g_iOptionWidgetInstances--;
@@ -355,7 +353,7 @@ void OptionsInstanceManager::widgetDestroyed()
KviOptionsWidget * OptionsInstanceManager::getInstance(OptionsWidgetInstanceEntry * pEntry, QWidget * pPar)
{
if(!pEntry)
- return NULL;
+ return nullptr;
#if 0
if(pEntry->pWidget)
@@ -365,7 +363,7 @@ KviOptionsWidget * OptionsInstanceManager::getInstance(OptionsWidgetInstanceEntr
QWidget * pOldPar = (QWidget *)pEntry->pWidget->parent();
pEntry->pWidget->setParent(pPar);
pOldPar->deleteLater();
- pEntry->pWidget = 0;
+ pEntry->pWidget = nullptr;
}
}
#endif