summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/muse/audioconvert.h2
-rw-r--r--muse2/muse/midiedit/ecanvas.cpp2
-rw-r--r--muse2/muse/midiedit/scoreedit.cpp6
-rw-r--r--muse2/muse/mplugins/mitplugin.cpp4
-rw-r--r--muse2/muse/plugin.h4
-rw-r--r--muse2/muse/song.cpp2
6 files changed, 13 insertions, 7 deletions
diff --git a/muse2/muse/audioconvert.h b/muse2/muse/audioconvert.h
index 23f06ecf..f17d74b2 100644
--- a/muse2/muse/audioconvert.h
+++ b/muse2/muse/audioconvert.h
@@ -55,7 +55,7 @@ class AudioConverter
public:
AudioConverter();
- ~AudioConverter();
+ virtual ~AudioConverter();
AudioConverter* reference();
static AudioConverter* release(AudioConverter* cv);
diff --git a/muse2/muse/midiedit/ecanvas.cpp b/muse2/muse/midiedit/ecanvas.cpp
index 6907c014..9b51c653 100644
--- a/muse2/muse/midiedit/ecanvas.cpp
+++ b/muse2/muse/midiedit/ecanvas.cpp
@@ -154,7 +154,7 @@ void EventCanvas::songChanged(MusECore::SongChangedFlags_t flags)
// (same in waveview.cpp)
bool curItemNeedsRestore=false;
MusECore::Event storedEvent;
- int partSn;
+ int partSn = 0xDEADBEEF; // to prevent compiler warning; partSn is unused anyway if curItemNeedsRestore==false.
if (curItem)
{
curItemNeedsRestore=true;
diff --git a/muse2/muse/midiedit/scoreedit.cpp b/muse2/muse/midiedit/scoreedit.cpp
index aa22ce68..e274769d 100644
--- a/muse2/muse/midiedit/scoreedit.cpp
+++ b/muse2/muse/midiedit/scoreedit.cpp
@@ -3183,6 +3183,10 @@ void ScoreCanvas::draw_items(QPainter& p, int y_offset, staff_t& staff, ScoreIte
case COLOR_MODE_VELO:
color_index=VELO_PIXMAP_BEGIN + it->source_event->velo();
break;
+
+ default:
+ cerr << "ERROR: THIS CANNOT HAPPEN: coloring_mode (="<<coloring_mode<<") is invalid! defaulting to black." << endl;
+ color_index=BLACK_PIXMAP;
}
if (it->source_event->selected())
@@ -3224,6 +3228,8 @@ void ScoreCanvas::draw_items(QPainter& p, int y_offset, staff_t& staff, ScoreIte
case NONE: acc_pix=pix_noacc; break;
case SHARP: acc_pix=pix_sharp; break;
case B: acc_pix=pix_b; break;
+ default: cerr << "ERROR: THIS CANNOT HAPPEN: it->pos.vorzeichen (="<<it->pos.vorzeichen<<") is invalid! defaulting to NONE." << endl;
+ acc_pix=pix_noacc; break;
}
draw_pixmap(p,it->x-ACCIDENTIAL_DIST -x_pos+x_left,y_offset + it->y, acc_pix[color_index]);
diff --git a/muse2/muse/mplugins/mitplugin.cpp b/muse2/muse/mplugins/mitplugin.cpp
index d4d7dd70..be833fa3 100644
--- a/muse2/muse/mplugins/mitplugin.cpp
+++ b/muse2/muse/mplugins/mitplugin.cpp
@@ -45,7 +45,7 @@ void MusE::startMidiInputPlugin(int id)
{
bool flag = false;
QWidget* w = 0;
- QAction* act;
+ QAction* act = 0;
if (id == 0) {
if (!MusEGlobal::mitPluginTranspose) {
MusEGlobal::mitPluginTranspose = new MITPluginTranspose();
@@ -101,7 +101,7 @@ void MusE::startMidiInputPlugin(int id)
else
w->hide();
}
- act->setChecked(flag);
+ if (act) act->setChecked(flag);
}
void MusE::hideMitPluginTranspose()
diff --git a/muse2/muse/plugin.h b/muse2/muse/plugin.h
index ee37c34f..4de0de11 100644
--- a/muse2/muse/plugin.h
+++ b/muse2/muse/plugin.h
@@ -252,7 +252,7 @@ class PluginIBase
public:
PluginIBase();
- ~PluginIBase();
+ virtual ~PluginIBase();
virtual bool on() const = 0;
virtual void setOn(bool val) = 0;
virtual unsigned long pluginID() = 0;
@@ -332,7 +332,7 @@ class PluginI : public PluginIBase {
public:
PluginI();
- ~PluginI();
+ virtual ~PluginI();
Plugin* plugin() const { return _plugin; }
bool on() const { return _on; }
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index 000bbec3..8f189759 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -1374,7 +1374,7 @@ void Song::update(MusECore::SongChangedFlags_t flags, bool allowRecursion)
{
static int level = 0; // DEBUG
if (level && !allowRecursion) {
- printf("THIS SHOULD NEVER HAPPEN: unallowed recursion in Song::update(%08x), level %d!\n"
+ printf("THIS SHOULD NEVER HAPPEN: unallowed recursion in Song::update(%08lx), level %d!\n"
" the songChanged() signal is NOT emitted. this will\n"
" probably cause windows being not up-to-date.\n", flags, level);
return;