forked from qt-creator/qt-creator
use QTC_ASSERT instead of Q_ASSERT
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user