~ubuntu-branches/ubuntu/saucy/kopete/saucy-updates

« back to all changes in this revision

Viewing changes to plugins/history2/history2import.cpp

  • Committer: Package Import Robot
  • Author(s): Howard Chan, Michał Zając, Howard Chan
  • Date: 2013-06-28 18:19:57 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20130628181957-oe71prbd9qv1ygop
Tags: 4:4.10.90-0ubuntu1
[ Michał Zając ]
* New upstream beta release

[ Howard Chan ]
* Delete the API patch since it's included in upstream now.
* Fix control file to make -dbg depend on main package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
488
488
 
489
489
        // this is to collect unknown nicknames (the list stores the index in log->messages of the messages that used the nickname)
490
490
        // the bool says if that nickname is incoming (only used when the list is empty)
491
 
        QHash<QString, QPair<bool, QList<int> > > nicknames;
 
491
        typedef QHash<QString, QPair<bool, QList<int> > > NickNameHash;
 
492
        NickNameHash nicknames;
492
493
 
493
494
        QTextStream str(&file);
494
495
        // utf-8 seems to be default for pidgins-txt logs
543
544
                log->messages.append(message);
544
545
 
545
546
                // check if we can guess which nickname belongs to us
546
 
                QHash<QString, QPair<bool, QList<int> > >::iterator itr;
547
 
                QHash<QString, QPair<bool, QList<int> > >::const_iterator itr2;
 
547
                NickNameHash::iterator itr;
 
548
                NickNameHash::const_iterator itr2;
548
549
                for (itr = nicknames.begin(); itr != nicknames.end(); ++itr) {
549
550
                        if (itr->second.isEmpty()) // no work for this one
550
551
                                continue;
551
552
                        bool haveAnother = false, lastIncoming = false;
552
553
                        // check against all other nicknames
553
554
                        for (itr2 = nicknames.constBegin(); itr2 != nicknames.constEnd(); ++itr2) {
554
 
                                if (itr2 == itr) // skip ourselve
 
555
                                if (itr2 == NickNameHash::const_iterator(itr)) // skip ourselve
555
556
                                        continue;
556
557
                                // if there is another unknown nickname, we have no chance to guess which is our
557
558
                                if (!itr2->second.isEmpty())