Commit 1a9b436c authored by Daniel Teske's avatar Daniel Teske

Qt4ProjectManager: Cleanup TODOs

Change-Id: I3c274c5b9aa37e14d74da3276d7012983f14fc89
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent aef919b3
......@@ -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();
}
......
......@@ -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;
......
......@@ -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()) {
......
......@@ -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);
......
......@@ -461,7 +461,6 @@ void Qt4RunConfigurationWidget::hideEvent(QHideEvent *event)
QWidget::hideEvent(event);
}
////// TODO c&p above
QWidget *Qt4RunConfiguration::createConfigurationWidget()
{
return new Qt4RunConfigurationWidget(this, 0);
......
......@@ -98,7 +98,6 @@ public:
QString proFilePath() const;
// TODO detectQtShadowBuild() ? how did this work ?
QVariantMap toMap() const;
Utils::OutputFormatter *createOutputFormatter() const;
......
......@@ -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;
......
......@@ -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<Qt4ProFileNode *>(*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()";
......
......@@ -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<ProjectExplorer::FileType, QSet<Utils::FileName> > m_files;
QSet<Utils::FileName> m_recursiveEnumerateFiles;
QSet<QString> m_watchedFolders;
......
......@@ -1233,7 +1233,7 @@ void CentralizedFolderWatcher::unwatchFolders(const QList<QString> &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<Qt4Project *>(project())->qtDir(buildConfiguration);
// const QString qtSourceDir = static_cast<Qt4Project *>(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"
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment