Qucs/qucs — pull request #124 by yodalee (2014-11-21 19:05:04+00:00)
Title: Refactor search dialog

This is a refactor branch. The origin search dialog implementation is quite... dirty.
You can see it get an QucsApp instance, save it as a private member.
Whenever user press "Find", "Find Again" (WTF is this...) and "Replace", it execute the search function.
You can see that now if I wanna move textdoc from QPlainTextEdit to other implementation. the function in search dialog will also need modified. These two are strongly coupled, not a good design.
******
Here is the modification I made.
Remove QucsApp instance in SearchDialog. Now implement search, and replace function in TextDoc (who should responsible for these function). SearchDialog now only emit `search`, and `replace` signal. QucsApp will connect these signal to TextDoc's Slot. Now we can change TextDoc and SearchDialog implementation freely, as long as they provide search and replace signal and slot.