forked from qt-creator/qt-creator
*QtVersion::warningReason(): de-duplicate code
Change-Id: I08e370cd83de5ea4f4cdfc079cc908d52d81b192 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
@@ -72,9 +72,7 @@ QString DesktopQtVersion::type() const
|
||||
|
||||
QStringList DesktopQtVersion::warningReason() const
|
||||
{
|
||||
QStringList ret;
|
||||
if (qtAbis().count() == 1 && qtAbis().first().isNull())
|
||||
ret << QCoreApplication::translate("QtVersion", "ABI detection failed: Make sure to use a matching tool chain when building.");
|
||||
QStringList ret = BaseQtVersion::warningReason();
|
||||
if (qtVersion() >= QtSupport::QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
|
||||
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
|
||||
return ret;
|
||||
|
@@ -72,9 +72,7 @@ QString SimulatorQtVersion::type() const
|
||||
|
||||
QStringList SimulatorQtVersion::warningReason() const
|
||||
{
|
||||
QStringList ret;
|
||||
if (qtAbis().count() == 1 && qtAbis().first().isNull())
|
||||
ret << QCoreApplication::translate("QtVersion", "ABI detection failed: Make sure to use a matching tool chain when building.");
|
||||
QStringList ret = BaseQtVersion::warningReason();
|
||||
if (qtVersion() >= QtSupport::QtVersionNumber(4, 7, 0) && qmlviewerCommand().isEmpty())
|
||||
ret << QCoreApplication::translate("QtVersion", "No qmlviewer installed.");
|
||||
return ret;
|
||||
|
@@ -387,7 +387,10 @@ QString BaseQtVersion::invalidReason() const
|
||||
|
||||
QStringList BaseQtVersion::warningReason() const
|
||||
{
|
||||
return QStringList();
|
||||
QStringList ret;
|
||||
if (qtAbis().count() == 1 && qtAbis().first().isNull())
|
||||
ret << QCoreApplication::translate("QtVersion", "ABI detection failed: Make sure to use a matching tool chain when building.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ProjectExplorer::ToolChain *BaseQtVersion::preferredToolChain(const Utils::FileName &ms) const
|
||||
|
@@ -62,14 +62,6 @@ QString EmbeddedLinuxQtVersion::type() const
|
||||
return RemoteLinux::Constants::EMBEDDED_LINUX_QT;
|
||||
}
|
||||
|
||||
QStringList EmbeddedLinuxQtVersion::warningReason() const
|
||||
{
|
||||
QStringList ret;
|
||||
if (qtAbis().count() == 1 && qtAbis().first().isNull())
|
||||
ret << QCoreApplication::translate("QtVersion", "ABI detection failed: Make sure to use a matching tool chain when building.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::Abi> EmbeddedLinuxQtVersion::detectQtAbis() const
|
||||
{
|
||||
return qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()));
|
||||
|
@@ -48,8 +48,6 @@ public:
|
||||
|
||||
QString type() const;
|
||||
|
||||
QStringList warningReason() const;
|
||||
|
||||
QList<ProjectExplorer::Abi> detectQtAbis() const;
|
||||
|
||||
QString description() const;
|
||||
|
Reference in New Issue
Block a user