aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-23 23:11:41 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2016-05-23 23:11:41 +0800
commitb059dd6fa25ad50f549cb1384042b07b6cfe06bf (patch)
treea90d70e3def9a05f37fcb4ecd99db1d2657db1ab /qmidiplayer-desktop
parent7e12992ad284fda2c29e494b3c0d60101592c277 (diff)
downloadQMidiPlayer-b059dd6fa25ad50f549cb1384042b07b6cfe06bf.tar.xz
Add horizontal visualization mode.
Add build date in version page.
Diffstat (limited to 'qmidiplayer-desktop')
-rw-r--r--qmidiplayer-desktop/qmphelpwindow.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/qmidiplayer-desktop/qmphelpwindow.cpp b/qmidiplayer-desktop/qmphelpwindow.cpp
index e3d2897..c9f4667 100644
--- a/qmidiplayer-desktop/qmphelpwindow.cpp
+++ b/qmidiplayer-desktop/qmphelpwindow.cpp
@@ -2,6 +2,17 @@
#include "qmphelpwindow.hpp"
#include "ui_qmphelpwindow.h"
+static const char *months="JanFebMarAprMayJunJulAugSepOctNovDec";
+std::string parseDate(const char *date)
+{
+ char ms[8];
+ int y,d,m;sscanf(date,"%s %d %d",ms,&d,&y);
+ m=(strstr(months,ms)-months)/3+1;
+ char r[16];
+ sprintf(r,"%04d-%02d-%02d",y,m,d);
+ return std::string(r);
+}
+
qmpHelpWindow::qmpHelpWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::qmpHelpWindow)
@@ -28,6 +39,7 @@ void qmpHelpWindow::on_textBrowser_sourceChanged(const QUrl &src)
s.replace("CT_FLUIDSYNTH_VERSION",FLUIDSYNTH_VERSION);
s.replace("RT_FLUIDSYNTH_VERSION",fluid_version_str());
s.replace("APP_VERSION",APP_VERSION);
+ s.replace("BUILD_DATE",parseDate(__DATE__).c_str());
ui->textBrowser->setHtml(s);
}
}