Skip to content

Commit

Permalink
Rename addTrack(const QDomElement&) to createTrack(const QDomElement&)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakertooth committed Dec 8, 2024
1 parent e4a7619 commit a0fa59f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/TrackContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class LMMS_EXPORT TrackContainer : public Model, public JournallingObject
return track;
}

Track* addTrack(const QDomElement& element);
Track* createTrack(const QDomElement& element);
void removeTrack( Track * _track );

virtual void updateAfterTrackAdd(Track* track);
Expand Down
2 changes: 1 addition & 1 deletion src/core/Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Track* Track::clone()
QDomDocument doc;
QDomElement parent = doc.createElement("clonedtrack");
saveState(doc, parent);
const auto track = m_trackContainer->addTrack(parent.firstChild().toElement());
const auto track = m_trackContainer->createTrack(parent.firstChild().toElement());

AutomationClip::resolveAllIDs();
return track;
Expand Down
4 changes: 2 additions & 2 deletions src/core/TrackContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void TrackContainer::loadSettings( const QDomElement & _this )
pd->setLabelText( tr("Loading Track %1 (%2/Total %3)").arg( trackName ).
arg( pd->value() + 1 ).arg( Engine::getSong()->getLoadingTrackCount() ) );
}
addTrack(node.toElement());
createTrack(node.toElement());
}
node = node.nextSibling();
}
Expand Down Expand Up @@ -175,7 +175,7 @@ int TrackContainer::countTracks( Track::Type _tt ) const
return( cnt );
}

Track* TrackContainer::addTrack(const QDomElement& element)
Track* TrackContainer::createTrack(const QDomElement& element)
{
const auto trackType = static_cast<Track::Type>(element.attribute("type").toInt());
auto track = static_cast<Track*>(nullptr);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editors/PatternEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void PatternEditor::dropEvent(QDropEvent* de)
if( type.left( 6 ) == "track_" )
{
DataFile dataFile( value.toUtf8() );
Track* t = model()->addTrack(dataFile.content().firstChild().toElement());
Track* t = model()->createTrack(dataFile.content().firstChild().toElement());

// Ensure pattern clips exist
bool hasValidPatternClips = false;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editors/TrackContainerView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ void TrackContainerView::dropEvent( QDropEvent * _de )
else if( type.left( 6 ) == "track_" )
{
DataFile dataFile( value.toUtf8() );
m_tc->addTrack(dataFile.content().firstChild().toElement());
m_tc->createTrack(dataFile.content().firstChild().toElement());
_de->accept();
}
}
Expand Down

0 comments on commit a0fa59f

Please sign in to comment.