Commit 105e5aec authored by El Mehdi Fekari's avatar El Mehdi Fekari Committed by Mehdi Fekari

Qnx: Handle bbnk-env file extension when adding manual target

Task-number: QTCREATORBUG-10745

Change-Id: Ibefc228699ee339adccef5126cc167575be3ba5e
Reviewed-by: default avatarDavid Kaspar <dkaspar@blackberry.com>
Reviewed-by: default avatarTobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos's avatarNicolas Arnaud-Cormos <nicolas@kdab.com>
parent 939b0cae
......@@ -64,10 +64,13 @@ NdkPathChooser::NdkPathChooser(Mode mode, QWidget *parent)
: Utils::PathChooser(parent)
, m_mode(mode)
{
if (m_mode == NdkPathChooser::InstallMode)
if (m_mode == NdkPathChooser::InstallMode) {
setExpectedKind(Utils::PathChooser::Directory);
else
} else {
setExpectedKind(Utils::PathChooser::File);
setPromptDialogFilter(Utils::HostOsInfo::isWindowsHost() ? QLatin1String("*.bat") :
QLatin1String("*.sh"));
}
}
bool NdkPathChooser::validatePath(const QString &path, QString *errorMessage)
......@@ -80,7 +83,10 @@ bool NdkPathChooser::validatePath(const QString &path, QString *errorMessage)
return !(QnxUtils::sdkInstallerPath(path).isEmpty());
QFileInfo fi(path);
return (fi.suffix() == QLatin1String("sh") || fi.suffix() == QLatin1String("bat"));
if (Utils::HostOsInfo::isWindowsHost())
return fi.suffix() == QLatin1String("bat");
return fi.suffix() == QLatin1String("sh");
}
//------------------------------------------------------------------
......
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