Commit 6048a896 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_NULLPTR reduce the number of compile warning

parent 5b5e286a
...@@ -112,7 +112,7 @@ int main(int argc, char **argv) ...@@ -112,7 +112,7 @@ int main(int argc, char **argv)
RenderJob *job = new RenderJob(doerase, usekuiserver, pid, render, profile, rendermodule, player, src, dest, preargs, args, in, out); RenderJob *job = new RenderJob(doerase, usekuiserver, pid, render, profile, rendermodule, player, src, dest, preargs, args, in, out);
if (!locale.isEmpty()) job->setLocale(locale); if (!locale.isEmpty()) job->setLocale(locale);
job->start(); job->start();
RenderJob *dualjob = NULL; RenderJob *dualjob = Q_NULLPTR;
if (dualpass) { if (dualpass) {
if (vprelist.size()>1) if (vprelist.size()>1)
args.replaceInStrings(QRegExp(QLatin1String("^vpre=.*")),QStringLiteral("vpre=%1").arg(vprelist.at(1))); args.replaceInStrings(QRegExp(QLatin1String("^vpre=.*")),QStringLiteral("vpre=%1").arg(vprelist.at(1)));
......
...@@ -125,7 +125,7 @@ Bin* AbstractProjectItem::bin() ...@@ -125,7 +125,7 @@ Bin* AbstractProjectItem::bin()
if (m_parent) { if (m_parent) {
return m_parent->bin(); return m_parent->bin();
} }
return NULL; return Q_NULLPTR;
} }
QPixmap AbstractProjectItem::roundedPixmap(const QPixmap &source) QPixmap AbstractProjectItem::roundedPixmap(const QPixmap &source)
......
...@@ -202,7 +202,7 @@ bool BinMessageWidget::event(QEvent* ev) { ...@@ -202,7 +202,7 @@ bool BinMessageWidget::event(QEvent* ev) {
} }
SmallJobLabel::SmallJobLabel(QWidget *parent) : QPushButton(parent) SmallJobLabel::SmallJobLabel(QWidget *parent) : QPushButton(parent)
, m_action(NULL) , m_action(Q_NULLPTR)
{ {
setFixedWidth(0); setFixedWidth(0);
setFlat(true); setFlat(true);
...@@ -317,21 +317,21 @@ bool LineEventEater::eventFilter(QObject *obj, QEvent *event) ...@@ -317,21 +317,21 @@ bool LineEventEater::eventFilter(QObject *obj, QEvent *event)
Bin::Bin(QWidget* parent) : Bin::Bin(QWidget* parent) :
QWidget(parent) QWidget(parent)
, isLoading(false) , isLoading(false)
, m_itemModel(NULL) , m_itemModel(Q_NULLPTR)
, m_itemView(NULL) , m_itemView(Q_NULLPTR)
, m_rootFolder(NULL) , m_rootFolder(Q_NULLPTR)
, m_folderUp(NULL) , m_folderUp(Q_NULLPTR)
, m_jobManager(NULL) , m_jobManager(Q_NULLPTR)
, m_doc(NULL) , m_doc(Q_NULLPTR)
, m_extractAudioAction(NULL) , m_extractAudioAction(Q_NULLPTR)
, m_transcodeAction(NULL) , m_transcodeAction(Q_NULLPTR)
, m_clipsActionsMenu(NULL) , m_clipsActionsMenu(Q_NULLPTR)
, m_inTimelineAction(NULL) , m_inTimelineAction(Q_NULLPTR)
, m_listType((BinViewType) KdenliveSettings::binMode()) , m_listType((BinViewType) KdenliveSettings::binMode())
, m_iconSize(160, 90) , m_iconSize(160, 90)
, m_propertiesPanel(NULL) , m_propertiesPanel(Q_NULLPTR)
, m_blankThumb() , m_blankThumb()
, m_invalidClipDialog(NULL) , m_invalidClipDialog(Q_NULLPTR)
, m_gainedFocus(false) , m_gainedFocus(false)
, m_audioDuration(0) , m_audioDuration(0)
, m_processedAudio(0) , m_processedAudio(0)
...@@ -602,7 +602,7 @@ bool Bin::eventFilter(QObject *obj, QEvent *event) ...@@ -602,7 +602,7 @@ bool Bin::eventFilter(QObject *obj, QEvent *event)
QAbstractItemView *view = qobject_cast<QAbstractItemView*>(obj->parent()); QAbstractItemView *view = qobject_cast<QAbstractItemView*>(obj->parent());
if (view) { if (view) {
QModelIndex idx = view->indexAt(mouseEvent->pos()); QModelIndex idx = view->indexAt(mouseEvent->pos());
ClipController *ctl = NULL; ClipController *ctl = Q_NULLPTR;
if (idx.isValid()) { if (idx.isValid()) {
AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(idx).internalPointer()); AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(idx).internalPointer());
if (item) { if (item) {
...@@ -741,7 +741,7 @@ void Bin::slotAddClip() ...@@ -741,7 +741,7 @@ void Bin::slotAddClip()
void Bin::deleteClip(const QString &id) void Bin::deleteClip(const QString &id)
{ {
if (m_monitor->activeClipId() == id) { if (m_monitor->activeClipId() == id) {
emit openClip(NULL); emit openClip(Q_NULLPTR);
} }
ProjectClip *clip = m_rootFolder->clip(id); ProjectClip *clip = m_rootFolder->clip(id);
if (!clip) { if (!clip) {
...@@ -762,7 +762,7 @@ ProjectClip *Bin::getFirstSelectedClip() ...@@ -762,7 +762,7 @@ ProjectClip *Bin::getFirstSelectedClip()
{ {
QModelIndexList indexes = m_proxyModel->selectionModel()->selectedIndexes(); QModelIndexList indexes = m_proxyModel->selectionModel()->selectedIndexes();
if (indexes.isEmpty()) { if (indexes.isEmpty()) {
return NULL; return Q_NULLPTR;
} }
foreach (const QModelIndex &ix, indexes) { foreach (const QModelIndex &ix, indexes) {
AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(ix).internalPointer()); AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(ix).internalPointer());
...@@ -771,7 +771,7 @@ ProjectClip *Bin::getFirstSelectedClip() ...@@ -771,7 +771,7 @@ ProjectClip *Bin::getFirstSelectedClip()
return clip; return clip;
} }
} }
return NULL; return Q_NULLPTR;
} }
void Bin::slotDeleteClip() void Bin::slotDeleteClip()
...@@ -861,7 +861,7 @@ void Bin::slotReloadClip() ...@@ -861,7 +861,7 @@ void Bin::slotReloadClip()
AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(ix).internalPointer()); AbstractProjectItem *item = static_cast<AbstractProjectItem*>(m_proxyModel->mapToSource(ix).internalPointer());
ProjectClip *currentItem = qobject_cast<ProjectClip*>(item); ProjectClip *currentItem = qobject_cast<ProjectClip*>(item);
if (currentItem) { if (currentItem) {
emit openClip(NULL); emit openClip(Q_NULLPTR);
QDomDocument doc; QDomDocument doc;
QDomElement xml = currentItem->toXml(doc); QDomElement xml = currentItem->toXml(doc);
qDebug()<<"*****************\n"<<doc.toString()<<"\n******************"; qDebug()<<"*****************\n"<<doc.toString()<<"\n******************";
...@@ -963,7 +963,7 @@ int Bin::lastClipId() const ...@@ -963,7 +963,7 @@ int Bin::lastClipId() const
void Bin::setDocument(KdenliveDoc* project) void Bin::setDocument(KdenliveDoc* project)
{ {
// Remove clip from Bin's monitor // Remove clip from Bin's monitor
if (m_doc) emit openClip(NULL); if (m_doc) emit openClip(Q_NULLPTR);
m_infoMessage->hide(); m_infoMessage->hide();
blockSignals(true); blockSignals(true);
m_proxyModel->selectionModel()->blockSignals(true); m_proxyModel->selectionModel()->blockSignals(true);
...@@ -979,7 +979,7 @@ void Bin::setDocument(KdenliveDoc* project) ...@@ -979,7 +979,7 @@ void Bin::setDocument(KdenliveDoc* project)
} }
delete m_rootFolder; delete m_rootFolder;
delete m_itemView; delete m_itemView;
m_itemView = NULL; m_itemView = Q_NULLPTR;
delete m_jobManager; delete m_jobManager;
m_clipCounter = 1; m_clipCounter = 1;
m_folderCounter = 1; m_folderCounter = 1;
...@@ -1003,7 +1003,7 @@ void Bin::setDocument(KdenliveDoc* project) ...@@ -1003,7 +1003,7 @@ void Bin::setDocument(KdenliveDoc* project)
//connect(m_itemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), m_itemView //connect(m_itemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), m_itemView
//connect(m_itemModel, SIGNAL(updateCurrentItem()), this, SLOT(autoSelect())); //connect(m_itemModel, SIGNAL(updateCurrentItem()), this, SLOT(autoSelect()));
slotInitView(NULL); slotInitView(Q_NULLPTR);
bool binEffectsDisabled = getDocumentProperty(QStringLiteral("disablebineffects")).toInt() == 1; bool binEffectsDisabled = getDocumentProperty(QStringLiteral("disablebineffects")).toInt() == 1;
setBinEffectsDisabledStatus(binEffectsDisabled); setBinEffectsDisabledStatus(binEffectsDisabled);
autoSelect(); autoSelect();
...@@ -1178,7 +1178,7 @@ void Bin::slotLoadFolders(QMap<QString,QString> foldersData) ...@@ -1178,7 +1178,7 @@ void Bin::slotLoadFolders(QMap<QString,QString> foldersData)
if (parentFolder == m_rootFolder) { if (parentFolder == m_rootFolder) {
// parent folder not yet created, create unnamed placeholder // parent folder not yet created, create unnamed placeholder
parentFolder = new ProjectFolder(parentId, QString(), parentFolder); parentFolder = new ProjectFolder(parentId, QString(), parentFolder);
} else if (parentFolder == NULL) { } else if (parentFolder == Q_NULLPTR) {
// Parent folder not yet created in hierarchy // Parent folder not yet created in hierarchy
if (iterations > maxIterations) { if (iterations > maxIterations) {
// Give up, place folder in root // Give up, place folder in root
...@@ -1377,11 +1377,11 @@ void Bin::selectProxyModel(const QModelIndex &id) ...@@ -1377,11 +1377,11 @@ void Bin::selectProxyModel(const QModelIndex &id)
// No item selected in bin // No item selected in bin
m_openAction->setEnabled(false); m_openAction->setEnabled(false);
m_deleteAction->setEnabled(false); m_deleteAction->setEnabled(false);
showClipProperties(NULL); showClipProperties(Q_NULLPTR);
emit findInTimeline(QString()); emit findInTimeline(QString());
emit masterClipSelected(NULL, m_monitor); emit masterClipSelected(Q_NULLPTR, m_monitor);
// Display black bg in clip monitor // Display black bg in clip monitor
emit openClip(NULL); emit openClip(Q_NULLPTR);
} }
} }
...@@ -1437,7 +1437,7 @@ void Bin::slotInitView(QAction *action) ...@@ -1437,7 +1437,7 @@ void Bin::slotInitView(QAction *action)
m_folderUp->parent()->removeChild(m_folderUp); m_folderUp->parent()->removeChild(m_folderUp);
} }
delete m_folderUp; delete m_folderUp;
m_folderUp = NULL; m_folderUp = Q_NULLPTR;
} }
} }
m_listType = static_cast<BinViewType>(viewType); m_listType = static_cast<BinViewType>(viewType);
...@@ -1449,7 +1449,7 @@ void Bin::slotInitView(QAction *action) ...@@ -1449,7 +1449,7 @@ void Bin::slotInitView(QAction *action)
switch (m_listType) { switch (m_listType) {
case BinIconView: case BinIconView:
m_itemView = new MyListView(this); m_itemView = new MyListView(this);
m_folderUp = new ProjectFolderUp(NULL); m_folderUp = new ProjectFolderUp(Q_NULLPTR);
m_showDate->setEnabled(false); m_showDate->setEnabled(false);
m_showDesc->setEnabled(false); m_showDesc->setEnabled(false);
break; break;
...@@ -1643,7 +1643,7 @@ void Bin::slotItemDoubleClicked(const QModelIndex &ix, const QPoint pos) ...@@ -1643,7 +1643,7 @@ void Bin::slotItemDoubleClicked(const QModelIndex &ix, const QPoint pos)
// We are entering a parent folder // We are entering a parent folder
m_folderUp->setParent(parentItem->parent()); m_folderUp->setParent(parentItem->parent());
} }
else m_folderUp->setParent(NULL); else m_folderUp->setParent(Q_NULLPTR);
m_itemView->setRootIndex(m_proxyModel->mapFromSource(parent)); m_itemView->setRootIndex(m_proxyModel->mapFromSource(parent));
return; return;
} }
...@@ -1716,12 +1716,12 @@ void Bin::slotSwitchClipProperties() ...@@ -1716,12 +1716,12 @@ void Bin::slotSwitchClipProperties()
return; return;
} }
} }
slotSwitchClipProperties(NULL); slotSwitchClipProperties(Q_NULLPTR);
} }
void Bin::slotSwitchClipProperties(ProjectClip *clip) void Bin::slotSwitchClipProperties(ProjectClip *clip)
{ {
if (clip == NULL) { if (clip == Q_NULLPTR) {
m_propertiesPanel->setEnabled(false); m_propertiesPanel->setEnabled(false);
return; return;
} }
...@@ -1829,7 +1829,7 @@ QStringList Bin::getBinFolderClipIds(const QString &id) const ...@@ -1829,7 +1829,7 @@ QStringList Bin::getBinFolderClipIds(const QString &id) const
ProjectClip *Bin::getBinClip(const QString &id) ProjectClip *Bin::getBinClip(const QString &id)
{ {
ProjectClip *clip = NULL; ProjectClip *clip = Q_NULLPTR;
if (id.contains(QLatin1Char('_'))) { if (id.contains(QLatin1Char('_'))) {
clip = m_rootFolder->clip(id.section(QLatin1Char('_'), 0, 0)); clip = m_rootFolder->clip(id.section(QLatin1Char('_'), 0, 0));
} }
...@@ -1898,7 +1898,7 @@ void Bin::slotProducerReady(requestClipInfo info, ClipController *controller) ...@@ -1898,7 +1898,7 @@ void Bin::slotProducerReady(requestClipInfo info, ClipController *controller)
} }
} }
else if (currentClip == info.clipId) { else if (currentClip == info.clipId) {
emit openClip(NULL); emit openClip(Q_NULLPTR);
clip->setCurrent(true); clip->setCurrent(true);
} }
} }
...@@ -2072,7 +2072,7 @@ void Bin::slotUpdateJobStatus(const QString&id, int jobType, int status, const Q ...@@ -2072,7 +2072,7 @@ void Bin::slotUpdateJobStatus(const QString&id, int jobType, int status, const Q
} }
if (!actionName.isEmpty()) { if (!actionName.isEmpty()) {
QAction *action = NULL; QAction *action = Q_NULLPTR;
QList< KActionCollection * > collections = KActionCollection::allCollections(); QList< KActionCollection * > collections = KActionCollection::allCollections();
for (int i = 0; i < collections.count(); ++i) { for (int i = 0; i < collections.count(); ++i) {
KActionCollection *coll = collections.at(i); KActionCollection *coll = collections.at(i);
...@@ -2981,7 +2981,7 @@ void Bin::slotAddClipMarker(const QString &id, QList <CommentedTime> newMarkers, ...@@ -2981,7 +2981,7 @@ void Bin::slotAddClipMarker(const QString &id, QList <CommentedTime> newMarkers,
{ {
ProjectClip *clip = getBinClip(id); ProjectClip *clip = getBinClip(id);
if (!clip) return; if (!clip) return;
if (groupCommand == NULL) { if (groupCommand == Q_NULLPTR) {
groupCommand = new QUndoCommand; groupCommand = new QUndoCommand;
groupCommand->setText(i18np("Add marker", "Add markers", newMarkers.count())); groupCommand->setText(i18np("Add marker", "Add markers", newMarkers.count()));
} }
...@@ -3262,7 +3262,7 @@ void Bin::slotQueryRemoval(const QString &id, QUrl url, const QString &errorMess ...@@ -3262,7 +3262,7 @@ void Bin::slotQueryRemoval(const QString &id, QUrl url, const QString &errorMess
} }
} }
delete m_invalidClipDialog; delete m_invalidClipDialog;
m_invalidClipDialog = NULL; m_invalidClipDialog = Q_NULLPTR;
} }
void Bin::slotRefreshClipThumbnail(const QString &id) void Bin::slotRefreshClipThumbnail(const QString &id)
...@@ -3429,15 +3429,15 @@ void Bin::slotSendAudioThumb(QString id) ...@@ -3429,15 +3429,15 @@ void Bin::slotSendAudioThumb(QString id)
bool Bin::isEmpty() const bool Bin::isEmpty() const
{ {
// TODO: return true if we only have folders // TODO: return true if we only have folders
if (m_clipCounter == 1 || m_rootFolder == NULL) return true; if (m_clipCounter == 1 || m_rootFolder == Q_NULLPTR) return true;
return m_rootFolder->isEmpty(); return m_rootFolder->isEmpty();
} }
void Bin::reloadAllProducers() void Bin::reloadAllProducers()
{ {
if (m_rootFolder == NULL || m_rootFolder->isEmpty() || !isEnabled()) return; if (m_rootFolder == Q_NULLPTR || m_rootFolder->isEmpty() || !isEnabled()) return;
QList <ProjectClip*> clipList = m_rootFolder->childClips(); QList <ProjectClip*> clipList = m_rootFolder->childClips();
emit openClip(NULL); emit openClip(Q_NULLPTR);
foreach(ProjectClip *clip, clipList) { foreach(ProjectClip *clip, clipList) {
QDomDocument doc; QDomDocument doc;
QDomElement xml = clip->toXml(doc); QDomElement xml = clip->toXml(doc);
......
...@@ -544,7 +544,7 @@ private slots: ...@@ -544,7 +544,7 @@ private slots:
void slotShowDescColumn(bool show); void slotShowDescColumn(bool show);
/** @brief Setup the bin view type (icon view, tree view, ...). /** @brief Setup the bin view type (icon view, tree view, ...).
* @param action The action whose data defines the view type or NULL to keep default view */ * @param action The action whose data defines the view type or Q_NULLPTR to keep default view */
void slotInitView(QAction *action); void slotInitView(QAction *action);
/** @brief Update status for clip jobs */ /** @brief Update status for clip jobs */
......
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
Generators::Generators(Monitor *monitor, const QString &path, QWidget *parent) : Generators::Generators(Monitor *monitor, const QString &path, QWidget *parent) :
QDialog(parent) QDialog(parent)
, m_producer(NULL) , m_producer(Q_NULLPTR)
, m_timePos(NULL) , m_timePos(Q_NULLPTR)
, m_container(NULL) , m_container(Q_NULLPTR)
, m_preview(NULL) , m_preview(Q_NULLPTR)
{ {
QFile file(path); QFile file(path);
QDomDocument doc; QDomDocument doc;
......
...@@ -48,7 +48,7 @@ ProjectClip::ProjectClip(const QString &id, QIcon thumb, ClipController *control ...@@ -48,7 +48,7 @@ ProjectClip::ProjectClip(const QString &id, QIcon thumb, ClipController *control
AbstractProjectItem(AbstractProjectItem::ClipItem, id, parent) AbstractProjectItem(AbstractProjectItem::ClipItem, id, parent)
, m_abortAudioThumb(false) , m_abortAudioThumb(false)
, m_controller(controller) , m_controller(controller)
, m_thumbsProducer(NULL) , m_thumbsProducer(Q_NULLPTR)
{ {
m_clipStatus = StatusReady; m_clipStatus = StatusReady;
m_name = m_controller->clipName(); m_name = m_controller->clipName();
...@@ -73,9 +73,9 @@ ProjectClip::ProjectClip(const QString &id, QIcon thumb, ClipController *control ...@@ -73,9 +73,9 @@ ProjectClip::ProjectClip(const QString &id, QIcon thumb, ClipController *control
ProjectClip::ProjectClip(const QDomElement& description, QIcon thumb, ProjectFolder* parent) : ProjectClip::ProjectClip(const QDomElement& description, QIcon thumb, ProjectFolder* parent) :
AbstractProjectItem(AbstractProjectItem::ClipItem, description, parent) AbstractProjectItem(AbstractProjectItem::ClipItem, description, parent)
, m_abortAudioThumb(false) , m_abortAudioThumb(false)
, m_controller(NULL) , m_controller(Q_NULLPTR)
, m_type(Unknown) , m_type(Unknown)
, m_thumbsProducer(NULL) , m_thumbsProducer(Q_NULLPTR)
{ {
Q_ASSERT(description.hasAttribute("id")); Q_ASSERT(description.hasAttribute("id"));
m_clipStatus = StatusWaiting; m_clipStatus = StatusWaiting;
...@@ -186,13 +186,13 @@ ProjectClip* ProjectClip::clip(const QString &id) ...@@ -186,13 +186,13 @@ ProjectClip* ProjectClip::clip(const QString &id)
if (id == m_id) { if (id == m_id) {
return this; return this;
} }
return NULL; return Q_NULLPTR;
} }
ProjectFolder* ProjectClip::folder(const QString &id) ProjectFolder* ProjectClip::folder(const QString &id)
{ {
Q_UNUSED(id) Q_UNUSED(id)
return NULL; return Q_NULLPTR;
} }
void ProjectClip::disableEffects(bool disable) void ProjectClip::disableEffects(bool disable)
...@@ -208,7 +208,7 @@ ProjectSubClip* ProjectClip::getSubClip(int in, int out) ...@@ -208,7 +208,7 @@ ProjectSubClip* ProjectClip::getSubClip(int in, int out)
return clip; return clip;
} }
} }
return NULL; return Q_NULLPTR;
} }
QStringList ProjectClip::subClipIds() const QStringList ProjectClip::subClipIds() const
...@@ -228,7 +228,7 @@ ProjectClip* ProjectClip::clipAt(int ix) ...@@ -228,7 +228,7 @@ ProjectClip* ProjectClip::clipAt(int ix)
if (ix == index()) { if (ix == index()) {
return this; return this;
} }
return NULL; return Q_NULLPTR;
} }
/*bool ProjectClip::isValid() const /*bool ProjectClip::isValid() const
...@@ -376,7 +376,7 @@ void ProjectClip::createAudioThumbs() ...@@ -376,7 +376,7 @@ void ProjectClip::createAudioThumbs()
Mlt::Producer *ProjectClip::originalProducer() Mlt::Producer *ProjectClip::originalProducer()
{ {
if (!m_controller) { if (!m_controller) {
return NULL; return Q_NULLPTR;
} }
return &m_controller->originalProducer(); return &m_controller->originalProducer();
} }
...@@ -388,11 +388,11 @@ Mlt::Producer *ProjectClip::thumbProducer() ...@@ -388,11 +388,11 @@ Mlt::Producer *ProjectClip::thumbProducer()
return m_thumbsProducer; return m_thumbsProducer;
} }
if (!m_controller || m_controller->clipType() == Unknown) { if (!m_controller || m_controller->clipType() == Unknown) {
return NULL; return Q_NULLPTR;
} }
Mlt::Producer prod = m_controller->originalProducer(); Mlt::Producer prod = m_controller->originalProducer();
if (!prod.is_valid()) if (!prod.is_valid())
return NULL; return Q_NULLPTR;
Clip clip(prod); Clip clip(prod);
if (KdenliveSettings::gpu_accel()) { if (KdenliveSettings::gpu_accel()) {
m_thumbsProducer = clip.softClone(ClipController::getPassPropertiesList()); m_thumbsProducer = clip.softClone(ClipController::getPassPropertiesList());
...@@ -413,7 +413,7 @@ ClipController *ProjectClip::controller() ...@@ -413,7 +413,7 @@ ClipController *ProjectClip::controller()
bool ProjectClip::isReady() const bool ProjectClip::isReady() const
{ {
return m_controller != NULL && m_clipStatus == StatusReady; return m_controller != Q_NULLPTR && m_clipStatus == StatusReady;
} }
/*void ProjectClip::setZone(const QPoint &zone) /*void ProjectClip::setZone(const QPoint &zone)
...@@ -818,7 +818,7 @@ QVariant ProjectClip::data(DataType type) const ...@@ -818,7 +818,7 @@ QVariant ProjectClip::data(DataType type) const
{ {
switch (type) { switch (type) {
case AbstractProjectItem::IconOverlay: case AbstractProjectItem::IconOverlay:
return m_controller != NULL ? (m_controller->hasEffects() ? QVariant("kdenlive-track_has_effect") : QVariant()) : QVariant(); return m_controller != Q_NULLPTR ? (m_controller->hasEffects() ? QVariant("kdenlive-track_has_effect") : QVariant()) : QVariant();
break; break;
default: default:
break; break;
...@@ -843,7 +843,7 @@ void ProjectClip::slotQueryIntraThumbs(QList <int> frames) ...@@ -843,7 +843,7 @@ void ProjectClip::slotQueryIntraThumbs(QList <int> frames)
void ProjectClip::doExtractIntra() void ProjectClip::doExtractIntra()
{ {
Mlt::Producer *prod = thumbProducer(); Mlt::Producer *prod = thumbProducer();
if (prod == NULL || !prod->is_valid()) return; if (prod == Q_NULLPTR || !prod->is_valid()) return;
int fullWidth = 150 * prod->profile()->dar() + 0.5; int fullWidth = 150 * prod->profile()->dar() + 0.5;
double dar = prod->profile()->dar(); double dar = prod->profile()->dar();
int max = prod->get_length(); int max = prod->get_length();
...@@ -890,7 +890,7 @@ void ProjectClip::slotExtractImage(QList <int> frames) ...@@ -890,7 +890,7 @@ void ProjectClip::slotExtractImage(QList <int> frames)
void ProjectClip::doExtractImage() void ProjectClip::doExtractImage()
{ {
Mlt::Producer *prod = thumbProducer(); Mlt::Producer *prod = thumbProducer();
if (prod == NULL || !prod->is_valid()) return; if (prod == Q_NULLPTR || !prod->is_valid()) return;
int frameWidth = 150 * prod->profile()->dar() + 0.5; int frameWidth = 150 * prod->profile()->dar() + 0.5;
bool ok = false; bool ok = false;
QDir thumbFolder = bin()->getCacheDir(CacheThumbs, &ok); QDir thumbFolder = bin()->getCacheDir(CacheThumbs, &ok);
...@@ -944,7 +944,7 @@ void ProjectClip::discardAudioThumb() ...@@ -944,7 +944,7 @@ void ProjectClip::discardAudioThumb()
const QString ProjectClip::getAudioThumbPath(AudioStreamInfo *audioInfo) const QString ProjectClip::getAudioThumbPath(AudioStreamInfo *audioInfo)
{ {
if (audioInfo == NULL) if (audioInfo == Q_NULLPTR)
return QString(); return QString();
int audioStream = audioInfo->ffmpeg_audio_index(); int audioStream = audioInfo->ffmpeg_audio_index();
QString clipHash = hash(); QString clipHash = hash();
...@@ -1291,7 +1291,7 @@ const QString ProjectClip::geometryWithOffset(const QString &data, int offset) ...@@ -1291,7 +1291,7 @@ const QString ProjectClip::geometryWithOffset(const QString &data, int offset)
if (offset == 0) return data; if (offset == 0) return data;
Mlt::Profile *profile = m_controller->profile(); Mlt::Profile *profile = m_controller->profile();
Mlt::Geometry geometry(data.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height()); Mlt::Geometry geometry(data.toUtf8().data(), duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::Geometry newgeometry(NULL, duration().frames(profile->fps()), profile->width(), profile->height()); Mlt::Geometry newgeometry(Q_NULLPTR, duration().frames(profile->fps()), profile->width(), profile->height());
Mlt::GeometryItem item; Mlt::GeometryItem item;
int pos = 0; int pos = 0;
while (!geometry.next_key(&item, pos)) { while (!geometry.next_key(&item, pos)) {
......
...@@ -72,14 +72,14 @@ public: ...@@ -72,14 +72,14 @@ public:
/** @brief Returns a unique hash identifier used to store clip thumbnails. */ /** @brief Returns a unique hash identifier used to store clip thumbnails. */
//virtual void hash() = 0; //virtual void hash() = 0;
/** @brief Returns this if @param id matches the clip's id or NULL otherwise. */ /** @brief Returns this if @param id matches the clip's id or Q_NULLPTR otherwise. */
ProjectClip *clip(const QString &id); ProjectClip *clip(const QString &id);
ProjectFolder* folder(const QString &id); ProjectFolder* folder(const QString &id);
ProjectSubClip* getSubClip(int in, int out); ProjectSubClip* getSubClip(int in, int out);
/** @brief Returns this if @param ix matches the clip's index or NULL otherwise. */ /** @brief Returns this if @param ix matches the clip's index or Q_NULLPTR otherwise. */
ProjectClip* clipAt(int ix);