Bug 90334 - kdevassistant keeps restarting itself
Summary: kdevassistant keeps restarting itself
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-27 18:22 UTC by illogic-al
Modified: 2004-10-17 06:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description illogic-al 2004-09-27 18:22:10 UTC
Version:           3.1.0 (using KDE 3.3.0, compiled sources)
Compiler:          gcc version 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)
OS:                Linux (i686) release 2.6.7-1.mm.6mdkcustom

I'm using KDE 3.3.0 and Kdevelop compiled from source and whenever running kdevassistant (documentation viewer) from either the menu or the console the programs keeps on spawning new instances of itself.

The problem goes away if the line
UseAssistant=true
is removed from the file ~/.kde/share/config/kdevassistantrc
Comment 1 illogic-al 2004-10-16 16:28:56 UTC
still appears in 3.1.1. effectively making kdevassistant useless.
Comment 2 Anne-Marie Mahfouf 2004-10-17 04:32:23 UTC
I confirm (kdevelop cvs HEAD 14 October 2004)
rm kdevassistantrc
open kdevassitant
Go to Search view
Then in Settings -> Configure -> Documention -> Other
check the box:  [x] Use Kdevelop Assistant To Browse Documentation, click OK
Quit KDevAssistant
Restart it: multiple instances pop up until you kdekillall kdevassistant
Comment 3 illogic-al 2004-10-17 04:46:30 UTC
more info. 
It LastPage=3 and UseAssistant=true need to both be in the kdeassistantrc it seems. 
Actually anything except 0 will do here. I think "lastpage" is the documentation tab pages
0 = default
1 = index
2 = finder
etc, etc
Comment 4 Jens Dagerbo 2004-10-17 06:21:31 UTC
CVS commit by dagerbo: 

Fix the forkbomb created by KDevAssistant  when it was told to use
KDevAssistant to remotely open documentation...

CCBUG: 90334


  M +6 -0      docglobalconfigwidget.cpp   1.10
  M +6 -0      documentation_part.cpp   1.23


--- kdevelop/parts/documentation/docglobalconfigwidget.cpp  #1.9:1.10
@@ -100,4 +100,10 @@ DocGlobalConfigWidget::DocGlobalConfigWi
     
     useAssistant_box->setChecked(m_part->isAssistantUsed());
+        
+        // Having app-specific settings isn't pretty, but this setting is nonsensical in kdevassistant
+        if ( kapp->instanceName().find("kdevassistant") != -1 )
+        {
+                useAssistant_box->hide();
+        }
 }
 

--- kdevelop/parts/documentation/documentation_part.cpp  #1.22:1.23
@@ -591,4 +591,10 @@ QCString DocumentationPart::startAssista
 bool DocumentationPart::isAssistantUsed() const
 {
+        // hack to solve BR #90334 - don't call kdevassistant via DCOP if we ARE kdevassistant
+        if ( kapp->instanceName().find("kdevassistant") != -1 )
+        {
+                return false;
+        }
+        
     return m_assistantUsed;
 }


Comment 5 illogic-al 2004-10-17 06:40:26 UTC
tested. it works. I dub thee fixed.