forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.5'
Change-Id: I4d74ad26046136ff2d38cfc1015b502009b2b344
This commit is contained in:
@@ -119,31 +119,35 @@ bool MergeTool::start(const QString &workingDirectory, const QStringList &files)
|
|||||||
MergeTool::FileState MergeTool::waitAndReadStatus(QString &extraInfo)
|
MergeTool::FileState MergeTool::waitAndReadStatus(QString &extraInfo)
|
||||||
{
|
{
|
||||||
QByteArray state;
|
QByteArray state;
|
||||||
if (m_process->canReadLine() || (m_process->waitForReadyRead(500) && m_process->canReadLine())) {
|
for (int i = 0; i < 5; ++i) {
|
||||||
state = m_process->readLine().trimmed();
|
if (m_process->canReadLine()) {
|
||||||
// " {local}: modified file"
|
state = m_process->readLine().trimmed();
|
||||||
// " {remote}: deleted"
|
break;
|
||||||
if (!state.isEmpty()) {
|
}
|
||||||
state = state.mid(state.indexOf(':') + 2);
|
m_process->waitForReadyRead(500);
|
||||||
if (state == "deleted")
|
}
|
||||||
return DeletedState;
|
// " {local}: modified file"
|
||||||
if (state.startsWith("modified"))
|
// " {remote}: deleted"
|
||||||
return ModifiedState;
|
if (!state.isEmpty()) {
|
||||||
if (state.startsWith("created"))
|
state = state.mid(state.indexOf(':') + 2);
|
||||||
return CreatedState;
|
if (state == "deleted")
|
||||||
QByteArray submodulePrefix("submodule commit ");
|
return DeletedState;
|
||||||
// " {local}: submodule commit <hash>"
|
if (state.startsWith("modified"))
|
||||||
if (state.startsWith(submodulePrefix)) {
|
return ModifiedState;
|
||||||
extraInfo = QString::fromLocal8Bit(state.mid(submodulePrefix.size()));
|
if (state.startsWith("created"))
|
||||||
return SubmoduleState;
|
return CreatedState;
|
||||||
}
|
QByteArray submodulePrefix("submodule commit ");
|
||||||
// " {local}: a symbolic link -> 'foo.cpp'"
|
// " {local}: submodule commit <hash>"
|
||||||
QByteArray symlinkPrefix("a symbolic link -> '");
|
if (state.startsWith(submodulePrefix)) {
|
||||||
if (state.startsWith(symlinkPrefix)) {
|
extraInfo = QString::fromLocal8Bit(state.mid(submodulePrefix.size()));
|
||||||
extraInfo = QString::fromLocal8Bit(state.mid(symlinkPrefix.size()));
|
return SubmoduleState;
|
||||||
extraInfo.chop(1); // remove last quote
|
}
|
||||||
return SymbolicLinkState;
|
// " {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;
|
return UnknownState;
|
||||||
|
@@ -300,11 +300,28 @@ void IosConfigurations::updateAutomaticKitList()
|
|||||||
}
|
}
|
||||||
if (kitExists) {
|
if (kitExists) {
|
||||||
kitAtt->blockNotification();
|
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 {
|
} else {
|
||||||
qCDebug(kitSetupLog) << "setting up new kit for " << p.name;
|
qCDebug(kitSetupLog) << "setting up new kit for " << p.name;
|
||||||
kitAtt = new Kit;
|
kitAtt = new Kit;
|
||||||
kitAtt->setAutoDetected(true);
|
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;
|
QString displayName = baseDisplayName;
|
||||||
for (int iVers = 1; iVers < 100; ++iVers) {
|
for (int iVers = 1; iVers < 100; ++iVers) {
|
||||||
bool unique = true;
|
bool unique = true;
|
||||||
|
@@ -251,12 +251,12 @@ void UiCodeModelSupport::updateFromBuild()
|
|||||||
QString UiCodeModelSupport::uicCommand() const
|
QString UiCodeModelSupport::uicCommand() const
|
||||||
{
|
{
|
||||||
QtSupport::BaseQtVersion *version;
|
QtSupport::BaseQtVersion *version;
|
||||||
if (m_project->needsConfiguration()) {
|
ProjectExplorer::Target *target;
|
||||||
version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::defaultKit());
|
if (!m_project->needsConfiguration()
|
||||||
} else {
|
&& (target = m_project->activeTarget()))
|
||||||
ProjectExplorer::Target *target = m_project->activeTarget();
|
|
||||||
version = QtSupport::QtKitInformation::qtVersion(target->kit());
|
version = QtSupport::QtKitInformation::qtVersion(target->kit());
|
||||||
}
|
else
|
||||||
|
version = QtSupport::QtKitInformation::qtVersion(ProjectExplorer::KitManager::defaultKit());
|
||||||
return version ? version->uicCommand() : QString();
|
return version ? version->uicCommand() : QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Submodule src/shared/qbs updated: 31881df00d...55ff3783ce
Reference in New Issue
Block a user