diff options
author | Chris Xiong <chirs241097@gmail.com> | 2016-04-22 21:06:51 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2016-04-22 21:06:51 +0800 |
commit | 446263beafeafa831530a6f9711aa891955b7db3 (patch) | |
tree | 00e9d55274580d413e6d88747d8fe7893cd69ac2 /qmidiplayer-desktop/qmpmainwindow.cpp | |
parent | 7457599cb1bbf1d28b4b29bc12d07801b37ad410 (diff) | |
download | QMidiPlayer-446263beafeafa831530a6f9711aa891955b7db3.tar.xz |
First stable version!0.7.2-5
Remove visualization stub.
Complain explicitly if an invalid file is loaded.
Remove fluidsynth warnings from stderr.
Diffstat (limited to 'qmidiplayer-desktop/qmpmainwindow.cpp')
-rw-r--r-- | qmidiplayer-desktop/qmpmainwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qmidiplayer-desktop/qmpmainwindow.cpp b/qmidiplayer-desktop/qmpmainwindow.cpp index c04bc93..73c2895 100644 --- a/qmidiplayer-desktop/qmpmainwindow.cpp +++ b/qmidiplayer-desktop/qmpmainwindow.cpp @@ -6,6 +6,7 @@ #include <QFont> #include <QDirIterator> #include <QDesktopWidget> +#include <QMessageBox> #include "qmpmainwindow.hpp" #include "ui_qmpmainwindow.h" #include "../core/qmpmidiplay.hpp" @@ -27,14 +28,14 @@ char* wcsto8bit(const wchar_t* s) #define LOAD_FILE \ {\ char* c=wcsto8bit(fns.toStdWString().c_str());\ - if(!player->playerLoadFile(c)){free(c);return;}\ + if(!player->playerLoadFile(c)){free(c);QMessageBox::critical(this,tr("Error"),tr("%1 is not a valid midi file.").arg(fns));return;}\ free(c);\ } #else #define LOAD_SOUNDFONT \ player->pushSoundFont(settingsw->getSFWidget()->item(i)->text().toStdString().c_str()) #define LOAD_FILE \ - if(!player->playerLoadFile(fns.toStdString().c_str()))return + if(!player->playerLoadFile(fns.toStdString().c_str())){QMessageBox::critical(this,tr("Error"),tr("%1 is not a valid midi file.").arg(fns));return;} #endif #define UPDATE_INTERVAL 66 |