Qnx: Drop support for QNX 6.5

Or, rather, assume that slog2info is available and handle a missting
slog2info more or less gracefully.

Change-Id: I739482ff0a3d88ee7ff735adf42809cc2ee3e510
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-03-14 17:19:01 +01:00
parent 52a7205965
commit 821dce1e9d
4 changed files with 6 additions and 66 deletions

View File

@@ -23,8 +23,6 @@ using namespace Utils;
namespace Qnx::Internal {
const char QnxVersionKey[] = "QnxVersion";
static QString signalProcessByNameQnxCommandLine(const QString &filePath, int sig)
{
QString executable = filePath;
@@ -65,46 +63,6 @@ QnxDevice::QnxDevice()
}});
}
int QnxDevice::qnxVersion() const
{
if (m_versionNumber == 0)
updateVersionNumber();
return m_versionNumber;
}
void QnxDevice::updateVersionNumber() const
{
QtcProcess versionNumberProcess;
versionNumberProcess.setCommand({filePath("uname"), {"-r"}});
versionNumberProcess.runBlocking(EventLoopMode::On);
QByteArray output = versionNumberProcess.readAllRawStandardOutput();
QString versionMessage = QString::fromLatin1(output);
const QRegularExpression versionNumberRegExp("(\\d+)\\.(\\d+)\\.(\\d+)");
const QRegularExpressionMatch match = versionNumberRegExp.match(versionMessage);
if (match.hasMatch()) {
int major = match.captured(1).toInt();
int minor = match.captured(2).toInt();
int patch = match.captured(3).toInt();
m_versionNumber = (major << 16)|(minor<<8)|(patch);
}
}
void QnxDevice::fromMap(const QVariantMap &map)
{
m_versionNumber = map.value(QLatin1String(QnxVersionKey), 0).toInt();
LinuxDevice::fromMap(map);
}
QVariantMap QnxDevice::toMap() const
{
QVariantMap map(LinuxDevice::toMap());
map.insert(QLatin1String(QnxVersionKey), m_versionNumber);
return map;
}
PortsGatheringMethod QnxDevice::portsGatheringMethod() const
{
return {