| Summary: | kaddressbook crashes while adding a picture to a contact | ||
|---|---|---|---|
| Product: | [Unmaintained] kab3 | Reporter: | Sergio Martins <smartins> |
| Component: | general | Assignee: | Tobias Koenig <tokoe> |
| Status: | RESOLVED UNMAINTAINED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Gentoo Packages | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Where you must go to reproduce the bug | ||
|
Description
Sergio Martins
2007-02-07 00:58:35 UTC
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. |