소스 검색

Small changes in text find

Kandrashin Denis 12 년 전
부모
커밋
b847178469
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 2
      fb2edit.pro
  2. 3 1
      source/fb2dlgs.cpp

+ 1 - 2
fb2edit.pro

@@ -65,5 +65,4 @@ if (unix) {
 }
 
 FORMS += \
-    source/fb2find.ui \
-    ../untitled.ui
+    source/fb2find.ui

+ 3 - 1
source/fb2dlgs.cpp

@@ -53,6 +53,7 @@ FbTextFindDlg::FbTextFindDlg(FbTextEdit &edit)
     , m_edit(edit)
 {
     ui->setupUi(this);
+    ui->checkHigh->hide();
     connect(ui->btnFind, SIGNAL(clicked()), this, SLOT(find()));
 }
 
@@ -69,8 +70,9 @@ void FbTextFindDlg::find()
     QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
     if (ui->radioUp->isChecked()) options |= QWebPage::FindBackward;
     if (ui->checkCase->isChecked()) options |= QWebPage::FindCaseSensitively;
-    if (ui->checkHigh->isChecked()) options |= QWebPage::HighlightAllOccurrences;
+    m_edit.findText(text, options);
 
+    options |= QWebPage::HighlightAllOccurrences;
     m_edit.findText(text, options);
 }