Skip to content

Commit

Permalink
bad pointer to a closed window
Browse files Browse the repository at this point in the history
  • Loading branch information
pypt committed Jun 2, 2012
1 parent e4f38f6 commit 0c79283
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fvupdateconfirmdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "fvavailableupdate.h"
#include "fvupdater.h"
#include "ui_fvupdateconfirmdialog.h"
#include <QCloseEvent>


FvUpdateConfirmDialog::FvUpdateConfirmDialog(QWidget *parent) :
Expand Down Expand Up @@ -42,3 +43,9 @@ bool FvUpdateConfirmDialog::UpdateWindowWithCurrentProposedUpdate()

return true;
}

void FvUpdateConfirmDialog::closeEvent(QCloseEvent* event)
{
FvUpdater::sharedUpdater()->updateConfirmationDialogWasClosed();
event->accept();
}
2 changes: 2 additions & 0 deletions fvupdateconfirmdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class FvUpdateConfirmDialog : public QDialog
// Update the current update proposal from FvUpdater
bool UpdateWindowWithCurrentProposedUpdate();

void closeEvent(QCloseEvent* event);

private:
Ui::FvUpdateConfirmDialog* m_ui;
};
Expand Down
7 changes: 7 additions & 0 deletions fvupdatewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "fvupdater.h"
#include "fvavailableupdate.h"
#include <QApplication>
#include <QCloseEvent>
#include <QDebug>


Expand Down Expand Up @@ -52,3 +53,9 @@ bool FvUpdateWindow::UpdateWindowWithCurrentProposedUpdate()

return true;
}

void FvUpdateWindow::closeEvent(QCloseEvent* event)
{
FvUpdater::sharedUpdater()->updaterWindowWasClosed();
event->accept();
}
2 changes: 2 additions & 0 deletions fvupdatewindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class FvUpdateWindow : public QWidget
// Update the current update proposal from FvUpdater
bool UpdateWindowWithCurrentProposedUpdate();

void closeEvent(QCloseEvent* event);

private:
Ui::FvUpdateWindow* m_ui;
QGraphicsScene* m_appIconScene;
Expand Down

0 comments on commit 0c79283

Please sign in to comment.