forked from qt-creator/qt-creator
Merge branch '2.0' of scm.dev.nokia.troll.no:creator/mainline
Conflicts: doc/qtcreator.qdoc doc/qtcreator.qdocconf share/qtcreator/gdbmacros/dumper.py share/qtcreator/gdbmacros/gdbmacros.py src/plugins/debugger/debuggermanager.cpp src/plugins/debugger/gdb/attachgdbadapter.cpp src/plugins/debugger/gdb/gdbengine.cpp src/plugins/debugger/watchhandler.cpp src/plugins/mercurial/mercurialjobrunner.h src/plugins/qmljseditor/qmljseditor.cpp src/plugins/qmljseditor/qmljseditor.pro src/plugins/qmljseditor/qmljseditorplugin.cpp src/plugins/qmljseditor/qmljseditorplugin.h src/plugins/qmljseditor/qmljspreviewrunner.cpp src/plugins/qmljseditor/qmljspreviewrunner.h src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp src/plugins/qt4projectmanager/qt-maemo/qemuruntimemanager.cpp src/plugins/qt4projectmanager/qt4projectmanager.pro src/plugins/qt4projectmanager/qtversionmanager.h src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp src/plugins/qt4projectmanager/wizards/targetsetuppage.h
This commit is contained in:
@@ -638,10 +638,14 @@ bool QtVersion::supportsShadowBuilds() const
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::Task>
|
||||
QtVersion::reportIssues(const QString &proFile)
|
||||
QtVersion::reportIssues(const QString &proFile, const QString &buildDir)
|
||||
{
|
||||
QList<ProjectExplorer::Task> results;
|
||||
|
||||
QString tmpBuildDir = buildDir;
|
||||
if (!buildDir.endsWith(QChar('/')))
|
||||
tmpBuildDir.append(QChar('/'));
|
||||
|
||||
if (!isValid()) {
|
||||
//: %1: Reason for being invalid
|
||||
const QString msg = QCoreApplication::translate("Qt4ProjectManager::QtVersion", "The Qt version is invalid: %1").arg(invalidReason());
|
||||
@@ -659,6 +663,23 @@ QtVersion::reportIssues(const QString &proFile)
|
||||
QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
|
||||
}
|
||||
|
||||
QString sourcePath = QFileInfo(proFile).absolutePath();
|
||||
if (!sourcePath.endsWith(QChar('/')))
|
||||
sourcePath.append(QChar('/'));
|
||||
|
||||
if ((tmpBuildDir.startsWith(sourcePath)) && (tmpBuildDir != sourcePath)) {
|
||||
const QString msg = QCoreApplication::translate("Qt4ProjectManager::QtVersion",
|
||||
"Qmake does not support build directories below the source directory.");
|
||||
results.append(ProjectExplorer::Task(ProjectExplorer::Task::Warning, msg, QString(), -1,
|
||||
QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
|
||||
} else if (tmpBuildDir.count(QChar('/')) != sourcePath.count(QChar('/'))) {
|
||||
const QString msg = QCoreApplication::translate("Qt4ProjectManager::QtVersion",
|
||||
"The build directory needs to be at the same level as the source directory.");
|
||||
|
||||
results.append(ProjectExplorer::Task(ProjectExplorer::Task::Warning, msg, QString(), -1,
|
||||
QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
|
||||
}
|
||||
|
||||
QSet<QString> targets = supportedTargetIds();
|
||||
if (targets.contains(Constants::S60_DEVICE_TARGET_ID) ||
|
||||
targets.contains(Constants::S60_EMULATOR_TARGET_ID))
|
||||
@@ -731,6 +752,7 @@ void QtVersion::setQMakeCommand(const QString& qmakeCommand)
|
||||
#endif
|
||||
m_designerCommand.clear();
|
||||
m_linguistCommand.clear();
|
||||
m_qmlviewerCommand.clear();
|
||||
m_uicCommand.clear();
|
||||
m_toolChainUpToDate = false;
|
||||
// TODO do i need to optimize this?
|
||||
@@ -1184,6 +1206,22 @@ QString QtVersion::linguistCommand() const
|
||||
return m_linguistCommand;
|
||||
}
|
||||
|
||||
QString QtVersion::qmlviewerCommand() const
|
||||
{
|
||||
if (!isValid())
|
||||
return QString();
|
||||
if (m_qmlviewerCommand.isNull()) {
|
||||
#ifdef Q_OS_MAC
|
||||
const QString qmlViewerName = QLatin1String("QMLViewer");
|
||||
#else
|
||||
const QString qmlViewerName = QLatin1String("qmlviewer");
|
||||
#endif
|
||||
|
||||
m_qmlviewerCommand = findQtBinary(possibleGuiBinaries(qmlViewerName));
|
||||
}
|
||||
return m_qmlviewerCommand;
|
||||
}
|
||||
|
||||
bool QtVersion::supportsTargetId(const QString &id) const
|
||||
{
|
||||
updateToolChainAndMkspec();
|
||||
|
||||
Reference in New Issue
Block a user