forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.6'
Conflicts: src/plugins/coreplugin/helpmanager.cpp Change-Id: I2feb60ec0afb2f22f75dc137a01c3fa217b299d8
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/savedaction.h>
|
||||
#include <utils/stylehelper.h>
|
||||
|
||||
@@ -2120,9 +2121,12 @@ void FakeVimPluginPrivate::highlightMatches(FakeVimHandler *, const QString &nee
|
||||
int FakeVimPluginPrivate::currentFile() const
|
||||
{
|
||||
IEditor *editor = EditorManager::currentEditor();
|
||||
if (!editor)
|
||||
return -1;
|
||||
return DocumentModel::indexOfDocument(editor->document());
|
||||
if (editor) {
|
||||
const Utils::optional<int> index = DocumentModel::indexOfDocument(editor->document());
|
||||
if (QTC_GUARD(index))
|
||||
return index.value();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void FakeVimPluginPrivate::switchToFile(int n)
|
||||
|
||||
Reference in New Issue
Block a user