BookMarks: restructure bookmark map

compare file names case insensitive on windows

Task-number: QTCREATORBUG-19418
Change-Id: I4925a7b33f35ce18e906990ffc104b22ea6d73dc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2017-12-07 10:44:42 +01:00
parent 469edcdde3
commit 2d3829ffcc
4 changed files with 32 additions and 96 deletions

View File

@@ -112,7 +112,7 @@ bool BookmarksPlugin::initialize(const QStringList & /*arguments*/, QString *)
connect(m_toggleAction, &QAction::triggered, [this]() {
BaseTextEditor *editor = BaseTextEditor::currentTextEditor();
if (editor && !editor->document()->isTemporary())
m_bookmarkManager->toggleBookmark(editor->document()->filePath().toString(), editor->currentLine());
m_bookmarkManager->toggleBookmark(editor->document()->filePath(), editor->currentLine());
});
connect(m_prevAction, &QAction::triggered, m_bookmarkManager, &BookmarkManager::prev);
@@ -167,7 +167,7 @@ void BookmarksPlugin::editorOpened(IEditor *editor)
connect(widget, &TextEditorWidget::markRequested, m_bookmarkManager,
[this, editor](TextEditorWidget *, int line, TextMarkRequestKind kind) {
if (kind == BookmarkRequest && !editor->document()->isTemporary())
m_bookmarkManager->toggleBookmark(editor->document()->filePath().toString(), line);
m_bookmarkManager->toggleBookmark(editor->document()->filePath(), line);
});
connect(widget, &TextEditorWidget::markContextMenuRequested,
@@ -190,7 +190,7 @@ void BookmarksPlugin::requestContextMenu(TextEditorWidget *widget,
return;
m_bookmarkMarginActionLineNumber = lineNumber;
m_bookmarkMarginActionFileName = widget->textDocument()->filePath().toString();
m_bookmarkMarginActionFileName = widget->textDocument()->filePath();
menu->addAction(m_bookmarkMarginAction);
if (m_bookmarkManager->hasBookmarkInPosition(m_bookmarkMarginActionFileName, m_bookmarkMarginActionLineNumber))