forked from qt-creator/qt-creator
Add method to QtVersion to query it for issues
Reviewed-by: dt
This commit is contained in:
@@ -35,9 +35,11 @@
|
|||||||
|
|
||||||
#include "qt-maemo/maemomanager.h"
|
#include "qt-maemo/maemomanager.h"
|
||||||
#include "qt-s60/s60manager.h"
|
#include "qt-s60/s60manager.h"
|
||||||
|
#include "qt-s60/s60projectchecker.h"
|
||||||
|
|
||||||
#include <projectexplorer/debugginghelper.h>
|
#include <projectexplorer/debugginghelper.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/cesdkhandler.h>
|
#include <projectexplorer/cesdkhandler.h>
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
@@ -635,6 +637,34 @@ bool QtVersion::supportsShadowBuilds() const
|
|||||||
return true;
|
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
|
QString QtVersion::displayName() const
|
||||||
{
|
{
|
||||||
return m_displayName;
|
return m_displayName;
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
#ifndef QTVERSIONMANAGER_H
|
#ifndef QTVERSIONMANAGER_H
|
||||||
#define QTVERSIONMANAGER_H
|
#define QTVERSIONMANAGER_H
|
||||||
|
|
||||||
|
#include <projectexplorer/taskwindow.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
|
|
||||||
@@ -139,6 +140,12 @@ public:
|
|||||||
|
|
||||||
bool supportsShadowBuilds() const;
|
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:
|
private:
|
||||||
QList<QSharedPointer<ProjectExplorer::ToolChain> > toolChains() const;
|
QList<QSharedPointer<ProjectExplorer::ToolChain> > toolChains() const;
|
||||||
static int getUniqueId();
|
static int getUniqueId();
|
||||||
|
Reference in New Issue
Block a user