Merge remote-tracking branch 'lukas/cleanup/qt4'
# Conflicts: # cmake/toolchains/common/MSYS.cmake
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -31,12 +31,10 @@
|
||||
|
||||
#ifdef LMMS_BUILD_WIN32
|
||||
#include <windows.h>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QAbstractNativeEventFilter>
|
||||
#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()
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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 ),
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -38,17 +38,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>
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -26,11 +26,7 @@
|
||||
#include <QDir>
|
||||
#include <QMessageBox>
|
||||
#include <QApplication>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QStandardPaths>
|
||||
#else
|
||||
#include <QDesktopServices>
|
||||
#endif
|
||||
#include <QtCore/QTextStream>
|
||||
|
||||
#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<QGuiApplication*>(QApplication::instance())->
|
||||
platformName() == "xcb")
|
||||
#else
|
||||
if (qgetenv("QT_QPA_PLATFORM").isNull()
|
||||
|| qgetenv("QT_QPA_PLATFORM") == "xcb")
|
||||
#endif
|
||||
{
|
||||
methods.append("xembed");
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -103,7 +103,7 @@ LadspaManager::LadspaManager()
|
||||
{
|
||||
m_sortedPlugins.append( qMakePair( getName( *it ), *it ) );
|
||||
}
|
||||
qSort( m_sortedPlugins );
|
||||
std::sort( m_sortedPlugins.begin(), m_sortedPlugins.end() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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<AudioPort *>::Iterator it = qFind( m_audioPorts.begin(),
|
||||
QVector<AudioPort *>::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() )
|
||||
{
|
||||
|
||||
@@ -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() )
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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() )
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -77,7 +77,7 @@ void MidiClient::removePort( MidiPort* port )
|
||||
}
|
||||
|
||||
QVector<MidiPort *>::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 );
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
@@ -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<AutomatableModel *>( j ) ) );
|
||||
update();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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() ) );
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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" ),
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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<QUrl> 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
|
||||
|
||||
@@ -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<int>::iterator it = qFind( m_markedSemiTones.begin(), m_markedSemiTones.end(), key );
|
||||
QList<int>::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<int>::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<int>() );
|
||||
std::sort( m_markedSemiTones.begin(), m_markedSemiTones.end(), std::greater<int>() );
|
||||
QList<int>::iterator new_end = std::unique( m_markedSemiTones.begin(), m_markedSemiTones.end() );
|
||||
m_markedSemiTones.erase( new_end, m_markedSemiTones.end() );
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -496,7 +496,7 @@ QString InstrumentTrack::instrumentName() const
|
||||
{
|
||||
return m_instrument->displayName();
|
||||
}
|
||||
return QString::null;
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user