use QTC_ASSERT instead of Q_ASSERT

This commit is contained in:
hjk
2008-12-09 15:25:01 +01:00
parent e99d8ce3fc
commit 4a552ead9f
94 changed files with 923 additions and 673 deletions

View File

@@ -35,6 +35,7 @@
#include "formeditorw.h"
#include <coreplugin/minisplitter.h>
#include <utils/qtcassert.h>
#include <QtCore/QEvent>
#include <QtGui/QVBoxLayout>
@@ -54,7 +55,7 @@ SharedSubWindow::SharedSubWindow(QWidget *shared, QWidget *parent) :
m_shared(shared),
m_layout(new QVBoxLayout)
{
Q_ASSERT(m_shared);
QTC_ASSERT(m_shared, /**/);
m_layout->setContentsMargins(0, 0, 0, 0);
setLayout(m_layout);
}
@@ -62,14 +63,14 @@ SharedSubWindow::SharedSubWindow(QWidget *shared, QWidget *parent) :
void SharedSubWindow::activate()
{
// Take the widget off the other parent
Q_ASSERT(m_shared);
QTC_ASSERT(m_shared, return);
QWidget *currentParent = m_shared->parentWidget();
if (currentParent == this)
return;
if (currentParent) {
QVBoxLayout *lt = qobject_cast<QVBoxLayout *>(currentParent->layout());
Q_ASSERT(lt);
QTC_ASSERT(lt, return);
m_shared->setParent(0);
delete lt->takeAt(0);
}