forked from qt-creator/qt-creator
use QTC_ASSERT instead of Q_ASSERT
This commit is contained in:
@@ -32,18 +32,20 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "cmakeproject.h"
|
||||
|
||||
#include "cmakeprojectconstants.h"
|
||||
#include "cmakeprojectnodes.h"
|
||||
#include "cmakerunconfiguration.h"
|
||||
#include "cmakestep.h"
|
||||
#include "makestep.h"
|
||||
#include "cmakerunconfiguration.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <cpptools/cppmodelmanagerinterface.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QProcess>
|
||||
#include <QDir>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QProcess>
|
||||
|
||||
using namespace CMakeProjectManager;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
@@ -550,7 +552,7 @@ void CMakeCbpParser::parseUnit()
|
||||
|
||||
void CMakeCbpParser::parseUnknownElement()
|
||||
{
|
||||
Q_ASSERT(isStartElement());
|
||||
QTC_ASSERT(isStartElement(), /**/);
|
||||
|
||||
while (!atEnd()) {
|
||||
readNext();
|
||||
|
||||
@@ -32,10 +32,12 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "cmakerunconfiguration.h"
|
||||
#include "cmakeprojectconstants.h"
|
||||
|
||||
#include "cmakeproject.h"
|
||||
#include "cmakeprojectconstants.h"
|
||||
|
||||
#include <projectexplorer/environment.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace CMakeProjectManager;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
@@ -45,9 +47,9 @@ CMakeRunConfiguration::CMakeRunConfiguration(CMakeProject *pro, const QString &t
|
||||
{
|
||||
setName(target);
|
||||
}
|
||||
|
||||
CMakeRunConfiguration::~CMakeRunConfiguration()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
QString CMakeRunConfiguration::type() const
|
||||
@@ -130,7 +132,7 @@ QStringList CMakeRunConfigurationFactory::canCreate(ProjectExplorer::Project *pr
|
||||
// used to translate the types to names to display to the user
|
||||
QString CMakeRunConfigurationFactory::nameForType(const QString &type) const
|
||||
{
|
||||
Q_ASSERT(type.startsWith(Constants::CMAKERUNCONFIGURATION));
|
||||
QTC_ASSERT(type.startsWith(Constants::CMAKERUNCONFIGURATION), /**/);
|
||||
|
||||
if (type == Constants::CMAKERUNCONFIGURATION)
|
||||
return "CMake"; // Doesn't happen
|
||||
@@ -141,7 +143,7 @@ QString CMakeRunConfigurationFactory::nameForType(const QString &type) const
|
||||
QSharedPointer<ProjectExplorer::RunConfiguration> CMakeRunConfigurationFactory::create(ProjectExplorer::Project *project, const QString &type)
|
||||
{
|
||||
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
|
||||
Q_ASSERT(pro);
|
||||
QTC_ASSERT(pro, /**/);
|
||||
if (type == Constants::CMAKERUNCONFIGURATION) {
|
||||
// Restoring, filename will be added by restoreSettings
|
||||
QSharedPointer<ProjectExplorer::RunConfiguration> rc(new CMakeRunConfiguration(pro, QString::null, QString::null));
|
||||
|
||||
@@ -32,8 +32,11 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "cmakestep.h"
|
||||
#include "cmakeprojectconstants.h"
|
||||
|
||||
#include "cmakeproject.h"
|
||||
#include "cmakeprojectconstants.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace CMakeProjectManager;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
@@ -41,12 +44,10 @@ using namespace CMakeProjectManager::Internal;
|
||||
CMakeStep::CMakeStep(CMakeProject *pro)
|
||||
: AbstractProcessStep(pro), m_pro(pro)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CMakeStep::~CMakeStep()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CMakeStep::init(const QString &buildConfiguration)
|
||||
@@ -114,9 +115,9 @@ bool CMakeBuildStepFactory::canCreate(const QString &name) const
|
||||
|
||||
ProjectExplorer::BuildStep *CMakeBuildStepFactory::create(ProjectExplorer::Project *project, const QString &name) const
|
||||
{
|
||||
Q_ASSERT(name == Constants::CMAKESTEP);
|
||||
QTC_ASSERT(name == Constants::CMAKESTEP, /**/);
|
||||
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
|
||||
Q_ASSERT(pro);
|
||||
QTC_ASSERT(pro, /**/);
|
||||
return new CMakeStep(pro);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,18 +35,18 @@
|
||||
#include "cmakeprojectconstants.h"
|
||||
#include "cmakeproject.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace CMakeProjectManager;
|
||||
using namespace CMakeProjectManager::Internal;
|
||||
|
||||
MakeStep::MakeStep(CMakeProject *pro)
|
||||
: AbstractProcessStep(pro), m_pro(pro)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
MakeStep::~MakeStep()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool MakeStep::init(const QString &buildConfiguration)
|
||||
@@ -109,9 +109,9 @@ bool MakeBuildStepFactory::canCreate(const QString &name) const
|
||||
|
||||
ProjectExplorer::BuildStep *MakeBuildStepFactory::create(ProjectExplorer::Project *project, const QString &name) const
|
||||
{
|
||||
Q_ASSERT(name == Constants::MAKESTEP);
|
||||
QTC_ASSERT(name == Constants::MAKESTEP, return 0);
|
||||
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
|
||||
Q_ASSERT(pro);
|
||||
QTC_ASSERT(pro, return 0);
|
||||
return new MakeStep(pro);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user