diff --git a/cmake/toolchains/common/MSYS.cmake b/cmake/toolchains/common/MSYS.cmake index 1b377aeee..0b27e8d32 100644 --- a/cmake/toolchains/common/MSYS.cmake +++ b/cmake/toolchains/common/MSYS.cmake @@ -19,18 +19,4 @@ ENDIF() SET(CMAKE_C_USE_RESPONSE_FILE_FOR_INCLUDES OFF) SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_INCLUDES OFF) -# Variable to assist override Qt debug libraries with release versions -SET(QT_OVERRIDE_LIBRARIES - optimized;${MINGW_PREFIX}/bin/QtGui4.dll; - optimized;${MINGW_PREFIX}/bin/QtCore4.dll; - optimized;${MINGW_PREFIX}/bin/QtXml4.dll; - debug;${MINGW_PREFIX}/bin/QtGui4.dll; - debug;${MINGW_PREFIX}/bin/QtCore4.dll; - debug;${MINGW_PREFIX}/bin/QtXml4.dll; -) -IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug") - # Override Qt debug libraries with release versions - SET(QT_LIBRARIES "${QT_OVERRIDE_LIBRARIES}") -ENDIF() - SET(LMMS_BUILD_MSYS 1) diff --git a/include/AutomatableButton.h b/include/AutomatableButton.h index 578063f16..4b5065542 100644 --- a/include/AutomatableButton.h +++ b/include/AutomatableButton.h @@ -39,7 +39,7 @@ class LMMS_EXPORT AutomatableButton : public QPushButton, public BoolModelView Q_OBJECT public: AutomatableButton( QWidget * _parent, const QString & _name - = QString::null ); + = QString() ); virtual ~AutomatableButton(); inline void setCheckable( bool _on ) @@ -84,7 +84,7 @@ class LMMS_EXPORT automatableButtonGroup : public QWidget, public IntModelView Q_OBJECT public: automatableButtonGroup( QWidget * _parent, const QString & _name - = QString::null ); + = QString() ); virtual ~automatableButtonGroup(); void addButton( AutomatableButton * _btn ); diff --git a/include/AutomatableSlider.h b/include/AutomatableSlider.h index 0fbd3adf6..f58d4a059 100644 --- a/include/AutomatableSlider.h +++ b/include/AutomatableSlider.h @@ -36,7 +36,7 @@ class AutomatableSlider : public QSlider, public IntModelView { Q_OBJECT public: - AutomatableSlider( QWidget * _parent, const QString & _name = QString::null ); + AutomatableSlider( QWidget * _parent, const QString & _name = QString() ); virtual ~AutomatableSlider(); bool showStatus() diff --git a/include/FileBrowser.h b/include/FileBrowser.h index 91a58831d..1565017d1 100644 --- a/include/FileBrowser.h +++ b/include/FileBrowser.h @@ -129,13 +129,13 @@ public: void update( void ); - inline QString fullName( QString path = QString::null ) + inline QString fullName( QString path = QString() ) { - if( path == QString::null ) + if( path == QString() ) { path = m_directories[0]; } - if( path != QString::null ) + if( path != QString() ) { path += QDir::separator(); } diff --git a/include/LcdSpinBox.h b/include/LcdSpinBox.h index ab04ec574..b63dfaa40 100644 --- a/include/LcdSpinBox.h +++ b/include/LcdSpinBox.h @@ -34,9 +34,9 @@ class LMMS_EXPORT LcdSpinBox : public LcdWidget, public IntModelView { Q_OBJECT public: - LcdSpinBox( int numDigits, QWidget* parent, const QString& name = QString::null ); + LcdSpinBox( int numDigits, QWidget* parent, const QString& name = QString() ); - LcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name = QString::null ); + LcdSpinBox( int numDigits, const QString& style, QWidget* parent, const QString& name = QString() ); virtual ~LcdSpinBox() = default; diff --git a/include/LcdWidget.h b/include/LcdWidget.h index a9c551704..db969dd33 100644 --- a/include/LcdWidget.h +++ b/include/LcdWidget.h @@ -40,9 +40,9 @@ class LMMS_EXPORT LcdWidget : public QWidget Q_PROPERTY( QColor textShadowColor READ textShadowColor WRITE setTextShadowColor ) public: - LcdWidget( QWidget* parent, const QString& name = QString::null ); - LcdWidget( int numDigits, QWidget* parent, const QString& name = QString::null ); - LcdWidget( int numDigits, const QString& style, QWidget* parent, const QString& name = QString::null ); + LcdWidget( QWidget* parent, const QString& name = QString() ); + LcdWidget( int numDigits, QWidget* parent, const QString& name = QString() ); + LcdWidget( int numDigits, const QString& style, QWidget* parent, const QString& name = QString() ); virtual ~LcdWidget(); diff --git a/include/LedCheckbox.h b/include/LedCheckbox.h index 00f74ac05..723bae6a9 100644 --- a/include/LedCheckbox.h +++ b/include/LedCheckbox.h @@ -45,10 +45,10 @@ public: } ; LedCheckBox( const QString & _txt, QWidget * _parent, - const QString & _name = QString::null, + const QString & _name = QString(), LedColors _color = Yellow ); LedCheckBox( QWidget * _parent, - const QString & _name = QString::null, + const QString & _name = QString(), LedColors _color = Yellow ); virtual ~LedCheckBox(); diff --git a/include/MainApplication.h b/include/MainApplication.h index 4edf55d5e..41d670419 100644 --- a/include/MainApplication.h +++ b/include/MainApplication.h @@ -31,12 +31,10 @@ #ifdef LMMS_BUILD_WIN32 #include -#if QT_VERSION >= 0x050000 #include #endif -#endif -#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000 +#if defined(LMMS_BUILD_WIN32) class MainApplication : public QApplication, public QAbstractNativeEventFilter #else class MainApplication : public QApplication @@ -47,10 +45,8 @@ public: bool event(QEvent* event); #ifdef LMMS_BUILD_WIN32 bool winEventFilter(MSG* msg, long* result); -#if QT_VERSION >= 0x050000 bool nativeEventFilter(const QByteArray& eventType, void* message, long* result); -#endif #endif inline QString& queuedFile() { diff --git a/include/MidiApple.h b/include/MidiApple.h index dcef23a83..21b88073b 100644 --- a/include/MidiApple.h +++ b/include/MidiApple.h @@ -47,7 +47,7 @@ public: inline static QString probeDevice() { - return QString::Null(); // no midi device name + return QString(); // no midi device name } inline static QString name() @@ -56,7 +56,7 @@ public: } inline static QString configSection() { - return QString::Null(); // no configuration settings + return QString(); // no configuration settings } virtual void processOutEvent( const MidiEvent & _me, diff --git a/include/MidiDummy.h b/include/MidiDummy.h index 980afe288..dffd1ce51 100644 --- a/include/MidiDummy.h +++ b/include/MidiDummy.h @@ -46,12 +46,12 @@ public: inline static QString probeDevice() { - return QString::Null(); // no midi device name + return QString(); // no midi device name } inline static QString configSection() { - return QString::Null(); // no configuration settings + return QString(); // no configuration settings } diff --git a/include/MidiWinMM.h b/include/MidiWinMM.h index 08e49c108..a51fa7ed6 100644 --- a/include/MidiWinMM.h +++ b/include/MidiWinMM.h @@ -47,7 +47,7 @@ public: inline static QString probeDevice() { - return QString::Null(); // no midi device name + return QString(); // no midi device name } @@ -58,7 +58,7 @@ public: inline static QString configSection() { - return QString::Null(); // no configuration settings + return QString(); // no configuration settings } diff --git a/include/Model.h b/include/Model.h index 290639cc1..b40c21029 100644 --- a/include/Model.h +++ b/include/Model.h @@ -35,7 +35,7 @@ class LMMS_EXPORT Model : public QObject { Q_OBJECT public: - Model( Model * _parent, QString _display_name = QString::null, + Model( Model * _parent, QString _display_name = QString(), bool _default_constructed = false ) : QObject( _parent ), m_displayName( _display_name ), diff --git a/include/PixmapButton.h b/include/PixmapButton.h index e44f5d952..6ee7bcdc8 100644 --- a/include/PixmapButton.h +++ b/include/PixmapButton.h @@ -36,7 +36,7 @@ class LMMS_EXPORT PixmapButton : public AutomatableButton Q_OBJECT public: PixmapButton( QWidget * _parent, - const QString & _name = QString::null ); + const QString & _name = QString() ); virtual ~PixmapButton(); void setActiveGraphic( const QPixmap & _pm ); diff --git a/include/RemotePlugin.h b/include/RemotePlugin.h index 57f6b379b..99160a967 100644 --- a/include/RemotePlugin.h +++ b/include/RemotePlugin.h @@ -138,8 +138,8 @@ public: m_shmID( -1 ), #endif m_data( NULL ), - m_dataSem( QString::null ), - m_messageSem( QString::null ), + m_dataSem( QString() ), + m_messageSem( QString() ), m_lockDepth( 0 ) { #ifdef USE_QT_SHMEM @@ -181,8 +181,8 @@ public: m_shmID( shmget( _shm_key, 0, 0 ) ), #endif m_data( NULL ), - m_dataSem( QString::null ), - m_messageSem( QString::null ), + m_dataSem( QString() ), + m_messageSem( QString() ), m_lockDepth( 0 ) { #ifdef USE_QT_SHMEM diff --git a/include/embed.h b/include/embed.h index 6348331f7..40ce8faed 100644 --- a/include/embed.h +++ b/include/embed.h @@ -60,11 +60,11 @@ class PixmapLoader { public: PixmapLoader( const PixmapLoader * _ref ) : - m_name( _ref != NULL ? _ref->m_name : QString::null ) + m_name( _ref != NULL ? _ref->m_name : QString() ) { } - PixmapLoader( const QString & _name = QString::null ) : + PixmapLoader( const QString & _name = QString() ) : m_name( _name ) { } @@ -96,7 +96,7 @@ protected: class PluginPixmapLoader : public PixmapLoader { public: - PluginPixmapLoader( const QString & _name = QString::null ) : + PluginPixmapLoader( const QString & _name = QString() ) : PixmapLoader( _name ) { } diff --git a/plugins/GigPlayer/PatchesDialog.cpp b/plugins/GigPlayer/PatchesDialog.cpp index ac7c4d330..7be3bfd98 100644 --- a/plugins/GigPlayer/PatchesDialog.cpp +++ b/plugins/GigPlayer/PatchesDialog.cpp @@ -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. diff --git a/plugins/VstEffect/VstEffectControlDialog.cpp b/plugins/VstEffect/VstEffectControlDialog.cpp index 797818979..156eaae01 100644 --- a/plugins/VstEffect/VstEffectControlDialog.cpp +++ b/plugins/VstEffect/VstEffectControlDialog.cpp @@ -272,12 +272,10 @@ void VstEffectControlDialog::showEvent(QShowEvent *_se) VstEffectControlDialog::~VstEffectControlDialog() { -#if !(QT_VERSION < 0x050000 && defined(LMMS_BUILD_LINUX)) if (m_pluginWidget && layout()) { layout()->removeWidget(m_pluginWidget); m_pluginWidget->setParent(nullptr); } -#endif } diff --git a/plugins/lb302/lb302.cpp b/plugins/lb302/lb302.cpp index 00d94f52c..d32f14e88 100644 --- a/plugins/lb302/lb302.cpp +++ b/plugins/lb302/lb302.cpp @@ -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; diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index e555886fc..a628fb984 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -78,7 +78,7 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data ) patmanInstrument::patmanInstrument( InstrumentTrack * _instrument_track ) : Instrument( _instrument_track, &patman_plugin_descriptor ), - m_patchFile( QString::null ), + m_patchFile( QString() ), m_loopedModel( true, this ), m_tunedModel( true, this ) { @@ -182,7 +182,7 @@ void patmanInstrument::setFile( const QString & _patch_file, bool _rename ) { if( _patch_file.size() <= 0 ) { - m_patchFile = QString::null; + m_patchFile = QString(); return; } diff --git a/plugins/sf2_player/patches_dialog.cpp b/plugins/sf2_player/patches_dialog.cpp index 6ae791c15..bb8801f49 100644 --- a/plugins/sf2_player/patches_dialog.cpp +++ b/plugins/sf2_player/patches_dialog.cpp @@ -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. diff --git a/plugins/vibed/nine_button_selector.cpp b/plugins/vibed/nine_button_selector.cpp index 0c48c66c9..edcfc2f51 100644 --- a/plugins/vibed/nine_button_selector.cpp +++ b/plugins/vibed/nine_button_selector.cpp @@ -52,8 +52,8 @@ nineButtonSelector::nineButtonSelector( QPixmap _button0_on, int _x, int _y, QWidget * _parent ): QWidget( _parent ), - IntModelView( new nineButtonSelectorModel(0, 8, _default, NULL, - QString::null, true ), this ) + IntModelView( new nineButtonSelectorModel(0, 8, _default, NULL, + QString(), true ), this ) { setFixedSize( 50, 50 ); move( _x, _y ); diff --git a/plugins/vst_base/VstPlugin.cpp b/plugins/vst_base/VstPlugin.cpp index 791150da1..9b2bdc88d 100644 --- a/plugins/vst_base/VstPlugin.cpp +++ b/plugins/vst_base/VstPlugin.cpp @@ -38,17 +38,10 @@ #ifdef LMMS_BUILD_LINUX # include -# if QT_VERSION < 0x050000 -# include -# else -# include "X11EmbedContainer.h" -# include -# endif +# include "X11EmbedContainer.h" #endif -#if QT_VERSION >= 0x050000 -# include -#endif +#include #include diff --git a/plugins/zynaddsubfx/CMakeLists.txt b/plugins/zynaddsubfx/CMakeLists.txt index ff9d7219d..bdc10bf32 100644 --- a/plugins/zynaddsubfx/CMakeLists.txt +++ b/plugins/zynaddsubfx/CMakeLists.txt @@ -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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f798881c7..0fcdd04cd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -184,11 +184,6 @@ FOREACH(LIB ${LMMS_REQUIRED_LIBS}) ENDFOREACH() -# Required libs for debug msys builds -IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug") - TARGET_LINK_LIBRARIES(lmms QtCore4 QtGui4 QtXml4) -ENDIF() - # Install IF(NOT MSVC) IF(LMMS_BUILD_WIN32) diff --git a/src/core/AutomatableModel.cpp b/src/core/AutomatableModel.cpp index 30732e052..e3ed6e445 100644 --- a/src/core/AutomatableModel.cpp +++ b/src/core/AutomatableModel.cpp @@ -409,7 +409,7 @@ void AutomatableModel::linkModel( AutomatableModel* model ) void AutomatableModel::unlinkModel( AutomatableModel* model ) { - AutoModelVector::Iterator it = qFind( m_linkedModels.begin(), m_linkedModels.end(), model ); + AutoModelVector::Iterator it = std::find( m_linkedModels.begin(), m_linkedModels.end(), model ); if( it != m_linkedModels.end() ) { m_linkedModels.erase( it ); diff --git a/src/core/ConfigManager.cpp b/src/core/ConfigManager.cpp index f52e10ac7..9d6781f7c 100644 --- a/src/core/ConfigManager.cpp +++ b/src/core/ConfigManager.cpp @@ -26,11 +26,7 @@ #include #include #include -#if QT_VERSION >= 0x050000 #include -#else -#include -#endif #include #include "ConfigManager.h" @@ -55,11 +51,7 @@ ConfigManager * ConfigManager::s_instanceOfMe = NULL; ConfigManager::ConfigManager() : m_lmmsRcFile( QDir::home().absolutePath() +"/.lmmsrc.xml" ), - #if QT_VERSION >= 0x050000 m_workingDir( QStandardPaths::writableLocation( QStandardPaths::DocumentsLocation ) + "/lmms/"), - #else - m_workingDir( QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation ) + "/lmms/"), - #endif m_dataDir( "data:/" ), m_artworkDir( defaultArtworkDir() ), m_vstDir( m_workingDir + "vst/" ), @@ -210,13 +202,8 @@ QStringList ConfigManager::availabeVstEmbedMethods() methods.append("win32"); #endif #ifdef LMMS_BUILD_LINUX -#if QT_VERSION >= 0x050000 if (static_cast(QApplication::instance())-> platformName() == "xcb") -#else - if (qgetenv("QT_QPA_PLATFORM").isNull() - || qgetenv("QT_QPA_PLATFORM") == "xcb") -#endif { methods.append("xembed"); } diff --git a/src/core/EffectChain.cpp b/src/core/EffectChain.cpp index 886899c04..8439fd91e 100644 --- a/src/core/EffectChain.cpp +++ b/src/core/EffectChain.cpp @@ -137,7 +137,7 @@ void EffectChain::removeEffect( Effect * _effect ) { Engine::mixer()->requestChangeInModel(); - Effect ** found = qFind( m_effects.begin(), m_effects.end(), _effect ); + Effect ** found = std::find( m_effects.begin(), m_effects.end(), _effect ); if( found == m_effects.end() ) { Engine::mixer()->doneChangeInModel(); diff --git a/src/core/LadspaManager.cpp b/src/core/LadspaManager.cpp index 176fde18b..4336e50a5 100644 --- a/src/core/LadspaManager.cpp +++ b/src/core/LadspaManager.cpp @@ -103,7 +103,7 @@ LadspaManager::LadspaManager() { m_sortedPlugins.append( qMakePair( getName( *it ), *it ) ); } - qSort( m_sortedPlugins ); + std::sort( m_sortedPlugins.begin(), m_sortedPlugins.end() ); } diff --git a/src/core/Mixer.cpp b/src/core/Mixer.cpp index 3298d3dd0..b508b968b 100644 --- a/src/core/Mixer.cpp +++ b/src/core/Mixer.cpp @@ -393,7 +393,7 @@ const surroundSampleFrame * Mixer::renderNextBuffer() ConstPlayHandleList::Iterator it_rem = m_playHandlesToRemove.begin(); while( it_rem != m_playHandlesToRemove.end() ) { - PlayHandleList::Iterator it = qFind( m_playHandles.begin(), m_playHandles.end(), *it_rem ); + PlayHandleList::Iterator it = std::find( m_playHandles.begin(), m_playHandles.end(), *it_rem ); if( it != m_playHandles.end() ) { @@ -659,7 +659,7 @@ void Mixer::restoreAudioDevice() void Mixer::removeAudioPort( AudioPort * _port ) { requestChangeInModel(); - QVector::Iterator it = qFind( m_audioPorts.begin(), + QVector::Iterator it = std::find( m_audioPorts.begin(), m_audioPorts.end(), _port ); if( it != m_audioPorts.end() ) @@ -720,7 +720,7 @@ void Mixer::removePlayHandle( PlayHandle * _ph ) } } // Now check m_playHandles - PlayHandleList::Iterator it = qFind( m_playHandles.begin(), + PlayHandleList::Iterator it = std::find( m_playHandles.begin(), m_playHandles.end(), _ph ); if( it != m_playHandles.end() ) { diff --git a/src/core/Model.cpp b/src/core/Model.cpp index 04a1f2f33..597d0340d 100644 --- a/src/core/Model.cpp +++ b/src/core/Model.cpp @@ -33,7 +33,7 @@ QString Model::fullDisplayName() const const QString p = parentModel()->fullDisplayName(); if( n.isEmpty() && p.isEmpty() ) { - return QString::null; + return QString(); } else if( p.isEmpty() ) { diff --git a/src/core/SampleBuffer.cpp b/src/core/SampleBuffer.cpp index 76afa5599..140a420fb 100644 --- a/src/core/SampleBuffer.cpp +++ b/src/core/SampleBuffer.cpp @@ -1012,12 +1012,12 @@ QString SampleBuffer::openAudioFile() const { if( ofd.selectedFiles().isEmpty() ) { - return QString::null; + return QString(); } return tryToMakeRelative( ofd.selectedFiles()[0] ); } - return QString::null; + return QString(); } diff --git a/src/core/Track.cpp b/src/core/Track.cpp index e7aa15cd0..36d649e77 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -95,7 +95,7 @@ TextFloat * TrackContentObjectView::s_textFloat = NULL; TrackContentObject::TrackContentObject( Track * track ) : Model( track ), m_track( track ), - m_name( QString::null ), + m_name( QString() ), m_startPosition(), m_length(), m_mutedModel( false, this, tr( "Mute" ) ), @@ -870,7 +870,7 @@ void TrackContentObjectView::mouseMoveEvent( QMouseEvent * me ) DataFile dataFile = createTCODataFiles( tcoViews ); // TODO -- thumbnail for all selected - QPixmap thumbnail = QPixmap::grabWidget( this ).scaled( + QPixmap thumbnail = grab().scaled( 128, 128, Qt::KeepAspectRatio, Qt::SmoothTransformation ); @@ -1242,7 +1242,7 @@ void TrackContentWidget::addTCOView( TrackContentObjectView * tcov ) */ void TrackContentWidget::removeTCOView( TrackContentObjectView * tcov ) { - tcoViewVector::iterator it = qFind( m_tcoViews.begin(), + tcoViewVector::iterator it = std::find( m_tcoViews.begin(), m_tcoViews.end(), tcov ); if( it != m_tcoViews.end() ) @@ -1808,8 +1808,7 @@ void TrackOperationsWidget::mousePressEvent( QMouseEvent * me ) m_trackView->getTrack()->saveState( dataFile, dataFile.content() ); new StringPairDrag( QString( "track_%1" ).arg( m_trackView->getTrack()->type() ), - dataFile.toString(), QPixmap::grabWidget( - m_trackView->getTrackSettingsWidget() ), + dataFile.toString(), m_trackView->getTrackSettingsWidget()->grab(), this ); } else if( me->button() == Qt::LeftButton ) @@ -2259,7 +2258,7 @@ TrackContentObject * Track::addTCO( TrackContentObject * tco ) */ void Track::removeTCO( TrackContentObject * tco ) { - tcoVector::iterator it = qFind( m_trackContentObjects.begin(), + tcoVector::iterator it = std::find( m_trackContentObjects.begin(), m_trackContentObjects.end(), tco ); if( it != m_trackContentObjects.end() ) @@ -2331,7 +2330,7 @@ TrackContentObject * Track::getTCO( int tcoNum ) int Track::getTCONum( const TrackContentObject * tco ) { // for( int i = 0; i < getTrackContentWidget()->numOfTCOs(); ++i ) - tcoVector::iterator it = qFind( m_trackContentObjects.begin(), + tcoVector::iterator it = std::find( m_trackContentObjects.begin(), m_trackContentObjects.end(), tco ); if( it != m_trackContentObjects.end() ) diff --git a/src/core/audio/AudioPort.cpp b/src/core/audio/AudioPort.cpp index e9beb3c0e..eda000bb9 100644 --- a/src/core/audio/AudioPort.cpp +++ b/src/core/audio/AudioPort.cpp @@ -238,7 +238,7 @@ void AudioPort::addPlayHandle( PlayHandle * handle ) void AudioPort::removePlayHandle( PlayHandle * handle ) { m_playHandleLock.lock(); - PlayHandleList::Iterator it = qFind( m_playHandles.begin(), m_playHandles.end(), handle ); + PlayHandleList::Iterator it = std::find( m_playHandles.begin(), m_playHandles.end(), handle ); if( it != m_playHandles.end() ) { m_playHandles.erase( it ); diff --git a/src/core/main.cpp b/src/core/main.cpp index 078e9f26d..71440654e 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -818,22 +818,12 @@ int main( int argc, char * * argv ) QPushButton * discard; QPushButton * exit; - #if QT_VERSION >= 0x050000 - // setting all buttons to the same roles allows us - // to have a custom layout - discard = mb.addButton( MainWindow::tr( "Discard" ), - QMessageBox::AcceptRole ); - recover = mb.addButton( MainWindow::tr( "Recover" ), - QMessageBox::AcceptRole ); - - # else - // in qt4 the button order is reversed - recover = mb.addButton( MainWindow::tr( "Recover" ), - QMessageBox::AcceptRole ); - discard = mb.addButton( MainWindow::tr( "Discard" ), - QMessageBox::AcceptRole ); - - #endif + // setting all buttons to the same roles allows us + // to have a custom layout + discard = mb.addButton( MainWindow::tr( "Discard" ), + QMessageBox::AcceptRole ); + recover = mb.addButton( MainWindow::tr( "Recover" ), + QMessageBox::AcceptRole ); // have a hidden exit button exit = mb.addButton( "", QMessageBox::RejectRole); diff --git a/src/core/midi/MidiClient.cpp b/src/core/midi/MidiClient.cpp index b88c64db1..03eec4e38 100644 --- a/src/core/midi/MidiClient.cpp +++ b/src/core/midi/MidiClient.cpp @@ -77,7 +77,7 @@ void MidiClient::removePort( MidiPort* port ) } QVector::Iterator it = - qFind( m_midiPorts.begin(), m_midiPorts.end(), port ); + std::find( m_midiPorts.begin(), m_midiPorts.end(), port ); if( it != m_midiPorts.end() ) { m_midiPorts.erase( it ); diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index 0597cf2f5..cdb1a5a04 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -43,8 +43,8 @@ static float floatFromClipboard(bool* ok=nullptr); AutomatableModelView::AutomatableModelView( ::Model* model, QWidget* _this ) : ModelView( model, _this ), - m_description( QString::null ), - m_unit( QString::null ) + m_description( QString() ), + m_unit( QString() ) { widget()->setAcceptDrops( true ); widget()->setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) ); diff --git a/src/gui/AutomationPatternView.cpp b/src/gui/AutomationPatternView.cpp index 92e7b7377..6879b5bbd 100644 --- a/src/gui/AutomationPatternView.cpp +++ b/src/gui/AutomationPatternView.cpp @@ -91,7 +91,7 @@ void AutomationPatternView::update() void AutomationPatternView::resetName() { - m_pat->setName( QString::null ); + m_pat->setName( QString() ); } @@ -118,7 +118,7 @@ void AutomationPatternView::disconnectObject( QAction * _a ) float oldMin = m_pat->getMin(); float oldMax = m_pat->getMax(); - m_pat->m_objects.erase( qFind( m_pat->m_objects.begin(), + m_pat->m_objects.erase( std::find( m_pat->m_objects.begin(), m_pat->m_objects.end(), dynamic_cast( j ) ) ); update(); diff --git a/src/gui/EffectSelectDialog.cpp b/src/gui/EffectSelectDialog.cpp index deb39d901..64b180d48 100644 --- a/src/gui/EffectSelectDialog.cpp +++ b/src/gui/EffectSelectDialog.cpp @@ -120,21 +120,15 @@ EffectSelectDialog::EffectSelectDialog( QWidget * _parent ) : connect( ui->buttonBox, SIGNAL( accepted() ), this, SLOT( acceptSelection() ) ); -#if QT_VERSION >= 0x050000 -#define setResizeMode setSectionResizeMode ui->filterEdit->setClearButtonEnabled( true ); -#endif - ui->pluginList->verticalHeader()->setResizeMode( + ui->pluginList->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents ); ui->pluginList->verticalHeader()->hide(); - ui->pluginList->horizontalHeader()->setResizeMode( 0, + ui->pluginList->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::Stretch ); - ui->pluginList->horizontalHeader()->setResizeMode( 1, + ui->pluginList->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::ResizeToContents ); ui->pluginList->sortByColumn( 0, Qt::AscendingOrder ); -#if QT_VERSION >= 0x050000 -#undef setResizeMode -#endif updateSelection(); show(); diff --git a/src/gui/FileBrowser.cpp b/src/gui/FileBrowser.cpp index 91804d136..05727d332 100644 --- a/src/gui/FileBrowser.cpp +++ b/src/gui/FileBrowser.cpp @@ -83,15 +83,13 @@ FileBrowser::FileBrowser(const QString & directories, const QString & filter, m_filterEdit = new QLineEdit( searchWidget ); m_filterEdit->setPlaceholderText( tr("Search") ); -#if QT_VERSION >= 0x050000 m_filterEdit->setClearButtonEnabled( true ); -#endif connect( m_filterEdit, SIGNAL( textEdited( const QString & ) ), this, SLOT( filterItems( const QString & ) ) ); QPushButton * reload_btn = new QPushButton( embed::getIconPixmap( "reload" ), - QString::null, searchWidget ); + QString(), searchWidget ); reload_btn->setToolTip( tr( "Refresh list" ) ); connect( reload_btn, SIGNAL( clicked() ), this, SLOT( reloadTree() ) ); @@ -131,7 +129,7 @@ bool FileBrowser::filterItems( const QString & filter, QTreeWidgetItem * item ) { // yes, then show everything below it->setHidden( false ); - filterItems( QString::null, it ); + filterItems( QString(), it ); anyMatched = true; } else @@ -221,7 +219,7 @@ void FileBrowser::addItems(const QString & path ) { if( m_dirsAsItems ) { - m_fileBrowserTreeWidget->addTopLevelItem( new Directory( path, QString::null, m_filter ) ); + m_fileBrowserTreeWidget->addTopLevelItem( new Directory( path, QString(), m_filter ) ); return; } diff --git a/src/gui/FxMixerView.cpp b/src/gui/FxMixerView.cpp index cbcfd0a47..043ec3637 100644 --- a/src/gui/FxMixerView.cpp +++ b/src/gui/FxMixerView.cpp @@ -131,7 +131,7 @@ FxMixerView::FxMixerView() : ml->addWidget( channelArea, 1, Qt::AlignTop ); // show the add new effect channel button - QPushButton * newChannelBtn = new QPushButton( embed::getIconPixmap( "new_channel" ), QString::null, this ); + QPushButton * newChannelBtn = new QPushButton( embed::getIconPixmap( "new_channel" ), QString(), this ); newChannelBtn->setObjectName( "newChannelBtn" ); newChannelBtn->setFixedSize( fxLineSize ); connect( newChannelBtn, SIGNAL( clicked() ), this, SLOT( addNewChannel() ) ); diff --git a/src/gui/LmmsStyle.cpp b/src/gui/LmmsStyle.cpp index e57e29e47..b6a139bbb 100644 --- a/src/gui/LmmsStyle.cpp +++ b/src/gui/LmmsStyle.cpp @@ -132,11 +132,7 @@ LmmsStyle::LmmsStyle() : if( s_palette != NULL ) { qApp->setPalette( *s_palette ); } -#if QT_VERSION >= 0x050000 setBaseStyle( QStyleFactory::create( "Fusion" ) ); -#else - setBaseStyle( QStyleFactory::create( "Plastique" ) ); -#endif } diff --git a/src/gui/MainApplication.cpp b/src/gui/MainApplication.cpp index 994ae2771..8eee9b5d0 100644 --- a/src/gui/MainApplication.cpp +++ b/src/gui/MainApplication.cpp @@ -35,7 +35,7 @@ MainApplication::MainApplication(int& argc, char** argv) : QApplication(argc, argv), m_queuedFile() { -#if defined(LMMS_BUILD_WIN32) && QT_VERSION >= 0x050000 +#if defined(LMMS_BUILD_WIN32) installNativeEventFilter(this); #endif } @@ -92,7 +92,6 @@ bool MainApplication::winEventFilter(MSG* msg, long* result) } } -#if QT_VERSION >= 0x050000 bool MainApplication::nativeEventFilter(const QByteArray& eventType, void* message, long* result) { @@ -103,4 +102,3 @@ bool MainApplication::nativeEventFilter(const QByteArray& eventType, return false; } #endif -#endif diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 35728d25e..93fad8ef0 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -69,7 +69,7 @@ #include "lmmsversion.h" -#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000 +#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) //Work around an issue on KDE5 as per https://bugs.kde.org/show_bug.cgi?id=337491#c21 void disableAutoKeyAccelerators(QWidget* mainWindow) { @@ -96,7 +96,7 @@ MainWindow::MainWindow() : m_metronomeToggle( 0 ), m_session( Normal ) { -#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) && QT_VERSION >= 0x050000 +#if !defined(LMMS_BUILD_WIN32) && !defined(LMMS_BUILD_APPLE) && !defined(LMMS_BUILD_HAIKU) disableAutoKeyAccelerators(this); #endif setAttribute( Qt::WA_DeleteOnClose ); @@ -336,7 +336,7 @@ void MainWindow::finalize() Qt::CTRL + Qt::Key_M ); // Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071 -#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION >= 0x050000) && (QT_VERSION < 0x050600)) +#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION < 0x050600)) project_menu->addSeparator(); #endif project_menu->addAction( embed::getIconPixmap( "exit" ), tr( "&Quit" ), @@ -411,7 +411,7 @@ void MainWindow::finalize() } // Prevent dangling separator at end of menu per https://bugreports.qt.io/browse/QTBUG-40071 -#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION >= 0x050000) && (QT_VERSION < 0x050600)) +#if !(defined(LMMS_BUILD_APPLE) && (QT_VERSION < 0x050600)) help_menu->addSeparator(); #endif help_menu->addAction( embed::getIconPixmap( "icon" ), tr( "About" ), diff --git a/src/gui/MidiSetupWidget.cpp b/src/gui/MidiSetupWidget.cpp index ccde9f29e..f3001b3af 100644 --- a/src/gui/MidiSetupWidget.cpp +++ b/src/gui/MidiSetupWidget.cpp @@ -36,7 +36,7 @@ MidiSetupWidget::MidiSetupWidget( const QString & caption, const QString & confi m_configSection(configSection), m_device(nullptr) { - // supply devName=QString::Null() (distinct from QString("")) + // supply devName=QString() (distinct from QString("")) // to indicate that there is no editable DEVICE field if (!devName.isNull()) { diff --git a/src/gui/SetupDialog.cpp b/src/gui/SetupDialog.cpp index 2f567a869..555969fb3 100644 --- a/src/gui/SetupDialog.cpp +++ b/src/gui/SetupDialog.cpp @@ -1053,11 +1053,7 @@ void SetupDialog::accept() QString::number( m_disableAutoQuit ) ); ConfigManager::inst()->setValue( "app", "language", m_lang ); ConfigManager::inst()->setValue( "ui", "vstembedmethod", -#if QT_VERSION >= 0x050000 m_vstEmbedComboBox->currentData().toString() ); -#else - m_vstEmbedComboBox->itemData(m_vstEmbedComboBox->currentIndex()).toString() ); -#endif ConfigManager::inst()->setWorkingDir(QDir::fromNativeSeparators(m_workingDir)); @@ -1273,7 +1269,7 @@ void SetupDialog::openWorkingDir() { QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose LMMS working directory" ), m_workingDir ); - if( new_dir != QString::null ) + if( new_dir != QString() ) { m_wdLineEdit->setText( new_dir ); } @@ -1284,7 +1280,7 @@ void SetupDialog::openGIGDir() QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose your GIG directory" ), m_gigDir ); - if( new_dir != QString::null ) + if( new_dir != QString() ) { m_gigLineEdit->setText( new_dir ); } @@ -1295,7 +1291,7 @@ void SetupDialog::openSF2Dir() QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose your SF2 directory" ), m_sf2Dir ); - if( new_dir != QString::null ) + if( new_dir != QString() ) { m_sf2LineEdit->setText( new_dir ); } @@ -1317,7 +1313,7 @@ void SetupDialog::openVSTDir() QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose your VST-plugin directory" ), m_vstDir ); - if( new_dir != QString::null ) + if( new_dir != QString() ) { m_vdLineEdit->setText( new_dir ); } @@ -1349,7 +1345,7 @@ void SetupDialog::openArtworkDir() QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose artwork-theme directory" ), m_artworkDir ); - if( new_dir != QString::null ) + if( new_dir != QString() ) { m_adLineEdit->setText( new_dir ); } @@ -1371,7 +1367,7 @@ void SetupDialog::openLADSPADir() QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose LADSPA plugin directory" ), m_ladDir ); - if( new_dir != QString::null ) + if( new_dir != QString() ) { if( m_ladLineEdit->text() == "" ) { @@ -1393,7 +1389,7 @@ void SetupDialog::openSTKDir() QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose STK rawwave directory" ), m_stkDir ); - if( new_dir != QString::null ) + if( new_dir != QString() ) { m_stkLineEdit->setText( new_dir ); } @@ -1410,7 +1406,7 @@ void SetupDialog::openDefaultSoundfont() tr( "Choose default SoundFont" ), m_defaultSoundfont, "SoundFont2 Files (*.sf2)" ); - if( new_file != QString::null ) + if( new_file != QString() ) { m_sfLineEdit->setText( new_file ); } @@ -1443,7 +1439,7 @@ void SetupDialog::openBackgroundArtwork() tr( "Choose background artwork" ), dir, "Image Files (" + fileTypes + ")" ); - if( new_file != QString::null ) + if( new_file != QString() ) { m_baLineEdit->setText( new_file ); } diff --git a/src/gui/StringPairDrag.cpp b/src/gui/StringPairDrag.cpp index a10d31c5c..f754e2d39 100644 --- a/src/gui/StringPairDrag.cpp +++ b/src/gui/StringPairDrag.cpp @@ -40,7 +40,7 @@ StringPairDrag::StringPairDrag( const QString & _key, const QString & _value, { if( _icon.isNull() && _w ) { - setPixmap( QPixmap::grabWidget( _w ).scaled( + setPixmap( _w->grab().scaled( 64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation ) ); diff --git a/src/gui/SubWindow.cpp b/src/gui/SubWindow.cpp index 9e3876d24..7340d428c 100644 --- a/src/gui/SubWindow.cpp +++ b/src/gui/SubWindow.cpp @@ -52,7 +52,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : m_borderColor = Qt::black; // close, maximize and restore (after maximizing) buttons - m_closeBtn = new QPushButton( embed::getIconPixmap( "close" ), QString::null, this ); + m_closeBtn = new QPushButton( embed::getIconPixmap( "close" ), QString(), this ); m_closeBtn->resize( m_buttonSize ); m_closeBtn->setFocusPolicy( Qt::NoFocus ); m_closeBtn->setCursor( Qt::ArrowCursor ); @@ -60,7 +60,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : m_closeBtn->setToolTip( tr( "Close" ) ); connect( m_closeBtn, SIGNAL( clicked( bool ) ), this, SLOT( close() ) ); - m_maximizeBtn = new QPushButton( embed::getIconPixmap( "maximize" ), QString::null, this ); + m_maximizeBtn = new QPushButton( embed::getIconPixmap( "maximize" ), QString(), this ); m_maximizeBtn->resize( m_buttonSize ); m_maximizeBtn->setFocusPolicy( Qt::NoFocus ); m_maximizeBtn->setCursor( Qt::ArrowCursor ); @@ -68,7 +68,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) : m_maximizeBtn->setToolTip( tr( "Maximize" ) ); connect( m_maximizeBtn, SIGNAL( clicked( bool ) ), this, SLOT( showMaximized() ) ); - m_restoreBtn = new QPushButton( embed::getIconPixmap( "restore" ), QString::null, this ); + m_restoreBtn = new QPushButton( embed::getIconPixmap( "restore" ), QString(), this ); m_restoreBtn->resize( m_buttonSize ); m_restoreBtn->setFocusPolicy( Qt::NoFocus ); m_restoreBtn->setCursor( Qt::ArrowCursor ); diff --git a/src/gui/TimeLineWidget.cpp b/src/gui/TimeLineWidget.cpp index 5c91cfcf8..71b384dc8 100644 --- a/src/gui/TimeLineWidget.cpp +++ b/src/gui/TimeLineWidget.cpp @@ -40,11 +40,6 @@ #include "SongEditor.h" -#if QT_VERSION < 0x040800 -#define MiddleButton MidButton -#endif - - QPixmap * TimeLineWidget::s_posMarkerPixmap = NULL; TimeLineWidget::TimeLineWidget( const int xoff, const int yoff, const float ppt, diff --git a/src/gui/dialogs/FileDialog.cpp b/src/gui/dialogs/FileDialog.cpp index fb9c7faac..3ce10760a 100644 --- a/src/gui/dialogs/FileDialog.cpp +++ b/src/gui/dialogs/FileDialog.cpp @@ -35,7 +35,7 @@ FileDialog::FileDialog( QWidget *parent, const QString &caption, const QString &directory, const QString &filter ) : QFileDialog( parent, caption, directory, filter ) { -#if (QT_VERSION >= 0x040806 && QT_VERSION < 0x050000) || QT_VERSION > 0x050200 +#if QT_VERSION > 0x050200 setOption( QFileDialog::DontUseCustomDirectoryIcons ); #endif @@ -43,27 +43,15 @@ FileDialog::FileDialog( QWidget *parent, const QString &caption, // Add additional locations to the sidebar QList urls = sidebarUrls(); -#if QT_VERSION >= 0x050000 urls << QUrl::fromLocalFile( QStandardPaths::writableLocation( QStandardPaths::DesktopLocation ) ); -#else - urls << QUrl::fromLocalFile( QDesktopServices::storageLocation( QDesktopServices::DesktopLocation ) ); -#endif // Find downloads directory QDir downloadDir( QDir::homePath() + "/Downloads" ); if ( ! downloadDir.exists() ) -#if QT_VERSION >= 0x050000 downloadDir = QStandardPaths::writableLocation( QStandardPaths::DownloadLocation ); -#else - downloadDir = QDesktopServices::storageLocation( QDesktopServices::DocumentsLocation ) + "/Downloads"; -#endif if ( downloadDir.exists() ) urls << QUrl::fromLocalFile( downloadDir.absolutePath() ); -#if QT_VERSION >= 0x050000 urls << QUrl::fromLocalFile( QStandardPaths::writableLocation( QStandardPaths::MusicLocation ) ); -#else - urls << QUrl::fromLocalFile( QDesktopServices::storageLocation( QDesktopServices::MusicLocation ) ); -#endif urls << QUrl::fromLocalFile( ConfigManager::inst()->workingDir() ); // Add `/Volumes` directory on OS X systems, this allows the user to browse diff --git a/src/gui/editors/PianoRoll.cpp b/src/gui/editors/PianoRoll.cpp index 7a38777e7..e5f6458b5 100644 --- a/src/gui/editors/PianoRoll.cpp +++ b/src/gui/editors/PianoRoll.cpp @@ -64,10 +64,6 @@ #include "TimeLineWidget.h" -#if QT_VERSION < 0x040800 -#define MiddleButton MidButton -#endif - using std::move; typedef AutomationPattern::timeMap timeMap; @@ -517,7 +513,7 @@ void PianoRoll::markSemiTone( int i ) break; case stmaMarkCurrentSemiTone: { - QList::iterator it = qFind( m_markedSemiTones.begin(), m_markedSemiTones.end(), key ); + QList::iterator it = std::find( m_markedSemiTones.begin(), m_markedSemiTones.end(), key ); if( it != m_markedSemiTones.end() ) { m_markedSemiTones.erase( it ); @@ -538,7 +534,7 @@ void PianoRoll::markSemiTone( int i ) QList::iterator i; for (int ix = 0; ix < aok.size(); ++ix) { - i = qFind(m_markedSemiTones.begin(), m_markedSemiTones.end(), aok.at(ix)); + i = std::find(m_markedSemiTones.begin(), m_markedSemiTones.end(), aok.at(ix)); m_markedSemiTones.erase(i); } } @@ -592,7 +588,7 @@ void PianoRoll::markSemiTone( int i ) ; } - qSort( m_markedSemiTones.begin(), m_markedSemiTones.end(), qGreater() ); + std::sort( m_markedSemiTones.begin(), m_markedSemiTones.end(), std::greater() ); QList::iterator new_end = std::unique( m_markedSemiTones.begin(), m_markedSemiTones.end() ); m_markedSemiTones.erase( new_end, m_markedSemiTones.end() ); } diff --git a/src/gui/widgets/AutomatableButton.cpp b/src/gui/widgets/AutomatableButton.cpp index d760ab06f..1d9cecce8 100644 --- a/src/gui/widgets/AutomatableButton.cpp +++ b/src/gui/widgets/AutomatableButton.cpp @@ -220,7 +220,7 @@ void automatableButtonGroup::addButton( AutomatableButton * _btn ) void automatableButtonGroup::removeButton( AutomatableButton * _btn ) { - m_buttons.erase( qFind( m_buttons.begin(), m_buttons.end(), _btn ) ); + m_buttons.erase( std::find( m_buttons.begin(), m_buttons.end(), _btn ) ); _btn->m_group = NULL; } diff --git a/src/gui/widgets/ComboBox.cpp b/src/gui/widgets/ComboBox.cpp index 99a06c5d5..0673ee32d 100644 --- a/src/gui/widgets/ComboBox.cpp +++ b/src/gui/widgets/ComboBox.cpp @@ -47,7 +47,7 @@ const int CB_ARROW_BTN_WIDTH = 20; ComboBox::ComboBox( QWidget * _parent, const QString & _name ) : QWidget( _parent ), - IntModelView( new ComboBoxModel( NULL, QString::null, true ), this ), + IntModelView( new ComboBoxModel( NULL, QString(), true ), this ), m_menu( this ), m_pressed( false ) { diff --git a/src/gui/widgets/ControllerRackView.cpp b/src/gui/widgets/ControllerRackView.cpp index 79e1bafa0..621c41c73 100644 --- a/src/gui/widgets/ControllerRackView.cpp +++ b/src/gui/widgets/ControllerRackView.cpp @@ -176,7 +176,7 @@ void ControllerRackView::onControllerRemoved( Controller * removedController ) if (viewOfRemovedController ) { - m_controllerViews.erase( qFind( m_controllerViews.begin(), + m_controllerViews.erase( std::find( m_controllerViews.begin(), m_controllerViews.end(), viewOfRemovedController ) ); delete viewOfRemovedController; diff --git a/src/gui/widgets/EffectRackView.cpp b/src/gui/widgets/EffectRackView.cpp index c1e36547e..6af490a42 100644 --- a/src/gui/widgets/EffectRackView.cpp +++ b/src/gui/widgets/EffectRackView.cpp @@ -126,7 +126,7 @@ void EffectRackView::moveDown( EffectView* view ) if( view != m_effectViews.last() ) { // moving next effect up is the same - moveUp( *( qFind( m_effectViews.begin(), m_effectViews.end(), view ) + 1 ) ); + moveUp( *( std::find( m_effectViews.begin(), m_effectViews.end(), view ) + 1 ) ); } } @@ -136,7 +136,7 @@ void EffectRackView::moveDown( EffectView* view ) void EffectRackView::deletePlugin( EffectView* view ) { Effect * e = view->effect(); - m_effectViews.erase( qFind( m_effectViews.begin(), m_effectViews.end(), view ) ); + m_effectViews.erase( std::find( m_effectViews.begin(), m_effectViews.end(), view ) ); delete view; fxChain()->removeEffect( e ); e->deleteLater(); diff --git a/src/gui/widgets/Graph.cpp b/src/gui/widgets/Graph.cpp index ed57dcea6..e9a00c304 100644 --- a/src/gui/widgets/Graph.cpp +++ b/src/gui/widgets/Graph.cpp @@ -510,7 +510,7 @@ void graphModel::setSampleAt( int x, float val ) void graphModel::setSamples( const float * _samples ) { - qCopy( _samples, _samples + length(), m_samples.begin()); + std::copy( _samples, _samples + length(), m_samples.begin()); emit samplesChanged( 0, length()-1 ); } diff --git a/src/gui/widgets/LadspaControlView.cpp b/src/gui/widgets/LadspaControlView.cpp index 800eae4e9..39ed1c3ea 100644 --- a/src/gui/widgets/LadspaControlView.cpp +++ b/src/gui/widgets/LadspaControlView.cpp @@ -60,7 +60,7 @@ LadspaControlView::LadspaControlView( QWidget * _parent, case TOGGLED: { LedCheckBox * toggle = new LedCheckBox( - m_ctl->port()->name, this, QString::null, LedCheckBox::Green ); + m_ctl->port()->name, this, QString(), LedCheckBox::Green ); toggle->setModel( m_ctl->toggledModel() ); layout->addWidget( toggle ); if( link != NULL ) diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 5b4a255d1..e1101580f 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -496,7 +496,7 @@ QString InstrumentTrack::instrumentName() const { return m_instrument->displayName(); } - return QString::null; + return QString(); }