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

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/kaddressbook
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2007-02-09 17:53:27
Message-ID: 1171043607.907810.721.nullmailer () svn ! kde ! org
[Download RAW message or body]

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;
 };
 
 /**


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

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