diff options
Diffstat (limited to 'muse2/muse/widgets/unusedwavefiles.cpp')
-rw-r--r-- | muse2/muse/widgets/unusedwavefiles.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/muse2/muse/widgets/unusedwavefiles.cpp b/muse2/muse/widgets/unusedwavefiles.cpp index 842491c4..810105bf 100644 --- a/muse2/muse/widgets/unusedwavefiles.cpp +++ b/muse2/muse/widgets/unusedwavefiles.cpp @@ -47,10 +47,10 @@ UnusedWaveFiles::UnusedWaveFiles(QWidget *parent) : void UnusedWaveFiles::findWaveFiles() { ui->filelistWidget->clear(); - //printf("museProject =%s\n", museProject.toLatin1().data()); -// QFileInfo proj(museProject); + //printf("MusEGlobal::museProject =%s\n", MusEGlobal::museProject.toLatin1().data()); +// QFileInfo proj(MusEGlobal::museProject); // QString projPath = proj.absolutePath(); - QDir dir(museProject); + QDir dir(MusEGlobal::museProject); QStringList filter; filter.append("*.wav"); filter.append("*.ogg"); @@ -60,14 +60,14 @@ void UnusedWaveFiles::findWaveFiles() // get med files QStringList medFiles; if (ui->currentProjRadioButton->isChecked()) { - medFiles.append(muse->projectName()); + medFiles.append(MusEGlobal::muse->projectName()); } else { //printf("get ALLL *.med files!\n"); QStringList medFilter("*.med"); medFiles = dir.entryList(medFilter); } foreach (QString medFile, medFiles) { - QString fname = museProject+"/"+ medFile; + QString fname = MusEGlobal::museProject+"/"+ medFile; //printf("fopen %s\n", fname.toLatin1().data()); FILE *fp =fopen(fname.toLatin1().data(),"r"); QTextStream fileContent(fp); @@ -102,15 +102,15 @@ void UnusedWaveFiles::accept() int ret = QMessageBox::question(this,"Move files", "Are you sure you want to move away the unused files?", QMessageBox::Ok, QMessageBox::Cancel); if (ret == QMessageBox::Ok) { - QDir currDir(museProject); + QDir currDir(MusEGlobal::museProject); currDir.mkdir("unused"); foreach(QString file, allWaveFiles) { - QFile::rename(museProject+ "/"+file, museProject + "/unused/" +file); + QFile::rename(MusEGlobal::museProject+ "/"+file, MusEGlobal::museProject + "/unused/" +file); // move the wca file if it exists - QFileInfo wf(museProject + "/" + file); - if (QFile::exists(museProject + "/" + wf.baseName()+".wca")) { - QFile::rename(museProject + "/" + wf.baseName()+".wca", museProject + "/unused/" +wf.baseName()+".wca"); + QFileInfo wf(MusEGlobal::museProject + "/" + file); + if (QFile::exists(MusEGlobal::museProject + "/" + wf.baseName()+".wca")) { + QFile::rename(MusEGlobal::museProject + "/" + wf.baseName()+".wca", MusEGlobal::museProject + "/unused/" +wf.baseName()+".wca"); } } |