~ubuntu-branches/ubuntu/hardy/kdenetwork-kde4/hardy-backports

« back to all changes in this revision

Viewing changes to kopete/protocols/msn/msncontact.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-03-03 11:37:32 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080303113732-nqcrcv9eu0t6s899
Tags: 4:4.0.2-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
#include <qcheckbox.h>
25
25
#include <QList>
 
26
#include <QImageReader>
26
27
 
27
28
#undef KDE_NO_COMPAT
28
29
#include <kaction.h>
689
690
        entry.name = contactId();
690
691
        entry.category = Kopete::AvatarManager::Contact;
691
692
        entry.contact = this;
692
 
        entry.image = QImage(f->fileName());
 
693
 
 
694
        f->open();
 
695
        entry.image = QImageReader(f).read();
 
696
        f->close();
693
697
 
694
698
        entry = Kopete::AvatarManager::self()->add(entry);
695
699
 
713
717
        removeProperty( Kopete::Global::Properties::self()->photo()  ) ;
714
718
        emit displayPictureChanged();
715
719
 
716
 
        KConfigGroup config(KGlobal::config(), "MSN");
717
 
        if ( config.readEntry( "DownloadPicture", 2 ) >= 2 && !obj.isEmpty()
 
720
    KConfigGroup *config=account()->configGroup();
 
721
        if ( config->readEntry( "DownloadPicture", 2 ) >= 2 && !obj.isEmpty()
718
722
                         && account()->myself()->onlineStatus().status() != Kopete::OnlineStatus::Invisible )
719
723
                manager(Kopete::Contact::CanCreate); //create the manager which will download the photo automatically.
720
724
}