Version: (using KDE KDE 3.5.6) Installed from: Gentoo Packages OS: Linux Edit a contact, go to "Misc" tab, click the photo button, choose an image from the file selector See: http://img390.imageshack.us/img390/1092/38734412nt3.png Now, press button 1 then button 2 and kaddressbook crashes. If you can't reproduce the bug i'll post a backtrace.
Created attachment 19573 [details] Where you must go to reproduce the bug
SVN commit 631989 by tokoe: Give the KPixmapSelectorDialog a real parent to make modular dialog working... BUG:141305 M +6 -6 imagewidget.cpp M +2 -1 imagewidget.h --- branches/KDE/3.5/kdepim/kaddressbook/imagewidget.cpp #631988:631989 @@ -47,8 +47,8 @@ #include "imagewidget.h" -ImageLoader::ImageLoader() - : QObject( 0, "ImageLoader" ) +ImageLoader::ImageLoader( QWidget *parent ) + : QObject( 0, "ImageLoader" ), mParent( parent ) { } @@ -67,7 +67,7 @@ image.load( url.path() ); picture.setData( image ); (*ok) = true; - } else if ( KIO::NetAccess::download( url, tempFile, 0 ) ) { + } else if ( KIO::NetAccess::download( url, tempFile, mParent ) ) { image.load( tempFile ); picture.setData( image ); (*ok) = true; @@ -76,13 +76,13 @@ if ( !(*ok) ) { // image does not exist (any more) - KMessageBox::sorry( 0, i18n( "This contact's image cannot be found." ) ); + KMessageBox::sorry( mParent, i18n( "This contact's image cannot be found." ) ); return picture; } QPixmap pixmap = picture.data(); - QPixmap selectedPixmap = KPIM::KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 100, 140, 0 ); + QPixmap selectedPixmap = KPIM::KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 100, 140, mParent ); if ( selectedPixmap.isNull() ) { (*ok) = false; return picture; @@ -248,7 +248,7 @@ QWidget *parent, const char *name ) : QWidget( parent, name ), mReadOnly( false ) { - mImageLoader = new ImageLoader(); + mImageLoader = new ImageLoader( this ); QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); --- branches/KDE/3.5/kdepim/kaddressbook/imagewidget.h #631988:631989 @@ -40,12 +40,13 @@ Q_OBJECT public: - ImageLoader(); + ImageLoader( QWidget *parent ); KABC::Picture loadPicture( const KURL &url, bool *ok ); private: KABC::Picture mPicture; + QWidget *mParent; }; /**
The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product.