Commit 3286113e authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.5'

Change-Id: I4d74ad26046136ff2d38cfc1015b502009b2b344
parents 022a81da e548635a
......@@ -119,31 +119,35 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
MergeTool::FileState MergeTool::waitAndReadStatus(QString &extraInfo)
{
QByteArray state;
if (m_process->canReadLine() || (m_process->waitForReadyRead(500) && m_process->canReadLine())) {
state = m_process->readLine().trimmed();
// " {local}: modified file"
// " {remote}: deleted"
if (!state.isEmpty()) {
state = state.mid(state.indexOf(':') + 2);
if (state == "deleted")
return DeletedState;
if (state.startsWith("modified"))
return ModifiedState;
if (state.startsWith("created"))
return CreatedState;
QByteArray submodulePrefix("submodule commit ");
// " {local}: submodule commit <hash>"
if (state.startsWith(submodulePrefix)) {
extraInfo = QString::fromLocal8Bit(state.mid(submodulePrefix.size()));
return SubmoduleState;
}
// " {local}: a symbolic link -> 'foo.cpp'"
QByteArray symlinkPrefix("a symbolic link -> '");
if (state.startsWith(symlinkPrefix)) {
extraInfo = QString::fromLocal8Bit(state.mid(symlinkPrefix.size()));
extraInfo.chop(1); // remove last quote
return SymbolicLinkState;
}
for (int i = 0; i < 5; ++i) {
if (m_process->canReadLine()) {
state = m_process->readLine().trimmed();
break;
}
m_process->waitForReadyRead(500);
}
// " {local}: modified file"
// " {remote}: deleted"
if (!state.isEmpty()) {
state = state.mid(state.indexOf(':') + 2);
if (state == "deleted")
return DeletedState;
if (state.startsWith("modified"))
return ModifiedState;
if (state.startsWith("created"))
return CreatedState;
QByteArray submodulePrefix("submodule commit ");
// " {local}: submodule commit <hash>"
if (state.startsWith(submodulePrefix)) {
extraInfo = QString::fromLocal8Bit(state.mid(submodulePrefix.size()));
return SubmoduleState;
}
// " {local}: a symbolic link -> 'foo.cpp'"
QByteArray symlinkPrefix("a symbolic link -> '");
if (state.startsWith(symlinkPrefix)) {
extraInfo = QString::fromLocal8Bit(state.mid(symlinkPrefix.size()));
extraInfo.chop(1); // remove last quote
return SymbolicLinkState;
}
}
return UnknownState;
......
......@@ -300,11 +300,28 @@ void IosConfigurations::updateAutomaticKitList()
}
if (kitExists) {
kitAtt->blockNotification();
// TODO: this is just to fix up broken display names from before
QString baseDisplayName = tr("%1 %2").arg(p.name, qt->unexpandedDisplayName());
QString displayName = baseDisplayName;
for (int iVers = 1; iVers < 100; ++iVers) {
bool unique = true;
foreach (const Kit *k, existingKits) {
if (k == kitAtt)
continue;
if (k->displayName() == displayName) {
unique = false;
break;
}
}
if (unique) break;
displayName = baseDisplayName + QLatin1Char('-') + QString::number(iVers);
}
kitAtt->setUnexpandedDisplayName(displayName);
} else {
qCDebug(kitSetupLog) << "setting up new kit for " << p.name;
kitAtt = new Kit;
kitAtt->setAutoDetected(true);
QString baseDisplayName = tr("%1 %2").arg(p.name, qt->displayName());
QString baseDisplayName = tr("%1 %2").arg(p.name, qt->unexpandedDisplayName());
QString displayName = baseDisplayName;
for (int iVers = 1; iVers < 100; ++iVers) {
bool unique = true;
......
......@@ -251,12 +251,12 @@ void UiCodeModelSupport::updateFromBuild()
QString UiCodeModelSupport::uicCommand() const
{
QtSupport::BaseQtVersion *version;
if (m_project->needsConfiguration()) {
version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::defaultKit());
} else {
ProjectExplorer::Target *target = m_project->activeTarget();
ProjectExplorer::Target *target;
if (!m_project->needsConfiguration()
&& (target = m_project->activeTarget()))
version = QtSupport::QtKitInformation::qtVersion(target->kit());
}
else
version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::defaultKit());
return version ? version->uicCommand() : QString();
}
......
Subproject commit 31881df00d0321f54b8f0d1865d8b16847befde0
Subproject commit 55ff3783ce27c87517ae4758fdaca0f16a86367b
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