Editor: Refactor Open Link in Next Split.

Cleanup code and added shortcuts and menu entries for
- open header/source in next split
- follow symbol under cursor in next split
- open declaration/definition in next split

Change-Id: I2c4347749d26669d88b7c2968f30f60710f442b1
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
David Schulz
2013-02-05 14:14:33 +01:00
parent a37770ba3b
commit 6ef0cf1a30
20 changed files with 159 additions and 231 deletions

View File

@@ -46,7 +46,6 @@ static const char markTextChangesKey[] = "MarkTextChanges";
static const char autoFoldFirstCommentKey[] = "AutoFoldFirstComment";
static const char centerCursorOnScrollKey[] = "CenterCursorOnScroll";
static const char openLinksInNextSplitKey[] = "OpenLinksInNextSplitKey";
static const char forceOpenLinksInNextSplitKey[] = "ForceOpenLinksInNextSplitKey";
static const char groupPostfix[] = "DisplaySettings";
namespace TextEditor {
@@ -90,7 +89,6 @@ void DisplaySettings::toSettings(const QString &category, QSettings *s) const
s->setValue(QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment);
s->setValue(QLatin1String(centerCursorOnScrollKey), m_centerCursorOnScroll);
s->setValue(QLatin1String(openLinksInNextSplitKey), m_openLinksInNextSplit);
s->setValue(QLatin1String(forceOpenLinksInNextSplitKey), m_forceOpenLinksInNextSplit);
s->endGroup();
}
@@ -117,7 +115,6 @@ void DisplaySettings::fromSettings(const QString &category, const QSettings *s)
m_autoFoldFirstComment = s->value(group + QLatin1String(autoFoldFirstCommentKey), m_autoFoldFirstComment).toBool();
m_centerCursorOnScroll = s->value(group + QLatin1String(centerCursorOnScrollKey), m_centerCursorOnScroll).toBool();
m_openLinksInNextSplit = s->value(group + QLatin1String(openLinksInNextSplitKey), m_openLinksInNextSplit).toBool();
m_forceOpenLinksInNextSplit = s->value(group + QLatin1String(forceOpenLinksInNextSplitKey), m_forceOpenLinksInNextSplit).toBool();
}
bool DisplaySettings::equals(const DisplaySettings &ds) const