[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/protocols/msn
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2005-02-02 17:11:38
Message-ID: 20050202171138.14CF31CE9E () office ! kde ! org
[Download RAW message or body]
CVS commit by ogoffart:
Don't emit the "photoChanged" signal before the photo is fully moved to this location
M +12 -5 msncontact.cpp 1.182
M +3 -2 msncontact.h 1.112
--- kdenetwork/kopete/protocols/msn/msncontact.cpp #1.181:1.182
@@ -5,7 +5,7 @@
Copyright (c) 2002 by Ryan Cumming <bodnar42@phalynx.dhs.org>
Copyright (c) 2002-2003 by Martijn Klingens <klingens@kde.org>
- Copyright (c) 2002-2004 by Olivier Goffart <ogoffart@tiscalinet.be>
+ Copyright (c) 2002-2005 by Olivier Goffart <ogoffart at kde.org>
- Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
+ Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
*************************************************************************
@@ -608,11 +608,18 @@ void MSNContact::setDisplayPicture(KTemp
QString newlocation=locateLocal( "appdata", "msnpictures/"+ \
contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ;
- KIO::file_move( KURL::fromPathOrURL( f->name() ) , KURL::fromPathOrURL( \
newlocation ) , -1, true /*overwrite*/ , false /*resume*/ , false \
/*showProgressInfo*/ ); + KIO::Job *j=KIO::file_move( KURL::fromPathOrURL( \
f->name() ) , KURL::fromPathOrURL( newlocation ) , -1, true /*overwrite*/ , false \
/*resume*/ , false /*showProgressInfo*/ ); +
f->setAutoDelete(false);
delete f;
- setProperty( Kopete::Global::Properties::self()->photo() , newlocation );
+ //let the time to KIO to copy the file
+ connect(j, SIGNAL(result(KIO::Job *)) , this, \
SLOT(slotEmitDisplayPictureChanged() )); +}
- QTimer::singleShot( 100 , this, SIGNAL(displayPictureChanged()) ); //let the \
time to KIO to copy the file +void MSNContact::slotEmitDisplayPictureChanged()
+{
+ QString newlocation=locateLocal( "appdata", "msnpictures/"+ \
contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; + setProperty( \
Kopete::Global::Properties::self()->photo() , newlocation ); + emit \
displayPictureChanged(); }
--- kdenetwork/kopete/protocols/msn/msncontact.h #1.111:1.112
@@ -5,7 +5,7 @@
Copyright (c) 2002 by Ryan Cumming <bodnar42@phalynx.dhs.org>
Copyright (c) 2002 by Martijn Klingens <klingens@kde.org>
- Copyright (c) 2002-2004 by Olivier Goffart <ogoffart@tiscalinet.be>
+ Copyright (c) 2002-2005 by Olivier Goffart <ogoffart at kde.org>
- Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
+ Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
@@ -143,4 +143,5 @@ private slots:
void slotShowProfile();
void slotSendMail();
+ void slotEmitDisplayPictureChanged();
/**
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic