From 142cee902bf7f0e6ed130eb62069902c8cb9b961 Mon Sep 17 00:00:00 2001 From: Denis Mingulov Date: Fri, 27 Jan 2012 15:25:15 +0200 Subject: [PATCH] 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 Reviewed-by: Leandro Melo --- src/plugins/cppeditor/cppeditor.qrc | 1 - src/plugins/texteditor/basehoverhandler.cpp | 2 +- src/plugins/{cppeditor => texteditor}/images/f1.png | Bin src/plugins/{cppeditor => texteditor}/images/f1.svg | 0 src/plugins/texteditor/texteditor.qrc | 1 + tests/system/suite_qtquick/tst_qml_editor/test.py | 12 ++++++------ 6 files changed, 8 insertions(+), 8 deletions(-) rename src/plugins/{cppeditor => texteditor}/images/f1.png (100%) rename src/plugins/{cppeditor => texteditor}/images/f1.svg (100%) diff --git a/src/plugins/cppeditor/cppeditor.qrc b/src/plugins/cppeditor/cppeditor.qrc index 61cf4a08a65..6e5f83fba6c 100644 --- a/src/plugins/cppeditor/cppeditor.qrc +++ b/src/plugins/cppeditor/cppeditor.qrc @@ -4,6 +4,5 @@ images/qt_h.png CppEditor.mimetypes.xml images/qt_c.png - images/f1.png diff --git a/src/plugins/texteditor/basehoverhandler.cpp b/src/plugins/texteditor/basehoverhandler.cpp index 93821eb92fe..e2f6badd467 100644 --- a/src/plugins/texteditor/basehoverhandler.cpp +++ b/src/plugins/texteditor/basehoverhandler.cpp @@ -113,7 +113,7 @@ void BaseHoverHandler::appendToolTip(const QString &extension) void BaseHoverHandler::addF1ToToolTip() { m_toolTip = QString(QLatin1String("" + "" "
%1  " - "
")).arg(m_toolTip); } diff --git a/src/plugins/cppeditor/images/f1.png b/src/plugins/texteditor/images/f1.png similarity index 100% rename from src/plugins/cppeditor/images/f1.png rename to src/plugins/texteditor/images/f1.png diff --git a/src/plugins/cppeditor/images/f1.svg b/src/plugins/texteditor/images/f1.svg similarity index 100% rename from src/plugins/cppeditor/images/f1.svg rename to src/plugins/texteditor/images/f1.svg diff --git a/src/plugins/texteditor/texteditor.qrc b/src/plugins/texteditor/texteditor.qrc index 86fa6638cbc..49b0b463256 100644 --- a/src/plugins/texteditor/texteditor.qrc +++ b/src/plugins/texteditor/texteditor.qrc @@ -5,5 +5,6 @@ TextEditor.mimetypes.xml images/refactormarker.png images/snippet.png + images/f1.png diff --git a/tests/system/suite_qtquick/tst_qml_editor/test.py b/tests/system/suite_qtquick/tst_qml_editor/test.py index f4cf3a46c33..624705285fd 100644 --- a/tests/system/suite_qtquick/tst_qml_editor/test.py +++ b/tests/system/suite_qtquick/tst_qml_editor/test.py @@ -156,9 +156,9 @@ def testHovering(): expectedTypes = ["TextTip", "TextTip"] expectedValues = [ {'text':'
FocusScope\n

The FocusScope object explicitly ' - 'creates a focus scope.

  
'}, + 'creates a focus scope.

  '}, {'text':'
Rectangle\n

The Rectangle item provides a filled rectangle with an ' - 'optional border.

  
'} + 'optional border.

  '} ] alternativeValues = [{"text":"FocusScope"}, {"text":"Rectangle"}] verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues) @@ -172,14 +172,14 @@ def testHovering(): {'text':'
boolean

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, input will be given active focus ' - 'when scope gains active focus.

  scope gains active focus.

  
'}, {'text':'
string

This property holds the color used to fill the rectangle.' - '

  
'}, + '

  '}, {'text':'
State

This property holds a list of states defined by the item.' - '

  
'}, + '

  '}, {'text':'
Transition

This property holds a list of transitions defined by ' - 'the item.

  
'} + 'the item.

  '} ] alternativeValues = [{"text":"boolean"}, {"text":"string"}, {"text":"State"}, {"text":"Transition"}] verifyHoveringOnEditor(editor, lines, additionalKeyPresses, expectedTypes, expectedValues, alternativeValues)