diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
commit | 4a1be16bbfafb8455b54336c4465da8f8bfe3ab6 (patch) | |
tree | 01cbdba041d5e864294909d834c1a189f0edb98b /muse2/synti/fluidsynth/fluidsynti.cpp | |
parent | f681783c513b54002aa4dfec2566f26bfc38689b (diff) |
ported many Qt3 methods to Qt4
Diffstat (limited to 'muse2/synti/fluidsynth/fluidsynti.cpp')
-rw-r--r-- | muse2/synti/fluidsynth/fluidsynti.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/muse2/synti/fluidsynth/fluidsynti.cpp b/muse2/synti/fluidsynth/fluidsynti.cpp index c9d5ef4d..0802614b 100644 --- a/muse2/synti/fluidsynth/fluidsynti.cpp +++ b/muse2/synti/fluidsynth/fluidsynti.cpp @@ -112,7 +112,7 @@ bool FluidSynth::init(const char* name) gui = new FluidSynthGui(); gui->show(); - gui->setCaption(name); + gui->setWindowTitle(name); lastdir= ""; currentlyLoadedFonts = 0; @@ -363,10 +363,11 @@ void FluidSynth::parseInitData(int n, const byte* d) for (int i=0; i<nr_of_fonts; i++) { fonts[i].filename = (char*)(chptr); chptr+=(strlen(fonts[i].filename.c_str())+1); + QByteArray ba = projPathPtr->toAscii(); if (QFileInfo(fonts[i].filename.c_str()).isRelative()) { printf("path is relative, we append full path!\n"); - fonts[i].filename = projPathPtr->ascii() + std::string("/")+ fonts[i].filename; + fonts[i].filename = ba.constData() + std::string("/")+ fonts[i].filename; } std::cout << "SOUNDFONT FILENAME + PATH " << fonts[i].filename << std::endl; } @@ -589,7 +590,7 @@ static void* fontLoadThread(void* t) //Strip off the filename QString temp = QString(filename); - QString name = temp.right(temp.length() - temp.findRev('/',-1) - 1); + QString name = temp.right(temp.length() - temp.lastIndexOf('/',-1) - 1); name = name.left(name.length()-4); //Strip off ".sf2" font.name = name.toLatin1().constData(); fptr->stack.push_front(font); |