diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtProfileWindow.cpp | 7 | ||||
-rw-r--r-- | Swift/QtUI/QtProfileWindow.h | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Swift/QtUI/QtProfileWindow.cpp b/Swift/QtUI/QtProfileWindow.cpp index ccc6ae9..26b160a 100644 --- a/Swift/QtUI/QtProfileWindow.cpp +++ b/Swift/QtUI/QtProfileWindow.cpp @@ -22,14 +22,15 @@ namespace Swift { -QtProfileWindow::QtProfileWindow(QWidget* parent) : - QWidget(parent), +QtProfileWindow::QtProfileWindow() : + QWidget(), ui(new Ui::QtProfileWindow) { ui->setupUi(this); new QShortcut(QKeySequence::Close, this, SLOT(close())); ui->throbberLabel->setMovie(new QMovie(":/icons/throbber.gif", QByteArray(), this)); connect(ui->savePushButton, SIGNAL(clicked()), SLOT(handleSave())); setEditable(false); + setAttribute(Qt::WA_DeleteOnClose); } QtProfileWindow::~QtProfileWindow() { @@ -104,8 +105,8 @@ void QtProfileWindow::updateTitle() { } void QtProfileWindow::closeEvent(QCloseEvent* event) { - onWindowClosed(jid); event->accept(); + onWindowAboutToBeClosed(jid); } void QtProfileWindow::handleSave() { diff --git a/Swift/QtUI/QtProfileWindow.h b/Swift/QtUI/QtProfileWindow.h index 1dbc0fb..a2af63a 100644 --- a/Swift/QtUI/QtProfileWindow.h +++ b/Swift/QtUI/QtProfileWindow.h @@ -28,7 +28,7 @@ class QtProfileWindow : public QWidget, public ProfileWindow { Q_OBJECT public: - explicit QtProfileWindow(QWidget* parent = 0); + QtProfileWindow(); virtual ~QtProfileWindow(); virtual void setJID(const JID& jid); |