Commit 6473ab73 authored by Tobias Hunger's avatar Tobias Hunger

Add method to QtVersion to query it for issues

Reviewed-by: dt
parent e0358620
......@@ -35,9 +35,11 @@
#include "qt-maemo/maemomanager.h"
#include "qt-s60/s60manager.h"
#include "qt-s60/s60projectchecker.h"
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/cesdkhandler.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
......@@ -635,6 +637,34 @@ bool QtVersion::supportsShadowBuilds() const
return true;
}
QList<ProjectExplorer::Task>
QtVersion::reportIssues(const QString &proFile)
{
QList<ProjectExplorer::Task> results;
if (!isValid())
results.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
QObject::tr("The Qt version is invalid: %1",
"%1: Reason for being invalid").arg(invalidReason()),
QString(), -1,
QLatin1String(ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM)));
QFileInfo qmakeInfo(qmakeCommand());
if (!qmakeInfo.exists() ||
!qmakeInfo.isExecutable())
results.append(ProjectExplorer::Task(ProjectExplorer::Task::Error,
QObject::tr("The qmake command \"%1\" was not found or is not executable.",
"%1: Path to qmake executable.").arg(qmakeCommand()),
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))
results.append(S60ProjectChecker::reportIssues(proFile, this));
return results;
}
QString QtVersion::displayName() const
{
return m_displayName;
......
......@@ -30,6 +30,7 @@
#ifndef QTVERSIONMANAGER_H
#define QTVERSIONMANAGER_H
#include <projectexplorer/taskwindow.h>
#include <projectexplorer/toolchain.h>
#include <QSharedPointer>
......@@ -139,6 +140,12 @@ public:
bool supportsShadowBuilds() const;
/// Check a .pro-file/Qt version combination on possible issues with
/// its symbian setup.
/// @return a list of tasks, ordered on severity (errors first, then
/// warnings and finally info items.
QList<ProjectExplorer::Task> reportIssues(const QString &proFile);
private:
QList<QSharedPointer<ProjectExplorer::ToolChain> > toolChains() const;
static int getUniqueId();
......
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