Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 414151
Collapse All | Expand All

(-)rosegarden-11.11.42.orig/src/base/Overlaps.h (-3 / +3 lines)
Lines 65-79 Link Here
65
        timeT segEnd = (*i)->getEndMarkerTime();
65
        timeT segEnd = (*i)->getEndMarkerTime();
66
66
67
        // Start and ends of segments always are range limits
67
        // Start and ends of segments always are range limits
68
        insert(std::pair<timeT, OverlapRange<T> >(segStart, range));
68
        this->insert(std::pair<timeT, OverlapRange<T> >(segStart, range));
69
        insert(std::pair<timeT, OverlapRange<T> >(segEnd, range));
69
        this->insert(std::pair<timeT, OverlapRange<T> >(segEnd, range));
70
70
71
        timeT currentTime, propertyTime;
71
        timeT currentTime, propertyTime;
72
        currentTime = segStart;
72
        currentTime = segStart;
73
        for (;;) {
73
        for (;;) {
74
            bool fnd = getNextPropertyTime((*i), currentTime, propertyTime);
74
            bool fnd = getNextPropertyTime((*i), currentTime, propertyTime);
75
            if (!fnd) break;
75
            if (!fnd) break;
76
            insert(std::pair<timeT, OverlapRange<T> >(propertyTime, range));
76
            this->insert(std::pair<timeT, OverlapRange<T> >(propertyTime, range));
77
            currentTime = propertyTime;
77
            currentTime = propertyTime;
78
        }
78
        }
79
    }
79
    }
(-)rosegarden-11.11.42.orig/src/base/Sets.h (-22 / +22 lines)
Lines 349-355 Link Here
349
    m_final = m_baseIterator;
349
    m_final = m_baseIterator;
350
    sample(m_baseIterator, true);
350
    sample(m_baseIterator, true);
351
351
352
    if (getAsEvent(m_baseIterator)->isa(Note::EventType)) {
352
    if (AbstractSet::getAsEvent(m_baseIterator)->isa(Note::EventType)) {
353
        m_initialNote = m_baseIterator;
353
        m_initialNote = m_baseIterator;
354
        m_finalNote = m_baseIterator;
354
        m_finalNote = m_baseIterator;
355
    }
355
    }
