Commit 02a679d9 authored by hjk's avatar hjk

Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline

parents 5285379f 5e569036
No preview for this file type
......@@ -1194,10 +1194,18 @@
\o The file system sidebar does not update automatically. As a
workaround, switch to another directory and then back.
\o The resource system of the embedded version of Qt Designer does not
interact with the project manager.
\o Loading KDE4 designer plugins breaks the style, due to a bug in KDE.
\o Scopes in .pro files are ignored, and environment variables not expanded.
\o Code completion for generated UI header files is not updated properly
after the first time.
\o Code completion does not support typedefs (e.g. std::string) and
private classes (e.g. class MyClass::Data {};).
\o On Gnome, after minimizing Qt Creator and restoring again, the
application window does not repaint properly until resized.
\endlist
*/
......@@ -17,15 +17,15 @@ sources.fileextensions = "qtcreator.qdoc"
qhp.projects = QtCreator
qhp.QtCreator.file = qtcreator.qhp
qhp.QtCreator.namespace = com.nokia.qtcreator.09
qhp.QtCreator.namespace = com.nokia.qtcreator.091
qhp.QtCreator.virtualFolder = doc
qhp.QtCreator.indexTitle = Qt Creator
qhp.QtCreator.indexRoot =
qhp.QtCreator.extraFiles = classic.css \
images/qt-logo.png
qhp.QtCreator.filterAttributes = qtcreator 0.9
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 0.9
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 0.9
qhp.QtCreator.filterAttributes = qtcreator 0.9.1
qhp.QtCreator.customFilters.QtCreator.name = Qt Creator 0.9.1
qhp.QtCreator.customFilters.QtCreator.filterAttributes = qtcreator 0.9.1
# macros.qdocconf
......@@ -201,5 +201,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"30%\" align=\"left\">Copyright &copy; 2008 Nokia</td>\n" \
"<td width=\"40%\" align=\"center\">&nbsp;</td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator 0.9</div></td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt Creator 0.9.1</div></td>\n" \
"</tr></table></div></address>"
......@@ -568,7 +568,7 @@ void CMakeCbpParser::parseUnit()
void CMakeCbpParser::parseUnknownElement()
{
QTC_ASSERT(isStartElement(), /**/);
Q_ASSERT(isStartElement());
while (!atEnd()) {
readNext();
......
......@@ -136,7 +136,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
{
QTC_ASSERT(type.startsWith(Constants::CMAKERUNCONFIGURATION), /**/);
Q_ASSERT(type.startsWith(Constants::CMAKERUNCONFIGURATION));
if (type == Constants::CMAKERUNCONFIGURATION)
return "CMake"; // Doesn't happen
......@@ -147,7 +147,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);
QTC_ASSERT(pro, /**/);
Q_ASSERT(pro);
if (type == Constants::CMAKERUNCONFIGURATION) {
// Restoring, filename will be added by restoreSettings
QSharedPointer<ProjectExplorer::RunConfiguration> rc(new CMakeRunConfiguration(pro, QString::null, QString::null));
......
......@@ -115,9 +115,9 @@ bool CMakeBuildStepFactory::canCreate(const QString &name) const
ProjectExplorer::BuildStep *CMakeBuildStepFactory::create(ProjectExplorer::Project *project, const QString &name) const
{
QTC_ASSERT(name == Constants::CMAKESTEP, /**/);
Q_ASSERT(name == Constants::CMAKESTEP);
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
QTC_ASSERT(pro, /**/);
Q_ASSERT(pro);
return new CMakeStep(pro);
}
......
......@@ -109,9 +109,9 @@ bool MakeBuildStepFactory::canCreate(const QString &name) const
ProjectExplorer::BuildStep *MakeBuildStepFactory::create(ProjectExplorer::Project *project, const QString &name) const
{
QTC_ASSERT(name == Constants::MAKESTEP, return 0);
Q_ASSERT(name == Constants::MAKESTEP);
CMakeProject *pro = qobject_cast<CMakeProject *>(project);
QTC_ASSERT(pro, return 0);
Q_ASSERT(pro);
return new MakeStep(pro);
}
......
......@@ -74,7 +74,7 @@ QKeySequence AllProjectsFind::defaultShortcut() const
QStringList AllProjectsFind::files()
{
QTC_ASSERT(m_plugin->session(), return QStringList());
Q_ASSERT(m_plugin->session());
QList<QRegExp> filterRegs;
QStringList nameFilters = fileNameFilters();
foreach (const QString &filter, nameFilters) {
......
......@@ -95,8 +95,8 @@ QString ApplicationRunConfigurationRunner::displayName() const
RunControl* ApplicationRunConfigurationRunner::run(QSharedPointer<RunConfiguration> runConfiguration, const QString &mode)
{
QSharedPointer<ApplicationRunConfiguration> rc = qSharedPointerCast<ApplicationRunConfiguration>(runConfiguration);
QTC_ASSERT(rc, return 0);
QTC_ASSERT(mode == ProjectExplorer::Constants::RUNMODE, return 0);
Q_ASSERT(rc);
Q_ASSERT(mode == ProjectExplorer::Constants::RUNMODE);
ApplicationRunControl *runControl = new ApplicationRunControl(rc);
return runControl;
......@@ -130,7 +130,7 @@ ApplicationRunControl::~ApplicationRunControl()
void ApplicationRunControl::start()
{
QSharedPointer<ApplicationRunConfiguration> rc = qSharedPointerCast<ApplicationRunConfiguration>(runConfiguration());
QTC_ASSERT(rc, return);
Q_ASSERT(rc);
m_applicationLauncher.setEnvironment(rc->environment().toStringList());
m_applicationLauncher.setWorkingDirectory(rc->workingDirectory());
......
......@@ -302,7 +302,7 @@ void BuildManager::buildQueueAppend(BuildStep * bs, const QString &configuration
void BuildManager::buildProjects(const QList<Project *> &projects, const QList<QString> &configurations)
{
QTC_ASSERT(projects.count() == configurations.count(), /**/);
Q_ASSERT(projects.count() == configurations.count());
QList<QString>::const_iterator cit = configurations.constBegin();
QList<Project *>::const_iterator it, end;
end = projects.constEnd();
......@@ -318,7 +318,7 @@ void BuildManager::buildProjects(const QList<Project *> &projects, const QList<Q
void BuildManager::cleanProjects(const QList<Project *> &projects, const QList<QString> &configurations)
{
QTC_ASSERT(projects.count() == configurations.count(), /**/);
Q_ASSERT(projects.count() == configurations.count());
QList<QString>::const_iterator cit = configurations.constBegin();
QList<Project *>::const_iterator it, end;
end = projects.constEnd();
......@@ -378,7 +378,7 @@ void BuildManager::decrementActiveBuildSteps(Project *pro)
QHash<Project *, int>::iterator it = m_activeBuildSteps.find(pro);
QHash<Project *, int>::iterator end = m_activeBuildSteps.end();
if (it == end) {
QTC_ASSERT(false && "BuildManager m_activeBuildSteps says project is not building, but apparently a build step was still in the queue.", return);
Q_ASSERT(false && "BuildManager m_activeBuildSteps says project is not building, but apparently a build step was still in the queue.");
} else if (*it == 1) {
--*it;
emit buildStateChanged(pro);
......
......@@ -80,7 +80,7 @@ void BuildStep::copyBuildConfiguration(const QString &source, const QString &des
void BuildStep::setValue(const QString &buildConfiguration, const QString &name, const QVariant &value)
{
BuildConfiguration *bc = getBuildConfiguration(buildConfiguration);
QTC_ASSERT(bc, return);
Q_ASSERT(bc);
bc->setValue(name, value);
}
......
......@@ -123,13 +123,13 @@ void BuildStepsPage::updateBuildStepWidget(QTreeWidgetItem *newItem, QTreeWidget
{
if (oldItem == newItem)
return;
QTC_ASSERT(m_pro, return);
Q_ASSERT(m_pro);
if (newItem) {
int row = m_ui->buildSettingsList->indexOfTopLevelItem(newItem);
m_ui->buildSettingsWidget->setCurrentIndex(row);
BuildStepConfigWidget *widget = qobject_cast<BuildStepConfigWidget *>(m_ui->buildSettingsWidget->currentWidget());
QTC_ASSERT(widget, return);
Q_ASSERT(widget);
widget->init(m_configuration);
}
updateBuildStepButtonsState();
......
......@@ -74,7 +74,7 @@ QKeySequence CurrentProjectFind::defaultShortcut() const
QStringList CurrentProjectFind::files()
{
Project *project = m_plugin->currentProject();
QTC_ASSERT(project, return QStringList());
Q_ASSERT(project);
QList<QRegExp> filterRegs;
QStringList nameFilters = fileNameFilters();
foreach (const QString &filter, nameFilters) {
......
......@@ -411,7 +411,7 @@ BuildConfiguration * Project::getBuildConfiguration(const QString &name) const
void Project::setValue(const QString &buildConfiguration, const QString &name, const QVariant &value)
{
BuildConfiguration *bc = getBuildConfiguration(buildConfiguration);
QTC_ASSERT(bc, return);
Q_ASSERT(bc);
bc->setValue(name, value);
}
......@@ -445,13 +445,19 @@ QList<QSharedPointer<RunConfiguration> > Project::runConfigurations() const
void Project::addRunConfiguration(QSharedPointer<RunConfiguration> runConfiguration)
{
QTC_ASSERT(!m_runConfigurations.contains(runConfiguration), return);
if (m_runConfigurations.contains(runConfiguration)) {
qWarning()<<"Not adding already existing runConfiguration"<<runConfiguration->name();
return;
}
m_runConfigurations.push_back(runConfiguration);
}
void Project::removeRunConfiguration(QSharedPointer<RunConfiguration> runConfiguration)
{
QTC_ASSERT(m_runConfigurations.contains(runConfiguration), /**/);
if(!m_runConfigurations.contains(runConfiguration)) {
qWarning()<<"Not removing runConfiguration"<<runConfiguration->name()<<"becasue it doesn't exist";
return;
}
m_runConfigurations.removeOne(runConfiguration);
if (m_activeRunConfiguration == runConfiguration) {
if (m_runConfigurations.isEmpty())
......@@ -470,7 +476,7 @@ void Project::setActiveRunConfiguration(QSharedPointer<RunConfiguration> runConf
{
if (runConfiguration == m_activeRunConfiguration)
return;
QTC_ASSERT(m_runConfigurations.contains(runConfiguration) || runConfiguration == 0, return);
Q_ASSERT(m_runConfigurations.contains(runConfiguration) || runConfiguration == 0);
m_activeRunConfiguration = runConfiguration;
emit activeRunConfigurationChanged();
}
......
......@@ -787,7 +787,8 @@ void ProjectExplorerPlugin::setStartupProject(Project *project)
if (!project)
project = m_currentProject;
QTC_ASSERT(project, return);
if (!project)
return;
m_session->setStartupProject(project);
// NPE: Visually mark startup project
updateActions();
......@@ -1086,12 +1087,11 @@ void ProjectExplorerPlugin::buildQueueFinished(bool success)
this, SLOT(addErrorToApplicationOutputWindow(RunControl *, const QString &)));
connect(control, SIGNAL(finished()),
this, SLOT(runControlFinished()));
control->start();
if (m_runMode == ProjectExplorer::Constants::DEBUGMODE)
m_debuggingRunControl = control;
control->start();
updateRunAction();
}
} else {
......@@ -1361,7 +1361,7 @@ void ProjectExplorerPlugin::runProject()
void ProjectExplorerPlugin::debugProject()
{
Project *pro = startupProject();
if (!pro || m_debuggingRunControl)
if (!pro || m_debuggingRunControl )
return;
if (saveModifiedFiles(QList<Project *>() << pro)) {
......@@ -1369,6 +1369,7 @@ void ProjectExplorerPlugin::debugProject()
m_delayedRunConfiguration = pro->activeRunConfiguration();
//NBS TODO make the build project step take into account project dependencies
m_buildManager->buildProject(pro, pro->activeBuildConfiguration());
updateRunAction();
}
}
......@@ -1535,7 +1536,8 @@ void ProjectExplorerPlugin::updateContextMenuActions()
void ProjectExplorerPlugin::addNewFile()
{
QTC_ASSERT(m_currentNode && m_currentNode->nodeType() == ProjectNodeType, return);
if (!m_currentNode && m_currentNode->nodeType() == ProjectNodeType)
return;
const QString location = QFileInfo(m_currentNode->path()).dir().absolutePath();
m_core->showNewItemDialog(tr("New File", "Title of dialog"),
Core::BaseFileWizard::findWizardsOfKind(Core::IWizard::FileWizard)
......@@ -1545,7 +1547,8 @@ void ProjectExplorerPlugin::addNewFile()
void ProjectExplorerPlugin::addExistingFiles()
{
QTC_ASSERT(m_currentNode && m_currentNode->nodeType() == ProjectNodeType, return);
if (!m_currentNode && m_currentNode->nodeType() == ProjectNodeType)
return;
ProjectNode *projectNode = qobject_cast<ProjectNode*>(m_currentNode);
const QString dir = QFileInfo(m_currentNode->path()).dir().absolutePath();
QStringList fileNames = QFileDialog::getOpenFileNames(m_core->mainWindow(), tr("Add Existing Files"), dir);
......@@ -1597,14 +1600,16 @@ void ProjectExplorerPlugin::addExistingFiles()
void ProjectExplorerPlugin::openFile()
{
QTC_ASSERT(m_currentNode, return);
if (m_currentNode)
return;
m_core->editorManager()->openEditor(m_currentNode->path());
m_core->editorManager()->ensureEditorManagerVisible();
}
void ProjectExplorerPlugin::removeFile()
{
QTC_ASSERT(m_currentNode && m_currentNode->nodeType() == FileNodeType, return);
if (!m_currentNode && m_currentNode->nodeType() == FileNodeType)
return;
FileNode *fileNode = qobject_cast<FileNode*>(m_currentNode);
const QString filePath = m_currentNode->path();
......@@ -1616,7 +1621,7 @@ void ProjectExplorerPlugin::removeFile()
// remove from project
ProjectNode *projectNode = fileNode->projectNode();
QTC_ASSERT(projectNode, return);
Q_ASSERT(projectNode);
if (!projectNode->removeFiles(fileNode->fileType(), QStringList(filePath))) {
QMessageBox::warning(m_core->mainWindow(), tr("Remove file failed"),
......@@ -1768,11 +1773,15 @@ void ProjectExplorerPlugin::populateOpenWithMenu()
void ProjectExplorerPlugin::openWithMenuTriggered(QAction *action)
{
QTC_ASSERT(action, return);
if (!action) {
qWarning() << "ProjectExplorerPlugin::openWithMenuTriggered no action, can't happen.";
return;
}
Core::IEditorFactory * const editorFactory = qVariantValue<Core::IEditorFactory *>(action->data());
QTC_ASSERT(m_core, return);
QTC_ASSERT(m_core->editorManager(), return);
QTC_ASSERT(editorFactory, return);
if (!editorFactory) {
qWarning() << "Editor Factory not attached to action, can't happen"<<editorFactory;
return;
}
m_core->editorManager()->openEditor(currentNode()->path(), editorFactory->kind());
m_core->editorManager()->ensureEditorManagerVisible();
}
......
......@@ -176,7 +176,7 @@ QModelIndex DetailedModel::index(int row, int column, const QModelIndex &parent)
result = createIndex(0, 0, m_rootNode);
} else if (column == 0) {
FolderNode *parentNode = qobject_cast<FolderNode*>(nodeForIndex(parent));
QTC_ASSERT(parentNode, return result);
Q_ASSERT(parentNode);
result = createIndex(row, 0, m_childNodes.value(parentNode).at(row));
}
return result;
......@@ -189,7 +189,7 @@ QModelIndex DetailedModel::parent(const QModelIndex &index) const
if (Node *node = nodeForIndex(index)) {
if (FolderNode *parentFolderNode = node->parentFolderNode()) {
if (FolderNode *grandParentFolderNode = parentFolderNode->parentFolderNode()) {
QTC_ASSERT(m_childNodes.contains(grandParentFolderNode), return parentIndex);
Q_ASSERT(m_childNodes.contains(grandParentFolderNode));
int row = m_childNodes.value(grandParentFolderNode).indexOf(parentFolderNode);
parentIndex = createIndex(row, 0, parentFolderNode);
} else {
......@@ -351,8 +351,8 @@ bool DetailedModel::canFetchMore(const QModelIndex & parent) const
void DetailedModel::fetchMore(const QModelIndex & parent)
{
FolderNode *folderNode = qobject_cast<FolderNode*>(nodeForIndex(parent));
QTC_ASSERT(folderNode, return);
QTC_ASSERT(!m_childNodes.contains(folderNode), return);
Q_ASSERT(folderNode);
Q_ASSERT(!m_childNodes.contains(folderNode));
m_childNodes.insert(folderNode, childNodeList(folderNode));
}
......@@ -368,7 +368,7 @@ void DetailedModel::foldersAboutToBeAdded(FolderNode *parentFolder,
const QList<FolderNode*> &newFolders)
{
Q_UNUSED(newFolders);
QTC_ASSERT(parentFolder, return);
Q_ASSERT(parentFolder);
if (m_childNodes.contains(parentFolder))
m_folderToAddTo = parentFolder;
......@@ -386,7 +386,7 @@ void DetailedModel::foldersAdded()
void DetailedModel::foldersAboutToBeRemoved(FolderNode *parentFolder,
const QList<FolderNode*> &staleFolders)
{
QTC_ASSERT(parentFolder, return);
Q_ASSERT(parentFolder);
if (m_childNodes.contains(parentFolder)) {
QList<Node*> newChildNodes = m_childNodes.value(parentFolder);
......@@ -416,7 +416,7 @@ void DetailedModel::filesAboutToBeAdded(FolderNode *parentFolder,
const QList<FileNode*> &newFiles)
{
Q_UNUSED(newFiles);
QTC_ASSERT(parentFolder, return);
Q_ASSERT(parentFolder);
if (m_childNodes.contains(parentFolder))
m_folderToAddTo = parentFolder;
......@@ -434,7 +434,7 @@ void DetailedModel::filesAdded()
void DetailedModel::filesAboutToBeRemoved(FolderNode *parentFolder,
const QList<FileNode*> &staleFiles)
{
QTC_ASSERT(parentFolder, return);
Q_ASSERT(parentFolder);
if (m_childNodes.contains(parentFolder)) {
QList<Node*> newChildNodes = m_childNodes.value(parentFolder);
......@@ -473,7 +473,7 @@ QModelIndex DetailedModel::indexForNode(const Node *node)
// update internal cache
if (canFetchMore(parentIndex))
fetchMore(parentIndex);
QTC_ASSERT(m_childNodes.contains(parentFolder), return QModelIndex());
Q_ASSERT(m_childNodes.contains(parentFolder));
int row = m_childNodes.value(parentFolder).indexOf(const_cast<Node*>(node));
if (row >= 0)
......@@ -506,7 +506,7 @@ void DetailedModel::addToChildNodes(FolderNode *parentFolder, QList<Node*> newCh
{
QList<Node*> childNodes = m_childNodes.value(parentFolder);
QModelIndex parentIndex = indexForNode(parentFolder);
QTC_ASSERT(parentIndex.isValid(), return);
Q_ASSERT(parentIndex.isValid());
// position -> nodes, with positions in decreasing order
QList<QPair<int, QList<Node*> > > insertions;
......@@ -550,14 +550,14 @@ void DetailedModel::addToChildNodes(FolderNode *parentFolder, QList<Node*> newCh
endInsertRows();
}
QTC_ASSERT(childNodes == newChildNodes, /**/);
Q_ASSERT(childNodes == newChildNodes);
}
void DetailedModel::removeFromChildNodes(FolderNode *parentFolder, QList<Node*> newChildNodes)
{
QList<Node*> childNodes = m_childNodes.value(parentFolder);
QModelIndex parentIndex = indexForNode(parentFolder);
QTC_ASSERT(parentIndex.isValid(), return);
Q_ASSERT(parentIndex.isValid());
// position -> nodes, with positions in decreasing order
QList<QPair<int, QList<Node*> > > deletions;
......@@ -600,7 +600,7 @@ void DetailedModel::removeFromChildNodes(FolderNode *parentFolder, QList<Node*>
endRemoveRows();
}
QTC_ASSERT(childNodes == newChildNodes, /**/);
Q_ASSERT(childNodes == newChildNodes);
}
QList<FolderNode*> DetailedModel::recursiveSubFolders(FolderNode *parentFolder)
......@@ -663,7 +663,7 @@ QModelIndex FlatModel::index(int row, int column, const QModelIndex &parent) con
result = createIndex(0, 0, m_rootNode);
} else if (parent.isValid() && column == 0) {
FolderNode *parentNode = qobject_cast<FolderNode*>(nodeForIndex(parent));
QTC_ASSERT(parentNode, return QModelIndex());
Q_ASSERT(parentNode);
QHash<FolderNode*, QList<Node*> >::const_iterator it = m_childNodes.constFind(parentNode);
if (it == m_childNodes.constEnd()) {
fetchMore(parentNode);
......@@ -690,9 +690,9 @@ QModelIndex FlatModel::parent(const QModelIndex &idx) const
fetchMore(grandParentNode);
it = m_childNodes.constFind(grandParentNode);
}
QTC_ASSERT(it != m_childNodes.constEnd(), return QModelIndex());
Q_ASSERT(it != m_childNodes.constEnd());
const int row = it.value().indexOf(parentNode);
QTC_ASSERT(row >= 0, return QModelIndex());
Q_ASSERT(row >= 0);
parentIndex = createIndex(row, 0, parentNode);
} else {
// top level node, parent is session
......@@ -850,8 +850,8 @@ QList<Node*> FlatModel::childNodes(FolderNode *parentNode, const QSet<Node*> &bl
void FlatModel::fetchMore(FolderNode *folderNode) const
{
QTC_ASSERT(folderNode, return);
QTC_ASSERT(!m_childNodes.contains(folderNode), return);
Q_ASSERT(folderNode);
Q_ASSERT(!m_childNodes.contains(folderNode));
QList<Node*> nodeList = childNodes(folderNode);
m_childNodes.insert(folderNode, nodeList);
......@@ -860,7 +860,7 @@ void FlatModel::fetchMore(FolderNode *folderNode) const
void FlatModel::fetchMore(const QModelIndex &parent)
{
FolderNode *folderNode = qobject_cast<FolderNode*>(nodeForIndex(parent));
QTC_ASSERT(folderNode, return);
Q_ASSERT(folderNode);
fetchMore(folderNode);
}
......
......@@ -376,7 +376,7 @@ void ProjectNode::removeProjectNodes(const QList<ProjectNode*> &subProjects)
*/
void ProjectNode::addFolderNodes(const QList<FolderNode*> &subFolders, FolderNode *parentFolder)
{
QTC_ASSERT(parentFolder, return);
Q_ASSERT(parentFolder);
if (!subFolders.isEmpty()) {
const bool emitSignals = (parentFolder->projectNode() == this);
......@@ -412,7 +412,7 @@ void ProjectNode::addFolderNodes(const QList<FolderNode*> &subFolders, FolderNod
void ProjectNode::removeFolderNodes(const QList<FolderNode*> &subFolders,
FolderNode *parentFolder)
{
QTC_ASSERT(parentFolder, return);
Q_ASSERT(parentFolder);
if (!subFolders.isEmpty()) {
const bool emitSignals = (parentFolder->projectNode() == this);
......@@ -450,7 +450,7 @@ void ProjectNode::removeFolderNodes(const QList<FolderNode*> &subFolders,
*/
void ProjectNode::addFileNodes(const QList<FileNode*> &files, FolderNode *folder)
{
QTC_ASSERT(folder, return);
Q_ASSERT(folder);
if (!files.isEmpty()) {
const bool emitSignals = (folder->projectNode() == this);
......@@ -482,7 +482,7 @@ void ProjectNode::addFileNodes(const QList<FileNode*> &files, FolderNode *folder
*/
void ProjectNode::removeFileNodes(const QList<FileNode*> &files, FolderNode *folder)
{
QTC_ASSERT(folder, return);
Q_ASSERT(folder);
if (!files.isEmpty()) {
const bool emitSignals = (folder->projectNode() == this);
......
......@@ -274,9 +274,9 @@ void RunSettingsWidget::initRunConfigurationComboBox()
void RunSettingsWidget::activateRunConfiguration(int index)
{
QTC_ASSERT(m_project, return);
Q_ASSERT(m_project);
const QList<QSharedPointer<RunConfiguration> > runConfigurations = m_project->runConfigurations();
QTC_ASSERT(index < runConfigurations.size(), return);
Q_ASSERT(index < runConfigurations.size());
QSharedPointer<RunConfiguration> selectedRunConfiguration = runConfigurations.at(index);
// Change the active run configuration of the project
......
......@@ -141,7 +141,7 @@ QString SessionFile::mimeType() const
bool SessionFile::load(const QString &fileName)
{
QTC_ASSERT(!fileName.isEmpty(), return false);
Q_ASSERT(!fileName.isEmpty());
if (debug)
qDebug() << "SessionFile::load " << fileName;
......@@ -246,7 +246,7 @@ bool SessionFile::save(const QString &fileName)
if (!fileName.isEmpty())
m_fileName = fileName;
QTC_ASSERT(!m_fileName.isEmpty(), return false);
Q_ASSERT(!m_fileName.isEmpty());
if (debug)
qDebug() << "SessionFile - saving " << m_fileName;
......@@ -493,7 +493,7 @@ void SessionManager::setStartupProject(Project *startupProject)
qDebug() << Q_FUNC_INFO << (startupProject ? startupProject->name() : "0");
if (startupProject) {
QTC_ASSERT(m_file->m_projects.contains(startupProject), return);
Q_ASSERT(m_file->m_projects.contains(startupProject));
}
m_file->m_startupProject = startupProject;
......@@ -566,7 +566,7 @@ void SessionManager::removeProject(Project *project)
bool SessionManager::createImpl(const QString &fileName)
{
QTC_ASSERT(!fileName.isEmpty(), return false);
Q_ASSERT(!fileName.isEmpty());
if (debug)
qDebug() << "SessionManager - creating new session " << fileName << " ...";
......@@ -597,7 +597,7 @@ bool SessionManager::createImpl(const QString &fileName)
bool SessionManager::loadImpl(const QString &fileName)
{
QTC_ASSERT(!fileName.isEmpty(), return false);
Q_ASSERT(!fileName.isEmpty());
if (debug)
qDebug() << "SessionManager - loading session " << fileName << " ...";
......@@ -803,7 +803,7 @@ Project *SessionManager::projectForNode(Node *node) const
while (rootProjectNode && rootProjectNode->parentFolderNode() != m_sessionNode)
rootProjectNode = rootProjectNode->parentFolderNode();
QTC_ASSERT(rootProjectNode, return 0);
Q_ASSERT(rootProjectNode);
QList<Project *> projectList = projects();
foreach (Project *p, projectList) {
......
......@@ -157,9 +157,9 @@ bool GdbMacrosBuildStepFactory::canCreate(const QString &name) const
ProjectExplorer::BuildStep *GdbMacrosBuildStepFactory::create(ProjectExplorer::Project *pro, const QString &name) const
{
QTC_ASSERT(name == Constants::GDBMACROSBUILDSTEP, return 0);
Q_ASSERT(name == Constants::GDBMACROSBUILDSTEP);
Qt4Project *qt4project = qobject_cast<Qt4Project *>(pro);
QTC_ASSERT(qt4project, return 0);
Q_ASSERT(qt4project);
return new GdbMacrosBuildStep(qt4project);
}
......
......@@ -294,7 +294,7 @@ void MakeStepConfigWidget::init(const QString &buildConfiguration)
if (!showPage0) {
Qt4Project *pro = qobject_cast<Qt4Project *>(m_makeStep->project());
QTC_ASSERT(pro, return);