[Bug 71532] Reinvoking grep function should set focus to dialog if already open

Harald Fernengel harry at kdevelop.org
Fri Jan 2 17:53:04 UTC 2004


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=71532     
harry at kdevelop.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From harry at kdevelop.org  2004-01-02 17:52 -------
Subject: kdevelop/parts/grepview

CVS commit by harald: 

if you lose this non-modal dialog somewhere behind your main window, make sure
it is brought to front when the action is called again.

CCMAIL: 71532-done at bugs.kde.org


  M +10 -0     grepdlg.cpp   1.23
  M +1 -5      grepdlg.h   1.6


--- kdevelop/parts/grepview/grepdlg.cpp  #1.22:1.23
@@ -276,3 +276,13 @@ void GrepDialog::slotSearchClicked()
 }
 
+void GrepDialog::show()
+{
+    // not beautiful, but works with all window
+    // managers and Qt versions
+    if (isVisible())
+        QDialog::hide();
+    QDialog::show();
+    pattern_combo->setFocus();
+}
+
 #include "grepdlg.moc"

--- kdevelop/parts/grepview/grepdlg.h  #1.5:1.6
@@ -49,9 +49,5 @@ public:
     bool recursiveFlag() const
         { return recursive_box->isChecked(); }
-    void show()
-    {
-        pattern_combo->setFocus();
-        QDialog::show();
-    }
+    void show();
 
 #ifdef IGNORE_SCM_DIRS




More information about the KDevelop-devel mailing list