Lines 362-368 Link Here
362
    for (i = j = m_baseIterator; i != getContainer().begin() && test(--j); i = j){
362
    for (i = j = m_baseIterator; i != getContainer().begin() && test(--j); i = j){
363
        if (sample(j, false)) {
363
        if (sample(j, false)) {
364
            m_initial = j;
364
            m_initial = j;
365
            if (getAsEvent(j)->isa(Note::EventType)) {
365
            if (AbstractSet::getAsEvent(j)->isa(Note::EventType)) {
366
		m_initialNote = j;
366
		m_initialNote = j;
367
		if (m_finalNote == getContainer().end()) {
367
		if (m_finalNote == getContainer().end()) {
368
		    m_finalNote = j;
368
		    m_finalNote = j;
Lines 379-385 Link Here
379
    for (i = j = m_baseIterator; ++j != getContainer().end() && test(j); i = j) {
379
    for (i = j = m_baseIterator; ++j != getContainer().end() && test(j); i = j) {
380
        if (sample(j, true)) {
380
        if (sample(j, true)) {
381
            m_final = j;
381
            m_final = j;
382
            if (getAsEvent(j)->isa(Note::EventType)) {
382
            if (AbstractSet::getAsEvent(j)->isa(Note::EventType)) {
383
		m_finalNote = j;
383
		m_finalNote = j;
384
		if (m_initialNote == getContainer().end()) {
384
		if (m_initialNote == getContainer().end()) {
385
		    m_initialNote = j;
385
		    m_initialNote = j;
Lines 397-413 Link Here
397
AbstractSet<Element, Container>::sample(const Iterator &i, bool)
397
AbstractSet<Element, Container>::sample(const Iterator &i, bool)
398
{
398
{
399
    const Quantizer &q(getQuantizer());
399
    const Quantizer &q(getQuantizer());
400
    Event *e = getAsEvent(i);
400
    Event *e = AbstractSet::getAsEvent(i);
401
    timeT d(q.getQuantizedDuration(e));
401
    timeT d(q.getQuantizedDuration(e));
402
    
402
    
403
    if (e->isa(Note::EventType) || d > 0) {
403
    if (e->isa(Note::EventType) || d > 0) {
404
        if (m_longest == getContainer().end() ||
404
        if (m_longest == getContainer().end() ||
405
            d > q.getQuantizedDuration(getAsEvent(m_longest))) {
405
            d > q.getQuantizedDuration(AbstractSet::getAsEvent(m_longest))) {
406
//          std::cerr << "New longest in set at duration " << d << " and time " << e->getAbsoluteTime() << std::endl;
406
//          std::cerr << "New longest in set at duration " << d << " and time " << e->getAbsoluteTime() << std::endl;
407
            m_longest = i;
407
            m_longest = i;
408
        }
408
        }
409
        if (m_shortest == getContainer().end() ||
409
        if (m_shortest == getContainer().end() ||
410
            d < q.getQuantizedDuration(getAsEvent(m_shortest))) {
410
            d < q.getQuantizedDuration(AbstractSet::getAsEvent(m_shortest))) {
411
//          std::cerr << "New shortest in set at duration " << d << " and time " << e->getAbsoluteTime() << std::endl;
411
//          std::cerr << "New shortest in set at duration " << d << " and time " << e->getAbsoluteTime() << std::endl;
412
            m_shortest = i;
412
            m_shortest = i;
413
        }
413
        }
Lines 417-428 Link Here
417
        long p = get__Int(e, BaseProperties::PITCH);
417
        long p = get__Int(e, BaseProperties::PITCH);
418
418
419
        if (m_highest == getContainer().end() ||
419
        if (m_highest == getContainer().end() ||
420
            p > get__Int(getAsEvent(m_highest), BaseProperties::PITCH)) {
420
            p > get__Int(AbstractSet::getAsEvent(m_highest), BaseProperties::PITCH)) {
421
//          std::cerr << "New highest in set at pitch " << p << " and time " << e->getAbsoluteTime() << std::endl;
421
//          std::cerr << "New highest in set at pitch " << p << " and time " << e->getAbsoluteTime() << std::endl;
422
            m_highest = i;
422
            m_highest = i;
423
        }
423
        }
424
        if (m_lowest == getContainer().end() ||
424
        if (m_lowest == getContainer().end() ||
425
            p < get__Int(getAsEvent(m_lowest), BaseProperties::PITCH)) {
425
            p < get__Int(AbstractSet::getAsEvent(m_lowest), BaseProperties::PITCH)) {
426
//          std::cerr << "New lowest in set at pitch " << p << " and time " << e->getAbsoluteTime() << std::endl;
426
//          std::cerr << "New lowest in set at pitch " << p << " and time " << e->getAbsoluteTime() << std::endl;
427
            m_lowest = i;
427
            m_lowest = i;
428
        }
428
        }
Lines 441-448 Link Here
441
                                                            PropertyName stemUpProperty) :
441
                                                            PropertyName stemUpProperty) :
442
    AbstractSet<Element, Container>(c, i, q),
442
    AbstractSet<Element, Container>(c, i, q),
443
    m_stemUpProperty(stemUpProperty),
443
    m_stemUpProperty(stemUpProperty),
444
    m_time(q->getQuantizedAbsoluteTime(getAsEvent(i))),
444
    m_time(q->getQuantizedAbsoluteTime(GenericChord::getAsEvent(i))),
445
    m_subordering(getAsEvent(i)->getSubOrdering()),
445
    m_subordering(GenericChord::getAsEvent(i)->getSubOrdering()),
446
    m_firstReject(c.end())
446
    m_firstReject(c.end())
447
{
447
{
448
    // initialise must be called in individual derived classes.  If we
448
    // initialise must be called in individual derived classes.  If we
Lines 471-477 Link Here
471
bool
471
bool
472
GenericChord<Element, Container, singleStaff>::test(const Iterator &i)
472
GenericChord<Element, Container, singleStaff>::test(const Iterator &i)
473
{
473
{
474
    Event *e = getAsEvent(i);
474
    Event *e = GenericChord::getAsEvent(i);
475
    if (AbstractSet<Element, Container>::
475
    if (AbstractSet<Element, Container>::
476
	getQuantizer().getQuantizedAbsoluteTime(e) != m_time) {
476
	getQuantizer().getQuantizedAbsoluteTime(e) != m_time) {
477
	return false;
477
	return false;
Lines 507-513 Link Here
507
GenericChord<Element, Container, singleStaff>::sample(const Iterator &i,
507
GenericChord<Element, Container, singleStaff>::sample(const Iterator &i,
508
                                                      bool goingForwards)
508
                                                      bool goingForwards)
509
{
509
{
510
    Event *e1 = getAsEvent(i);
510
    Event *e1 = GenericChord::getAsEvent(i);
511
    if (!e1->isa(Note::EventType)) {
511
    if (!e1->isa(Note::EventType)) {
512
        if (goingForwards && m_firstReject == AbstractSet<Element, Container>::getContainer().end()) m_firstReject = i;
512
        if (goingForwards && m_firstReject == AbstractSet<Element, Container>::getContainer().end()) m_firstReject = i;
513
        return false;
513
        return false;
Lines 527-533 Link Here
527
527
528
        if (AbstractSet<Element, Container>::m_baseIterator != AbstractSet<Element, Container>::getContainer().end()) {
528
        if (AbstractSet<Element, Container>::m_baseIterator != AbstractSet<Element, Container>::getContainer().end()) {
529
529
530
            Event *e0 = getAsEvent(AbstractSet<Element, Container>::m_baseIterator);
530
            Event *e0 = GenericChord::getAsEvent(AbstractSet<Element, Container>::m_baseIterator);
531
531
532
            if (!(m_stemUpProperty == PropertyName::EmptyPropertyName)) {
532
            if (!(m_stemUpProperty == PropertyName::EmptyPropertyName)) {
533
533
Lines 573-579 Link Here
573
    }
573
    }
574
574
575
    AbstractSet<Element, Container>::sample(i, goingForwards);
575
    AbstractSet<Element, Container>::sample(i, goingForwards);
576
    push_back(i);
576
    this->push_back(i);
577
    return true;
577
    return true;
578
}
578
}
579
579
Lines 615-621 Link Here
615
615
616
    for (unsigned int i = 0; i < std::vector<typename Container::iterator>::size(); ++i) {
616
    for (unsigned int i = 0; i < std::vector<typename Container::iterator>::size(); ++i) {
617
617
618
        Event *e = getAsEvent((*this)[i]);
618
        Event *e = GenericChord::getAsEvent((*this)[i]);
619
        std::vector<Mark> marks(Marks::getMarks(*e));
619
        std::vector<Mark> marks(Marks::getMarks(*e));
620
620
621
        for (std::vector<Mark>::iterator j = marks.begin(); j != marks.end(); ++j) {
621
        for (std::vector<Mark>::iterator j = marks.begin(); j != marks.end(); ++j) {
Lines 635-641 Link Here
635
635
636
    for (unsigned int i = 0; i < std::vector<typename Container::iterator>::size(); ++i) {
636
    for (unsigned int i = 0; i < std::vector<typename Container::iterator>::size(); ++i) {
637
637
638
        Event *e = getAsEvent((*this)[i]);
638
        Event *e = GenericChord::getAsEvent((*this)[i]);
639
        std::vector<Mark> marks(Marks::getMarks(*e));
639
        std::vector<Mark> marks(Marks::getMarks(*e));
640
640
641
641
Lines 662-670 Link Here
662
662
663
    for (typename std::vector<typename Container::iterator>::const_iterator
663
    for (typename std::vector<typename Container::iterator>::const_iterator
664
             i = std::vector<typename Container::iterator>::begin(); i != std::vector<typename Container::iterator>::end(); ++i) {
664
             i = std::vector<typename Container::iterator>::begin(); i != std::vector<typename Container::iterator>::end(); ++i) {
665
        if (getAsEvent(*i)->has(BaseProperties::PITCH)) {
665
        if (GenericChord::getAsEvent(*i)->has(BaseProperties::PITCH)) {
666
            int pitch = get__Int
666
            int pitch = get__Int
667
                (getAsEvent(*i), BaseProperties::PITCH);
667
                (GenericChord::getAsEvent(*i), BaseProperties::PITCH);
668
            if (pitches.size() > 0 && pitches[pitches.size()-1] == pitch) 
668
            if (pitches.size() > 0 && pitches[pitches.size()-1] == pitch) 
669
                continue;
669
                continue;
670
            pitches.push_back(pitch);
670
            pitches.push_back(pitch);
Lines 696-702 Link Here
696
    while (1) {
696
    while (1) {
697
        if (i == AbstractSet<Element, Container>::getContainer().begin()) return AbstractSet<Element, Container>::getContainer().end();
697
        if (i == AbstractSet<Element, Container>::getContainer().begin()) return AbstractSet<Element, Container>::getContainer().end();
698
        --i;
698
        --i;
699
        if (getAsEvent(i)->isa(Note::EventType)) {
699
        if (GenericChord::getAsEvent(i)->isa(Note::EventType)) {
700
            return i;
700
            return i;
701
        }
701
        }
702
    }
702
    }
Lines 710-716 Link Here
710
    Iterator i(AbstractSet<Element, Container>::getFinalElement());
710
    Iterator i(AbstractSet<Element, Container>::getFinalElement());
711
    while (  i != AbstractSet<Element, Container>::getContainer().end() &&
711
    while (  i != AbstractSet<Element, Container>::getContainer().end() &&
712
           ++i != AbstractSet<Element, Container>::getContainer().end()) {
712
           ++i != AbstractSet<Element, Container>::getContainer().end()) {
713
        if (getAsEvent(i)->isa(Note::EventType)) {
713
        if (GenericChord::getAsEvent(i)->isa(Note::EventType)) {
714
            return i;
714
            return i;
715
        }
715
        }
716
    }
716
    }
Lines 732-739 Link Here
732
                                                           const Iterator &b)
732
                                                           const Iterator &b)
733
{
733
{
734
    try {
734
    try {
735
        long ap = get__Int(getAsEvent(a), BaseProperties::PITCH);
735
        long ap = get__Int(GenericChord::getAsEvent(a), BaseProperties::PITCH);
736
        long bp = get__Int(getAsEvent(b), BaseProperties::PITCH);
736
        long bp = get__Int(GenericChord::getAsEvent(b), BaseProperties::PITCH);
737
        return (ap < bp);
737
        return (ap < bp);
738
    } catch (Event::NoData) {
738
    } catch (Event::NoData) {
739
        std::cerr << "Bad karma: PitchGreater failed to find one or both pitches" << std::endl;
739
        std::cerr << "Bad karma: PitchGreater failed to find one or both pitches" << std::endl;
(-)rosegarden-11.11.42.orig/src/document/RosegardenDocument.cpp (-5 / +5 lines)
Lines 2359-2371 Link Here
2359
         ++i) {
2359
         ++i) {
2360
2360
2361
        Segment *s = i->second;
2361
        Segment *s = i->second;
2362
        Segment::iterator i = s->begin();
2362
        Segment::iterator j = s->begin();
2363
2363
2364
        if (i == s->end() || !(*i)->isa(Clef::EventType)) continue;
2364
        if (j == s->end() || !(*j)->isa(Clef::EventType)) continue;
2365
2365
2366
        if ((*i)->getAbsoluteTime() < meaningfulBarStart) {
2366
        if ((*j)->getAbsoluteTime() < meaningfulBarStart) {
2367
            Event *e = new Event(**i, meaningfulBarStart);
2367
            Event *e = new Event(**j, meaningfulBarStart);
2368
            s->erase(i);
2368
            s->erase(j);
2369
            s->insert(e);
2369
            s->insert(e);
2370
        }
2370
        }
2371
    }
2371
    }
(-)rosegarden-11.11.42.orig/src/gui/application/LircClient.cpp (+1 lines)
Lines 29-34 Link Here
29
#include <QSocketNotifier>
29
#include <QSocketNotifier>
30
#include <fcntl.h>
30
#include <fcntl.h>
31
#include <cstdlib>
31
#include <cstdlib>
32
#include <unistd.h>
32
33
33
namespace Rosegarden
34
namespace Rosegarden
34
{
35
{
(-)rosegarden-11.11.42.orig/src/gui/application/LircCommander.cpp (-1 / +1 lines)
Lines 31-37 Link Here
31
#include "document/CommandHistory.h"
31
#include "document/CommandHistory.h"
32
32
33
#include <QObject>
33
#include <QObject>
34
34
#include <unistd.h>
35
35
36
namespace Rosegarden
36
namespace Rosegarden
37
{
37
{
(-)rosegarden-11.11.42.orig/src/gui/application/main.cpp (+1 lines)
Lines 49-54 Link Here
49
#include <QStringList>
49
#include <QStringList>
50
50
51
#include <sys/time.h>
51
#include <sys/time.h>
52
#include <unistd.h>
52
53
53
using namespace Rosegarden;
54
using namespace Rosegarden;
54
55
(-)rosegarden-11.11.42.orig/src/gui/editors/notation/Inconsistencies.h (-6 / +6 lines)
Lines 52-62 Link Here
52
        timeT end = comp->getEndMarker();
52
        timeT end = comp->getEndMarker();
53
53
54
        typename std::map<timeT, OverlapRange<T> >::iterator it;
54
        typename std::map<timeT, OverlapRange<T> >::iterator it;
55
        if (getFirst(start, end, it)) {
55
        if (this->getFirst(start, end, it)) {
56
            for (;;) {
56
            for (;;) {
57
                timeT t1, t2;
57
                timeT t1, t2;
58
                if (!isConsistent(it)) {
58
                if (!this->isConsistent(it)) {
59
                    getTimeRange(it, t1, t2);
59
                    this->getTimeRange(it, t1, t2);
60
                    int bar1 = comp->getBarNumber(t1) + 1;
60
                    int bar1 = comp->getBarNumber(t1) + 1;
61
                    int bar2 = comp->getBarNumber(t2) + 1;
61
                    int bar2 = comp->getBarNumber(t2) + 1;
62
                    str += QString("<blockquote>");
62
                    str += QString("<blockquote>");
Lines 68-85 Link Here
68
                    }
68
                    }
69
69
70
                    str += QString("<blockquote>");
70
                    str += QString("<blockquote>");
71
                    const std::vector<Segment *> *s = getSegments(it);
71
                    const std::vector<Segment *> *s = this->getSegments(it);
72
                    std::vector<Segment *>::const_iterator sit;
72
                    std::vector<Segment *>::const_iterator sit;
73
                    for (sit = s->begin(); sit != s->end(); ++sit) {
73
                    for (sit = s->begin(); sit != s->end(); ++sit) {
74
                        if (sit != s->begin()) str += QString("<br>");                            
74
                        if (sit != s->begin()) str += QString("<br>");                            
75
                        T pr = Overlaps<T>::getPropertyAtTime(*sit, t1);
75
                        T pr = Overlaps<T>::getPropertyAtTime(*sit, t1);
76
                        str+= segLine
76
                        str+= segLine
77
                                  .arg(QString::fromStdString((*sit)->getLabel()))
77
                                  .arg(QString::fromStdString((*sit)->getLabel()))
78
                                  .arg(getTranslatedName(pr));
78
                                  .arg(this->getTranslatedName(pr));
79
                    }
79
                    }
80
                    str += QString("</blockquote></blockquote>");
80
                    str += QString("</blockquote></blockquote>");
81
                }
81
                }
82
                if (!getNext(end, it)) break;
82
                if (!this->getNext(end, it)) break;
83
            }
83
            }
84
        }
84
        }
85
    }
85
    }
(-)rosegarden-11.11.42.orig/src/gui/studio/AudioPluginOSCGUIManager.cpp (-1 / +1 lines)
Lines 37-43 Link Here
37
#include <QString>
37
#include <QString>
38
38
39
#include <lo/lo.h>
39
#include <lo/lo.h>
40
40
#include <unistd.h>
41
41
42
namespace Rosegarden
42
namespace Rosegarden
43
{
43
{
(-)rosegarden-11.11.42.orig/src/sound/RingBuffer.h (+1 lines)
Lines 18-23 Link Here
18
18
19
#include <sys/types.h>
19
#include <sys/types.h>
20
#include <sys/mman.h>
20
#include <sys/mman.h>
21
#include <string.h>
21
22
22
#include "Scavenger.h"
23
#include "Scavenger.h"
23
24

Return to bug 414151