Skip to content

Commit

Permalink
Global
Browse files Browse the repository at this point in the history
- fixed some memory leaks
  • Loading branch information
Jmgr committed Jan 14, 2012
1 parent abbb7cd commit 2588835
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion actiontools/codecombobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace ActionTools
QComboBox(parent)
{
setModel(new CodeComboBoxModel(this));
setItemDelegate(new CodeComboBoxDelegate);
setItemDelegate(new CodeComboBoxDelegate(this));

CodeLineEdit *codeLineEdit = new CodeLineEdit(parent);
codeLineEdit->setEmbedded(true);
Expand Down
30 changes: 16 additions & 14 deletions gui/actiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@

ActionDialog::ActionDialog(QAbstractItemModel *completionModel, ActionTools::Script *script, ActionTools::ActionDefinition *actionDefinition, const QString &localeName, QWidget *parent)
: QDialog(parent),
ui(new Ui::ActionDialog),
mActionInstance(0),
mScript(script),
mCurrentLine(-1),
mCurrentColumn(-1),
mCurrentException(-1),
mCompletionModel(completionModel),
mExceptionsLayout(new QGridLayout),
mTabWidget(new QTabWidget(this)),
mExceptionsTabWidget(new QWidget),
mCommonTabWidget(new QWidget),
mPauseBeforeSpinBox(new QSpinBox(this)),
mPauseAfterSpinBox(new QSpinBox(this)),
mTimeoutSpinBox(new QSpinBox(this))
ui(new Ui::ActionDialog),
mActionInstance(0),
mScript(script),
mCurrentLine(-1),
mCurrentColumn(-1),
mCurrentException(-1),
mCompletionModel(completionModel),
mExceptionsLayout(new QGridLayout),
mTabWidget(new QTabWidget(this)),
mExceptionsTabWidget(new QWidget(mTabWidget)),
mCommonTabWidget(new QWidget(mTabWidget)),
mPauseBeforeSpinBox(new QSpinBox(this)),
mPauseAfterSpinBox(new QSpinBox(this)),
mTimeoutSpinBox(new QSpinBox(this))
{
#ifdef ACT_PROFILE
Tools::HighResolutionTimer timer("ActionDialog creation " + actionDefinition->id());
Expand Down Expand Up @@ -209,6 +209,8 @@ ActionDialog::ActionDialog(QAbstractItemModel *completionModel, ActionTools::Scr

mTabWidget->addTab(mExceptionsTabWidget, tr("Exceptions"));
}
else
delete mExceptionsLayout;

//Init of action infos
QString informations;
Expand Down

0 comments on commit 2588835

Please sign in to comment.