Fix wrong usage of `QObject` leading to warnings

Classes inheriting from `QObject` must use the `Q_OBJECT` macro. This was
not the case and thus causing warnings. Since the `QObject` base class was
not utilized here anyways except for `tr()` I simply removed the that
inheritance.
This commit is contained in:
Martchus 2023-06-12 22:49:11 +02:00
parent c787b1bc7c
commit eb0111dd7b
3 changed files with 3 additions and 3 deletions

View File

@ -315,7 +315,7 @@ void CConductor::reconnectMidi()
{
if (!validMidiOutput()) {
QString midiInputName = m_settings->value("Midi/Input").toString();
if (midiInputName.startsWith(tr("None"))) {
if (midiInputName.startsWith(QCoreApplication::translate("CConductor", "None"))) {
CChord::setPianoRange(PC_KEY_LOWEST_NOTE, PC_KEY_HIGHEST_NOTE);
} else {
CChord::setPianoRange(m_settings->value("Keyboard/LowestNote", 0).toInt(),

View File

@ -37,7 +37,7 @@
#include "MidiEvent.h"
class CMidiDeviceBase : public QObject
class CMidiDeviceBase
{
public:
virtual void init() = 0;

View File

@ -63,7 +63,7 @@ public:
static QString getFluidInternalName()
{
return QString(tr("Internal Sound") + " " + FLUID_NAME );
return QCoreApplication::translate("CMidiDeviceFluidSynth", "Internal Sound %1").arg(QString::fromUtf8(FLUID_NAME));
}
private: