aboutsummaryrefslogtreecommitdiff
path: root/qmidiplayer-desktop/qmpinfowindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-19 23:36:48 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-19 23:36:48 +0800
commit6d568d07b31ba2ae39703cfd272d3003ea542018 (patch)
tree58dca1ac27ffe9dd6bb045c5a71d04644b7a2e07 /qmidiplayer-desktop/qmpinfowindow.cpp
parentc7bf3e37e6eaed6895c797f72ef116b42c6f8a44 (diff)
downloadQMidiPlayer-6d568d07b31ba2ae39703cfd272d3003ea542018.tar.xz
Legacy code massacre!
Complete reconstruction of the settings infrastructure. All options are now registered using a revamped option API. Legacy configuration files are no longer compatible. Please make a backup.
Diffstat (limited to 'qmidiplayer-desktop/qmpinfowindow.cpp')
-rw-r--r--qmidiplayer-desktop/qmpinfowindow.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qmidiplayer-desktop/qmpinfowindow.cpp b/qmidiplayer-desktop/qmpinfowindow.cpp
index d1485be..c0b8892 100644
--- a/qmidiplayer-desktop/qmpinfowindow.cpp
+++ b/qmidiplayer-desktop/qmpinfowindow.cpp
@@ -47,22 +47,22 @@ void qmpInfoWindow::updateInfo()
{
char str[256];
CMidiPlayer* player=qmpMainWindow::getInstance()->getPlayer();
- QSettings* settings=qmpSettingsWindow::getSettingsIntf();
+ std::string textencoding=qmpMainWindow::getInstance()->getSettings()->getOptionEnumIntOptName("Midi/TextEncoding");
ui->lbFileName->setText(QString("File name: ")+qmpMainWindow::getInstance()->getFileName());
if(player->getTitle())
{
- if(settings->value("Midi/TextEncoding","").toString()!="Unicode")
+ if(textencoding!="Unicode")
ui->lbTitle->setText(QString("Title: ")+
- QTextCodec::codecForName(settings->value("Midi/TextEncoding","").toString().toStdString().c_str())->toUnicode(player->getTitle()));
+ QTextCodec::codecForName(textencoding.c_str())->toUnicode(player->getTitle()));
else
ui->lbTitle->setText(QString("Title: ")+player->getTitle());
}
else ui->lbTitle->setText(QString("Title: "));
if(player->getCopyright())
{
- if(settings->value("Midi/TextEncoding","").toString()!="Unicode")
+ if(textencoding!="Unicode")
ui->lbCopyright->setText(QString("Copyright: ")+
- QTextCodec::codecForName(settings->value("Midi/TextEncoding","").toString().toStdString().c_str())->toUnicode(player->getCopyright()));
+ QTextCodec::codecForName(textencoding.c_str())->toUnicode(player->getCopyright()));
else
ui->lbCopyright->setText(QString("Copyright: ")+player->getCopyright());
}