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

List:       kde-panel-devel
Subject:    [Panel-devel] Launcher applet makes plasma crashing
From:       "Ismael Asensio" <caciquecola500 () gmail ! com>
Date:       2007-11-29 0:21:02
Message-ID: 80c786080711281621y6994dbe9v853b1532f075e8b3 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi all! I've been trying the kde 4 for a week now, and I've found a bug that
makes plasma totally crash.

I can reproduce it by dragging any file (from dolphin or any other app, as
well as kde3 konqueror, for instance) to the plasma desktop. By following
the backtrack (attached), I've found that it's related to the launcher
applet where probably, the init() function in url.cpp is called AFTER
calling setUrl, and thus, the m_icon field is empty at that moment.
Simply adding a launcher applet from the applet selector causes no bug.

I've repared it by means of the following patch, but it is for sure a pretty
hackish way. I'm attaching it anyway.

BTW, I am totally new to kde4 and plasma development, but I'd like to help
by solving little issues like this or any other stuff as far as I'm able to.
Is there any bug database to track svn bugs or jobs? I'm aware of kde-krush
saturdays, but it is not usually a good date for me :p. Thank you for all
the amount of awesome work, and sorry if the list is not the place for this
kind of message (instead of any wiki, bug tracker, or so)

Cheers!

[Attachment #5 (text/html)]

Hi all! I&#39;ve been trying the kde 4 for a week now, and I&#39;ve found a bug that \
makes plasma totally crash.<br><br>I can reproduce it by dragging any file (from \
dolphin or any other app, as well as kde3 konqueror, for instance) to the plasma \
desktop. By following the backtrack (attached), I&#39;ve found that it&#39;s related \
to the launcher applet where probably, the init() function in  url.cpp is called \
AFTER calling setUrl, and thus, the m_icon field is empty at that moment. <br>Simply \
adding a launcher applet from the applet selector causes no bug.<br><br>I&#39;ve \
repared it by means of the following patch, but it is for sure a pretty hackish way. \
I&#39;m attaching it anyway.<br><br>BTW, I am totally new to kde4 and plasma \
development, but I&#39;d like to help by solving little issues like this or any other \
stuff as far as I&#39;m able to. Is there any bug database to track svn bugs or jobs? \
I&#39;m aware of kde-krush saturdays, but it is not usually a good date for me :p. \
Thank you for all the amount of awesome work, and sorry if the list is not the place \
for this kind of message (instead of any wiki, bug tracker, or so) \
<br><br>Cheers!<br><br>


["launcher_bug_crashing.diff" (text/plain)]

Index: url.cpp
===================================================================
--- url.cpp	(revisión: 742818)
+++ url.cpp	(copia de trabajo)
@@ -51,15 +51,17 @@
     KConfigGroup cg = config();
     int size = globalConfig().readEntry("IconSize", IconSize(KIconLoader::Desktop));
     size = cg.readEntry("IconSize", size);
-
-    new Plasma::HBoxLayout(this);
-    m_icon = new Plasma::Icon(this),
-    connect(m_icon, SIGNAL(clicked()), this, SLOT(openUrl()));
-    m_icon->setIconSize(size, size);
-    if (m_url.isEmpty()) {
-        setUrl(cg.readEntry("Url"));
+    
+    if (!m_icon) {
+      new Plasma::HBoxLayout(this);
+      m_icon = new Plasma::Icon(this);
+      connect(m_icon, SIGNAL(clicked()), this, SLOT(openUrl()));
+      m_icon->setIconSize(size, size);
+      if (m_url.isEmpty()) {
+	  setUrl(cg.readEntry("Url"));
+      }
+      resize(m_icon->sizeHint());
     }
-    resize(m_icon->sizeHint());
 }
 
 Url::~Url()
@@ -85,10 +87,14 @@
 
     KMimeType::Ptr mime = KMimeType::findByUrl(url);
     m_mimetype = mime->name();
+    if (!m_icon) {
+	init();
+    }
+
     m_icon->setIcon(KMimeType::iconNameForUrl(url));
-
+    
     if (m_icon->icon().isNull()) {
-        m_icon->setIcon("unknown");
+	m_icon->setIcon("unknown");
     }
 }
 

["launcher_error_backtrace" (application/octet-stream)]

_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


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

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