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

List:       kde-bugs-dist
Subject:    [Bug 197343] Amarok crashed when setting custom album cover
From:       Nikolaj Hald Nielsen <nhn () kde ! org>
Date:       2010-03-09 11:27:38
Message-ID: 20100309112739.082F6355A3 () immanuel ! kde ! org
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=197343


Nikolaj Hald Nielsen <nhn@kde.org> changed:

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




--- Comment #72 from Nikolaj Hald Nielsen <nhn kde org>  2010-03-09 12:27:25 ---
commit 4b046b44de3b5ebf86670dedda6d3230ac7a2cfc
Author: Nikolaj Hald Nielsen <nhn@kde.org>
Date:   Tue Mar 9 12:22:55 2010 +0100

    Fix crash when attempting to set a custom album cover while nepomuk is
enabled on the system.

    Thanks to trueg <trueg@kde.org> for the patch.
    Please test this as I could not reproduce the crash locally.
    BUG: 197343

diff --git a/src/covermanager/CoverFetchingActions.cpp
b/src/covermanager/CoverFetchingActions.cpp
index ae22e0b..885b5da 100644
--- a/src/covermanager/CoverFetchingActions.cpp
+++ b/src/covermanager/CoverFetchingActions.cpp
@@ -155,9 +155,10 @@ SetCustomCoverAction::slotTriggered()
     dlg.setCaption( i18n("Select Cover Image File") );
     dlg.setInlinePreviewShown( true );

-    KFileWidget *fileWidget = dynamic_cast<KFileWidget*>( dlg.fileWidget() );
-    KDirLister *dirLister = fileWidget->dirOperator()->dirLister();
-    dirLister->setAutoErrorHandlingEnabled( false, qobject_cast<QWidget*>(
parent() ) );
+    // trueg: there could be another implementation of the file module which
does not use KFileWidget!
+    if ( KFileWidget *fileWidget = dynamic_cast<KFileWidget*>(
dlg.fileWidget() ) )
+        if ( KDirLister *dirLister = fileWidget->dirOperator()->dirLister() )
+            dirLister->setAutoErrorHandlingEnabled( false,
qobject_cast<QWidget*>( parent() ) );

     dlg.exec();
     KUrl file = dlg.selectedUrl();

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

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