aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/main.cpp11
-rw-r--r--qmidiplayer-desktop/qmpdevpropdialog.cpp2
-rw-r--r--qmidiplayer-desktop/qmppresetselect.cpp1
3 files changed, 9 insertions, 5 deletions
diff --git a/qmidiplayer-desktop/main.cpp b/qmidiplayer-desktop/main.cpp
index ba44e99..37f6338 100644
--- a/qmidiplayer-desktop/main.cpp
+++ b/qmidiplayer-desktop/main.cpp
@@ -27,9 +27,6 @@
int main(int argc,char **argv)
{
-#ifdef _WIN32
- FreeConsole();
-#endif
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QCoreApplication::setApplicationName("qmidiplayer");
QCoreApplication::setApplicationVersion(APP_VERSION);
@@ -52,8 +49,16 @@ int main(int argc,char **argv)
clp.addPositionalArgument("file",QCoreApplication::translate("main","midi files to play (optional)."),"[files...]");
clp.addOption(QCommandLineOption("plugin",QCoreApplication::translate("main","Load a plugin from <plugin library>."),"plugin library"));
clp.addOption(QCommandLineOption({"l","load-all-files"},QCoreApplication::translate("main","Load all files from the same folder.")));
+#ifdef _WIN32
+ clp.addOption(QCommandLineOption("keep-console",QCoreApplication::translate("main","Keep console window open.")));
+#endif
clp.process(a);
+#ifdef _WIN32
+ if(!clp.isSet("keep-console"))
+ FreeConsole();
+#endif
+
qmpMainWindow w(&clp);
if(w.parseArgs()==1)return 0;
w.init();
diff --git a/qmidiplayer-desktop/qmpdevpropdialog.cpp b/qmidiplayer-desktop/qmpdevpropdialog.cpp
index 82136dc..64c385d 100644
--- a/qmidiplayer-desktop/qmpdevpropdialog.cpp
+++ b/qmidiplayer-desktop/qmpdevpropdialog.cpp
@@ -21,7 +21,7 @@ qmpDevPropDialog::qmpDevPropDialog(QWidget *parent) :
this->ui->twProps->edit(ui->twProps->model()->index(r,c));
if(c==3)
{
- QString p=QFileDialog::getOpenFileUrl(this,"Select Device Initialization File",QUrl()).path();
+ QString p=QFileDialog::getOpenFileUrl(this,"Select Device Initialization File",QUrl()).toLocalFile();
if(p.length())this->ui->twProps->item(r,2)->setText(p);
}
});
diff --git a/qmidiplayer-desktop/qmppresetselect.cpp b/qmidiplayer-desktop/qmppresetselect.cpp
index 578ae1d..85dc893 100644
--- a/qmidiplayer-desktop/qmppresetselect.cpp
+++ b/qmidiplayer-desktop/qmppresetselect.cpp
@@ -27,7 +27,6 @@ void qmpPresetSelector::showEvent(QShowEvent *e)
void qmpPresetSelector::setupWindow(int chid)
{
CMidiPlayer *plyr=qmpMainWindow::getInstance()->getPlayer();
- if(!plyr->fluid()->getSFCount())return;
ch=chid;int r;char name[256];
uint16_t b;uint8_t p;
std::string pstname;