From f6b540e14072d9cfcd5f4a787dcd9039fae7011b Mon Sep 17 00:00:00 2001 From: llornkcor Date: Tue, 19 Mar 2002 13:29:51 +0000 Subject: searchbar was being shown when text opened from setDocument --- (limited to 'core/apps/textedit') diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index f56d5d3..1a1b186 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -373,7 +373,6 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) searchBar->hide(); - editor = new QpeEditor( this ); setCentralWidget( editor ); editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); @@ -521,10 +520,15 @@ void TextEdit::fileOpen() edited=FALSE; if(caption().left(1)=="*") setCaption(caption().right(caption().length()-1)); + doSearchBar(); +} + +void TextEdit::doSearchBar() +{ Config cfg("TextEdit"); cfg.setGroup("View"); if(cfg.readEntry("SearchBar","Closed") != "Opened") - searchBar->hide(); + searchBar->hide(); } #if 0 @@ -849,6 +853,7 @@ void TextEdit::setDocument(const QString& fileref) editor->setEdited(TRUE); edited1=FALSE; edited=TRUE; + doSearchBar(); } void TextEdit::closeEvent( QCloseEvent *e ) diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h index a70b581..70cf068 100644 --- a/core/apps/textedit/textedit.h +++ b/core/apps/textedit/textedit.h @@ -61,7 +61,7 @@ public slots: protected: void closeEvent( QCloseEvent *e ); - + void doSearchBar(); private slots: void setDocument(const QString&); void changeFont(); -- cgit v0.9.0.2