Commit a98fe15f authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/2.8' into HEAD

Conflicts:
	qbs/pluginspec/pluginspec.qbs

Change-Id: Ic8e992623b9eda8913ee473c779a8df27643ccc9
parents 2c211007 07c0a834
......@@ -18,11 +18,6 @@ Module {
var cmd = new JavaScriptCommand();
cmd.description = "prepare " + FileInfo.fileName(output.fileName);
cmd.highlight = "codegen";
cmd.ide_version_major = project.ide_version_major;
cmd.ide_version_minor = project.ide_version_minor;
cmd.ide_version_release = project.ide_version_release;
cmd.qtcreator_version = cmd.ide_version_major + '.' + cmd.ide_version_minor + '.' + cmd.ide_version_release;
cmd.pluginspecreplacements = product.pluginspecreplacements;
cmd.plugin_depends = [];
var deps = product.dependencies;
......@@ -45,16 +40,16 @@ Module {
// replace quoted quotes
all = all.replace(/\\\"/g, '"');
// replace config vars
vars['QTCREATOR_VERSION'] = qtcreator_version;
vars['IDE_VERSION_MAJOR'] = ide_version_major;
vars['IDE_VERSION_MINOR'] = ide_version_minor;
vars['IDE_VERSION_RELEASE'] = ide_version_release;
vars['QTCREATOR_VERSION'] = project.qtcreator_version;
vars['IDE_VERSION_MAJOR'] = project.ide_version_major;
vars['IDE_VERSION_MINOR'] = project.ide_version_minor;
vars['IDE_VERSION_RELEASE'] = project.ide_version_release;
var deplist = ["<dependencyList>"];
for (i in plugin_depends) {
deplist.push(" <dependency name=\"" + plugin_depends[i] + "\" version=\"" + qtcreator_version + "\"/>");
deplist.push(" <dependency name=\"" + plugin_depends[i] + "\" version=\"" + project.qtcreator_version + "\"/>");
}
for (i in plugin_recommends) {
deplist.push(" <dependency name=\"" + plugin_recommends[i] + "\" version=\"" + qtcreator_version + "\" type=\"optional\"/>");
deplist.push(" <dependency name=\"" + plugin_recommends[i] + "\" version=\"" + project.qtcreator_version + "\" type=\"optional\"/>");
}
deplist.push(" </dependencyList>");
vars['dependencyList'] = deplist.join("\n");
......
......@@ -1777,6 +1777,12 @@ class Dumper:
self.put('",')
return True
def isReferenceType(self, typeobj):
return typeobj.code == gdb.TYPE_CODE_REF
def isStructType(self, typeobj):
return typeobj.code == gdb.TYPE_CODE_STRUCT
def putPlotData(self, type, base, n, plotFormat):
if self.isExpanded():
self.putArrayData(type, base, n)
......
This diff is collapsed.
This diff is collapsed.
......@@ -50,6 +50,9 @@ int main(int argc, char *argv[])
// Since we always render text into an FBO, we need to globally disable
// subpixel antialiasing and instead use gray.
qputenv("QSG_DISTANCEFIELD_ANTIALIASING", "gray");
#ifdef Q_OS_MAC //This keeps qml2puppet from stealing focus
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
#endif
QApplication application(argc, argv);
......
......@@ -51,6 +51,10 @@ int main(int argc, char *argv[])
QtSimulatorPrivate::SimulatorConnection::createStubInstance();
#endif
#ifdef Q_OS_MAC //This keeps qml2puppet from stealing focus
qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true");
#endif
QApplication application(argc, argv);
QCoreApplication::setOrganizationName("QtProject");
......
......@@ -527,6 +527,7 @@ CPLUSPLUS_EXPORT QString simplifySTLType(const QString &typeIn)
if (type.startsWith(QLatin1String("struct ")))
type.remove(0, 7);
type.replace(QLatin1String("std::__1::"), QLatin1String("std::"));
type.replace(QLatin1Char('*'), QLatin1Char('@'));
for (int i = 0; i < 10; ++i) {
......
......@@ -151,6 +151,10 @@ void SshKeyGenerator::generateOpenSslPrivateKeyString(const KeyPtr &key)
= key.dynamicCast<RSA_PrivateKey>();
params << rsaKey->get_n() << rsaKey->get_e() << rsaKey->get_d() << rsaKey->get_p()
<< rsaKey->get_q();
const BigInt dmp1 = rsaKey->get_d() % (rsaKey->get_p() - 1);
const BigInt dmq1 = rsaKey->get_d() % (rsaKey->get_q() - 1);
const BigInt iqmp = inverse_mod(rsaKey->get_q(), rsaKey->get_p());
params << dmp1 << dmq1 << iqmp;
keyId = SshCapabilities::PubKeyRsa;
label = "RSA PRIVATE KEY";
} else {
......
......@@ -36,9 +36,29 @@
#include <QXmlStreamReader>
#include <QXmlStreamWriter>
#include <QDateTime>
#include <QTextStream>
#include <QRegExp>
#include <QRect>
#include <utils/qtcassert.h>
// Read and write rectangle in X11 resource syntax "12x12+4+3"
static QString rectangleToString(const QRect &r)
{
QString result;
QTextStream(&result) << r.width() << 'x' << r.height() << forcesign << r.x() << r.y();
return result;
}
static QRect stringToRectangle(const QString &v)
{
static QRegExp pattern(QLatin1String("(\\d+)x(\\d+)([-+]\\d+)([-+]\\d+)"));
Q_ASSERT(pattern.isValid());
return pattern.exactMatch(v) ?
QRect(QPoint(pattern.cap(3).toInt(), pattern.cap(4).toInt()),
QSize(pattern.cap(1).toInt(), pattern.cap(2).toInt())) :
QRect();
}
/*!
\class Utils::PersistentSettingsReader
......@@ -174,6 +194,8 @@ private:
bool handleStartElement(QXmlStreamReader &r);
bool handleEndElement(const QStringRef &name);
static QString formatWarning(const QXmlStreamReader &r, const QString &message);
QStack<ParseValueStackEntry> m_valueStack;
QVariantMap m_result;
QString m_currentVariableName;
......@@ -223,10 +245,16 @@ bool ParseContext::handleStartElement(QXmlStreamReader &r)
const QString key = attributes.hasAttribute(keyAttribute) ?
attributes.value(keyAttribute).toString() : QString();
switch (e) {
case SimpleValueElement:
case SimpleValueElement: {
// This reads away the end element, so, handle end element right here.
m_valueStack.push_back(ParseValueStackEntry(readSimpleValue(r, attributes), key));
const QVariant v = readSimpleValue(r, attributes);
if (!v.isValid()) {
qWarning() << ParseContext::formatWarning(r, QString::fromLatin1("Failed to read element \"%1\".").arg(name.toString()));
return false;
}
m_valueStack.push_back(ParseValueStackEntry(v, key));
return handleEndElement(name);
}
case ListValueElement:
m_valueStack.push_back(ParseValueStackEntry(QVariant::List, key));
break;
......@@ -256,6 +284,18 @@ bool ParseContext::handleEndElement(const QStringRef &name)
return e == QtCreatorElement;
}
QString ParseContext::formatWarning(const QXmlStreamReader &r, const QString &message)
{
QString result = QLatin1String("Warning reading ");
if (const QIODevice *device = r.device())
if (const QFile *file = qobject_cast<const QFile *>(device))
result += QDir::toNativeSeparators(file->fileName()) + QLatin1Char(':');
result += QString::number(r.lineNumber());
result += QLatin1String(": ");
result += message;
return result;
}
ParseContext::Element ParseContext::element(const QStringRef &r) const
{
if (r == valueElement)
......@@ -282,6 +322,10 @@ QVariant ParseContext::readSimpleValue(QXmlStreamReader &r, const QXmlStreamAttr
QTC_ASSERT(text.size() == 1, return QVariant());
return QVariant(QChar(text.at(0)));
}
if (type == QLatin1String("QRect")) {
const QRect rectangle = stringToRectangle(text);
return rectangle.isValid() ? QVariant(rectangle) : QVariant();
}
QVariant value;
value.setValue(text);
value.convert(QVariant::nameToType(type.toLatin1().data()));
......@@ -361,7 +405,14 @@ static void writeVariantValue(QXmlStreamWriter &w, const Context &ctx,
w.writeAttribute(ctx.typeAttribute, QLatin1String(variant.typeName()));
if (!key.isEmpty())
w.writeAttribute(ctx.keyAttribute, key);
w.writeCharacters(variant.toString());
switch (variant.type()) {
case QVariant::Rect:
w.writeCharacters(rectangleToString(variant.toRect()));
break;
default:
w.writeCharacters(variant.toString());
break;
}
w.writeEndElement();
break;
}
......
......@@ -186,8 +186,13 @@ bool AndroidSettingsWidget::checkSDK(const Utils::FileName &location)
|| (!androidExe.appendPath(QLatin1String("/tools/android" QTC_HOST_EXE_SUFFIX)).toFileInfo().exists()
&& !androidBat.appendPath(QLatin1String("/tools/android" ANDROID_BAT_SUFFIX)).toFileInfo().exists())
|| !emulator.appendPath(QLatin1String("/tools/emulator" QTC_HOST_EXE_SUFFIX)).toFileInfo().exists()) {
QMessageBox::critical(this, tr("Android SDK Folder"), tr("\"%1\" does not seem to be an Android SDK top folder.").arg(location.toUserOutput()));
m_ui->sdkWarningIconLabel->setVisible(true);
m_ui->sdkWarningLabel->setVisible(true);
m_ui->sdkWarningLabel->setText(tr("\"%1\" does not seem to be an Android SDK top folder.").arg(location.toUserOutput()));
return false;
} else {
m_ui->sdkWarningIconLabel->setVisible(false);
m_ui->sdkWarningLabel->setVisible(false);
}
return true;
}
......
......@@ -33,7 +33,11 @@
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="SDKLocationLineEdit"/>
<widget class="QLineEdit" name="SDKLocationLineEdit">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="SDKLocationPushButton">
......@@ -48,7 +52,43 @@
</property>
</widget>
</item>
<item row="1" column="0">
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="sdkWarningIconLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="sdkWarningLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="NDKLocationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
......@@ -64,17 +104,17 @@
</property>
</widget>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QLineEdit" name="NDKLocationLineEdit"/>
</item>
<item row="1" column="2">
<item row="2" column="2">
<widget class="QPushButton" name="NDKLocationPushButton">
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
<item row="2" column="1">
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>2</number>
......@@ -110,7 +150,7 @@
</item>
</layout>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QCheckBox" name="CreateKitCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
......@@ -126,7 +166,46 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="5" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QLabel" name="kitWarningIconLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="kitWarningLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
<widget class="QLabel" name="AntLocationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
......@@ -142,17 +221,17 @@
</property>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<widget class="QLineEdit" name="AntLocationLineEdit"/>
</item>
<item row="5" column="2">
<item row="6" column="2">
<widget class="QPushButton" name="AntLocationPushButton">
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QLabel" name="OpenJDKLocationLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
......@@ -168,55 +247,16 @@
</property>
</widget>
</item>
<item row="6" column="1">
<item row="7" column="1">
<widget class="QLineEdit" name="OpenJDKLocationLineEdit"/>
</item>
<item row="6" column="2">
<item row="7" column="2">
<widget class="QPushButton" name="OpenJDKLocationPushButton">
<property name="text">
<string>Browse</string>
</property>
</widget>
</item>
<item row="4" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QLabel" name="kitWarningIconLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../projectexplorer/projectexplorer.qrc">:/projectexplorer/images/compile_warning.png</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="kitWarningLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
......
......@@ -44,7 +44,8 @@ using namespace Core::Internal;
#define CANCELBUTTON_SIZE 15
ProgressBar::ProgressBar(QWidget *parent)
: QWidget(parent), m_titleVisible(true), m_separatorVisible(true), m_progressHeight(0),
: QWidget(parent), m_titleVisible(true), m_separatorVisible(true), m_cancelEnabled(true),
m_progressHeight(0),
m_minimum(1), m_maximum(100), m_value(1), m_cancelButtonFader(0), m_finished(false),
m_error(false)
{
......
......@@ -46,6 +46,7 @@
#include <QAction>
#include <QEvent>
#include <QHBoxLayout>
#include <QMouseEvent>
#include <QPainter>
#include <QPropertyAnimation>
#include <QStyle>
......@@ -379,6 +380,19 @@ bool ProgressManagerPrivate::eventFilter(QObject *obj, QEvent *event)
m_hovered = false;
// give the progress view the chance to get the mouse enter event
updateVisibilityWithDelay();
} else if (obj == m_statusBarWidget && event->type() == QEvent::MouseButtonPress
&& !m_taskList.isEmpty()) {
QMouseEvent *me = static_cast<QMouseEvent *>(event);
if (me->button() == Qt::LeftButton && !me->modifiers()) {
FutureProgress *progress = m_currentStatusDetailsProgress;
if (!progress)
progress = m_taskList.last();
// don't send signal directly from an event filter, event filters should
// do as little a possible
QTimer::singleShot(0, progress, SIGNAL(clicked()));
event->accept();
return true;
}
}
return false;
}
......@@ -643,8 +657,10 @@ void ProgressManagerPrivate::updateStatusDetailsWidget()
while (i != m_taskList.begin()) {
--i;
candidateWidget = (*i)->statusBarWidget();
if (candidateWidget)
if (candidateWidget) {
m_currentStatusDetailsProgress = *i;
break;
}
}
if (candidateWidget == m_currentStatusDetailsWidget)
......
......@@ -108,6 +108,7 @@ private:
QWidget *m_summaryProgressWidget;
QHBoxLayout *m_summaryProgressLayout;
QWidget *m_currentStatusDetailsWidget;
QPointer<FutureProgress> m_currentStatusDetailsProgress;
ProgressBar *m_summaryProgressBar;
QGraphicsOpacityEffect *m_opacityEffect;
QPointer<QPropertyAnimation> m_opacityAnimation;
......
......@@ -355,8 +355,16 @@ QString WatchData::toToolTip() const
formatToolTipRow(str, tr("Name"), name);
formatToolTipRow(str, tr("Expression"), QLatin1String(exp));
formatToolTipRow(str, tr("Internal Type"), QLatin1String(type));
formatToolTipRow(str, tr("Displayed Type"), displayedType);
QString val = valuetooltip.isEmpty() ? valuetooltip : value;
if (!displayedType.isEmpty())
formatToolTipRow(str, tr("Displayed Type"), displayedType);
QString val = valuetooltip.isEmpty() ? value : valuetooltip;
// Automatically display hex value for unsigned integers.
if (!val.isEmpty() && val.at(0).isDigit() && isIntType(type)) {
bool ok;
const quint64 intValue = val.toULongLong(&ok);
if (ok && intValue)
val += QLatin1String(" (hex) ") + QString::number(intValue, 16);
}
if (val.size() > 1000) {
val.truncate(1000);
val += tr(" ... <cut off>");
......
......@@ -139,7 +139,6 @@ public:
QMap<int, int> skippedLines() const { return m_skippedLines; }
QMap<int, DiffEditorWidget::DiffFileInfo> fileInfo() const { return m_fileInfo; }
void setWorkingDirectory(const QString &workingDirectory) { m_workingDirectory = workingDirectory; }
void setLineNumber(int blockNumber, int lineNumber);
void setFileInfo(int blockNumber, const DiffEditorWidget::DiffFileInfo &fileInfo) { m_fileInfo[blockNumber] = fileInfo; setSeparator(blockNumber, true); }
void setSkippedLines(int blockNumber, int skippedLines) { m_skippedLines[blockNumber] = skippedLines; setSeparator(blockNumber, true); }
......@@ -157,6 +156,11 @@ public slots:
void setDisplaySettings(const DisplaySettings &ds);
void setFontSettings(const TextEditor::FontSettings &fs);
signals:
void jumpToOriginalFileRequested(int diffFileIndex,
int lineNumber,
int columnNumber);
protected:
virtual int extraAreaWidth(int *markWidthPtr = 0) const { return BaseTextEditorWidget::extraAreaWidth(markWidthPtr); }
BaseTextEditor *createEditor() { return new DiffViewEditorEditable(this); }
......@@ -180,7 +184,6 @@ private:
const QTextBlock &block, int top);
void jumpToOriginalFile(const QTextCursor &cursor);
QString m_workingDirectory;
QMap<int, int> m_lineNumbers;
int m_lineNumberDigits;
// block number, fileInfo
......@@ -430,20 +433,13 @@ void DiffViewEditorWidget::jumpToOriginalFile(const QTextCursor &cursor)
return;
const int blockNumber = cursor.blockNumber();
const int position = cursor.positionInBlock();
const int columnNumber = cursor.positionInBlock();
if (!m_lineNumbers.contains(blockNumber))
return;
const int lineNr = m_lineNumbers.value(blockNumber);
QMap<int, DiffEditorWidget::DiffFileInfo>::const_iterator it = m_fileInfo.upperBound(blockNumber);
if (it != m_fileInfo.constBegin())
--it;
const QDir dir(m_workingDirectory);
const QString fileName = dir.absoluteFilePath(it.value().fileName);
const int lineNumber = m_lineNumbers.value(blockNumber);
Core::IEditor *ed = Core::EditorManager::openEditor(fileName);
if (TextEditor::ITextEditor *editor = qobject_cast<TextEditor::ITextEditor *>(ed))
editor->gotoLine(lineNr, position);
emit jumpToOriginalFileRequested(fileIndexForBlockNumber(blockNumber), lineNumber, columnNumber);
}
void DiffViewEditorWidget::paintEvent(QPaintEvent *e)
......@@ -609,6 +605,8 @@ DiffEditorWidget::DiffEditorWidget(QWidget *parent)
m_leftEditor, SLOT(setDisplaySettings(TextEditor::DisplaySettings)));
m_leftEditor->setDisplaySettings(settings->displaySettings());
m_leftEditor->setCodeStyle(settings->codeStyle());
connect(m_leftEditor, SIGNAL(jumpToOriginalFileRequested(int,int,int)),
this, SLOT(slotLeftJumpToOriginalFileRequested(int,int,int)));
m_rightEditor = new DiffViewEditorWidget(this);
m_rightEditor->setReadOnly(true);
......@@ -616,6 +614,8 @@ DiffEditorWidget::DiffEditorWidget(QWidget *parent)
m_rightEditor, SLOT(setDisplaySettings(TextEditor::DisplaySettings)));
m_rightEditor->setDisplaySettings(settings->displaySettings());
m_rightEditor->setCodeStyle(settings->codeStyle());
connect(m_rightEditor, SIGNAL(jumpToOriginalFileRequested(int,int,int)),
this, SLOT(slotRightJumpToOriginalFileRequested(int,int,int)));
connect(settings, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
this, SLOT(setFontSettings(TextEditor::FontSettings)));
......@@ -680,8 +680,7 @@ void DiffEditorWidget::clear(const QString &message)
void DiffEditorWidget::setDiff(const QList<DiffFilesContents> &diffFileList, const QString &workingDirectory)
{
m_leftEditor->setWorkingDirectory(workingDirectory);
m_rightEditor->setWorkingDirectory(workingDirectory);
m_workingDirectory = workingDirectory;
Differ differ;
QList<DiffList> diffList;
for (int i = 0; i < diffFileList.count(); i++) {
......@@ -1440,6 +1439,63 @@ void DiffEditorWidget::setFontSettings(const TextEditor::FontSettings &fontSetti
colorDiff(m_contextFileData);
}
void DiffEditorWidget::slotLeftJumpToOriginalFileRequested(int diffFileIndex,
int lineNumber,
int columnNumber)
{
if (diffFileIndex < 0 || diffFileIndex >= m_contextFileData.count())
return;
const FileData fileData = m_contextFileData.at(diffFileIndex);
const QString leftFileName = fileData.leftFileInfo.fileName;
const QString rightFileName = fileData.rightFileInfo.fileName;
if (leftFileName == rightFileName) {
// The same file (e.g. in git diff), jump to the line number taken from the right editor.
// Warning: git show SHA^ vs SHA or git diff HEAD vs Index
// (when Working tree has changed in meantime) will not work properly.
int leftLineNumber = 0;
int rightLineNumber = 0;
for (int i = 0; i < fileData.chunks.count(); i++) {
const ChunkData chunkData = fileData.chunks.at(i);
for (int j = 0; j < chunkData.rows.count(); j++) {
const RowData rowData = chunkData.rows.at(j);
if (rowData.leftLine.textLineType == TextLineData::TextLine)
leftLineNumber++;
if (rowData.rightLine.textLineType == TextLineData::TextLine)
rightLineNumber++;
if (leftLineNumber == lineNumber) {
int colNr = rowData.equal ? columnNumber : 0;
jumpToOriginalFile(leftFileName, rightLineNumber, colNr);
return;
}
}
}
} else {
// different file (e.g. in Tools | Diff...)
jumpToOriginalFile(leftFileName, lineNumber, columnNumber);
}
}
void DiffEditorWidget::slotRightJumpToOriginalFileRequested(int diffFileIndex,
int lineNumber, int columnNumber)
{
if (diffFileIndex < 0 || diffFileIndex >= m_contextFileData.count())
return;
const FileData fileData = m_contextFileData.at(diffFileIndex);
const QString fileName = fileData.rightFileInfo.fileName;
jumpToOriginalFile(fileName, lineNumber, columnNumber);
}
void DiffEditorWidget::jumpToOriginalFile(const QString &fileName,
int lineNumber, int columnNumber)
{
const QDir dir(m_workingDirectory);
const QString absoluteFileName = dir.absoluteFilePath(fileName);
Core::EditorManager::openEditorAt(absoluteFileName, lineNumber, columnNumber);
}
void DiffEditorWidget::leftVSliderChanged()