mirror of
https://github.com/fwbuilder/fwbuilder
synced 2026-09-13 16:39:48 +02:00
fixed #1755 "hitting enter after editing search attribute in the
Find panel should trigger search"
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
2010-09-30 Vadim Kurland <vadim@vk.crocodile.org>
|
2010-09-30 Vadim Kurland <vadim@vk.crocodile.org>
|
||||||
|
|
||||||
|
* FindObjectWidget.cpp (keyPressEvent): fixed #1755 "hitting enter
|
||||||
|
after editing search attribute in the Find panel should trigger
|
||||||
|
search"
|
||||||
|
|
||||||
* FindObjectWidget.cpp (matchAttr): fixed #1760 'Search by
|
* FindObjectWidget.cpp (matchAttr): fixed #1760 'Search by
|
||||||
attribute "name" should search by name or label'.
|
attribute "name" should search by name or label'.
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,18 @@ FindObjectWidget::FindObjectWidget(QWidget*p, ProjectPanel *pp,
|
|||||||
tr("Drop object for replacement here"));
|
tr("Drop object for replacement here"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FindObjectWidget::keyPressEvent( QKeyEvent* ev )
|
||||||
|
{
|
||||||
|
if (ev->key()==Qt::Key_Enter || ev->key()==Qt::Key_Return)
|
||||||
|
{
|
||||||
|
if (fwbdebug)
|
||||||
|
qDebug() << "FindObjectWidget::keyPressEvent Qt::Key_Enter";
|
||||||
|
ev->accept();
|
||||||
|
find();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FindObjectWidget::findObject(FWObject *o)
|
void FindObjectWidget::findObject(FWObject *o)
|
||||||
{
|
{
|
||||||
if (fwbdebug) qDebug("FindObjectWidget::findObject");
|
if (fwbdebug) qDebug("FindObjectWidget::findObject");
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ private:
|
|||||||
bool matchAttr(libfwbuilder::FWObject* obj);
|
bool matchAttr(libfwbuilder::FWObject* obj);
|
||||||
bool validateReplaceObject();
|
bool validateReplaceObject();
|
||||||
bool inSelectedFirewall( libfwbuilder::RuleElement* r);
|
bool inSelectedFirewall( libfwbuilder::RuleElement* r);
|
||||||
|
|
||||||
|
virtual void keyPressEvent( QKeyEvent* ev );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Ui::findObjectWidget_q *m_widget;
|
Ui::findObjectWidget_q *m_widget;
|
||||||
|
|||||||
@@ -640,6 +640,8 @@ void ObjectTreeView::keyPressEvent( QKeyEvent* ev )
|
|||||||
{
|
{
|
||||||
if (ev->key()==Qt::Key_Enter || ev->key()==Qt::Key_Return)
|
if (ev->key()==Qt::Key_Enter || ev->key()==Qt::Key_Return)
|
||||||
{
|
{
|
||||||
|
if (fwbdebug)
|
||||||
|
qDebug() << "ObjectTreeView::keyPressEvent Qt::Key_Enter";
|
||||||
editCurrentObject();
|
editCurrentObject();
|
||||||
ev->accept();
|
ev->accept();
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -201,6 +201,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Find Next</string>
|
<string>Find Next</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="autoDefault">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="default">
|
<property name="default">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -299,6 +299,14 @@
|
|||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<p>
|
||||||
|
fixed #1755 "hitting enter after editing search attribute in the
|
||||||
|
Find panel should trigger search"
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user