diff --git a/include/FileBrowser.h b/include/FileBrowser.h index 1565017d1..7e0482ce3 100644 --- a/include/FileBrowser.h +++ b/include/FileBrowser.h @@ -131,11 +131,11 @@ public: inline QString fullName( QString path = QString() ) { - if( path == QString() ) + if( path.isEmpty() ) { path = m_directories[0]; } - if( path != QString() ) + if( ! path.isEmpty() ) { path += QDir::separator(); } diff --git a/plugins/patman/patman.cpp b/plugins/patman/patman.cpp index a628fb984..6ab7adce7 100644 --- a/plugins/patman/patman.cpp +++ b/plugins/patman/patman.cpp @@ -78,7 +78,6 @@ PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data ) patmanInstrument::patmanInstrument( InstrumentTrack * _instrument_track ) : Instrument( _instrument_track, &patman_plugin_descriptor ), - m_patchFile( QString() ), m_loopedModel( true, this ), m_tunedModel( true, this ) { diff --git a/src/core/Track.cpp b/src/core/Track.cpp index 36d649e77..9ceff8f44 100644 --- a/src/core/Track.cpp +++ b/src/core/Track.cpp @@ -95,7 +95,6 @@ TextFloat * TrackContentObjectView::s_textFloat = NULL; TrackContentObject::TrackContentObject( Track * track ) : Model( track ), m_track( track ), - m_name( QString() ), m_startPosition(), m_length(), m_mutedModel( false, this, tr( "Mute" ) ), diff --git a/src/gui/AutomatableModelView.cpp b/src/gui/AutomatableModelView.cpp index cdb1a5a04..039c75c99 100644 --- a/src/gui/AutomatableModelView.cpp +++ b/src/gui/AutomatableModelView.cpp @@ -42,9 +42,7 @@ static float floatFromClipboard(bool* ok=nullptr); AutomatableModelView::AutomatableModelView( ::Model* model, QWidget* _this ) : - ModelView( model, _this ), - m_description( QString() ), - m_unit( QString() ) + ModelView( model, _this ) { widget()->setAcceptDrops( true ); widget()->setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) ); diff --git a/src/gui/SetupDialog.cpp b/src/gui/SetupDialog.cpp index 555969fb3..84c76128d 100644 --- a/src/gui/SetupDialog.cpp +++ b/src/gui/SetupDialog.cpp @@ -1269,7 +1269,7 @@ void SetupDialog::openWorkingDir() { QString new_dir = FileDialog::getExistingDirectory( this, tr( "Choose LMMS working directory" ), m_workingDir ); - if( new_dir != QString() ) + if( ! new_dir.isEmpty() ) { 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() ) + if( ! new_dir.isEmpty() ) { 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() ) + if( ! new_dir.isEmpty() ) { 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() ) + if( ! new_dir.isEmpty() ) { 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() ) + if( ! new_dir.isEmpty() ) { 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() ) + if( ! new_dir.isEmpty() ) { 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() ) + if( ! new_dir.isEmpty() ) { 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() ) + if( ! new_file.isEmpty() ) { m_sfLineEdit->setText( new_file ); } @@ -1439,7 +1439,7 @@ void SetupDialog::openBackgroundArtwork() tr( "Choose background artwork" ), dir, "Image Files (" + fileTypes + ")" ); - if( new_file != QString() ) + if( ! new_file.isEmpty() ) { m_baLineEdit->setText( new_file ); }