Merge remote-tracking branch 'origin/4.2'

Change-Id: I9006dd493707ae626ae3502541599c8789e1aab0
This commit is contained in:
Eike Ziller
2017-02-27 15:17:30 +01:00
28 changed files with 218 additions and 95 deletions

View File

@@ -64,6 +64,7 @@ const QLatin1String UninstallPreviousPackageKey("UninstallPreviousPackage");
const QLatin1String InstallFailedInconsistentCertificatesString("INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES");
const QLatin1String InstallFailedUpdateIncompatible("INSTALL_FAILED_UPDATE_INCOMPATIBLE");
const QLatin1String InstallFailedPermissionModelDowngrade("INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE");
const QLatin1String InstallFailedVersionDowngrade("INSTALL_FAILED_VERSION_DOWNGRADE");
const Core::Id AndroidDeployQtStep::Id("Qt4ProjectManager.AndroidDeployQtStep");
//////////////////
@@ -389,6 +390,9 @@ void AndroidDeployQtStep::slotAskForUninstall(DeployErrorCode errorCode)
case UpdateIncompatible:
uninstallMsg += InstallFailedUpdateIncompatible+"\n";
break;
case VersionDowngrade:
uninstallMsg += InstallFailedVersionDowngrade+"\n";
break;
default:
break;
}
@@ -517,6 +521,8 @@ AndroidDeployQtStep::DeployErrorCode AndroidDeployQtStep::parseDeployErrors(QStr
errorCode |= UpdateIncompatible;
if (deployOutputLine.contains(InstallFailedPermissionModelDowngrade))
errorCode |= PermissionModelDowngrade;
if (deployOutputLine.contains(InstallFailedVersionDowngrade))
errorCode |= VersionDowngrade;
return errorCode;
}

View File

@@ -66,7 +66,8 @@ class AndroidDeployQtStep : public ProjectExplorer::BuildStep
InconsistentCertificates = 0x0001,
UpdateIncompatible = 0x0002,
PermissionModelDowngrade = 0x0004,
Failure = 0x0008
VersionDowngrade = 0x0008,
Failure = 0x0010
};
public:

View File

@@ -171,7 +171,10 @@ void BareMetalDebugSupport::startExecution()
StandardRunnable r;
r.executable = p->executable();
r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::OsTypeLinux);
// We need to wrap the command arguments depending on a host OS,
// as the bare metal's GDB servers are launched on a host,
// but not on a target.
r.commandLineArguments = Utils::QtcProcess::joinArgs(p->arguments(), Utils::HostOsInfo::hostOs());
m_appRunner->start(dev, r);
}

View File

@@ -967,7 +967,6 @@ public:
void updateUiForProject(ProjectExplorer::Project *project);
void updateUiForTarget(ProjectExplorer::Target *target);
void updateUiForRunConfiguration(ProjectExplorer::RunConfiguration *rc);
void updateActiveLanguages();
public:
@@ -3324,12 +3323,11 @@ void DebuggerPluginPrivate::updateUiForProject(Project *project)
}
m_previousProject = project;
if (!project) {
updateUiForTarget(0);
updateUiForTarget(nullptr);
return;
}
connect(project, &Project::activeTargetChanged,
this, &DebuggerPluginPrivate::updateUiForTarget,
Qt::QueuedConnection);
this, &DebuggerPluginPrivate::updateUiForTarget);
updateUiForTarget(project->activeTarget());
}
@@ -3337,35 +3335,19 @@ void DebuggerPluginPrivate::updateUiForTarget(Target *target)
{
if (m_previousTarget) {
disconnect(m_previousTarget.data(), &Target::activeRunConfigurationChanged,
this, &DebuggerPluginPrivate::updateUiForRunConfiguration);
this, &DebuggerPluginPrivate::updateActiveLanguages);
}
m_previousTarget = target;
if (!target) {
updateUiForRunConfiguration(0);
updateActiveLanguages();
return;
}
connect(target, &Target::activeRunConfigurationChanged,
this, &DebuggerPluginPrivate::updateUiForRunConfiguration,
Qt::QueuedConnection);
updateUiForRunConfiguration(target->activeRunConfiguration());
}
// updates default debug language settings per run config.
void DebuggerPluginPrivate::updateUiForRunConfiguration(RunConfiguration *rc)
{
// if (m_previousRunConfiguration)
// disconnect(m_previousRunConfiguration, &RunConfiguration::requestRunActionsUpdate,
// this, &DebuggerPluginPrivate::updateActiveLanguages);
// m_previousRunConfiguration = rc;
Q_UNUSED(rc); // FIXME
this, &DebuggerPluginPrivate::updateActiveLanguages);
updateActiveLanguages();
// if (m_previousRunConfiguration)
// connect(m_previousRunConfiguration, &RunConfiguration::requestRunActionsUpdate,
// this, &DebuggerPluginPrivate::updateActiveLanguages,
// Qt::QueuedConnection);
}
void DebuggerPluginPrivate::updateActiveLanguages()

View File

@@ -512,7 +512,7 @@ static QTime timeFromData(int ms)
}
// Stolen and adapted from qdatetime.cpp
static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time)
static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time, int tiVersion)
{
enum {
SECS_PER_DAY = 86400,
@@ -554,8 +554,8 @@ static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time)
ds = msecs;
}
*date = (status & NullDate) ? QDate() : QDate::fromJulianDay(jd);
*time = (status & NullTime) ? QTime() : QTime::fromMSecsSinceStartOfDay(ds);
*date = ((status & NullDate) && tiVersion < 14) ? QDate() : QDate::fromJulianDay(jd);
*time = ((status & NullTime) && tiVersion < 14) ? QTime() : QTime::fromMSecsSinceStartOfDay(ds);
}
QString decodeData(const QString &ba, const QString &encoding)
@@ -671,6 +671,7 @@ QString decodeData(const QString &ba, const QString &encoding)
int p1 = ba.indexOf('/', p0 + 1);
int p2 = ba.indexOf('/', p1 + 1);
int p3 = ba.indexOf('/', p2 + 1);
int p4 = ba.indexOf('/', p3 + 1);
qint64 msecs = ba.left(p0).toLongLong();
++p0;
@@ -680,11 +681,13 @@ QString decodeData(const QString &ba, const QString &encoding)
++p2;
QByteArray timeZoneId = QByteArray::fromHex(ba.mid(p2, p3 - p2).toUtf8());
++p3;
int status = ba.mid(p3).toInt();
int status = ba.mid(p3, p4 - p3).toInt();
++p4;
int tiVersion = ba.mid(p4).toInt();
QDate date;
QTime time;
getDateTime(msecs, status, &date, &time);
getDateTime(msecs, status, &date, &time, tiVersion);
QDateTime dateTime;
if (spec == Qt::OffsetFromUTC) {

View File

@@ -1579,7 +1579,8 @@ void ProjectExplorerPluginPrivate::savePersistentSettings()
}
QSettings *s = ICore::settings();
s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession());
if (!SessionManager::isDefaultVirgin())
s->setValue(QLatin1String("ProjectExplorer/StartupSession"), SessionManager::activeSession());
s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files"));
QStringList fileNames;