From 113da29e2e29d24d863749d4d40e11f95e4f757d Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Tue, 7 Oct 2014 09:55:09 +0200 Subject: Fix QLayout related warning. QVBoxLayout was initialized with a widget which automatically tries to make the new layout the main layout of the widget. However, this is not intended. This bug was introduced in cc379dc. Test-Information: Before a warning "QLayout: Attempting to add QLayout..." was printed to stdout when joining a MUC; now this warning is gone. Change-Id: Ie680b188e108a3d825fb98947f2829d3c12955f7 diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index 3491d3c..6500ba4 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -80,7 +80,7 @@ QtChatWindow::QtChatWindow(const QString &contact, QtChatTheme* theme, UIEventSt layout->setContentsMargins(0,0,0,0); layout->setSpacing(2); - alertLayout_ = new QVBoxLayout(this); + alertLayout_ = new QVBoxLayout(); layout->addLayout(alertLayout_); subjectLayout_ = new QBoxLayout(QBoxLayout::LeftToRight); -- cgit v0.10.2-6-g49f6