This list is closed, nobody may subscribe to it.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(34) |
Sep
(63) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(8) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(36) |
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(2) |
Jun
(48) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
(7) |
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <su...@us...> - 2012-09-02 13:06:56
|
Revision: 1347 http://canorus.svn.sourceforge.net/canorus/?rev=1347&view=rev Author: suamor Date: 2012-09-02 13:06:49 +0000 (Sun, 02 Sep 2012) Log Message: ----------- First part of 0.7.1 history based on trunk changelog Modified Paths: -------------- trunk/NEWS Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2012-09-02 12:08:38 UTC (rev 1346) +++ trunk/NEWS 2012-09-02 13:06:49 UTC (rev 1347) @@ -1,3 +1,66 @@ +0.7.1 +===== +- Updated translations +- Add support for ignoring Lilypond comments when importing it +- Fix problem that undo command doesn't correctly update the cloned sheet +- Fix crash when undoing source commits for the first time +- Fix Lilypond comments import when parsing newlines (cr/lf) +- Fix crash when importing lilypond lyrics +- Fix warnings throughout the code with newer gcc compiler versions + (See separate file large-warn-fixes.txt for technical details) +- Break compilation when warning occurs +- Fixed Lilypond melismatic lyrics when used in combination with hyphens +- Set autobeamOff for printing when lyrics is applied to the voice +- Added Lilypond export for forced accidentals +- Added underscores as spaces in Lilypond export +- Fixed compilation errors using Swig2 +- Fixed note marks time start calculation +- Fixed importing of slurs times inside the tuplet +- Fixed importing of canorus files containing tuplet+slur combination +- Fixed settings dialog page on startup, if playback device not available anymore +- Fixed crash in reposit method, check for valid slur during creation +- Implemented degree-based accidentals detection for the given diatonic midi key +- Fixed semitiones calculation of diminished intervals +- Fixed midi notes import real times and for tempo > 240bmp +- Fixed wrong calculation from midi pitch to diatonic pitch +- Added parameter for scrolling the score view on newly selected music elements +- Fixed wrong semitones interval calculation +- Add midi support for (GM) instruments +- Fixed midi time and length calculation for midi import +- Fixed brackets and quotes lilypond export +- Fixed importing the tempo mark on a slured element +- Add notes, events to midi import and allow control via scripting +- Add list of shortcuts (midi and UI) in a special file to be used for + user defined shortcuts +- Start work on backend for editing shortcuts (loading/saving/parsing) +- Fixed exporting text on chords to lilypond +- Added preliminary documentation of canorus libraries +- Fix problem that make it impossible to save the document (#16606) +- Added support for moving sheets using drag&drop and double click +- Fixed unsaved changes warning dialog when opening recent documents +- Fixed sheet properties toolbar when removing the last sheet. +- Fix update of the sheet tab name when renaming the sheet +- Fixed properties dialog layout +- Fixed default note stem direction +- Fix that no time signature/barlines are shown when there are none in the score +- Fix licensing issues with examples (and remove example with undefined license) +- Renamed license file to COPYING +- Add volta bracket support through special text mark +- Add release build possibility (including compiler optimizations) +- Fix problem on text display with cleanup and chord creation +- Enforce UTF-8 encoding for the canorus and lilypond formats +- Fix midi time scaling and quantisation for all events +- Fix crash when opening an empty XML file +- Fix crash with using certain styles in GNOME environment +- Fix midi import adjustment of notes being left over +- Added articulation, fingering, dynamic marks to lilypond export +- Fix problem with tuplet export by returning the last note of a chort + instead of the first +- Fix freeze in the GUI during import +- Fix Midi export and repeats +- Fix repeat in multiple staffs +- Fix arbitrary placed key signature changes + 0.7 === - Added support for printing and preview of score. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-02 12:08:44
|
Revision: 1346 http://canorus.svn.sourceforge.net/canorus/?rev=1346&view=rev Author: suamor Date: 2012-09-02 12:08:38 +0000 (Sun, 02 Sep 2012) Log Message: ----------- addMElement: No need to show a warning, as the other element types are just added to the list. Modified Paths: -------------- trunk/src/layout/drawablestaff.cpp Modified: trunk/src/layout/drawablestaff.cpp =================================================================== --- trunk/src/layout/drawablestaff.cpp 2012-09-02 01:33:35 UTC (rev 1345) +++ trunk/src/layout/drawablestaff.cpp 2012-09-02 12:08:38 UTC (rev 1346) @@ -260,7 +260,8 @@ case CADrawableMusElement::DrawableFunctionMarkSupport: case CADrawableMusElement::DrawableFiguredBassNumber: case CADrawableMusElement::DrawableMark: - fprintf(stderr,"Warning: CADrawableStaff::addMElement - Unhandled element %d",elt->drawableMusElementType()); + // These elements are just added to the list but not handled specifically + //fprintf(stderr,"Warning: CADrawableStaff::addMElement - Unhandled element %d\n",elt->drawableMusElementType()); break; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-09-02 01:33:42
|
Revision: 1345 http://canorus.svn.sourceforge.net/canorus/?rev=1345&view=rev Author: matevz Date: 2012-09-02 01:33:35 +0000 (Sun, 02 Sep 2012) Log Message: ----------- Fixed crash when importing Lilypond lyrics. Modified Paths: -------------- trunk/src/import/lilypondimport.cpp Modified: trunk/src/import/lilypondimport.cpp =================================================================== --- trunk/src/import/lilypondimport.cpp 2012-09-02 00:33:51 UTC (rev 1344) +++ trunk/src/import/lilypondimport.cpp 2012-09-02 01:33:35 UTC (rev 1345) @@ -375,6 +375,17 @@ if (lastSyllable && text=="__") { lastSyllable->setMelismaStart(true); } else { + if (text.length()>0 && text[0]=='"') { + while (!text.endsWith('"') && peekNextElement()!="") { + text += QString(" ")+parseNextElement(); + } + text.remove(0,1); + if (text.endsWith('"')) { + text.chop(1); + } + text.replace("\\\"", "\""); + text.replace(" ", "_"); + } lc->addSyllable( lastSyllable = new CASyllable( text, false, false, lc, timeSDummy, 0 ) ); } } @@ -397,7 +408,14 @@ } else if (in().mid(start,1)=="%") { // handle comments start = in().indexOf(QRegExp("[\n\r]"), start); - start = in().indexOf(QRegExp("\\S"), start); + if (start==-1) { + start = in().size(); + } else { + start = in().indexOf(QRegExp("\\S"), start); + if (start==-1) { + start = in().size(); + } + } } int i = in().indexOf(DELIMITERS, start); @@ -427,8 +445,20 @@ const QString CALilyPondImport::peekNextElement() { // find the first non-whitespace character int start = in().indexOf(QRegExp("\\S")); - if (start==-1) + if (start==-1) { start = 0; + } else if (in().mid(start,1)=="%") { + // handle comments + start = in().indexOf(QRegExp("[\n\r]"), start); + if (start==-1) { + start = in().size(); + } else { + start = in().indexOf(QRegExp("\\S"), start); + if (start==-1) { + start = in().size(); + } + } + } int i = in().indexOf(DELIMITERS, start); if (i==-1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-09-02 00:33:57
|
Revision: 1344 http://canorus.svn.sourceforge.net/canorus/?rev=1344&view=rev Author: matevz Date: 2012-09-02 00:33:51 +0000 (Sun, 02 Sep 2012) Log Message: ----------- Fixed lilypond comments import when parsing newlines to fit both line feeds and carriage returns. Modified Paths: -------------- trunk/src/import/lilypondimport.cpp Modified: trunk/src/import/lilypondimport.cpp =================================================================== --- trunk/src/import/lilypondimport.cpp 2012-09-02 00:28:40 UTC (rev 1343) +++ trunk/src/import/lilypondimport.cpp 2012-09-02 00:33:51 UTC (rev 1344) @@ -396,7 +396,7 @@ start = 0; } else if (in().mid(start,1)=="%") { // handle comments - start = in().indexOf("\n", start); + start = in().indexOf(QRegExp("[\n\r]"), start); start = in().indexOf(QRegExp("\\S"), start); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-09-02 00:28:46
|
Revision: 1343 http://canorus.svn.sourceforge.net/canorus/?rev=1343&view=rev Author: matevz Date: 2012-09-02 00:28:40 +0000 (Sun, 02 Sep 2012) Log Message: ----------- Fixed crash when Undoing source commits for the first time. Modified Paths: -------------- trunk/src/ui/mainwin.cpp trunk/src/ui/mainwin.h Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2012-09-01 22:50:43 UTC (rev 1342) +++ trunk/src/ui/mainwin.cpp 2012-09-02 00:28:40 UTC (rev 1343) @@ -1172,7 +1172,37 @@ setMode(mode()); // updates the new View border settings } + /*! + Returns the currently selected sheet in the current view or 0, if no such view exists. +*/ +CASheet *CAMainWin::currentSheet() { + if (!currentView()) { + return 0; + } + + switch (currentView()->viewType()) { + case CAView::ScoreView: { + CAScoreView *v = currentScoreView(); + if (v) return v->sheet(); + break; + } + case CAView::SourceView: { + CASourceView *v = static_cast<CASourceView*>(currentView()); + if (v->voice() && v->voice()->staff()) { + return v->voice()->staff()->sheet(); + } else + if (v->lyricsContext()) { + return v->lyricsContext()->sheet(); + } + break; + } + } + + return 0; +} + +/*! Returns the currently selected context in the current view port or 0 if no contexts are selected. */ CAContext *CAMainWin::currentContext() { @@ -1239,7 +1269,6 @@ } CACanorus::rebuildUI( document(), 0 ); - if (curVoiceIdx>=0 && curVoiceIdx<currentSheet()->voiceList().size()) { setCurrentVoice( currentSheet()->voiceList()[curVoiceIdx] ); } Modified: trunk/src/ui/mainwin.h =================================================================== --- trunk/src/ui/mainwin.h 2012-09-01 22:50:43 UTC (rev 1342) +++ trunk/src/ui/mainwin.h 2012-09-02 00:28:40 UTC (rev 1343) @@ -115,11 +115,7 @@ else return 0; } - inline CASheet *currentSheet() { - CAScoreView *v = currentScoreView(); - if (v) return v->sheet(); - else return 0; - } + CASheet *currentSheet(); inline CAStaff *currentStaff() { CAContext *context = currentContext(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-09-01 22:50:49
|
Revision: 1342 http://canorus.svn.sourceforge.net/canorus/?rev=1342&view=rev Author: matevz Date: 2012-09-01 22:50:43 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Removed debugging stuff. Modified Paths: -------------- trunk/src/import/lilypondimport.cpp Modified: trunk/src/import/lilypondimport.cpp =================================================================== --- trunk/src/import/lilypondimport.cpp 2012-09-01 22:45:18 UTC (rev 1341) +++ trunk/src/import/lilypondimport.cpp 2012-09-01 22:50:43 UTC (rev 1342) @@ -389,7 +389,6 @@ \todo Only one-character syntax delimiters are supported so far. \sa peekNextElement() */ -#include<iostream> const QString CALilyPondImport::parseNextElement() { // find the first non-whitespace character int start = in().indexOf(QRegExp("\\S")); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2012-09-01 22:45:24
|
Revision: 1341 http://canorus.svn.sourceforge.net/canorus/?rev=1341&view=rev Author: matevz Date: 2012-09-01 22:45:18 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Added support for ignoring Lilypond comments when importing Lilypond. Removed obsolete _voiceNumber voice property. This is always calculated on-the-fly now. Modified Paths: -------------- trunk/src/import/canorusmlimport.cpp trunk/src/import/lilypondimport.cpp trunk/src/import/midiimport.cpp trunk/src/score/staff.h trunk/src/score/voice.cpp trunk/src/score/voice.h trunk/src/ui/mainwin.cpp Modified: trunk/src/import/canorusmlimport.cpp =================================================================== --- trunk/src/import/canorusmlimport.cpp 2012-09-01 20:26:02 UTC (rev 1340) +++ trunk/src/import/canorusmlimport.cpp 2012-09-01 22:45:18 UTC (rev 1341) @@ -257,7 +257,7 @@ if (!attributes.value("stem-direction").isEmpty()) stemDir = CANote::stemDirectionFromString(attributes.value("stem-direction")); - _curVoice = new CAVoice( voiceName, staff, stemDir, voiceNumber ); + _curVoice = new CAVoice( voiceName, staff, stemDir ); if (!attributes.value("midi-channel").isEmpty()) { _curVoice->setMidiChannel(attributes.value("midi-channel").toInt()); } Modified: trunk/src/import/lilypondimport.cpp =================================================================== --- trunk/src/import/lilypondimport.cpp 2012-09-01 20:26:02 UTC (rev 1340) +++ trunk/src/import/lilypondimport.cpp 2012-09-01 22:45:18 UTC (rev 1341) @@ -389,15 +389,22 @@ \todo Only one-character syntax delimiters are supported so far. \sa peekNextElement() */ +#include<iostream> const QString CALilyPondImport::parseNextElement() { // find the first non-whitespace character int start = in().indexOf(QRegExp("\\S")); - if (start==-1) + if (start==-1) { start = 0; + } else if (in().mid(start,1)=="%") { + // handle comments + start = in().indexOf("\n", start); + start = in().indexOf(QRegExp("\\S"), start); + } int i = in().indexOf(DELIMITERS, start); - if (i==-1) + if (i==-1) { i=in().size(); + } QString ret; if (i==start) { Modified: trunk/src/import/midiimport.cpp =================================================================== --- trunk/src/import/midiimport.cpp 2012-09-01 20:26:02 UTC (rev 1340) +++ trunk/src/import/midiimport.cpp 2012-09-01 22:45:18 UTC (rev 1341) @@ -451,7 +451,7 @@ CAMusElement *musElemTimeSig; for (int voiceIndex=0;voiceIndex<_allChannelsEvents[ch]->size();voiceIndex++) { // voiceName = QObject::tr("Voice%1").arg( voiceNumber ); - voice = new CAVoice( "", staff, CANote::StemNeutral, 1 ); + voice = new CAVoice( "", staff, CANote::StemNeutral ); staff->addVoice( voice ); setCurVoice(voice); voice->setMidiChannel( ch ); Modified: trunk/src/score/staff.h =================================================================== --- trunk/src/score/staff.h 2012-09-01 20:26:02 UTC (rev 1340) +++ trunk/src/score/staff.h 2012-09-01 22:45:18 UTC (rev 1341) @@ -34,6 +34,7 @@ inline const QList<CAVoice*>& voiceList() { return _voiceList; } inline void addVoice(CAVoice *voice) { _voiceList << voice; } + inline void insertVoice(int idx, CAVoice *voice) { _voiceList.insert(idx, voice); } CAVoice* addVoice(); inline void removeVoice(CAVoice *voice) { _voiceList.removeAll(voice); } CAVoice *findVoice(const QString name); Modified: trunk/src/score/voice.cpp =================================================================== --- trunk/src/score/voice.cpp 2012-09-01 20:26:02 UTC (rev 1340) +++ trunk/src/score/voice.cpp 2012-09-01 22:45:18 UTC (rev 1341) @@ -34,15 +34,9 @@ Creates a new voice named \a name, in \a staff, \a voiceNumber and \a stemDirection of notes stems. Voice number starts at 1. */ -CAVoice::CAVoice( const QString name, CAStaff *staff, CANote::CAStemDirection stemDirection, int voiceNumber ) { +CAVoice::CAVoice( const QString name, CAStaff *staff, CANote::CAStemDirection stemDirection ) { _staff = staff; _name = name; - - if ( !voiceNumber && staff ) { - _voiceNumber = staff->voiceList().size()+1; - } else { - _voiceNumber = voiceNumber; - } _stemDirection = stemDirection; _midiChannel = ((staff && staff->sheet()) ? CAMidiDevice::freeMidiChannel( staff->sheet() ) : 0); @@ -1124,13 +1118,6 @@ */ /*! - \var CAVoice::_voiceNumber - Preferred direction of stems for the notes inside the voice. This should be Neutral, if the voice is alone, Up, if the voice is the first voice, Down, if not. Preferred is not used here. - - \sa CANote::CAStemDirection -*/ - -/*! \fn CAVoice::musElementList() Returns the list of music elements in the voice. Modified: trunk/src/score/voice.h =================================================================== --- trunk/src/score/voice.h 2012-09-01 20:26:02 UTC (rev 1340) +++ trunk/src/score/voice.h 2012-09-01 22:45:18 UTC (rev 1341) @@ -24,7 +24,7 @@ friend class CAStaff; // used for insertion of music elements and updateTimes() when inserting elements and synchronizing voices public: - CAVoice( const QString name, CAStaff *staff, CANote::CAStemDirection stemDirection=CANote::StemNeutral, int voiceNumber=0 ); + CAVoice( const QString name, CAStaff *staff, CANote::CAStemDirection stemDirection=CANote::StemNeutral ); ~CAVoice(); inline CAStaff *staff() { return _staff; } inline void setStaff(CAStaff *staff) { _staff = staff; } @@ -120,7 +120,6 @@ QList<CAMusElement *> _musElementList; CAStaff *_staff; // parent staff - int _voiceNumber; // voice number starting at 1 CANote::CAStemDirection _stemDirection; QList<CALyricsContext*> _lyricsContextList; Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2012-09-01 20:26:02 UTC (rev 1340) +++ trunk/src/ui/mainwin.cpp 2012-09-01 22:45:18 UTC (rev 1341) @@ -1311,7 +1311,7 @@ CACanorus::undo()->createUndoCommand( document(), tr("new voice", "undo") ); if (staff) { - staff->addVoice(new CAVoice( staff->name() + tr("Voice%1").arg( staff->voiceList().size()+1 ), staff, stemDirection, voiceNumber )); + staff->addVoice(new CAVoice( staff->name() + tr("Voice%1").arg( staff->voiceList().size()+1 ), staff, stemDirection )); staff->synchronizeVoices(); } @@ -3981,9 +3981,10 @@ li.wait(); CAVoice *newVoice = li.importedVoice(); + int voiceNumber = oldVoice->voiceNumber(); oldVoice->staff()->removeVoice(oldVoice); - newVoice->staff()->addVoice( newVoice ); + newVoice->staff()->insertVoice( voiceNumber-1, newVoice ); newVoice->staff()->synchronizeVoices(); // FIXME any way to avoid this? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 20:26:08
|
Revision: 1340 http://canorus.svn.sourceforge.net/canorus/?rev=1340&view=rev Author: suamor Date: 2012-09-01 20:26:02 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Update compiler information Update duma problems for Precise platform Update eclipse version Modified Paths: -------------- trunk/large-warn-fixes.txt Modified: trunk/large-warn-fixes.txt =================================================================== --- trunk/large-warn-fixes.txt 2012-09-01 20:11:18 UTC (rev 1339) +++ trunk/large-warn-fixes.txt 2012-09-01 20:26:02 UTC (rev 1340) @@ -1,12 +1,18 @@ Hi, -I added a number of warning flags and mark warning as errors so they get fixed. -I did a large work fixing all the warning I got due to that change. One hope -was to find the reason why Canorus crashes on exit. I use the currently widely -spread gcc 4.4.3 (4.4.4/4.5.1 is the latest available) on Ubuntu 10.04 LTS. +I added a number of warning flags and mark warning as errors so they get +fixed. I did a large work fixing all the warning I got due to that change. +One hope was to find the reason why Canorus crashes on exit. I used the +currently widely spread gcc 4.4.3 (4.4.4/4.5.1 was the latest available at +that time) on Ubuntu 10.04 LTS. +In August I continued to fix all the warnings occuring with the current +4.6.3 Compiler. 4.7.x is not yet supported but if you use that compiler +and want to fix potential warnings then I'd be glad to integrate your +patch! + Also I tried to integrate duma into Canorus but on start I got an error happening -inside the libORBit called from the Gnome settings system (might be related to +inside the libfontconfig called from the Gnome system (might be related to the fact that I use Gnome desktop, so this bug would not necessarily occur on every system). Duma is a library to detect heap space errors (heap protection, i.e. overruns are detected (or underruns alternatively). I remember to have @@ -219,8 +225,8 @@ - Commented unused variable I also consider to check our code with some more advanced compiler checker to -find potential problems like Codan, the new code analysis tool from the latest -Eclipse Helios Edition. We could also add cppcheck to our nightly build section. +find potential problems like Codan, the new code analysis tool from the +Eclipse Indigo Edition. We could also add cppcheck to our nightly build section. and send results to either the developer or some other dedicated mailing list. BTW: The most annyoing thing were unhandled cases. Please take more care about This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 20:11:25
|
Revision: 1339 http://canorus.svn.sourceforge.net/canorus/?rev=1339&view=rev Author: suamor Date: 2012-09-01 20:11:18 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Add missing files that haven't been documented swigpython problems was already fixed -> removed Modified Paths: -------------- trunk/large-warn-fixes.txt Modified: trunk/large-warn-fixes.txt =================================================================== --- trunk/large-warn-fixes.txt 2012-09-01 20:09:11 UTC (rev 1338) +++ trunk/large-warn-fixes.txt 2012-09-01 20:11:18 UTC (rev 1339) @@ -77,29 +77,49 @@ - Commented unused variable interface: +rtmididevice.cpp: Cast count to integer for comparison (and for for loop) +rtmididevice.h: Destruktor is now virtual pluginaction.h: removeArgument return the removeAll result value pyconsoleinterface.h: bufferedInput did not return a value (now "0" pointer) plugin.cpp: Fix rebuildDocument used outside SWIGCPP #define +pluginmanager.cpp: + - Cast to integer in for loop + - Fixed: New method installPlugin needs to return a value keybdinput.cpp: Variables x, drawableStaff defined but not used layout: -drawablefunctionmarkcontext: Move method implementation from header to avoid - compiler problem with possible undefined member +drawablebarline.cpp: Added missing cases that were not handled +drawableclef.cpp: Added missing cases that were not handled +drawablecontext.cpp: Unused variable commented +drawablefunctionmark.cpp: + - Unused variable commented + - Added missing cases that were not handled + - clone: Return a value for default case +drawablefunctionmarkcontext.cpp: + - Move method implementation from header to avoid + compiler problem with possible undefined member + - Move some member default initialisation to head of constructor drawablekeysignature.cpp: && / || warning logic solved with additional braces drawablemark.cpp: Added missing cases that were not handled drawablenote.cpp: Added missing cases that were not handled drawablerest.cpp: Added missing cases that were not handled drawabeslur.cpp: Added missing cases that were not handled -drawabletimesignature.cpp: Added missing break in some cases +drawabestaff.cpp: Added missing cases that were not handled +drawabletimesignature.cpp: + - Added missing break in some cases + - Added missing cases that were not handled kdtree.h: && / || warning logic solved with additional braces layoutengine.cpp: - && / || warning logic solved with additional braces - Unused variable commented - Added missing cases that were not handled - Possible bug due to unused variable placedSymbol + - Fixed local buffer (array) problems by allocating them on the heap. + (performance might need to be improved) score: articulation.h setAssociatedNote - additionally return 'n' + (might cause or fix a bug) interval.cpp: - && / || warning logic solved with additional braces - Unused variable commented @@ -113,11 +133,16 @@ - && / || warning logic solved with additional braces - Unused variable commented - Fixed bug where synchronizeMusElements did not return any result -note.cpp: return values not well defined in all cases (stem) +note.cpp: return values not well defined in all cases (stem, empty string removed!) keysignature.cpp: - Added missing cases for clone (why was there a case in the first place ?) - return values not defined in all cases (bufferedInput) timesignature.cpp: return values not defined in all cases (timeSignatureTypeML) + -> no default value! +staff.cpp: + - Fixed local buffer (array) problems by allocating them on the heap. + (performance might need to be improved) + - Add default case for all the other music element types not handled here slur.cpp: Added missing cases for slurStyleToString tuplet.cpp: Changed initialization sequence fermata.cpp: Return NormalFermata in fermataTypeFromString for unknown strings @@ -163,13 +188,12 @@ scripting: canoruspython.i: Workaround for problem compiling with new swig version 2 -swigpython.h: Add method and structure from swig for above workaround - -> I haven't any quick good idea how to fix the problem properly swigpython.cpp: Bugfix: Add missing return value to callPycli pluginmanager ui: +mainwin.h: stopPlayback never returned a value (ToDo?). mainwin.cpp: - Commented unused variables - && / || warning logic solved with additional braces @@ -186,11 +210,13 @@ widgets actionseditor.cpp: - - Bug: Assignment instead of comparison + - Bugfix: Assignment instead of comparison - Problem: bSCuts not yet used (need to check) menutoolbutton.cpp: ^ / | warning logic solved with additional braces resourceview.cpp: No assignment in if! -scoreview.cpp: && / || warning logic solved with additional braces +scoreview.cpp: + - && / || warning logic solved with additional braces + - Commented unused variable I also consider to check our code with some more advanced compiler checker to find potential problems like Codan, the new code analysis tool from the latest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 20:09:17
|
Revision: 1338 http://canorus.svn.sourceforge.net/canorus/?rev=1338&view=rev Author: suamor Date: 2012-09-01 20:09:11 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Add ignore Property Changed: ---------------- trunk/src/ Property changes on: trunk/src ___________________________________________________________________ Modified: svn:ignore - Makefile cmake_install.cmake progress.make CMakeFiles .directory _CanorusPython.so canorus ui_*.h *.cxx *.pyc + Makefile cmake_install.cmake progress.make CMakeFiles .directory _CanorusPython.so canorus ui_*.h *.cxx *.pyc CMakeCache.txt CanorusPython.py This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 20:05:12
|
Revision: 1337 http://canorus.svn.sourceforge.net/canorus/?rev=1337&view=rev Author: suamor Date: 2012-09-01 20:05:06 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Attention: Important Warning Flags changed! 1) Stack Protector activated (again buffer overflow) 2) Wall (all warnings from gcc) 3) Werror (do not let slip any warnings, have to be corrected) 4) Wuninitialized, Wtype-limits additional warnings 5) "Warnings" for potentional stack problems RTMidi is not stack-protector-checked due to Alsa API not compatible with above flags Excluded Python Wrapper from Warn-Error for various reasons for now (hopefully to be removed later) Add potential (currently commented) duma support for memory checks - needs to be refined to only check Canorus and no depending libraries Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2012-09-01 19:55:53 UTC (rev 1336) +++ trunk/src/CMakeLists.txt 2012-09-01 20:05:06 UTC (rev 1337) @@ -13,7 +13,7 @@ SET(CMAKE_BUILD_TYPE Debug) ENDIF(NOT CMAKE_BUILD_TYPE) -SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fstack-protector-all -Wall -Werror -Wuninitialized -Wtype-limits -Wstack-protector") SET(CMAKE_C_FLAGS_RELEASE "-O2") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") @@ -455,6 +455,9 @@ SET( Canorus_Examples "../examples" ) +set_source_files_properties(${Canorus_RtMidi_Srcs} PROPERTIES COMPILE_FLAGS -Wno-stack-protector) +set_source_files_properties(${CANORUS_PYTHON_WRAP_CXX} PROPERTIES COMPILE_FLAGS -Wno-error) + # Set translation files FILE(GLOB Canorus_Translation_Srcs "lang/*.ts") # lang/*.ts -> Canorus_Translation_Srcs STRING(REGEX REPLACE "\\.ts" ".qm" Canorus_Translation_Bins "${Canorus_Translation_Srcs}") # Set Canorus_Translation_Bins to same values as Canorus_Translation_Srcs with different extensions @@ -612,6 +615,8 @@ # Add ${QT_QTTEST_LIBRARY} below to add the Qt Test library as well # Add ${POPPLERQT4_LIBRARY} ${POPPLER_LIBRARY} to reactivate poppler libraries TARGET_LINK_LIBRARIES(canorus ${QT_LIBRARIES} ${RUBY_LIBRARY} ${PYTHON_LIBRARY} ) +# Duma leads to a crash on libfontconfig with Ubuntu (10.04/12.04) +# duma ) ############################ # RtMIDI Library additions # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:56:00
|
Revision: 1336 http://canorus.svn.sourceforge.net/canorus/?rev=1336&view=rev Author: suamor Date: 2012-09-01 19:55:53 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Update (Indigo) Modified Paths: -------------- trunk/.cproject Modified: trunk/.cproject =================================================================== --- trunk/.cproject 2012-09-01 19:54:34 UTC (rev 1335) +++ trunk/.cproject 2012-09-01 19:55:53 UTC (rev 1336) @@ -2,75 +2,75 @@ <?fileVersion 4.0.0?> <cproject> -<storageModule moduleId="org.eclipse.cdt.core.settings"> -<cconfiguration id="converted.config.1044146074"> -<storageModule moduleId="scannerConfiguration"> -<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> -<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> -<buildOutputProvider> -<openAction enabled="true" filePath=""/> -<parser enabled="true"/> -</buildOutputProvider> -<scannerInfoProvider id="specsFile"> -<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> -<parser enabled="true"/> -</scannerInfoProvider> -</profile> -<profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> -<buildOutputProvider> -<openAction enabled="false" filePath=""/> -<parser enabled="true"/> -</buildOutputProvider> -<scannerInfoProvider id="makefileGenerator"> -<runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> -<parser enabled="false"/> -</scannerInfoProvider> -</profile> -<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> -<buildOutputProvider> -<openAction enabled="false" filePath=""/> -<parser enabled="true"/> -</buildOutputProvider> -<scannerInfoProvider id="specsFile"> -<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> -<parser enabled="false"/> -</scannerInfoProvider> -</profile> -<profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> -<buildOutputProvider> -<openAction enabled="false" filePath=""/> -<parser enabled="true"/> -</buildOutputProvider> -<scannerInfoProvider id="specsFile"> -<runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> -<parser enabled="false"/> -</scannerInfoProvider> -</profile> -</storageModule> - -<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.1044146074" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig"> -<externalSettings/> -<extensions> -<extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/> -<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> -</extensions> -</storageModule> -<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> - -<storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> -<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> -<storageModule moduleId="org.eclipse.cdt.core.pathentry"> -<pathentry base-path="Canorus" include="src" kind="inc" path="" system="true"/> -<pathentry include="/usr/include/qt4/QtCore" kind="inc" path="" system="true"/> -<pathentry include="/usr/include/qt4/QtGui" kind="inc" path="" system="true"/> -<pathentry include="/usr/include/qt4/QtSvg" kind="inc" path="" system="true"/> -<pathentry include="/usr/include/qt4/QtXml" kind="inc" path="" system="true"/> -<pathentry include="/usr/include/qt4/QtWebKit" kind="inc" path="" system="true"/> -<pathentry include="/usr/include/qt4/QtScript" kind="inc" path="" system="true"/> -<pathentry kind="src" path=""/> -<pathentry kind="out" path=""/> -<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/> -</storageModule> -</cconfiguration> -</storageModule> + <storageModule moduleId="org.eclipse.cdt.core.settings"> + <cconfiguration id="converted.config.1044146074"> + <storageModule moduleId="scannerConfiguration"> + <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"/> + <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile"> + <buildOutputProvider> + <openAction enabled="true" filePath=""/> + <parser enabled="true"/> + </buildOutputProvider> + <scannerInfoProvider id="specsFile"> + <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> + <parser enabled="true"/> + </scannerInfoProvider> + </profile> + <profile id="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"> + <buildOutputProvider> + <openAction enabled="false" filePath=""/> + <parser enabled="true"/> + </buildOutputProvider> + <scannerInfoProvider id="makefileGenerator"> + <runAction arguments="-f ${project_name}_scd.mk" command="make" useDefault="true"/> + <parser enabled="false"/> + </scannerInfoProvider> + </profile> + <profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile"> + <buildOutputProvider> + <openAction enabled="false" filePath=""/> + <parser enabled="true"/> + </buildOutputProvider> + <scannerInfoProvider id="specsFile"> + <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> + <parser enabled="false"/> + </scannerInfoProvider> + </profile> + <profile id="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile"> + <buildOutputProvider> + <openAction enabled="false" filePath=""/> + <parser enabled="true"/> + </buildOutputProvider> + <scannerInfoProvider id="specsFile"> + <runAction arguments="-E -P -v -dD ${plugin_state_location}/${specs_file}" command="gcc" useDefault="true"/> + <parser enabled="false"/> + </scannerInfoProvider> + </profile> + </storageModule> + <storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="converted.config.1044146074" moduleId="org.eclipse.cdt.core.settings" name="convertedConfig"> + <externalSettings/> + <extensions> + <extension id="org.eclipse.cdt.core.domsourceindexer" point="org.eclipse.cdt.core.CIndexer"/> + <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> + </extensions> + </storageModule> + <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> + <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/> + <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/> + </cconfiguration> + </storageModule> + <storageModule moduleId="refreshScope"/> + <storageModule moduleId="org.eclipse.cdt.core.pathentry"> + <pathentry kind="src" path=""/> + <pathentry kind="out" path=""/> + <pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/> + <pathentry include="/usr/include/qt4/QtCore" kind="inc" path="" system="true"/> + <pathentry include="/usr/include/qt4/QtGui" kind="inc" path="" system="true"/> + <pathentry include="/usr/include/qt4/QtSvg" kind="inc" path="" system="true"/> + <pathentry include="/usr/include/qt4/QtXml" kind="inc" path="" system="true"/> + <pathentry include="/usr/include/qt4/QtWebKit" kind="inc" path="" system="true"/> + <pathentry include="/usr/include/qt4/QtScript" kind="inc" path="" system="true"/> + <pathentry include="/usr/include/qt4/" kind="inc" path="" system="true"/> + <pathentry base-path="trunk" include="src" kind="inc" path="" system="true"/> + </storageModule> </cproject> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:54:40
|
Revision: 1335 http://canorus.svn.sourceforge.net/canorus/?rev=1335&view=rev Author: suamor Date: 2012-09-01 19:54:34 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: - && / || warning logic solved with additional braces - Commented unused variable Modified Paths: -------------- trunk/src/widgets/scoreview.cpp Modified: trunk/src/widgets/scoreview.cpp =================================================================== --- trunk/src/widgets/scoreview.cpp 2012-09-01 19:52:48 UTC (rev 1334) +++ trunk/src/widgets/scoreview.cpp 2012-09-01 19:54:34 UTC (rev 1335) @@ -340,7 +340,7 @@ QList<CADrawableMusElement*> CAScoreView::musElementsAt(double x, double y) { QList<CADrawableMusElement *> l = _drawableMList.findInRange(x,y); for (int i=0; i<l.size(); i++) - if ( !l[i]->isSelectable() || selectedVoice() && l[i]->musElement() && l[i]->musElement()->isPlayable() && static_cast<CAPlayable*>(l[i]->musElement())->voice()!=selectedVoice() ) + if ( !l[i]->isSelectable() || (selectedVoice() && l[i]->musElement() && l[i]->musElement()->isPlayable() && static_cast<CAPlayable*>(l[i]->musElement())->voice()!=selectedVoice()) ) l.removeAt(i--); return l; @@ -878,7 +878,7 @@ // draw contexts QList<CADrawableContext*> cList; - int j = _drawableCList.size(); + //int j = _drawableCList.size(); if (_repaintArea) cList = _drawableCList.findInRange(_repaintArea->x(), _repaintArea->y(), _repaintArea->width(),_repaintArea->height()); else @@ -913,13 +913,13 @@ if ( _selection.contains(mList[i])) { color = selectionColor(); } else - if ( selectedVoice() && - (elt && - (elt->isPlayable() && static_cast<CAPlayable*>(elt)->voice()==selectedVoice() || + if ( (selectedVoice() && + ((elt && + ((elt->isPlayable() && static_cast<CAPlayable*>(elt)->voice()==selectedVoice()) || (!elt->isPlayable() && elt->context()==selectedVoice()->staff()) || - elt->context()!=selectedVoice()->staff()) || - !elt && mList[i]->drawableContext()->context()==selectedVoice()->staff() - ) || + elt->context()!=selectedVoice()->staff())) || + (!elt && mList[i]->drawableContext()->context()==selectedVoice()->staff()) + )) || (!selectedVoice()) ) { if ( elt && elt->musElementType()==CAMusElement::Rest && @@ -927,9 +927,9 @@ static_cast<CARest*>(elt)->restType()==CARest::Hidden ) { color = hiddenElementsColor(); - } else if ( elt && elt->musElementType()==CAMusElement::Rest && - static_cast<CARest*>(elt)->restType()==CARest::Hidden || - elt && !elt->isVisible() + } else if ( (elt && elt->musElementType()==CAMusElement::Rest && + static_cast<CARest*>(elt)->restType()==CARest::Hidden) || + (elt && !elt->isVisible()) ) { color = QColor(0,0,0,0); // transparent color } else if ( elt && elt->color()!=QColor(0,0,0,0) ) { @@ -1033,7 +1033,7 @@ if (currentContext()?(currentContext()->drawableContextType() == CADrawableContext::DrawableStaff):0) { int pitch = (static_cast<CADrawableStaff*>(currentContext()))->calculatePitch(_xCursor, _yCursor); // the current staff has the real pitch we need for (int i=0; i<_shadowNote.size(); i++) { // apply this pitch to all shadow notes in all staffs - CAClef *clef = (static_cast<CADrawableStaff*>(_shadowDrawableNote[i]->drawableContext()))->getClef( _xCursor ); + //CAClef *clef = (static_cast<CADrawableStaff*>(_shadowDrawableNote[i]->drawableContext()))->getClef( _xCursor ); CADiatonicPitch dPitch(pitch, 0); _shadowNote[i]->setDiatonicPitch( dPitch ); @@ -1421,7 +1421,7 @@ */ void CAScoreView::addToSelection(const QList<CADrawableMusElement*> list, bool selectableOnly ) { for (int i=0; i<list.size(); i++) { - if ( !selectableOnly || selectableOnly && list[i]->isSelectable() ) + if ( !selectableOnly || (selectableOnly && list[i]->isSelectable()) ) addToSelection(list[i], false); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:52:54
|
Revision: 1334 http://canorus.svn.sourceforge.net/canorus/?rev=1334&view=rev Author: suamor Date: 2012-09-01 19:52:48 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: No assignment in if! Modified Paths: -------------- trunk/src/widgets/resourceview.cpp Modified: trunk/src/widgets/resourceview.cpp =================================================================== --- trunk/src/widgets/resourceview.cpp 2012-09-01 19:52:08 UTC (rev 1333) +++ trunk/src/widgets/resourceview.cpp 2012-09-01 19:52:48 UTC (rev 1334) @@ -117,8 +117,8 @@ QAction *remove = new QAction(tr("Remove"), this); actions << remove; - QAction *selectedAction; - if ( selectedAction = QMenu::exec( actions, e->globalPos() ) ) { + QAction *selectedAction = QMenu::exec( actions, e->globalPos() ); + if ( selectedAction ) { if (selectedAction==rename) { editItem( selection[0], 0 ); } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:52:14
|
Revision: 1333 http://canorus.svn.sourceforge.net/canorus/?rev=1333&view=rev Author: suamor Date: 2012-09-01 19:52:08 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: ^ / | warning logic solved with additional braces Modified Paths: -------------- trunk/src/widgets/menutoolbutton.cpp Modified: trunk/src/widgets/menutoolbutton.cpp =================================================================== --- trunk/src/widgets/menutoolbutton.cpp 2012-09-01 19:51:26 UTC (rev 1332) +++ trunk/src/widgets/menutoolbutton.cpp 2012-09-01 19:52:08 UTC (rev 1333) @@ -23,7 +23,7 @@ QStyleOptionToolButton opt; initStyleOption(&opt); if(!isChecked() && (opt.state & QStyle::State_Sunken)) - opt.state = opt.state ^ QStyle::State_Sunken | QStyle::State_Raised; + opt.state = (opt.state ^ QStyle::State_Sunken) | QStyle::State_Raised; p.drawComplexControl(QStyle::CC_ToolButton, opt); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:51:32
|
Revision: 1332 http://canorus.svn.sourceforge.net/canorus/?rev=1332&view=rev Author: suamor Date: 2012-09-01 19:51:26 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: - Bugfix: Assignment instead of comparison - Problem: bSCuts not yet used (need to check) Modified Paths: -------------- trunk/src/widgets/actionseditor.cpp Modified: trunk/src/widgets/actionseditor.cpp =================================================================== --- trunk/src/widgets/actionseditor.cpp 2012-09-01 19:49:25 UTC (rev 1331) +++ trunk/src/widgets/actionseditor.cpp 2012-09-01 19:51:26 UTC (rev 1332) @@ -319,7 +319,7 @@ // @ToDo: Only optional beep ? if (hasConflicts()) qApp->beep(); } - else if (iCol = COL_MIDI) + else if (iCol == COL_MIDI) { QString midiText = i->text(); @@ -492,11 +492,11 @@ void CAActionsEditor::loadActionsTable() { QString sk; - bool bSCuts = false; + //bool bSCuts = false; if( actionsTable->column( (QTableWidgetItem *)focusWidget() ) == COL_SHORTCUT ) { sk = tr("Shortcut files") +" (*.cakey)"; - bSCuts = true; + //bSCuts = true; } else sk = tr("Midi command files") +" (*.camid)"; @@ -547,7 +547,8 @@ accelText.clear(); midiText = rx.cap(4) + " " + rx.cap(5) + " " + rx.cap(6); qDebug(" command: '%s' context: '%s' accel: '%s' midi: '%s'", - command.toUtf8().data(), accelText.toUtf8().data(), midiText.toUtf8().data()); + command.toUtf8().data(), context.toUtf8().data(), + accelText.toUtf8().data(), midiText.toUtf8().data()); // @ToDo: command name is not identical to command identifier! row = findActionCommand(command); if (row > -1) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:49:31
|
Revision: 1331 http://canorus.svn.sourceforge.net/canorus/?rev=1331&view=rev Author: suamor Date: 2012-09-01 19:49:25 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: - Commented unused variables - && / || warning logic solved with additional braces - Added missing cases that were not handled - Save document did not return true or false without document - Open document did not return the document! - Possible bug: variables stanza, rebuild set but never used Modified Paths: -------------- trunk/src/ui/mainwin.cpp Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2012-09-01 19:46:44 UTC (rev 1330) +++ trunk/src/ui/mainwin.cpp 2012-09-01 19:49:25 UTC (rev 1331) @@ -1328,7 +1328,7 @@ if (voice) { // Last voice cannot be deleted if (voice->staff()->voiceList().size()==1) { - int ret = QMessageBox::critical( + /*int ret =*/ QMessageBox::critical( this, tr("Canorus"), tr("Cannot delete the last voice in the staff!") ); @@ -1470,7 +1470,7 @@ if (currentScoreView() && currentScoreView()->selection().size()) { CAMusElement *elt = currentScoreView()->selection().front()->musElement(); if ( elt->musElementType()==CAMusElement::Syllable || - elt->musElementType()==CAMusElement::Mark && (static_cast<CAMark*>(elt)->markType()==CAMark::Text || static_cast<CAMark*>(elt)->markType()==CAMark::BookMark) + ((elt->musElementType()==CAMusElement::Mark && (static_cast<CAMark*>(elt)->markType()==CAMark::Text)) || static_cast<CAMark*>(elt)->markType()==CAMark::BookMark) ) { currentScoreView()->createTextEdit(currentScoreView()->selection().front()); } else { @@ -1478,10 +1478,15 @@ } } } + case ReadOnlyMode: + case ProgressMode: + case NoDocumentMode: + fprintf(stderr,"Warning: CAMainWin::setMode - Unhandled mode %d",mode); + break; } // switch (mode) updateToolBars(); - if ( currentScoreView() && !currentScoreView()->textEditVisible() || - !currentScoreView() && currentView() ) + if ( (currentScoreView() && !currentScoreView()->textEditVisible()) || + (!currentScoreView() && currentView()) ) currentView()->setFocus(); } @@ -1675,7 +1680,7 @@ if (!elt) break; if ( mode()==EditMode && - (elt->musElementType()==CAMusElement::Syllable || elt->musElementType()==CAMusElement::Mark && static_cast<CAMark*>(elt)->markType()==CAMark::Text) + (elt->musElementType()==CAMusElement::Syllable || (elt->musElementType()==CAMusElement::Mark && static_cast<CAMark*>(elt)->markType()==CAMark::Text)) ){ v->createTextEdit( dElt ); } @@ -1726,9 +1731,9 @@ case CAContext::LyricsContext: { CACanorus::undo()->createUndoCommand( document(), tr("new lyrics context", "undo")); - int stanza=1; - if (dupContext && dupContext->context() && dupContext->context()->contextType()==CAContext::LyricsContext) - stanza = static_cast<CALyricsContext*>(dupContext->context())->stanzaNumber()+1; + //int stanza=1; + /*if (dupContext && dupContext->context() && dupContext->context()->contextType()==CAContext::LyricsContext) + stanza = static_cast<CALyricsContext*>(dupContext->context())->stanzaNumber()+1;*/ v->sheet()->insertContextAfter( dupContext?dupContext->context():0, @@ -1801,6 +1806,11 @@ break; } + case ReadOnlyMode: + case ProgressMode: + case NoDocumentMode: + fprintf(stderr,"Warning: CAMainWin::scoreViewMousePress - Unhandled mode %d",mode()); + break; } CAPluginManager::action("onScoreViewClick", document(), 0, 0, this); @@ -1972,7 +1982,7 @@ CAScoreView *sv = static_cast<CAScoreView*>(sender()); setCurrentView( sv ); - int val; + //int val; switch (e->modifiers()) { case Qt::NoModifier: //scroll horizontally sv->setWorldX( sv->worldX() - (int)((0.5*e->delta()) / sv->zoom()), CACanorus::settings()->animatedScroll() ); @@ -2118,7 +2128,7 @@ v->selectDownMusElement(); v->repaint(); } else if ((mode() == InsertMode) || (mode() == EditMode)) { - bool rebuild = false; + //bool rebuild = false; if (v->selection().size()) CACanorus::undo()->createUndoCommand( document(), tr("lower note", "undo") ); @@ -2136,7 +2146,7 @@ CADiatonicPitch pitch( note->diatonicPitch().noteName()-1, key.noteAccs(note->diatonicPitch().noteName()-1) ); note->setDiatonicPitch( pitch ); CACanorus::undo()->pushUndoCommand(); - rebuild = true; + //rebuild = true; eltList << note; } } @@ -2648,12 +2658,12 @@ QList<CANote*> noteList = noteStart->voice()->getNoteList(); int end = noteList.indexOf(noteEnd); for (int i=noteList.indexOf(noteStart); i<=end; i++) - if ( musElementFactory()->slurType()==CASlur::SlurType && (noteList[i]->slurStart() || noteList[i]->slurEnd()) || - musElementFactory()->slurType()==CASlur::PhrasingSlurType && (noteList[i]->phrasingSlurStart() || noteList[i]->phrasingSlurEnd()) ) + if (((musElementFactory()->slurType()==CASlur::SlurType && (noteList[i]->slurStart())) || noteList[i]->slurEnd()) || + (((musElementFactory()->slurType()==CASlur::PhrasingSlurType && (noteList[i]->phrasingSlurStart()))) || noteList[i]->phrasingSlurEnd()) ) return; - if (musElementFactory()->slurType()==CASlur::SlurType && (noteStart->slurStart() || noteEnd->slurEnd()) || - musElementFactory()->slurType()==CASlur::PhrasingSlurType && (noteStart->phrasingSlurStart() || noteEnd->phrasingSlurEnd())) + if (((musElementFactory()->slurType()==CASlur::SlurType && (noteStart->slurStart())) || noteEnd->slurEnd()) || + (((musElementFactory()->slurType()==CASlur::PhrasingSlurType && (noteStart->phrasingSlurStart()))) || noteEnd->phrasingSlurEnd())) break; // return, if the slur already exist success = musElementFactory()->configureSlur( staff, noteStart, noteEnd ); } @@ -2693,6 +2703,12 @@ } break; } + case CAMusElement::MidiNote: + case CAMusElement::Syllable: + case CAMusElement::Tuplet: + case CAMusElement::Undefined: + fprintf(stderr,"Warning: CAMainWin::insertMusElementAt - Unhandled Element %d",musElementFactory()->musElementType()); + break; } if (success) { @@ -2903,6 +2919,7 @@ return saveDocument(s); } } + return false; } /** @@ -2915,7 +2932,7 @@ ) { QString s = CAMainWin::uiSaveDialog->selectedFiles().at(0); // append the extension, if the filename doesn't contain a dot - int i; + //int i; if (!s.contains('.')) { int left = uiSaveDialog->selectedFilter().indexOf("(*.") + 2; int len = uiSaveDialog->selectedFilter().size() - left - 1; @@ -2953,6 +2970,7 @@ open->importDocument(); _mainWinProgressCtl.startProgress( open ); + return open->importedDocument(); } /*! @@ -3442,7 +3460,7 @@ CATextEdit *textEdit = static_cast<CATextEdit*>(sender()); CAScoreView *v = currentScoreView(); - CADrawableContext *dContext = v->currentContext(); + //CADrawableContext *dContext = v->currentContext(); CAMusElement *elt = (v->selection().size()?v->selection().front()->musElement():0); if ( elt->musElementType()==CAMusElement::Syllable ) { @@ -3456,16 +3474,16 @@ bool melisma = false; if (text.right(1)=="_") { melisma = true; text.chop(1); } - CAVoice *voice = 0; /// \todo GUI for syllable specific associated voice - current is the default lyrics context's one + //CAVoice *voice = 0; /// \todo GUI for syllable specific associated voice - current is the default lyrics context's one - CALyricsContext *lc = static_cast<CALyricsContext*>(dContext->context()); + //CALyricsContext *lc = static_cast<CALyricsContext*>(dContext->context()); // create or edit syllable if ( e->key()==Qt::Key_Space || e->key()==Qt::Key_Return || - e->key()==Qt::Key_Right && textEdit->cursorPosition()==textEdit->text().size() || - (e->key()==Qt::Key_Left || e->key()==Qt::Key_Backspace) && textEdit->cursorPosition()==0 || - CACanorus::settings()->finaleLyricsBehaviour() && e->key()==Qt::Key_Minus + (e->key()==Qt::Key_Right && textEdit->cursorPosition()==textEdit->text().size()) || + ((e->key()==Qt::Key_Left || e->key()==Qt::Key_Backspace) && textEdit->cursorPosition()==0) || + (CACanorus::settings()->finaleLyricsBehaviour() && e->key()==Qt::Key_Minus) ) { CACanorus::undo()->createUndoCommand( document(), tr("lyrics edit", "undo") ); syllable->setText(text); @@ -3474,7 +3492,7 @@ v->removeTextEdit(); - CAVoice *voice = (syllable->associatedVoice()?syllable->associatedVoice():lc->associatedVoice()); + //CAVoice *voice = (syllable->associatedVoice()?syllable->associatedVoice():lc->associatedVoice()); CAMusElement *nextSyllable = 0; if (syllable) { if (e->key()==Qt::Key_Space || e->key()==Qt::Key_Right || e->key()==Qt::Key_Return) { // next right note @@ -3495,7 +3513,7 @@ } } } - } else if (elt->musElementType()==CAMusElement::Mark && static_cast<CAMark*>(elt)->markType()==CAMark::Text || static_cast<CAMark*>(elt)->markType()==CAMark::BookMark) { + } else if ((elt->musElementType()==CAMusElement::Mark && static_cast<CAMark*>(elt)->markType()==CAMark::Text) || static_cast<CAMark*>(elt)->markType()==CAMark::BookMark) { if (e->key()==Qt::Key_Return) { CAMark *mark = static_cast<CAMark*>(elt); CACanorus::undo()->createUndoCommand( document(), tr("text edit", "undo") ); @@ -4060,8 +4078,8 @@ return; CASourceView *v=0; - CAStaff *staff = 0; - if (staff = currentStaff()) { + CAStaff *staff = currentStaff(); + if (staff) { int voiceNum = uiVoiceNum->getRealValue()-1<0?0:uiVoiceNum->getRealValue()-1; CAVoice *voice = staff->voiceList()[ voiceNum ]; v = new CASourceView(voice, 0); @@ -4389,6 +4407,8 @@ uiAssociatedVoiceAction->setVisible(false); break; } + case CAContext::FiguredBassContext: + break; } uiContextName->setText(context->name()); } else @@ -4960,7 +4980,7 @@ for(int previdx = eltidx-1; previdx >= 0; previdx--) { if((prev = eltMap[context][previdx]) && prev->musElementType() == CAMusElement::Note && pl->voice() == static_cast<CAPlayable*>(prev)->voice()) { - CANote *prevNote = static_cast<CANote*>(prev); + //CANote *prevNote = static_cast<CANote*>(prev); addToChord = prev->timeStart() == note->timeStart(); break; } @@ -5011,7 +5031,7 @@ if(voices.isEmpty()) voices << defaultVoice; - CAStaff *last = static_cast<CAStaff*>(currentSheet->contextList().last()); + //CAStaff *last = static_cast<CAStaff*>(currentSheet->contextList().last()); foreach(CAVoice* voice, voices) newStaff->addVoice(voice); } @@ -5067,9 +5087,9 @@ // cleans up the set - removes empty elements and elements which get deleted automatically (eg. slurs, if both notes are deleted, marks) for (QSet<CAMusElement*>::iterator i=musElemSet.begin(); i!=musElemSet.end(); ) { if (!(*i) || - (*i)->musElementType()==CAMusElement::Slur && musElemSet.contains(static_cast<CASlur*>(*i)->noteStart()) || - (*i)->musElementType()==CAMusElement::Slur && musElemSet.contains(static_cast<CASlur*>(*i)->noteEnd()) || - (*i)->musElementType()==CAMusElement::Mark && musElemSet.contains(static_cast<CAMark*>(*i)->associatedElement()) ) { + ((*i)->musElementType()==CAMusElement::Slur && musElemSet.contains(static_cast<CASlur*>(*i)->noteStart())) || + ((*i)->musElementType()==CAMusElement::Slur && musElemSet.contains(static_cast<CASlur*>(*i)->noteEnd())) || + ((*i)->musElementType()==CAMusElement::Mark && musElemSet.contains(static_cast<CAMark*>(*i)->associatedElement())) ) { i = musElemSet.erase(i); } else { i++; @@ -5104,8 +5124,8 @@ if ( !current && restsInOtherVoices.size() && ( restsInOtherVoices.back()->voice()!=chord[chordIdx]->voice() || - restsInOtherVoices.back()->voice()==chord[chordIdx]->voice() && - restsInOtherVoices.back()->timeEnd() < p->timeEnd() ) + (restsInOtherVoices.back()->voice()==chord[chordIdx]->voice() && + restsInOtherVoices.back()->timeEnd() < p->timeEnd()) ) ) { deleteNotes = false; break; @@ -5302,7 +5322,7 @@ switch(context->contextType()) { case CAContext::Staff: { - CAStaff* s = static_cast<CAStaff*>(context), *newStaff; + CAStaff/* * s = static_cast<CAStaff*>(context),*/ *newStaff; newContext = newStaff = new CAStaff(tr("Staff%1").arg(v->sheet()->staffList().size()+1), currentSheet); break; } @@ -5325,6 +5345,8 @@ newContext = new CAFunctionMarkContext(tr("FunctionMarkContext%1").arg(v->sheet()->contextList().size()+1), currentSheet); break; } + case CAContext::FiguredBassContext: + break; } if(insertAfter) { currentSheet->insertContextAfter(insertAfter, newContext); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:46:50
|
Revision: 1330 http://canorus.svn.sourceforge.net/canorus/?rev=1330&view=rev Author: suamor Date: 2012-09-01 19:46:44 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: stopPlayback never returned a value (ToDo?). Modified Paths: -------------- trunk/src/ui/mainwin.h Modified: trunk/src/ui/mainwin.h =================================================================== --- trunk/src/ui/mainwin.h 2012-09-01 19:44:48 UTC (rev 1329) +++ trunk/src/ui/mainwin.h 2012-09-01 19:46:44 UTC (rev 1330) @@ -380,6 +380,7 @@ inline bool stopPlayback() { if(_playback && _playback->isRunning()) _playback->stopNow(); + return true; } bool handleUnsavedChanges(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:44:54
|
Revision: 1329 http://canorus.svn.sourceforge.net/canorus/?rev=1329&view=rev Author: suamor Date: 2012-09-01 19:44:48 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: - Several context types not handled - Commented unused item - Bug: Sheet properties supposed to be stored are not stored at all! Code currently commented to compile Also never defines variables inside a loop Modified Paths: -------------- trunk/src/ui/propertiesdialog.cpp Modified: trunk/src/ui/propertiesdialog.cpp =================================================================== --- trunk/src/ui/propertiesdialog.cpp 2012-09-01 19:24:21 UTC (rev 1328) +++ trunk/src/ui/propertiesdialog.cpp 2012-09-01 19:44:48 UTC (rev 1329) @@ -256,6 +256,9 @@ case CAContext::FunctionMarkContext: updateFunctionMarkContextProperties( static_cast<CAFunctionMarkContext*>( _contextItem[cur] ) ); break; + case CAContext::FiguredBassContext: + fprintf(stderr,"Warning: CAPropertiesDialog::on_uiDocumentTree_currentItemChanged - Unhandled Type %d",_contextItem[cur]->contextType()); + break; } // update uiUp/uiDown buttons @@ -298,7 +301,7 @@ Called when "Apply" button is clicked. */ void CAPropertiesDialog::applyProperties() { - QTreeWidgetItem *item = uiDocumentTree->topLevelItem(0); + //QTreeWidgetItem *item = uiDocumentTree->topLevelItem(0); CACanorus::undo()->createUndoCommand( _document, tr("apply properties", "undo") ); CACanorus::undo()->pushUndoCommand(); @@ -318,9 +321,9 @@ _document->setComments( dp->uiComments->toPlainText() ); // store Sheet properties - for (int i=0; i<_sheetPropertiesWidget.keys().size(); i++) { + /*for (int i=0; i<_sheetPropertiesWidget.keys().size(); i++) { CASheet *s = _sheetPropertiesWidget.keys().at(i); - } + }*/ // store Context properties for (int i=0; i<_contextPropertiesWidget.keys().size(); i++) { @@ -338,6 +341,9 @@ case CAContext::FunctionMarkContext: { break; } + case CAContext::FiguredBassContext: + fprintf(stderr,"Warning: CAPropertiesDialog::applyProperties - Unhandled Type %d",c->contextType()); + break; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:24:27
|
Revision: 1328 http://canorus.svn.sourceforge.net/canorus/?rev=1328&view=rev Author: suamor Date: 2012-09-01 19:24:21 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: Bugfix: Add missing return value to callPycli Modified Paths: -------------- trunk/src/scripting/swigpython.cpp Modified: trunk/src/scripting/swigpython.cpp =================================================================== --- trunk/src/scripting/swigpython.cpp 2012-09-01 19:22:33 UTC (rev 1327) +++ trunk/src/scripting/swigpython.cpp 2012-09-01 19:24:21 UTC (rev 1328) @@ -234,6 +234,7 @@ PyEval_ReleaseLock(); // pthread_exit((void*)NULL); + return ret; } /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:22:44
|
Revision: 1327 http://canorus.svn.sourceforge.net/canorus/?rev=1327&view=rev Author: suamor Date: 2012-09-01 19:22:33 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: - && / || warning logic solved with additional braces - Unused variable commented - Fixed bug where synchronizeMusElements did not return any result Modified Paths: -------------- trunk/src/score/voice.cpp Modified: trunk/src/score/voice.cpp =================================================================== --- trunk/src/score/voice.cpp 2012-09-01 19:20:12 UTC (rev 1326) +++ trunk/src/score/voice.cpp 2012-09-01 19:22:33 UTC (rev 1327) @@ -101,7 +101,7 @@ void CAVoice::clear() { while ( _musElementList.size() ) { // deletes an element only if it's not present in other voices or we're deleting the last voice - if ( _musElementList.front()->isPlayable() || staff() && staff()->voiceList().size()<2 ) + if ( _musElementList.front()->isPlayable() || ( staff() && staff()->voiceList().size()<2 ) ) delete _musElementList.front(); // CAMusElement's destructor removes it from the list else _musElementList.removeFirst(); @@ -208,7 +208,7 @@ CAPlayable* CAVoice::insertInTupletAndVoiceAt( CAPlayable *reference, CAPlayable *p ) { int t = reference->timeStart(); int rtype = static_cast<CAMusElement*>(reference)->musElementType(); - int ptype = static_cast<CAMusElement*>(p)->musElementType(); + //int ptype = static_cast<CAMusElement*>(p)->musElementType(); CATuplet* tup = reference->tuplet(); CAVoice* voice = reference->voice(); @@ -880,6 +880,7 @@ m->setTimeStart( musElementList()[i]->timeStart() ); } } + return true; // What to return ? Maybe if some music element times were actually set } /*! @@ -891,6 +892,7 @@ Returns True, if fixes were made or False otherwise. */ bool CAVoice::synchronizeMusElements() { + bool fixesMade = false; for (int i=0; i<musElementList().size(); i++) { if ( musElementList()[i]->musElementType()==CAMusElement::Note && musElementList()[i]->markList().size() && @@ -919,8 +921,10 @@ // move at the end of the chord i += (chord.size() - chord.indexOf( static_cast<CANote*>(musElementList()[i]) )); + fixesMade = true; } } + return fixesMade; } /*! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:20:18
|
Revision: 1326 http://canorus.svn.sourceforge.net/canorus/?rev=1326&view=rev Author: suamor Date: 2012-09-01 19:20:12 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: Changed initialization sequence Modified Paths: -------------- trunk/src/score/tuplet.cpp Modified: trunk/src/score/tuplet.cpp =================================================================== --- trunk/src/score/tuplet.cpp 2012-09-01 19:19:03 UTC (rev 1325) +++ trunk/src/score/tuplet.cpp 2012-09-01 19:20:12 UTC (rev 1326) @@ -32,7 +32,7 @@ should already be part of the voice. */ CATuplet::CATuplet( int number, int actualNumber, QList<CAPlayable*> noteList ) - : CAMusElement( noteList.front()->context(), noteList.front()->timeStart(), 0 ), _noteList(noteList), _number(number), _actualNumber(actualNumber) { + : CAMusElement( noteList.front()->context(), noteList.front()->timeStart(), 0 ), _number(number), _actualNumber(actualNumber), _noteList(noteList) { setMusElementType( Tuplet ); assignTimes(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:19:09
|
Revision: 1325 http://canorus.svn.sourceforge.net/canorus/?rev=1325&view=rev Author: suamor Date: 2012-09-01 19:19:03 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: return values not defined in all cases (timeSignatureTypeML) -> no default value! Modified Paths: -------------- trunk/src/score/timesignature.cpp Modified: trunk/src/score/timesignature.cpp =================================================================== --- trunk/src/score/timesignature.cpp 2012-09-01 19:17:46 UTC (rev 1324) +++ trunk/src/score/timesignature.cpp 2012-09-01 19:19:03 UTC (rev 1325) @@ -87,6 +87,7 @@ case Baroque: return QString("baroque"); } + return ""; } /*! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:17:53
|
Revision: 1324 http://canorus.svn.sourceforge.net/canorus/?rev=1324&view=rev Author: suamor Date: 2012-09-01 19:17:46 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: - Fixed local buffer (array) problems by allocating them on the heap. (performance might need to be improved) - Add default case for all the other music element types not handled here Modified Paths: -------------- trunk/src/score/staff.cpp Modified: trunk/src/score/staff.cpp =================================================================== --- trunk/src/score/staff.cpp 2012-09-01 19:12:28 UTC (rev 1323) +++ trunk/src/score/staff.cpp 2012-09-01 19:17:46 UTC (rev 1324) @@ -54,7 +54,8 @@ newStaff->addVoice( voiceList()[i]->clone(newStaff) ); } - int eltIdx[voiceList().size()]; for (int i=0; i<voiceList().size(); i++) eltIdx[i]=0; + int *peltIdx = new int[voiceList().size()]; + for (int i=0; i<voiceList().size(); i++) peltIdx[i]=0; QList<CANote*> tiedOrigNotes; // original notes having opened tie QList<CANote*> sluredOrigNotes; // original notes having opened slur QList<CANote*> phrasingSluredOrigNotes; // original notes having opened phrasing slur @@ -69,11 +70,11 @@ QList<CAPlayable*> elementsUnderTuplet; // clone elements in the current voice until the non-playable element is reached - while ( eltIdx[i]<voiceList()[i]->musElementList().size() && voiceList()[i]->musElementList()[eltIdx[i]]->isPlayable() ) { - CAPlayable *origElt = static_cast<CAPlayable*>(voiceList()[i]->musElementList()[eltIdx[i]]); + while ( peltIdx[i]<voiceList()[i]->musElementList().size() && voiceList()[i]->musElementList()[peltIdx[i]]->isPlayable() ) { + CAPlayable *origElt = static_cast<CAPlayable*>(voiceList()[i]->musElementList()[peltIdx[i]]); CAPlayable *clonedElt = origElt->clone( newStaff->voiceList()[i] ); newStaff->voiceList()[i]->append( clonedElt, - voiceList()[i]->musElementList()[eltIdx[i]]->musElementType()==CAMusElement::Note && + voiceList()[i]->musElementList()[peltIdx[i]]->musElementType()==CAMusElement::Note && static_cast<CANote*>(origElt)->isPartOfChord() && !static_cast<CANote*>(origElt)->isFirstInChord() ); @@ -144,37 +145,39 @@ elementsUnderTuplet.clear(); } - eltIdx[i]++; + peltIdx[i]++; } newStaff->voiceList()[i]->synchronizeMusElements(); } // append non-playable elements (shared by all voices - only create clone of the first voice element and append it to all) - if ( eltIdx[0]<voiceList()[0]->musElementList().size() ) { - CAMusElement *newElt = voiceList()[0]->musElementList()[eltIdx[0]]->clone( newStaff ); + if ( peltIdx[0]<voiceList()[0]->musElementList().size() ) { + CAMusElement *newElt = voiceList()[0]->musElementList()[peltIdx[0]]->clone( newStaff ); for (int i=0; i<voiceList().size(); i++) { newStaff->voiceList()[i]->append( newElt ); - eltIdx[i]++; + peltIdx[i]++; } // put the element in the related reference list switch (newElt->musElementType()) { case CAMusElement::KeySignature: newStaff->addKeySignatureReference(newElt); break; case CAMusElement::TimeSignature: newStaff->addTimeSignatureReference(newElt); break; case CAMusElement::Clef: newStaff->addClefReference(newElt); break; + default: break; } } // check if we're at the end done = true; for (int i=0; i<voiceList().size(); i++) { - if (eltIdx[i]<voiceList()[i]->musElementList().size()) { + if (peltIdx[i]<voiceList()[i]->musElementList().size()) { done = false; break; } } } + delete [] peltIdx; return newStaff; } @@ -346,8 +349,10 @@ Returns True, if everything was ok. False, if fixes were needed. */ bool CAStaff::synchronizeVoices() { - int idx[voiceList().size()]; for (int i=0; i<voiceList().size(); i++) idx[i]=-1; // array of current indices of voices at current timeStart - CAMusElement *lastPlayable[voiceList().size()]; for (int i=0; i<voiceList().size(); i++) lastPlayable[i]=0; + int *pidx = new int[voiceList().size()]; + for (int i=0; i<voiceList().size(); i++) pidx[i]=-1; // array of current indices of voices at current timeStart + CAMusElement **plastPlayable = new CAMusElement*[voiceList().size()]; + for (int i=0; i<voiceList().size(); i++) plastPlayable[i]=0; _clefList.clear(); _keySignatureList.clear(); @@ -366,38 +371,39 @@ // gather shared elements into sharedList and remove them from the voice at new timeStart for ( int i=0; i<voiceList().size(); i++ ) { - // don't increase idx[i], if the next element is not-playable - while ( idx[i] < voiceList()[i]->musElementList().size()-1 && !voiceList()[i]->musElementList()[idx[i]+1]->isPlayable() && ( voiceList()[i]->musElementList()[idx[i]+1]->timeStart() == timeStart )) { - if ( !sharedList.contains(voiceList()[i]->musElementList()[ idx[i]+1 ]) ) { - sharedList << voiceList()[i]->musElementList()[ idx[i]+1 ]; + // don't increase pidx[i], if the next element is not-playable + while ( pidx[i] < voiceList()[i]->musElementList().size()-1 && !voiceList()[i]->musElementList()[pidx[i]+1]->isPlayable() && ( voiceList()[i]->musElementList()[pidx[i]+1]->timeStart() == timeStart )) { + if ( !sharedList.contains(voiceList()[i]->musElementList()[ pidx[i]+1 ]) ) { + sharedList << voiceList()[i]->musElementList()[ pidx[i]+1 ]; } - voiceList()[i]->_musElementList.removeAt( idx[i]+1 ); + voiceList()[i]->_musElementList.removeAt( pidx[i]+1 ); } } // insert all elements from sharedList into all voices - // OR increase idx[i] for 1 in all voices, if their new element is playable and new timeStart is correct + // OR increase pidx[i] for 1 in all voices, if their new element is playable and new timeStart is correct if ( sharedList.size() ) { for ( int i=0; i<voiceList().size(); i++ ) { for ( int j=0; j<sharedList.size(); j++) { - voiceList()[i]->_musElementList.insert( idx[i]+1+j, sharedList[j] ); + voiceList()[i]->_musElementList.insert( pidx[i]+1+j, sharedList[j] ); // shared elements from voice 0 get considered to go to the reference lists too if (i==0) switch (sharedList[j]->musElementType()) { case CAMusElement::KeySignature: addKeySignatureReference( sharedList[j] ); break; case CAMusElement::TimeSignature: addTimeSignatureReference( sharedList[j] ); break; case CAMusElement::Clef: addClefReference( sharedList[j] ); break; + default: break; } } - idx[i]++; // jump to the first one inserted from the sharedList, if inserting shared elts for the first time + pidx[i]++; // jump to the first one inserted from the sharedList, if inserting shared elts for the first time // or the first one after the sharedList in second pass } } else { for ( int i=0; i<voiceList().size(); i++ ) { - if ( idx[i] < voiceList()[i]->musElementList().size()-1 && ( voiceList()[i]->musElementList()[idx[i]+1]->timeStart() == timeStart ) ) { - if ( voiceList()[i]->musElementList()[idx[i]+1]->isPlayable() ) { - idx[i]++; - lastPlayable[i] = voiceList()[i]->musElementList()[idx[i]]; + if ( pidx[i] < voiceList()[i]->musElementList().size()-1 && ( voiceList()[i]->musElementList()[pidx[i]+1]->timeStart() == timeStart ) ) { + if ( voiceList()[i]->musElementList()[pidx[i]+1]->isPlayable() ) { + pidx[i]++; + plastPlayable[i] = voiceList()[i]->musElementList()[pidx[i]]; } } } @@ -405,23 +411,23 @@ // if the shared element overlaps any of the chords in other voices, insert rests (shift the shared sign forward) to that voice for (int i=0; i<voiceList().size(); i++) { - if ( idx[i]==-1 || voiceList()[i]->musElementList()[idx[i]]->isPlayable() ) // only legal idx[i] and non-playable elements + if ( pidx[i]==-1 || voiceList()[i]->musElementList()[pidx[i]]->isPlayable() ) // only legal pidx[i] and non-playable elements continue; for (int j=0; j<voiceList().size(); j++) { if (i==j) continue; // fix the overlapped chord, rests are inserted later in non-linearity check - if ( idx[j] != -1 && voiceList()[i]->musElementList()[idx[i]]->timeStart() == timeStart && - lastPlayable[j] && lastPlayable[j]->timeStart() < timeStart && lastPlayable[j]->timeEnd() > timeStart ) { - int gapLength = lastPlayable[j]->timeEnd() - timeStart; - QList<CARest*> restList = CARest::composeRests( gapLength, voiceList()[i]->musElementList()[idx[i]]->timeStart(), voiceList()[i] ); + if ( pidx[j] != -1 && voiceList()[i]->musElementList()[pidx[i]]->timeStart() == timeStart && + plastPlayable[j] && plastPlayable[j]->timeStart() < timeStart && plastPlayable[j]->timeEnd() > timeStart ) { + int gapLength = plastPlayable[j]->timeEnd() - timeStart; + QList<CARest*> restList = CARest::composeRests( gapLength, voiceList()[i]->musElementList()[pidx[i]]->timeStart(), voiceList()[i] ); - voiceList()[i]->musElementList()[idx[i]]->setTimeStart( lastPlayable[j]->timeEnd() ); + voiceList()[i]->musElementList()[pidx[i]]->setTimeStart( plastPlayable[j]->timeEnd() ); for ( int k=0; k < restList.size(); k++ ) - voiceList()[i]->_musElementList.insert( idx[i]++, restList[k] ); // insert the missing rests, rests are added in back, idx++ - voiceList()[i]->updateTimes( idx[i], gapLength, false ); // increase playable timeStarts - lastPlayable[ i ] = restList.last(); + voiceList()[i]->_musElementList.insert( pidx[i]++, restList[k] ); // insert the missing rests, rests are added in back, pidx++ + voiceList()[i]->updateTimes( pidx[i], gapLength, false ); // increase playable timeStarts + plastPlayable[ i ] = restList.last(); changesMade = true; } @@ -431,14 +437,14 @@ // if the elements times are not linear (every N-th element's timeEnd should be N+1-th timeStart), insert rests to achieve it for (int j=0; j<voiceList().size(); j++) { // fix the non-linearity - if ( idx[j]!=-1 && !voiceList()[j]->musElementList()[idx[j]]->isPlayable() && voiceList()[j]->musElementList()[idx[j]]->timeStart()==timeStart - && (lastPlayable[j]?lastPlayable[ j ]->timeEnd():0) < timeStart ) { - int gapLength = timeStart - ( (idx[j]==-1||!lastPlayable[j])?0:lastPlayable[ j ]->timeEnd() ); - QList<CARest*> restList = CARest::composeRests( gapLength, (idx[j]==-1||!lastPlayable[j])?0:lastPlayable[ j ]->timeEnd(), voiceList()[j] ); + if ( pidx[j]!=-1 && !voiceList()[j]->musElementList()[pidx[j]]->isPlayable() && voiceList()[j]->musElementList()[pidx[j]]->timeStart()==timeStart + && (plastPlayable[j]?plastPlayable[ j ]->timeEnd():0) < timeStart ) { + int gapLength = timeStart - ( (pidx[j]==-1||!plastPlayable[j])?0:plastPlayable[ j ]->timeEnd() ); + QList<CARest*> restList = CARest::composeRests( gapLength, (pidx[j]==-1||!plastPlayable[j])?0:plastPlayable[ j ]->timeEnd(), voiceList()[j] ); for ( int k=0; k < restList.size(); k++ ) - voiceList()[j]->_musElementList.insert( idx[j]++, restList[k] ); // insert the missing rests, rests are added in back, idx++ - voiceList()[j]->updateTimes( idx[j], gapLength, false ); // increase playable timeStarts - lastPlayable[ j ] = restList.last(); + voiceList()[j]->_musElementList.insert( pidx[j]++, restList[k] ); // insert the missing rests, rests are added in back, pidx++ + voiceList()[j]->updateTimes( pidx[j], gapLength, false ); // increase playable timeStarts + plastPlayable[ j ] = restList.last(); changesMade = true; } } @@ -446,7 +452,7 @@ // jump to the last inserted from the sharedList if ( sharedList.size() ) { for ( int i=0; i<voiceList().size(); i++ ) { - idx[i]+=(sharedList.size()-1); + pidx[i]+=(sharedList.size()-1); } } @@ -454,11 +460,11 @@ int shortestTime=-1; for ( int i=0; i<voiceList().size(); i++ ) { - if ( idx[i] < (voiceList()[i]->musElementList().size()-1) && + if ( pidx[i] < (voiceList()[i]->musElementList().size()-1) && ( shortestTime==-1 || - voiceList()[i]->musElementList()[ idx[i]+1 ]->timeStart() - timeStart < shortestTime ) + voiceList()[i]->musElementList()[ pidx[i]+1 ]->timeStart() - timeStart < shortestTime ) ) - shortestTime = voiceList()[i]->musElementList()[ idx[i]+1 ]->timeStart() - timeStart; + shortestTime = voiceList()[i]->musElementList()[ pidx[i]+1 ]->timeStart() - timeStart; } int deltaTime = ((shortestTime!=-1)?shortestTime:0); timeStart += deltaTime; // increase timeStart @@ -466,10 +472,11 @@ // if all voices are at the end, finish done = (deltaTime==0); // last pass is only meant to linearize for ( int i=0; i<voiceList().size(); i++ ) - if ( idx[i] < voiceList()[i]->musElementList().size()-1 ) + if ( pidx[i] < voiceList()[i]->musElementList().size()-1 ) done = false; } + delete [] pidx; return changesMade; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2012-09-01 19:12:34
|
Revision: 1323 http://canorus.svn.sourceforge.net/canorus/?rev=1323&view=rev Author: suamor Date: 2012-09-01 19:12:28 +0000 (Sat, 01 Sep 2012) Log Message: ----------- Large Warn Fixes: Added missing cases for slurStyleToString Modified Paths: -------------- trunk/src/score/slur.cpp Modified: trunk/src/score/slur.cpp =================================================================== --- trunk/src/score/slur.cpp 2012-09-01 19:11:10 UTC (rev 1322) +++ trunk/src/score/slur.cpp 2012-09-01 19:12:28 UTC (rev 1323) @@ -97,6 +97,8 @@ case SlurDotted: return "slur-dotted"; break; + case Undefined: + break; } return ""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |