Commit 70283a9e authored by Nikolai Kosjar's avatar Nikolai Kosjar

GLSLEditor: Remove GlslHoverHandler

The BaseHoverHandler does the same job.

Change-Id: I2708a87ed5cbc3b320766f52927be4a9670b522b
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent d870bab9
......@@ -27,7 +27,6 @@
#include "glsleditorconstants.h"
#include "glsleditorplugin.h"
#include "glslhighlighter.h"
#include "glslhoverhandler.h"
#include "glslautocompleter.h"
#include "glslcompletionassist.h"
#include "glslindenter.h"
......@@ -332,8 +331,6 @@ GlslEditorFactory::GlslEditorFactory()
setEditorActionHandlers(TextEditorActionHandler::Format
| TextEditorActionHandler::UnCommentSelection
| TextEditorActionHandler::UnCollapseAll);
addHoverHandler(new GlslHoverHandler);
}
} // namespace Internal
......
......@@ -10,7 +10,6 @@ glsleditorplugin.h \
glslhighlighter.h \
glslautocompleter.h \
glslindenter.h \
glslhoverhandler.h \
glslcompletionassist.h
SOURCES += \
......@@ -19,7 +18,6 @@ glsleditorplugin.cpp \
glslhighlighter.cpp \
glslautocompleter.cpp \
glslindenter.cpp \
glslhoverhandler.cpp \
glslcompletionassist.cpp
RESOURCES += glsleditor.qrc
......@@ -25,8 +25,6 @@ QtcPlugin {
"glsleditorplugin.h",
"glslhighlighter.cpp",
"glslhighlighter.h",
"glslhoverhandler.cpp",
"glslhoverhandler.h",
"glslindenter.cpp",
"glslindenter.h",
]
......
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#include "glslhoverhandler.h"
#include "glsleditor.h"
namespace GlslEditor {
namespace Internal {
void GlslHoverHandler::identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos)
{
if (!editorWidget->extraSelectionTooltip(pos).isEmpty())
setToolTip(editorWidget->extraSelectionTooltip(pos));
}
void GlslHoverHandler::decorateToolTip()
{
if (Qt::mightBeRichText(toolTip()))
setToolTip(toolTip().toHtmlEscaped());
}
} // namespace Internal
} // namespace GlslEditor
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
#pragma once
#include <texteditor/basehoverhandler.h>
namespace GlslEditor {
namespace Internal {
class GlslHoverHandler : public TextEditor::BaseHoverHandler
{
public:
GlslHoverHandler() {}
private:
void identifyMatch(TextEditor::TextEditorWidget *editorWidget, int pos) override;
void decorateToolTip() override;
};
} // namespace Internal
} // namespace GlslEditor
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