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: Christian Stenger <christian.stenger@nokia.com>
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
Denis Mingulov
2012-01-27 15:25:15 +02:00
committed by Leandro Melo
parent e99e435818
commit 142cee902b
6 changed files with 8 additions and 8 deletions

View File

@@ -4,6 +4,5 @@
<file>images/qt_h.png</file> <file>images/qt_h.png</file>
<file>CppEditor.mimetypes.xml</file> <file>CppEditor.mimetypes.xml</file>
<file>images/qt_c.png</file> <file>images/qt_c.png</file>
<file>images/f1.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@@ -113,7 +113,7 @@ void BaseHoverHandler::appendToolTip(const QString &extension)
void BaseHoverHandler::addF1ToToolTip() void BaseHoverHandler::addF1ToToolTip()
{ {
m_toolTip = QString(QLatin1String("<table><tr><td valign=middle>%1</td><td>&nbsp;&nbsp;" 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); "</tr></table>")).arg(m_toolTip);
} }

View File

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 677 B

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@@ -5,5 +5,6 @@
<file>TextEditor.mimetypes.xml</file> <file>TextEditor.mimetypes.xml</file>
<file>images/refactormarker.png</file> <file>images/refactormarker.png</file>
<file>images/snippet.png</file> <file>images/snippet.png</file>
<file>images/f1.png</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@@ -156,9 +156,9 @@ def testHovering():
expectedTypes = ["TextTip", "TextTip"] expectedTypes = ["TextTip", "TextTip"]
expectedValues = [ expectedValues = [
{'text':'<table><tr><td valign=middle>FocusScope\n<p>The FocusScope object explicitly ' {'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 ' {'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"}] alternativeValues = [{"text":"FocusScope"}, {"text":"Rectangle"}]
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) 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 ' {'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 ' '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 ' '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>'}, '></td></tr></table>'},
{'text':'<table><tr><td valign=middle>string<p>This property holds the color used to fill the rectangle.' {'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.' {'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 ' {'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"}] alternativeValues = [{"text":"boolean"}, {"text":"string"}, {"text":"State"}, {"text":"Transition"}]
verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)