Commit 9068d74c authored by Pino Toscano's avatar Pino Toscano

QFrame -> QWidget

Migrate mSearchFrame from QFrame to QWidget, since it does not use any
of what QFrame provides over QWidget; also change its name, since it is
not a frame anymore.
parent b8e8cf2b
......@@ -77,19 +77,19 @@ Navigator::Navigator( View *view, QWidget *parent )
QBoxLayout *topLayout = new QVBoxLayout( this );
mSearchFrame = new QFrame( this );
topLayout->addWidget( mSearchFrame );
mSearchLineEditWidget = new QWidget( this );
topLayout->addWidget( mSearchLineEditWidget );
QBoxLayout *searchLayout = new QHBoxLayout( mSearchFrame );
QBoxLayout *searchLayout = new QHBoxLayout( mSearchLineEditWidget );
searchLayout->setMargin( 6 );
mSearchEdit = new KLineEdit( mSearchFrame );
mSearchEdit = new KLineEdit( mSearchLineEditWidget );
mSearchEdit->setClearButtonShown(true);
searchLayout->addWidget( mSearchEdit );
connect(mSearchEdit, &KLineEdit::returnPressed, this, &Navigator::slotSearch);
connect(mSearchEdit, &KLineEdit::textChanged, this, &Navigator::checkSearchButton);
mSearchButton = new QPushButton( i18n("&Search"), mSearchFrame );
mSearchButton = new QPushButton( i18n("&Search"), mSearchLineEditWidget );
searchLayout->addWidget( mSearchButton );
connect(mSearchButton, &QPushButton::clicked, this, &Navigator::slotSearch);
......@@ -545,7 +545,7 @@ void Navigator::checkSearchButton()
void Navigator::hideSearch()
{
mSearchFrame->hide();
mSearchLineEditWidget->hide();
mTabWidget->removeTab( mTabWidget->indexOf( mSearchWidget ) );
}
......
......@@ -118,7 +118,7 @@ class Navigator : public QWidget
QTabWidget *mTabWidget;
QFrame *mSearchFrame;
QWidget *mSearchLineEditWidget;
KLineEdit *mSearchEdit;
QPushButton *mSearchButton;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment