Skip to content

Commit

Permalink
Replace NULL with nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
timrae committed May 22, 2016
1 parent e775ba9 commit a6e10d5
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/library/librarycontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ void LoadToGroupController::slotLoadToGroupAndPlay(double v) {
LibraryControl::LibraryControl(Library* pLibrary)
: QObject(pLibrary),
m_pLibrary(pLibrary),
m_pLibraryWidget(NULL),
m_pSidebarWidget(NULL),
m_pLibraryWidget(nullptr),
m_pSidebarWidget(nullptr),
m_numDecks("[Master]", "num_decks", this),
m_numSamplers("[Master]", "num_samplers", this),
m_numPreviewDecks("[Master]", "num_preview_decks", this) {
Expand Down Expand Up @@ -153,8 +153,8 @@ LibraryControl::~LibraryControl() {
}

void LibraryControl::maybeCreateGroupController(const QString& group) {
LoadToGroupController* pGroup = m_loadToGroupControllers.value(group, NULL);
if (pGroup == NULL) {
LoadToGroupController* pGroup = m_loadToGroupControllers.value(group, nullptr);
if (pGroup == nullptr) {
pGroup = new LoadToGroupController(this, group);
m_loadToGroupControllers[group] = pGroup;
}
Expand Down Expand Up @@ -197,7 +197,7 @@ void LibraryControl::slotNumPreviewDecksChanged(double v) {
}

void LibraryControl::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) {
if (m_pSidebarWidget != NULL) {
if (m_pSidebarWidget != nullptr) {
disconnect(m_pSidebarWidget, 0, this, 0);
}
m_pSidebarWidget = pSidebarWidget;
Expand All @@ -207,7 +207,7 @@ void LibraryControl::bindSidebarWidget(WLibrarySidebar* pSidebarWidget) {

void LibraryControl::bindWidget(WLibrary* pLibraryWidget, KeyboardEventFilter* pKeyboard) {
Q_UNUSED(pKeyboard);
if (m_pLibraryWidget != NULL) {
if (m_pLibraryWidget != nullptr) {
disconnect(m_pLibraryWidget, 0, this, 0);
}
m_pLibraryWidget = pLibraryWidget;
Expand All @@ -216,15 +216,15 @@ void LibraryControl::bindWidget(WLibrary* pLibraryWidget, KeyboardEventFilter* p
}

void LibraryControl::libraryWidgetDeleted() {
m_pLibraryWidget = NULL;
m_pLibraryWidget = nullptr;
}

void LibraryControl::sidebarWidgetDeleted() {
m_pSidebarWidget = NULL;
m_pSidebarWidget = nullptr;
}

void LibraryControl::slotLoadSelectedTrackToGroup(QString group, bool play) {
if (m_pLibraryWidget == NULL) {
if (m_pLibraryWidget == nullptr) {
return;
}

Expand All @@ -236,7 +236,7 @@ void LibraryControl::slotLoadSelectedTrackToGroup(QString group, bool play) {
}

void LibraryControl::slotLoadSelectedIntoFirstStopped(double v) {
if (m_pLibraryWidget == NULL) {
if (m_pLibraryWidget == nullptr) {
return;
}

Expand All @@ -250,7 +250,7 @@ void LibraryControl::slotLoadSelectedIntoFirstStopped(double v) {
}

void LibraryControl::slotAutoDjAddTop(double v) {
if (m_pLibraryWidget == NULL) {
if (m_pLibraryWidget == nullptr) {
return;
}

Expand All @@ -264,7 +264,7 @@ void LibraryControl::slotAutoDjAddTop(double v) {
}

void LibraryControl::slotAutoDjAddBottom(double v) {
if (m_pLibraryWidget == NULL) {
if (m_pLibraryWidget == nullptr) {
return;
}

Expand All @@ -290,7 +290,7 @@ void LibraryControl::slotSelectPrevTrack(double v) {
}

void LibraryControl::slotSelectTrack(double v) {
if (m_pLibraryWidget == NULL) {
if (m_pLibraryWidget == nullptr) {
return;
}

Expand All @@ -304,7 +304,7 @@ void LibraryControl::slotSelectTrack(double v) {
}

void LibraryControl::slotSelectItem(double v) {
if (m_pLibraryWidget == NULL || m_pSidebarWidget == NULL) {
if (m_pLibraryWidget == nullptr || m_pSidebarWidget == nullptr) {
return;
}
// Select track if a LibraryView object has focus, otherwise select sidebar item
Expand All @@ -315,7 +315,7 @@ void LibraryControl::slotSelectItem(double v) {
}

void LibraryControl::slotSelectSidebarItem(double v) {
if (m_pSidebarWidget == NULL) {
if (m_pSidebarWidget == nullptr) {
return;
}
if (v > 0) {
Expand Down Expand Up @@ -348,21 +348,21 @@ void LibraryControl::slotSelectPrevSidebarItem(double v) {
}

void LibraryControl::slotToggleFocusWidget(double v) {
if (v <= 0 || m_pSidebarWidget == NULL) {
if (v <= 0 || m_pSidebarWidget == nullptr) {
return;
}
QApplication::postEvent(m_pSidebarWidget, new QKeyEvent(
QEvent::KeyPress, (int)Qt::Key_Tab, Qt::NoModifier, QString(), true));
}

void LibraryControl::slotToggleSelectedSidebarItem(double v) {
if (m_pSidebarWidget != NULL && v > 0) {
if (m_pSidebarWidget != nullptr && v > 0) {
m_pSidebarWidget->toggleSelectedItem();
}
}

void LibraryControl::slotChooseItem(double v) {
if (m_pLibraryWidget == NULL) {
if (m_pLibraryWidget == nullptr) {
return;
}
// Load current track if a LibraryView object has focus
Expand Down

0 comments on commit a6e10d5

Please sign in to comment.