~ubuntu-branches/debian/stretch/psi-plus/stretch

« back to all changes in this revision

Viewing changes to src/sxe/sxesession.cpp

  • Committer: Package Import Robot
  • Author(s): Boris Pek
  • Date: 2013-10-23 02:42:20 UTC
  • mfrom: (1.4.7)
  • Revision ID: package-import@ubuntu.com-20131023024220-bk2hyoenqkwfhpgw
Tags: 0.16.242-1
* New upstream release:
  fixed the problem of initialization of private conversation when both
  sides use libotr 4.0.x. (Closes: #724880)
* Update debian/watch: sources were moved.
* Delete psi-plus-content-downloader package and update all related files.
  This plugin is in psi-plus-plugins package now.
* Update debian/control:
  - remove all currently unneeded Replaces and Breaks fields
  - add build dependency on libidn11-dev
* Update debian/rules: simplify get-orig-source section.
* Update debian/copyright:
  - update Source field due to changes in sources location
  - remove copyright holders whose code was deleted from source tree
    (bundled libidn library was removed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 *
19
19
 */
20
 
 
 
20
 
21
21
#include "sxesession.h"
22
22
#include "sxemanager.h"
23
23
 
100
100
bool SxeSession::processSxe(const QDomElement &sxe, const QString &id) {
101
101
        // Don't accept duplicates
102
102
        if(!id.isEmpty() && usedSxeIds_.contains(id)) {
103
 
                qDebug() << QString("Tried to process a duplicate %1 (received: %2).").arg(sxe.attribute("id")).arg(usedSxeIds_.size()).toAscii();
 
103
                qDebug() << QString("Tried to process a duplicate %1 (received: %2).").arg(sxe.attribute("id")).arg(usedSxeIds_.size()).toLatin1();
104
104
                return false;
105
105
        }
106
106
 
622
622
                        if(children.item(i) != node) {
623
623
                                SxeRecord* siblingMeta = record(children.item(i));
624
624
                                if(siblingMeta && *meta < *siblingMeta) {
625
 
                                        // qDebug() << QString("%1 (pw: %2) is less than %3 (pw: %4)").arg(meta->name()).arg(meta->primaryWeight()).arg(siblingMeta->name()).arg(siblingMeta->primaryWeight()).toAscii();
 
625
                                        // qDebug() << QString("%1 (pw: %2) is less than %3 (pw: %4)").arg(meta->name()).arg(meta->primaryWeight()).arg(siblingMeta->name()).arg(siblingMeta->primaryWeight()).toLatin1();
626
626
                                        before = children.item(i);
627
627
                                        insertLast = false;
628
628
                                        break;
632
632
        }
633
633
 
634
634
        if(insertLast) {
635
 
                // qDebug() << QString("Repositioning '%1' (pw: %2) as last.").arg(node.nodeName()).arg(meta->primaryWeight()).toAscii();
 
635
                // qDebug() << QString("Repositioning '%1' (pw: %2) as last.").arg(node.nodeName()).arg(meta->primaryWeight()).toLatin1();
636
636
                parentNode.appendChild(node);
637
637
        } else {
638
 
                // qDebug() << QString("Repositioning '%1' (pw: %2) before '%3' (pw: %4).").arg(node.nodeName()).arg(meta->primaryWeight()).arg(before.nodeName()).arg(record(before)->primaryWeight()).toAscii();
 
638
                // qDebug() << QString("Repositioning '%1' (pw: %2) before '%3' (pw: %4).").arg(node.nodeName()).arg(meta->primaryWeight()).arg(before.nodeName()).arg(record(before)->primaryWeight()).toLatin1();
639
639
                parentNode.insertBefore(node, before);
640
640
        }
641
641
}
708
708
 
709
709
SxeRecord* SxeSession::createRecord(const QString &id) {
710
710
        if(recordByNodeId_.contains(id)) {
711
 
                qDebug() << QString("record by id '%1' already exists.").arg(id).toAscii();
 
711
                qDebug() << QString("record by id '%1' already exists.").arg(id).toLatin1();
712
712
                return NULL;
713
713
        }
714
714
 
742
742
 
743
743
        // go through all the SxeRecord's
744
744
        foreach(SxeRecord* meta, recordByNodeId_.values()) {
745
 
                // qDebug() << QString("id: %1").arg(meta->rid()).toAscii();
 
745
                // qDebug() << QString("id: %1").arg(meta->rid()).toLatin1();
746
746
                if(node == meta->node())
747
747
                        return meta;
748
748
        }