Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some coding issues #18

Merged
merged 25 commits into from
Mar 1, 2017
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
31fbb6f
Use parented_ptr instead of raw pointer
jmigual Feb 14, 2017
b56d560
Merged branch jmigual-library-redesign into jmigual-library-redesign
jmigual Feb 14, 2017
a081b14
Remove usage of TrackCollection in Analysis View
jmigual Feb 14, 2017
e9a436e
Store QPointer instead of raw pointer in DlgAnalysis
jmigual Feb 14, 2017
ebc8d5a
Fix some includes and remove raw pointer
jmigual Feb 14, 2017
90cfe8a
Remove naked new pointer and use new TreeItem methods
jmigual Feb 14, 2017
ff89793
Remove more naked new pointers
jmigual Feb 14, 2017
c516ae6
Merged branch jmigual-library-redesign into jmigual-library-redesign
jmigual Feb 15, 2017
ef47826
Fix bug in browse feature when deleting a Quick Linkk
jmigual Feb 15, 2017
a558534
Add HistoryFeature actions in a parented_ptr
jmigual Feb 15, 2017
3eb165d
Add QPointer to getChildModel()
jmigual Feb 15, 2017
7cbe479
Fix maintenance feature pointer issues
jmigual Feb 15, 2017
6e46643
Fix naked pointers in MixxxLibraryFeature
jmigual Feb 15, 2017
95fdf79
Add parented_ptr in MixxxLibraryFeature
jmigual Feb 15, 2017
caa32b2
Add temporary parented_ptr fix
jmigual Feb 15, 2017
60372aa
Fix recording feature pointers
jmigual Feb 15, 2017
948ec4b
Use std::shared_ptr for LibraryPaneManager
jmigual Feb 15, 2017
709ecdb
Merge remote-tracking branch 'refs/remotes/daschuer/jmigual-library-r…
jmigual Feb 18, 2017
c5015af
Fix unnecessary const in parented_ptr
jmigual Feb 18, 2017
4c6565a
Use shared_ptr for features
jmigual Feb 24, 2017
5b9b3ec
Revert commit 948ec4b842d0482c967e354cd60ec31b51ac3baa
jmigual Feb 25, 2017
0b57f1b
Revert "Use shared_ptr for features"
jmigual Feb 24, 2017
7b6370d
Added nullptr checking to avoid segfaults
jmigual Feb 27, 2017
b165107
Add nullptr comparison operator to parented_ptr
jmigual Feb 27, 2017
0504ffa
Fix parent compilation issue with Qt4.8
jmigual Feb 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add HistoryFeature actions in a parented_ptr
jmigual committed Feb 15, 2017
commit a5585341fa74860d8cc04ef88ed7fb2805d3f0c5
12 changes: 6 additions & 6 deletions src/library/features/history/historyfeature.cpp
Original file line number Diff line number Diff line change
@@ -19,12 +19,12 @@ HistoryFeature::HistoryFeature(UserSettingsPointer pConfig,
TrackCollection* pTrackCollection)
: BasePlaylistFeature(pConfig, pLibrary, parent, pTrackCollection),
m_playlistId(-1) {
m_pJoinWithNextAction = new QAction(tr("Join with next"), this);
connect(m_pJoinWithNextAction, SIGNAL(triggered()),
m_pJoinWithNextAction = make_parented<QAction>(tr("Join with next"), this);
connect(m_pJoinWithNextAction.get(), SIGNAL(triggered()),
this, SLOT(slotJoinWithNext()));

m_pGetNewPlaylist = new QAction(tr("Create new history playlist"), this);
connect(m_pGetNewPlaylist, SIGNAL(triggered()), this, SLOT(slotGetNewPlaylist()));
m_pGetNewPlaylist = make_parented<QAction>(tr("Create new history playlist"), this);
connect(m_pGetNewPlaylist.get(), SIGNAL(triggered()), this, SLOT(slotGetNewPlaylist()));

// initialized in a new generic slot(get new history playlist purpose)
emit(slotGetNewPlaylist());
@@ -95,15 +95,15 @@ void HistoryFeature::onRightClickChild(const QPoint& globalPos, const QModelInde
menu.addAction(m_pAddToAutoDJAction);
menu.addAction(m_pAddToAutoDJTopAction);
menu.addAction(m_pRenamePlaylistAction);
menu.addAction(m_pJoinWithNextAction);
menu.addAction(m_pJoinWithNextAction.get());
if (playlistId != m_playlistId) {
// Todays playlist should not be locked or deleted
menu.addAction(m_pDeletePlaylistAction);
menu.addAction(m_pLockPlaylistAction);
}
if (playlistId == m_playlistId && m_playlistDao.tracksInPlaylist(m_playlistId) != 0) {
// Todays playlists can change !
menu.addAction(m_pGetNewPlaylist);
menu.addAction(m_pGetNewPlaylist.get());
}
menu.addSeparator();
menu.addAction(m_pExportPlaylistAction);
4 changes: 2 additions & 2 deletions src/library/features/history/historyfeature.h
Original file line number Diff line number Diff line change
@@ -54,8 +54,8 @@ class HistoryFeature : public BasePlaylistFeature {

QPointer<WLibrarySidebar> m_pSidebar;
QLinkedList<TrackId> m_recentTracks;
QAction* m_pJoinWithNextAction;
QAction* m_pGetNewPlaylist;
parented_ptr<QAction> m_pJoinWithNextAction;
parented_ptr<QAction> m_pGetNewPlaylist;
std::unique_ptr<HistoryTreeModel> m_pHistoryTreeModel;
int m_playlistId;
};