diff options
author | Tobias Markmann <tm@ayena.de> | 2013-01-17 16:11:43 (GMT) |
---|---|---|
committer | Swift Review <review@swift.im> | 2013-01-27 22:11:12 (GMT) |
commit | 28c99a37d09a68ef993330b9ece2732ec03eba8f (patch) | |
tree | fa21b0d626055842ffcaee5d8fa5a1f7552cf38c /Swift/QtUI | |
parent | 17aaca4d226e48396437c512b6ea1873fc75b56c (diff) | |
download | swift-contrib-28c99a37d09a68ef993330b9ece2732ec03eba8f.zip swift-contrib-28c99a37d09a68ef993330b9ece2732ec03eba8f.tar.bz2 |
Fixing VCard related crash caused by wrong deletion of profile window.
Change-Id: Ifab6b304f0e25ab323b4a354f4682291e6aa1078
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
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); |