diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index 692902c399d..91106630fa5 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -109,6 +109,11 @@ bool MakeStep::isClean() const return m_clean; } +QString MakeStep::makeCommand() const +{ + return m_makeCmd; +} + QVariantMap MakeStep::toMap() const { QVariantMap map(ProjectExplorer::AbstractProcessStep::toMap()); @@ -205,7 +210,7 @@ bool MakeStep::init() env.set(QLatin1String("LC_ALL"), QLatin1String("C")); // -w option enables "Enter"/"Leaving directory" messages, which we need for detecting the // absolute file path - // FIXME doing this without the user having a way to override this is rather bad + // doing this without the user having a way to override this is rather bad // so we only do it for unix and if the user didn't override the make command // but for now this is the least invasive change // We also prepend "L" to the MAKEFLAGS, so that nmake / jom are less verbose @@ -311,7 +316,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) m_ui->makePathChooser->setBaseDirectory(Utils::PathChooser::homePath()); - const QString &makeCmd = m_makeStep->m_makeCmd; + const QString &makeCmd = m_makeStep->makeCommand(); m_ui->makePathChooser->setPath(makeCmd); m_ui->makeArgumentsLineEdit->setText(m_makeStep->userArguments()); @@ -413,8 +418,8 @@ void MakeStepConfigWidget::updateDetails() param.setMacroExpander(bc->macroExpander()); param.setWorkingDirectory(bc->buildDirectory()); QString makeCmd = bc->makeCommand(); - if (!m_makeStep->m_makeCmd.isEmpty()) - makeCmd = m_makeStep->m_makeCmd; + if (!m_makeStep->makeCommand().isEmpty()) + makeCmd = m_makeStep->makeCommand(); param.setCommand(makeCmd); QString args = m_makeStep->userArguments(); @@ -434,7 +439,7 @@ void MakeStepConfigWidget::updateDetails() // but for now this is the least invasive change // We also prepend "L" to the MAKEFLAGS, so that nmake / jom are less verbose ProjectExplorer::ToolChain *toolChain = bc->toolChain(); - if (toolChain && m_makeStep->m_makeCmd.isEmpty()) { + if (toolChain && m_makeStep->makeCommand().isEmpty()) { if (toolChain->targetAbi().binaryFormat() != ProjectExplorer::Abi::PEFormat ) Utils::QtcProcess::addArg(&args, QLatin1String("-w")); if (toolChain->targetAbi().os() == ProjectExplorer::Abi::WindowsOS @@ -472,7 +477,7 @@ void MakeStepConfigWidget::userArgumentsChanged() void MakeStepConfigWidget::makeEdited() { - m_makeStep->m_makeCmd = m_ui->makePathChooser->rawPath(); + m_makeStep->makeCommand() = m_ui->makePathChooser->rawPath(); updateDetails(); } diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h index 083b9579d79..0b9d7346bb5 100644 --- a/src/plugins/qt4projectmanager/makestep.h +++ b/src/plugins/qt4projectmanager/makestep.h @@ -80,8 +80,6 @@ class QT4PROJECTMANAGER_EXPORT MakeStep : public ProjectExplorer::AbstractProces { Q_OBJECT friend class Internal::MakeStepFactory; - friend class MakeStepConfigWidget; // TODO remove this - // used to access internal stuff public: explicit MakeStep(ProjectExplorer::BuildStepList *bsl); @@ -99,6 +97,7 @@ public: void setUserArguments(const QString &arguments); void setClean(bool clean); bool isClean() const; + QString makeCommand() const; QVariantMap toMap() const; diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index 9e8b3569aa7..365be43db78 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -152,13 +152,13 @@ QString QMakeStep::allArguments(bool shorted) // Find out what flags we pass on to qmake arguments << bc->configCommandLineArguments(); - arguments << moreArguments(); + arguments << deducedArguments(); QString args = Utils::QtcProcess::joinArgs(arguments); // User arguments Utils::QtcProcess::addArgs(&args, m_userArgs); // moreArgumentsAfter - foreach (const QString &arg, moreArgumentsAfter()) + foreach (const QString &arg, deducedArgumentsAfter()) Utils::QtcProcess::addArg(&args, arg); return args; } @@ -167,7 +167,7 @@ QString QMakeStep::allArguments(bool shorted) /// moreArguments, /// -unix for Maemo /// QMAKE_VAR_QMLJSDEBUGGER_PATH -QStringList QMakeStep::moreArguments() +QStringList QMakeStep::deducedArguments() { Qt4BuildConfiguration *bc = qt4BuildConfiguration(); QStringList arguments; @@ -223,7 +223,7 @@ QStringList QMakeStep::moreArguments() } /// -after OBJECTS_DIR, MOC_DIR, UI_DIR, RCC_DIR -QStringList QMakeStep::moreArgumentsAfter() +QStringList QMakeStep::deducedArgumentsAfter() { Qt4BuildConfiguration *bc = qt4BuildConfiguration(); if (bc->qtVersion() && !bc->qtVersion()->supportsShadowBuilds()) { diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h index f55f9797d43..4483c4b4745 100644 --- a/src/plugins/qt4projectmanager/qmakestep.h +++ b/src/plugins/qt4projectmanager/qmakestep.h @@ -96,11 +96,15 @@ public: void setForced(bool b); bool forced(); - // TODO clean up those functions + // the complete argument line QString allArguments(bool shorted = false); - QStringList moreArguments(); - QStringList moreArgumentsAfter(); + // deduced arguments e.g. qmljs debugging + QStringList deducedArguments(); + // deduced arguments with -after, e.g. OBJECTS_DIR for symbian + QStringList deducedArgumentsAfter(); + // arguments passed to the pro file parser QStringList parserArguments(); + // arguments set by the user QString userArguments(); Utils::FileName mkspec(); void setUserArguments(const QString &arguments); diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp index d706a46efc4..2c9e9512b44 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp @@ -461,7 +461,6 @@ void Qt4RunConfigurationWidget::hideEvent(QHideEvent *event) QWidget::hideEvent(event); } -////// TODO c&p above QWidget *Qt4RunConfiguration::createConfigurationWidget() { return new Qt4RunConfigurationWidget(this, 0); diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h index bc8dd4c332f..3db37bba26f 100644 --- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h +++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h @@ -98,7 +98,6 @@ public: QString proFilePath() const; - // TODO detectQtShadowBuild() ? how did this work ? QVariantMap toMap() const; Utils::OutputFormatter *createOutputFormatter() const; diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp index a9f3e8b5161..66120e61c74 100644 --- a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp +++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp @@ -489,7 +489,7 @@ bool Qt4BuildConfiguration::compareToImportFrom(const QString &makefile) // This copies the settings from userArgs to actualArgs (minus some we // are not interested in), splitting them up into individual strings: extractSpecFromArguments(&userArgs, workingDirectory, version, &actualArgs), - actualArgs = qs->moreArguments() + actualArgs + qs->moreArgumentsAfter(); + actualArgs = qs->deducedArguments() + actualArgs + qs->deducedArgumentsAfter(); Utils::FileName actualSpec = qs->mkspec(); QString qmakeArgs = result.second; diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 221c1e25d43..441bb382b2e 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -101,7 +101,7 @@ static const FileTypeDataStorage fileTypeDataStorage[] = { ":/qt4projectmanager/images/qt_qrc.png" }, { ProjectExplorer::QMLType, QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "QML"), - ":/qt4projectmanager/images/qml.ico" }, // TODO icon + ":/qt4projectmanager/images/qml.ico" }, { ProjectExplorer::UnknownFileType, QT_TRANSLATE_NOOP("Qt4ProjectManager::Qt4PriFileNode", "Other files"), ":/qt4projectmanager/images/unknown.png" } @@ -571,7 +571,6 @@ void Qt4PriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader m_recursiveEnumerateFiles.clear(); // Remove non existing items and non folders - // todo fix files in INSTALL rules QStringList::iterator it = folders.begin(); while (it != folders.end()) { QFileInfo fi(*it); @@ -1004,16 +1003,6 @@ bool Qt4PriFileNode::renameFile(const FileType fileType, const QString &filePath return true; } -bool Qt4PriFileNode::changeIncludes(ProFile *includeFile, const QStringList &proFilePaths, - ChangeType change) -{ - Q_UNUSED(includeFile) - Q_UNUSED(proFilePaths) - Q_UNUSED(change) - // TODO - return false; -} - bool Qt4PriFileNode::priFileWritable(const QString &path) { const QString dir = QFileInfo(path).dir().path(); @@ -1814,7 +1803,6 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) // the .pro file is included in this .pro file // So to compare that later parse with the sync one Qt4ProFileNode *proFileNode = static_cast(*existingIt); - // TODO that could be made faster... proFileNode->setIncludedInExactParse(exactSubdirs.contains(proFileNode->path()) && includedInExactParse()); if (async) proFileNode->asyncUpdate(); @@ -1958,8 +1946,6 @@ QStringList Qt4ProFileNode::fileListForVar(QtSupport::ProFileReader *readerExact // This function is triggered after a build, and updates the state ui files // It does so by storing a modification time for each ui file we know about. - -// TODO this function should also be called if the build directory is changed QStringList Qt4ProFileNode::updateUiFiles() { // qDebug()<<"Qt4ProFileNode::updateUiFiles()"; diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index 0b6819f742e..b94e2b15dc5 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.h +++ b/src/plugins/qt4projectmanager/qt4nodes.h @@ -178,10 +178,6 @@ protected: RemoveFromProFile }; - bool changeIncludes(ProFile *includeFile, - const QStringList &proFilePaths, - ChangeType change); - void changeFiles(const FileType fileType, const QStringList &filePaths, QStringList *notChanged, @@ -208,7 +204,6 @@ private: Internal::Qt4PriFile *m_qt4PriFile; // Memory is cheap... - // TODO (really that cheap?) QMap > m_files; QSet m_recursiveEnumerateFiles; QSet m_watchedFolders; diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index 4309dedac58..4c6d7d0448b 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -1233,7 +1233,7 @@ void CentralizedFolderWatcher::unwatchFolders(const QList &folders, Qt4 } // Figure out which recursive directories we can remove - // TODO this might not scale. I'm pretty sure it doesn't + // this might not scale. I'm pretty sure it doesn't // A scaling implementation would need to save more information // where a given directory watcher actual comes from... @@ -1362,33 +1362,6 @@ void Qt4Project::configureAsExampleProject(const QStringList &platforms) ProjectExplorer::ProjectExplorerPlugin::instance()->requestProjectModeUpdate(this); } -/*! - Handle special case were a subproject of the qt directory is opened, and - qt was configured to be built as a shadow build -> also build in the sub- - project in the correct shadow build directory. - */ - -// TODO this function should be called on project first load -// and it should check against all configured qt versions ? -//void Qt4Project::detectQtShadowBuild(const QString &buildConfiguration) const -//{ -// if (project()->activeBuildConfiguration() == buildConfiguration) -// return; -// -// const QString currentQtDir = static_cast(project())->qtDir(buildConfiguration); -// const QString qtSourceDir = static_cast(project())->qtVersion(buildConfiguration)->sourcePath(); -// -// // if the project is a sub-project of Qt and Qt was shadow-built then automatically -// // adjust the build directory of the sub-project. -// if (project()->file()->fileName().startsWith(qtSourceDir) && qtSourceDir != currentQtDir) { -// project()->setValue(buildConfiguration, "useShadowBuild", true); -// QString buildDir = project()->projectDirectory(); -// buildDir.replace(qtSourceDir, currentQtDir); -// project()->setValue(buildConfiguration, "buildDirectory", buildDir); -// project()->setValue(buildConfiguration, "autoShadowBuild", true); -// } -//} - } // namespace Qt4ProjectManager #include "qt4project.moc" diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp index 9fa9de7bc4e..0f24693b1f3 100644 --- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp +++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp @@ -86,7 +86,6 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4BaseTarget *target) m_ui->setupUi(details); m_browseButton = m_ui->shadowBuildDirEdit->buttonAtIndex(0); - // TODO refix the layout m_ui->shadowBuildDirEdit->setPromptDialogTitle(tr("Shadow Build Directory")); m_ui->shadowBuildDirEdit->setExpectedKind(Utils::PathChooser::ExistingDirectory); diff --git a/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp b/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp index ad088177801..a24cf309463 100644 --- a/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp +++ b/src/plugins/qt4projectmanager/unconfiguredprojectpanel.cpp @@ -84,7 +84,6 @@ ProjectExplorer::PropertiesPanel *Qt4ProjectManager::Internal::UnconfiguredProje { ProjectExplorer::PropertiesPanel *panel = new ProjectExplorer::PropertiesPanel; panel->setDisplayName(displayName()); - // TODO the icon needs a update panel->setIcon(QIcon(":/projectexplorer/images/unconfigured.png")); TargetSetupPageWrapper *w = new TargetSetupPageWrapper(project);