Remove Qt4 compatibility code

This commit is contained in:
Lukas W
2018-04-28 12:04:44 +02:00
parent a87aa7e356
commit da1c78ce86
20 changed files with 20 additions and 137 deletions

View File

@@ -74,11 +74,7 @@ PatchesDialog::PatchesDialog( QWidget * pParent, Qt::WindowFlags wflags )
// Soundfonts list view...
QHeaderView * pHeader = m_progListView->header();
pHeader->setDefaultAlignment( Qt::AlignLeft );
#if QT_VERSION >= 0x050000
pHeader->setSectionsMovable( false );
#else
pHeader->setMovable( false );
#endif
pHeader->setStretchLastSection( true );
m_progListView->resizeColumnToContents( 0 ); // Prog.

View File

@@ -272,7 +272,7 @@ void VstEffectControlDialog::showEvent(QShowEvent *_se)
VstEffectControlDialog::~VstEffectControlDialog()
{
#if !(QT_VERSION < 0x050000 && defined(LMMS_BUILD_LINUX))
#ifndef LMMS_BUILD_LINUX
if (m_pluginWidget && layout()) {
layout()->removeWidget(m_pluginWidget);
m_pluginWidget->setParent(nullptr);

View File

@@ -434,11 +434,7 @@ QString lb302Synth::nodeName() const
// OBSOLETE. Break apart once we get Q_OBJECT to work. >:[
void lb302Synth::recalcFilter()
{
#if QT_VERSION >= 0x050000
vcf.load()->recalc();
#else
vcf->recalc();
#endif
// THIS IS OLD 3pole/24dB code, I may reintegrate it. Don't need it
// right now. Should be toggled by LB_24_RES_TRICK at the moment.
@@ -464,11 +460,7 @@ int lb302Synth::process(sampleFrame *outbuf, const int size)
float samp;
// Hold on to the current VCF, and use it throughout this period
#if QT_VERSION >= 0x050000
lb302Filter *filter = vcf.loadAcquire();
#else
lb302Filter *filter = vcf;
#endif
if( release_frame == 0 || ! m_playingNote )
{
@@ -692,11 +684,7 @@ void lb302Synth::initNote( lb302Note *n)
if(n->dead ==0){
// Swap next two blocks??
#if QT_VERSION >= 0x050000
vcf.load()->playNote();
#else
vcf->playNote();
#endif
// Ensure envelope is recalculated
vcf_envpos = ENVINC;

View File

@@ -75,11 +75,7 @@ patchesDialog::patchesDialog( QWidget *pParent, Qt::WindowFlags wflags )
// pHeader->setResizeMode(QHeaderView::Custom);
pHeader->setDefaultAlignment(Qt::AlignLeft);
// pHeader->setDefaultSectionSize(200);
#if QT_VERSION >= 0x050000
pHeader->setSectionsMovable(false);
#else
pHeader->setMovable(false);
#endif
pHeader->setStretchLastSection(true);
m_progListView->resizeColumnToContents(0); // Prog.

View File

@@ -35,17 +35,10 @@
#ifdef LMMS_BUILD_LINUX
# include <QX11Info>
# if QT_VERSION < 0x050000
# include <QX11EmbedContainer>
# else
# include "X11EmbedContainer.h"
# include <QWindow>
# endif
# include "X11EmbedContainer.h"
#endif
#if QT_VERSION >= 0x050000
# include <QWindow>
#endif
#include <QWindow>
#include <QDomDocument>

View File

@@ -122,11 +122,6 @@ ELSE()
ENDIF()
TARGET_LINK_LIBRARIES(ZynAddSubFxCore zynaddsubfx_nio ${FFTW3F_LIBRARIES} ${QT_LIBRARIES} -lz -lpthread)
# required libs for debug msys builds
IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
TARGET_LINK_LIBRARIES(ZynAddSubFxCore QtCore4 QtGui4 QtXml4)
ENDIF()
TARGET_LINK_LIBRARIES(ZynAddSubFxCore Qt5::Widgets Qt5::Xml)
IF(LMMS_BUILD_WIN32)