diff options
| author | Catalin Badea <catalin.badea392@gmail.com> | 2012-08-09 07:07:42 (GMT) |
|---|---|---|
| committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-11 15:59:13 (GMT) |
| commit | 5d7c8bccc989a9b7dd50f8b9f4f9f0659d41da02 (patch) | |
| tree | cfbedcf9c7884e4a73e6331d05847e8975571e22 /Swift/QtUI/QtHistoryWindow.cpp | |
| parent | 2f793dfdc411ad0a18f3e145f9c2e5eca531dc04 (diff) | |
| download | swift-contrib-5d7c8bccc989a9b7dd50f8b9f4f9f0659d41da02.zip swift-contrib-5d7c8bccc989a9b7dd50f8b9f4f9f0659d41da02.tar.bz2 | |
Highlight search term.
Diffstat (limited to 'Swift/QtUI/QtHistoryWindow.cpp')
| -rw-r--r-- | Swift/QtUI/QtHistoryWindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Swift/QtUI/QtHistoryWindow.cpp b/Swift/QtUI/QtHistoryWindow.cpp index b9f2e91..c2dcbcb 100644 --- a/Swift/QtUI/QtHistoryWindow.cpp +++ b/Swift/QtUI/QtHistoryWindow.cpp @@ -61,6 +61,7 @@ QtHistoryWindow::QtHistoryWindow(SettingsProvider* settings, UIEventStream* even connect(conversation_, SIGNAL(scrollReachedTop()), this, SLOT(handleScrollReachedTop())); connect(conversation_, SIGNAL(scrollReachedBottom()), this, SLOT(handleScrollReachedBottom())); connect(conversation_, SIGNAL(fontResized(int)), this, SLOT(handleFontResized(int))); + connect(conversation_, SIGNAL(contentSizeChanged()), this, SLOT(handleContentSizeChanged())); connect(ui_.searchBox_->lineEdit(), SIGNAL(returnPressed()), this, SLOT(handleReturnPressed())); connect(ui_.calendarWidget_, SIGNAL(clicked(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); connect(ui_.calendarWidget_, SIGNAL(activated(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); @@ -73,6 +74,7 @@ QtHistoryWindow::~QtHistoryWindow() { disconnect(conversation_, SIGNAL(scrollReachedTop()), this, SLOT(handleScrollReachedTop())); disconnect(conversation_, SIGNAL(scrollReachedBottom()), this, SLOT(handleScrollReachedBottom())); disconnect(conversation_, SIGNAL(fontResized(int)), this, SLOT(handleFontResized(int))); + disconnect(conversation_, SIGNAL(contentSizeChanged()), this, SLOT(handleContentSizeChanged())); disconnect(ui_.searchBox_->lineEdit(), SIGNAL(returnPressed()), this, SLOT(handleReturnPressed())); disconnect(ui_.calendarWidget_, SIGNAL(clicked(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); disconnect(ui_.calendarWidget_, SIGNAL(activated(const QDate&)), this, SLOT(handleCalendarClicked(const QDate&))); @@ -233,4 +235,8 @@ boost::gregorian::date QtHistoryWindow::getLastVisibleDate() { return boost::gregorian::date(boost::gregorian::not_a_date_time); } +void QtHistoryWindow::handleContentSizeChanged() { + conversation_->findText(ui_.searchBox_->lineEdit()->text(), QWebPage::HighlightAllOccurrences); +} + } |
Swift