[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 116396] Quanta refuse to launch Gubed plugin
From:       Mantia Andras <amantia () kde ! org>
Date:       2005-11-15 10:52:15
Message-ID: 20051115105215.11519.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=116396         
amantia kde org changed:

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



------- Additional Comments From amantia kde org  2005-11-15 11:52 -------
I forgot to CC the bug here.

----------  Forwarded Message  ----------

Subject: branches/KDE/3.5/kdewebdev/quanta
Date: Tuesday 15 November 2005 12:48
From: Andras Mantia <amantia kde org>
To: kde-commits kde org

SVN commit 480512 by amantia:

Workaround for a failed dynamic_cast when loading a KParts-based
 plugin. Debugger plugins are now loaded and seem to work on SUSE 10 as
 well.

 M  +6 -1      components/debugger/debuggermanager.cpp
 M  +7 -1      project/projectprivate.cpp


---
 branches/KDE/3.5/kdewebdev/quanta/components/debugger/debuggermanager.
cpp #480511:480512  @ -96,7 +96,12  @
       if(Project::ref()->debuggerClient() == service->name())
       {
         int errCode = 0;
-        m_client =
 KParts::ComponentFactory::createInstanceFromService<DebuggerClient::De
buggerClient>(service, this, 0, QStringList(), &errCode); +//Workaround
 for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2 +//The
 correct way should be a simple:
+// m_client =
 KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(se
rvice, this, 0, QStringList(), &errCode); +        QObject* obj =
 KParts::ComponentFactory::createInstanceFromService<QObject>(service,
 this, 0, QStringList(), &errCode); +        if (obj &&
 obj->inherits("DebuggerClient"))
+          m_client = static_cast<DebuggerClient *>(obj);

         //kdDebug(24002) << service->name() << " (" << m_client << ")"
 << endl;

--- branches/KDE/3.5/kdewebdev/quanta/project/projectprivate.cpp
 #480511:480512  @ -1484,8 +1484,14  @
     KService::Ptr service = *iterDbg;
     if(m_debuggerClientEdit == service->name())
     {
+      DebuggerClient *dbg = dbg;
       int errCode = 0;
-      DebuggerClient::DebuggerClient* dbg =
 KParts::ComponentFactory::createInstanceFromService<DebuggerClient::De
buggerClient>(service, this, 0, QStringList(), &errCode); +//Workaround
 for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2 +//The
 correct way should be a simple:
+// DebuggerClient *dbg =
 KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(se
rvice, this, 0, QStringList(), &errCode); +      QObject* obj =
 KParts::ComponentFactory::createInstanceFromService<QObject>(service,
 this, 0, QStringList(), &errCode); +      if (obj &&
 obj->inherits("DebuggerClient"))
+        dbg = static_cast<DebuggerClient *>(obj);
       if (dbg)
       {
         QDomNode projectNode = m_sessionDom.firstChild().firstChild();

-------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic