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

@@ -40,11 +40,13 @@
#include "uniqueidmanager.h"
#include "viewmanagerinterface.h"
#include <utils/qtcassert.h>
using namespace Core;
using namespace Core::Internal;
ProgressManager::ProgressManager(QObject *parent) :
ProgressManagerInterface(parent)
ProgressManager::ProgressManager(QObject *parent)
: ProgressManagerInterface(parent)
{
m_progressView = new ProgressView;
ICore *core = CoreImpl::instance();
@@ -103,7 +105,7 @@ QWidget *ProgressManager::progressView()
void ProgressManager::taskFinished()
{
QObject *taskObject = sender();
Q_ASSERT(taskObject);
QTC_ASSERT(taskObject, return);
QFutureWatcher<void> *task = static_cast<QFutureWatcher<void> *>(taskObject);
m_runningTasks.remove(task);
delete task;

View File

@@ -34,6 +34,8 @@
#include "progressview.h"
#include "futureprogress.h"
#include <utils/qtcassert.h>
#include <QtGui/QHBoxLayout>
using namespace Core;
@@ -136,7 +138,7 @@ void ProgressView::removeTask(FutureProgress *task)
void ProgressView::slotFinished()
{
FutureProgress *progress = qobject_cast<FutureProgress *>(sender());
Q_ASSERT(progress);
QTC_ASSERT(progress, return);
if (m_keep.contains(progress) && !m_keep.value(progress) && !progress->hasError())
removeTask(progress);
removeOldTasks(m_type.value(progress), true);