Commit 142cee90 authored by Denis Mingulov's avatar Denis Mingulov Committed by Leandro Melo

TextEditor: Fix incorrect dependency to CppEditor resources

TextEditor BaseHoverHandler::addF1ToToolTip() method has used
a resource from CppEditor (:/cppeditor/images/f1.png), despite
of the inverse official dependecy in PluginSpec file and other
classes.

As it is not used anywhere else - to fix the issue f1.png and
f1.svg are moved from CppEditor to TextEditor.

Change-Id: I14b542837d6337bd08e19ad72cf4a869be08465a
Reviewed-by: default avatarChristian Stenger <christian.stenger@nokia.com>
Reviewed-by: default avatarLeandro Melo <leandro.melo@nokia.com>
parent e99e4358
......@@ -4,6 +4,5 @@
<file>images/qt_h.png</file>
<file>CppEditor.mimetypes.xml</file>
<file>images/qt_c.png</file>
<file>images/f1.png</file>
</qresource>
</RCC>
......@@ -113,7 +113,7 @@ void BaseHoverHandler::appendToolTip(const QString &extension)
void BaseHoverHandler::addF1ToToolTip()
{
m_toolTip = QString(QLatin1String("<table><tr><td valign=middle>%1</td><td>&nbsp;&nbsp;"
"<img src=\":/cppeditor/images/f1.png\"></td>"
"<img src=\":/texteditor/images/f1.png\"></td>"
"</tr></table>")).arg(m_toolTip);
}
......
......@@ -5,5 +5,6 @@
<file>TextEditor.mimetypes.xml</file>
<file>images/refactormarker.png</file>
<file>images/snippet.png</file>
<file>images/f1.png</file>
</qresource>
</RCC>
......@@ -156,9 +156,9 @@ def testHovering():
expectedTypes = ["TextTip", "TextTip"]
expectedValues = [
{'text':'<table><tr><td valign=middle>FocusScope\n<p>The FocusScope object explicitly '
'creates a focus scope.</p></td><td>&nbsp;&nbsp;<img src=":/cppeditor/images/f1.png"></td></tr></table>'},
'creates a focus scope.</p></td><td>&nbsp;&nbsp;<img src=":/texteditor/images/f1.png"></td></tr></table>'},
{'text':'<table><tr><td valign=middle>Rectangle\n<p>The Rectangle item provides a filled rectangle with an '
'optional border.</p></td><td>&nbsp;&nbsp;<img src=":/cppeditor/images/f1.png"></td></tr></table>'}
'optional border.</p></td><td>&nbsp;&nbsp;<img src=":/texteditor/images/f1.png"></td></tr></table>'}
]
alternativeValues = [{"text":"FocusScope"}, {"text":"Rectangle"}]
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
......@@ -172,14 +172,14 @@ def testHovering():
{'text':'<table><tr><td valign=middle>boolean<p>This property indicates whether the item has focus '
'within the enclosing focus scope. If true, this item will gain active focus when the enclosing '
'focus scope gains active focus. In the following example, <tt>input</tt> will be given active focus '
'when <tt>scope</tt> gains active focus.</p></td><td>&nbsp;&nbsp;<img src=":/cppeditor/images/f1.png"'
'when <tt>scope</tt> gains active focus.</p></td><td>&nbsp;&nbsp;<img src=":/texteditor/images/f1.png"'
'></td></tr></table>'},
{'text':'<table><tr><td valign=middle>string<p>This property holds the color used to fill the rectangle.'
'</p></td><td>&nbsp;&nbsp;<img src=":/cppeditor/images/f1.png"></td></tr></table>'},
'</p></td><td>&nbsp;&nbsp;<img src=":/texteditor/images/f1.png"></td></tr></table>'},
{'text':'<table><tr><td valign=middle>State<p>This property holds a list of states defined by the item.'
'</p></td><td>&nbsp;&nbsp;<img src=":/cppeditor/images/f1.png"></td></tr></table>'},
'</p></td><td>&nbsp;&nbsp;<img src=":/texteditor/images/f1.png"></td></tr></table>'},
{'text':'<table><tr><td valign=middle>Transition<p>This property holds a list of transitions defined by '
'the item.</p></td><td>&nbsp;&nbsp;<img src=":/cppeditor/images/f1.png"></td></tr></table>'}
'the item.</p></td><td>&nbsp;&nbsp;<img src=":/texteditor/images/f1.png"></td></tr></table>'}
]
alternativeValues = [{"text":"boolean"}, {"text":"string"}, {"text":"State"}, {"text":"Transition"}]
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)
......
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