Bookmarks: Some general code cleanup

Change-Id: Ibaba24af685d733bc3a488b82f2af5212f7ac35d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Eike Ziller
2018-05-02 11:59:37 +02:00
parent 436967ebf0
commit eca2f5da53
3 changed files with 20 additions and 47 deletions

View File

@@ -141,7 +141,7 @@ BookmarksPluginRunData::BookmarksPluginRunData()
editorManagerContext);
mbm->addAction(cmd);
connect(&m_toggleAction, &QAction::triggered, [this] {
connect(&m_toggleAction, &QAction::triggered, this, [this] {
BaseTextEditor *editor = BaseTextEditor::currentTextEditor();
if (editor && !editor->document()->isTemporary())
m_bookmarkManager.toggleBookmark(editor->document()->filePath(), editor->currentLine());
@@ -154,7 +154,7 @@ BookmarksPluginRunData::BookmarksPluginRunData()
connect(&m_docNextAction, &QAction::triggered,
&m_bookmarkManager, &BookmarkManager::nextInDocument);
connect(&m_editBookmarkAction, &QAction::triggered, [this] {
connect(&m_editBookmarkAction, &QAction::triggered, this, [this] {
m_bookmarkManager.editByFileAndLine(m_marginActionFileName, m_marginActionLineNumber);
});
@@ -162,7 +162,7 @@ BookmarksPluginRunData::BookmarksPluginRunData()
this, &BookmarksPluginRunData::updateActions);
updateActions(false, m_bookmarkManager.state());
connect(&m_bookmarkMarginAction, &QAction::triggered, [this] {
connect(&m_bookmarkMarginAction, &QAction::triggered, this, [this] {
m_bookmarkManager.toggleBookmark(m_marginActionFileName, m_marginActionLineNumber);
});