Commit 9c244bcb authored by con's avatar con
Browse files

Fixes: - Warning about wrong connect

Details:  - Bookmarks plugin accidentally thought all editors are text editors.
parent 65f07aa2
...@@ -201,14 +201,18 @@ void BookmarksPlugin::updateActions(int state) ...@@ -201,14 +201,18 @@ void BookmarksPlugin::updateActions(int state)
void BookmarksPlugin::editorOpened(Core::IEditor *editor) void BookmarksPlugin::editorOpened(Core::IEditor *editor)
{ {
connect(editor, SIGNAL(markContextMenuRequested(TextEditor::ITextEditor*,int,QMenu*)), if (qobject_cast<ITextEditor *>(editor)) {
this, SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*))); connect(editor, SIGNAL(markContextMenuRequested(TextEditor::ITextEditor*,int,QMenu*)),
this, SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*)));
}
} }
void BookmarksPlugin::editorAboutToClose(Core::IEditor *editor) void BookmarksPlugin::editorAboutToClose(Core::IEditor *editor)
{ {
disconnect(editor, SIGNAL(markContextMenuRequested(TextEditor::ITextEditor*,int,QMenu*)), if (qobject_cast<ITextEditor *>(editor)) {
this, SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*))); disconnect(editor, SIGNAL(markContextMenuRequested(TextEditor::ITextEditor*,int,QMenu*)),
this, SLOT(requestContextMenu(TextEditor::ITextEditor*,int,QMenu*)));
}
} }
void BookmarksPlugin::requestContextMenu(TextEditor::ITextEditor *editor, void BookmarksPlugin::requestContextMenu(TextEditor::ITextEditor *editor,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment