Summary: | Quanta crash for each load of existing project | ||
---|---|---|---|
Product: | quanta | Reporter: | Grégory Ranchy <granchy> |
Component: | general | Assignee: | András Manţia <amantia> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Grégory Ranchy
2005-12-19 17:28:21 UTC
SVN commit 490250 by amantia: Fix crash in recent files action by not exposing the internal KURL objects to the caller application. For the reporter: this means that the bug will disappear only if you upgrade kdelibs from the 3.5 branch or wait for KDE 3.5.1. BUG: 118652 M +3 -4 kactionclasses.cpp --- branches/KDE/3.5/kdelibs/kdeui/kactionclasses.cpp #490249:490250 @@ -1103,7 +1103,6 @@ { if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/")) return; - const KURL u = url; // make a copy since d->m_urls.erase( title ) could destroy the KURL that "url" references const QString file = url.pathOrURL(); QStringList lst = KSelectAction::items(); @@ -1133,7 +1132,7 @@ // add file to list const QString title = name + " [" + file + "]"; d->m_shortNames.insert( title, name ); - d->m_urls.insert( title, u ); + d->m_urls.insert( title, url ); lst.prepend( title ); setItems( lst ); } @@ -1236,13 +1235,13 @@ void KRecentFilesAction::itemSelected( const QString& text ) { - emit urlSelected( d->m_urls[ text ] ); + emit urlSelected( KURL(d->m_urls[ text ]) ); //return a copy of the URL since the slot where it is connected might call addURL or removeURL where the d->m_urls.erase( title ) could destroy the d->m_urls[ text ] and the emitted URL will be invalid in the rest of the slot } void KRecentFilesAction::menuItemActivated( int id ) { QString text = d->m_popup->text(id); - emit urlSelected( d->m_urls[ text ] ); + emit urlSelected( KURL(d->m_urls[ text ]) );//return a copy of the URL since the slot where it is connected might call addURL or removeURL where the d->m_urls.erase( title ) could destroy the d->m_urls[ text ] and the emitted URL will be invalid in the rest of the slot } void KRecentFilesAction::menuAboutToShow() |