summaryrefslogtreecommitdiff
path: root/muse2/muse
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-08 00:22:51 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-08 00:22:51 +0000
commitf681783c513b54002aa4dfec2566f26bfc38689b (patch)
tree1aad8f37fd067cd36b2d4de1ae3b62b584914b20 /muse2/muse
parentc856c3c44f488b137dd3b76f81b2d4b9c5444b73 (diff)
Some fixes to the previous commit. Apparently I missed to filter a case.
Diffstat (limited to 'muse2/muse')
-rw-r--r--muse2/muse/app.cpp3
-rw-r--r--muse2/muse/driver/jack.cpp24
-rw-r--r--muse2/muse/midiedit/ecanvas.cpp3
-rw-r--r--muse2/muse/midievent.cpp3
-rw-r--r--muse2/muse/vst.cpp3
-rw-r--r--muse2/muse/widgets/utils.cpp6
6 files changed, 28 insertions, 14 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)