diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 00:22:51 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 00:22:51 +0000 |
commit | f681783c513b54002aa4dfec2566f26bfc38689b (patch) | |
tree | 1aad8f37fd067cd36b2d4de1ae3b62b584914b20 /muse2 | |
parent | c856c3c44f488b137dd3b76f81b2d4b9c5444b73 (diff) |
Some fixes to the previous commit. Apparently I missed to filter a case.
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/muse/app.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/driver/jack.cpp | 24 | ||||
-rw-r--r-- | muse2/muse/midiedit/ecanvas.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/midievent.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/vst.cpp | 3 | ||||
-rw-r--r-- | muse2/muse/widgets/utils.cpp | 6 | ||||
-rw-r--r-- | muse2/synti/fluid/fluidgui.cpp | 3 | ||||
-rw-r--r-- | muse2/synti/vam/vamgui.cpp | 3 |
8 files changed, 32 insertions, 16 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index ba261460..3c73efc1 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -3354,7 +3354,8 @@ void MusE::openRecentMenu() for (int i = 0; i < PROJECT_LIST_LEN; ++i) { if (projectList[i] == 0) break; - const char* path = projectList[i]->toLatin1().constData(); + QByteArray ba = projectList[i]->toLatin1(); + const char* path = ba.constData(); const char* p = strrchr(path, '/'); if (p == 0) p = path; diff --git a/muse2/muse/driver/jack.cpp b/muse2/muse/driver/jack.cpp index 909e6064..f70cf3d3 100644 --- a/muse2/muse/driver/jack.cpp +++ b/muse2/muse/driver/jack.cpp @@ -919,7 +919,8 @@ void JackAudioDevice::graphChanged() if (irl->channel != channel) continue; QString name = irl->name(); - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); //printf("portname=%s\n", portName); bool found = false; const char** pn = ports; @@ -956,7 +957,8 @@ void JackAudioDevice::graphChanged() if (irl->channel != channel) continue; QString name = irl->name(); - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); if (strcmp(*pn, portName) == 0) { found = true; break; @@ -1004,7 +1006,8 @@ void JackAudioDevice::graphChanged() if (irl->channel != channel) continue; QString name = irl->name(); - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); bool found = false; const char** pn = ports; while (pn && *pn) { @@ -1040,7 +1043,8 @@ void JackAudioDevice::graphChanged() if (irl->channel != channel) continue; QString name = irl->name(); - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); if (strcmp(*pn, portName) == 0) { found = true; break; @@ -1114,7 +1118,8 @@ void JackAudioDevice::graphChanged() // continue; QString name = irl->name(); //name += QString(JACK_MIDI_OUT_PORT_SUFFIX); // p3.3.55 - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); bool found = false; const char** pn = ports; while (pn && *pn) { @@ -1154,7 +1159,8 @@ void JackAudioDevice::graphChanged() //if (irl->channel != channel) // continue; QString name = irl->name(); - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); if (strcmp(*pn, portName) == 0) { found = true; break; @@ -1210,7 +1216,8 @@ void JackAudioDevice::graphChanged() //if (irl->channel != channel) // continue; QString name = irl->name(); - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); bool found = false; const char** pn = ports; while (pn && *pn) { @@ -1250,7 +1257,8 @@ void JackAudioDevice::graphChanged() //if (irl->channel != channel) // continue; QString name = irl->name(); - const char* portName = name.toLatin1(); + QByteArray ba = name.toLatin1(); + const char* portName = ba.constData(); if (strcmp(*pn, portName) == 0) { found = true; break; diff --git a/muse2/muse/midiedit/ecanvas.cpp b/muse2/muse/midiedit/ecanvas.cpp index 94a7d0c8..8323a2f8 100644 --- a/muse2/muse/midiedit/ecanvas.cpp +++ b/muse2/muse/midiedit/ecanvas.cpp @@ -454,7 +454,8 @@ QMimeData* EventCanvas::getTextDrag() void EventCanvas::pasteAt(const QString& pt, int pos) { - const char* p = pt.toLatin1(); + QByteArray ba = pt.toLatin1(); + const char* p = ba.constData(); Xml xml(p); for (;;) { Xml::Token token = xml.parse(); diff --git a/muse2/muse/midievent.cpp b/muse2/muse/midievent.cpp index 861a17f0..ffeca3ff 100644 --- a/muse2/muse/midievent.cpp +++ b/muse2/muse/midievent.cpp @@ -137,7 +137,8 @@ void MidiEventBase::read(Xml& xml) break; case Xml::Text: { - const char*s = tag.toLatin1(); + QByteArray ba = tag.toLatin1(); + const char*s = ba.constData(); edata.data = new unsigned char[dataLen]; edata.dataLen = dataLen; unsigned char* d = edata.data; diff --git a/muse2/muse/vst.cpp b/muse2/muse/vst.cpp index 29289924..28657c69 100644 --- a/muse2/muse/vst.cpp +++ b/muse2/muse/vst.cpp @@ -422,7 +422,8 @@ void* VstSynth::instantiate() n.setNum(_instances); QString instanceName = baseName() + "-" + n; doSetuid(); - const char* path = info.filePath().toLatin1(); + QByteArray ba = info.filePath().toLatin1(); + const char* path = ba.constData(); fstHandle = fst_load(path); if (fstHandle == 0) { diff --git a/muse2/muse/widgets/utils.cpp b/muse2/muse/widgets/utils.cpp index 942468d4..083ae3d3 100644 --- a/muse2/muse/widgets/utils.cpp +++ b/muse2/muse/widgets/utils.cpp @@ -180,7 +180,8 @@ int string2bitmap(const QString& str) { int val = 0; QString ss = str.simplified(); - const char* s = ss.toLatin1(); + QByteArray ba = ss.toLatin1(); + const char* s = ba.constData(); //printf("string2bitmap <%s>\n", s); if (s == 0) @@ -238,7 +239,8 @@ unsigned int string2u32bitmap(const QString& str) //int val = 0; unsigned int val = 0; QString ss = str.simplified(); - const char* s = ss.toLatin1(); + QByteArray ba = ss.toLatin1(); + const char* s = ba.constData(); //printf("string2bitmap <%s>\n", s); if (s == 0) diff --git a/muse2/synti/fluid/fluidgui.cpp b/muse2/synti/fluid/fluidgui.cpp index 4782e741..10625999 100644 --- a/muse2/synti/fluid/fluidgui.cpp +++ b/muse2/synti/fluid/fluidgui.cpp @@ -55,7 +55,8 @@ void FLUIDGui::loadFont() QMessageBox::critical(this, tr("FLUID: open Soundfile"), s); return; } - const char* path = pathEntry->text().toLatin1(); + QByteArray ba = pathEntry->text().toLatin1(); + const char* path = ba.constData(); int len = strlen(path) + 1 + 3; unsigned char buffer[len]; int k = 0; diff --git a/muse2/synti/vam/vamgui.cpp b/muse2/synti/vam/vamgui.cpp index 1ed32994..10378229 100644 --- a/muse2/synti/vam/vamgui.cpp +++ b/muse2/synti/vam/vamgui.cpp @@ -445,7 +445,8 @@ void VAMGui::setPreset(Preset* preset) putchar(0x7c); // mess putchar(0x2); // vam putchar(0x3); // setPreset - const char* name = preset->name.toLatin1(); + QByteArray ba = preset->name.toLatin1(); + const char* name = ba.constData(); while (*name) putchar(*name++ & 0x7f); putchar(0); |