aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp8
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.cpp4
-rw-r--r--src/plugins/Effect/ladspa/ladspahost.h6
-rw-r--r--src/plugins/Effect/ladspa/settingsdialog.cpp4
-rw-r--r--src/plugins/Effect/soxr/soxresampler.cpp5
-rw-r--r--src/plugins/Effect/soxr/soxresampler.h8
-rw-r--r--src/plugins/General/history/historywindow.cpp11
7 files changed, 16 insertions, 30 deletions
diff --git a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
index 2dc537284..de9120e43 100644
--- a/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
+++ b/src/plugins/CommandLineOptions/PlayListOption/playlistoption.cpp
@@ -104,8 +104,8 @@ QString PlayListOption::executeCommand(int id, const QStringList &args)
case PL_DUMP:
{
MetaDataFormatter formatter("%p%if(%p&%t, - ,)%t%if(%p,,%if(%t,,%f))%if(%l, - %l,)");
- int id = args.isEmpty() ? pl_manager->currentPlayListIndex() : args.at(0).toInt() - 1;
- PlayListModel *model = pl_manager->playListAt(id);
+ int pl_id = args.isEmpty() ? pl_manager->currentPlayListIndex() : args.at(0).toInt() - 1;
+ PlayListModel *model = pl_manager->playListAt(pl_id);
if(!model)
return tr("Invalid playlist ID") + "\n";
for(int i = 0; i < model->count(); ++i)
@@ -165,8 +165,8 @@ QString PlayListOption::executeCommand(int id, const QStringList &args)
break;
case PL_CLEAR:
{
- int id = args.isEmpty() ? pl_manager->currentPlayListIndex() : args.at(0).toInt() - 1;
- PlayListModel *model = pl_manager->playListAt(id);
+ int pl_id= args.isEmpty() ? pl_manager->currentPlayListIndex() : args.at(0).toInt() - 1;
+ PlayListModel *model = pl_manager->playListAt(pl_id);
if(!model)
return tr("Invalid playlist ID") + "\n";
model->clear();
diff --git a/src/plugins/Effect/ladspa/ladspahost.cpp b/src/plugins/Effect/ladspa/ladspahost.cpp
index 36f7081c6..0a15b1875 100644
--- a/src/plugins/Effect/ladspa/ladspahost.cpp
+++ b/src/plugins/Effect/ladspa/ladspahost.cpp
@@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2002-2003 Nick Lamb <njl195@zepler.org.uk> *
* Copyright (C) 2005 Giacomo Lozito <city_hunter@users.sf.net> *
- * Copyright (C) 2009-2015 by Ilya Kotov <forkotov02@ya.ru> *
+ * Copyright (C) 2009-2020 by Ilya Kotov <forkotov02@ya.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -41,8 +41,6 @@ LADSPAHost *LADSPAHost::m_instance = nullptr;
LADSPAHost::LADSPAHost(QObject *parent) : QObject(parent)
{
- m_chan = 2;
- m_freq = 44100;
m_instance = this;
loadModules();
diff --git a/src/plugins/Effect/ladspa/ladspahost.h b/src/plugins/Effect/ladspa/ladspahost.h
index 6b436dfb3..131f874bd 100644
--- a/src/plugins/Effect/ladspa/ladspahost.h
+++ b/src/plugins/Effect/ladspa/ladspahost.h
@@ -1,7 +1,7 @@
/***************************************************************************
* Copyright (C) 2002,2003 Nick Lamb <njl195@zepler.org.uk> *
* Copyright (C) 2005 Giacomo Lozito <city_hunter@users.sf.net> *
- * Copyright (C) 2009-2015 by Ilya Kotov <forkotov02@ya.ru> *
+ * Copyright (C) 2009-2020 by Ilya Kotov <forkotov02@ya.ru> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -102,8 +102,8 @@ private:
QList <LADSPAEffect *> m_effects;
static LADSPAHost *m_instance;
- int m_chan;
- quint32 m_freq;
+ int m_chan = 2;
+ quint32 m_freq = 44100;
QList<void *> m_modules;
LADSPA_Data m_buf[9][MAX_SAMPLES];
};
diff --git a/src/plugins/Effect/ladspa/settingsdialog.cpp b/src/plugins/Effect/ladspa/settingsdialog.cpp
index 877b3098e..b96c6533c 100644
--- a/src/plugins/Effect/ladspa/settingsdialog.cpp
+++ b/src/plugins/Effect/ladspa/settingsdialog.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2009-2015 by Ilya Kotov *
+ * Copyright (C) 2009-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -129,7 +129,7 @@ void SettingsDialog::on_configureButton_clicked()
}
if (effect->controls.isEmpty())
{
- QLabel *label = new QLabel(tr("This LADSPA plugin has no user controls"), dialog);
+ label = new QLabel(tr("This LADSPA plugin has no user controls"), dialog);
formLayout->addRow(label);
}
dialog->setLayout(formLayout);
diff --git a/src/plugins/Effect/soxr/soxresampler.cpp b/src/plugins/Effect/soxr/soxresampler.cpp
index 5a7f566fc..e47843638 100644
--- a/src/plugins/Effect/soxr/soxresampler.cpp
+++ b/src/plugins/Effect/soxr/soxresampler.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2016 by Ilya Kotov *
+ * Copyright (C) 2016-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -26,9 +26,6 @@
SoXResampler::SoXResampler() : Effect()
{
- m_soxr = nullptr;
- m_out = nullptr;
- m_out_samples = 0;
QSettings settings(Qmmp::configFile(), QSettings::IniFormat);
m_overSamplingFs = settings.value("SOXR/sample_rate", 48000).toInt();
m_quality = soxr_quality_spec(settings.value("SOXR/quality", SOXR_HQ).toInt(), 0);
diff --git a/src/plugins/Effect/soxr/soxresampler.h b/src/plugins/Effect/soxr/soxresampler.h
index 09e159837..1747548cb 100644
--- a/src/plugins/Effect/soxr/soxresampler.h
+++ b/src/plugins/Effect/soxr/soxresampler.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2016 by Ilya Kotov *
+ * Copyright (C) 2016-2020 by Ilya Kotov *
* forkotov02@ya.ru *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -39,10 +39,10 @@ public:
private:
void freeSoXR();
quint32 m_overSamplingFs;
- float *m_out;
- size_t m_out_samples;
+ float *m_out = nullptr;
+ size_t m_out_samples = 0;
soxr_quality_spec_t m_quality;
- soxr_t m_soxr;
+ soxr_t m_soxr = nullptr;
};
diff --git a/src/plugins/General/history/historywindow.cpp b/src/plugins/General/history/historywindow.cpp
index bd139deed..cbd7439d2 100644
--- a/src/plugins/General/history/historywindow.cpp
+++ b/src/plugins/General/history/historywindow.cpp
@@ -125,16 +125,7 @@ void HistoryWindow::loadHistory()
QString timeStr = dateTime.toLocalTime().toString(tr("hh:mm:ss"));
int topLevelCount = m_ui->historyTreeWidget->topLevelItemCount();
- if(!topLevelCount)
- {
- m_ui->historyTreeWidget->addTopLevelItem(new QTreeWidgetItem());
- m_ui->historyTreeWidget->topLevelItem(topLevelCount++)->setText(0, dateStr);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setFirstColumnSpanned(true);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setTextAlignment(0, Qt::AlignCenter);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setBackground(0, bgColor);
- m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->setForeground(0, textColor);
- }
- else if(m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->text(0) != dateStr)
+ if(!topLevelCount || m_ui->historyTreeWidget->topLevelItem(topLevelCount - 1)->text(0) != dateStr)
{
m_ui->historyTreeWidget->addTopLevelItem(new QTreeWidgetItem());
m_ui->historyTreeWidget->topLevelItem(topLevelCount++)->setText(0, dateStr);