QNX: Improved generation of SSH keys for BlackBerry devices

The user is now asked where to store the generated SSH key,
before it is generated, and if that would fail, is still
enabled to select a different key.

Task-number: QTCREATORBUG-9101
Task-number: QTCREATORBUG-9102
Change-Id: I8e2f732dbcbe7bd3bd3fa9b512a7a195fa868c17
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
This commit is contained in:
Tobias Nätterlund
2013-04-16 14:53:24 +02:00
committed by Tobias Nätterlund
parent 22fcb71a8e
commit 9728afadb0
6 changed files with 79 additions and 114 deletions

View File

@@ -56,6 +56,7 @@
#include <QFileInfo>
#include <QDir>
#include <QMessageBox>
#include <QDesktopServices>
namespace Qnx {
namespace Internal {
@@ -442,16 +443,14 @@ QString BlackBerryConfiguration::dataDirPath() const
if (Utils::HostOsInfo::isAnyUnixHost())
return homeDir + QLatin1String("/.rim");
#if defined(Q_OS_WIN)
if (Utils::HostOsInfo::isWindowsHost()) {
// needed because QSysInfo::windowsVersion() is not available on other
// platforms.
if (QSysInfo::windowsVersion() == QSysInfo::WV_XP)
return homeDir
+ QLatin1String("/Local Settings/Application Data/Research In Motion");
return homeDir + QLatin1String("/AppData/Local/Research in Motion");
// Get the proper storage location on Windows using QDesktopServices,
// to not hardcode "AppData/Local", as it might refer to "AppData/Roaming".
QString dataDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
dataDir = dataDir.left(dataDir.indexOf(QCoreApplication::organizationName()));
dataDir.append(QLatin1String("Research in Motion"));
return dataDir;
}
#endif
return QString();
}