Remove usage of deprecated Qt API
Removes usage of the following deprecated Qt functions: - QPixmap::grabWidget - QString::null - qFind - qSort - qGreater - qCopy
This commit is contained in:
@@ -39,7 +39,7 @@ class 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 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 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 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();
|
||||
|
||||
@@ -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 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 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 )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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() )
|
||||
{
|
||||
|
||||
@@ -1009,12 +1009,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 );
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -89,7 +89,7 @@ FileBrowser::FileBrowser(const QString & directories, const QString & filter,
|
||||
|
||||
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() ) );
|
||||
|
||||
@@ -129,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
|
||||
@@ -219,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() ) );
|
||||
|
||||
@@ -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())
|
||||
{
|
||||
|
||||
@@ -1269,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 );
|
||||
}
|
||||
@@ -1280,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 );
|
||||
}
|
||||
@@ -1291,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 );
|
||||
}
|
||||
@@ -1313,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 );
|
||||
}
|
||||
@@ -1345,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 );
|
||||
}
|
||||
@@ -1367,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() == "" )
|
||||
{
|
||||
@@ -1389,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 );
|
||||
}
|
||||
@@ -1406,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 );
|
||||
}
|
||||
@@ -1439,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 );
|
||||
|
||||
@@ -513,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 );
|
||||
@@ -534,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);
|
||||
}
|
||||
}
|
||||
@@ -588,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