Commit 5b1fd394 authored by Vincent Pinon's avatar Vincent Pinon
Browse files

clang-tidy -fix: modernize-use-nullptr

parent 30eb85f3
...@@ -34,7 +34,7 @@ class ShiftEnterFilter : public QObject ...@@ -34,7 +34,7 @@ class ShiftEnterFilter : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
ShiftEnterFilter(QObject *parent = 0); ShiftEnterFilter(QObject *parent = nullptr);
protected: protected:
bool eventFilter(QObject *obj, QEvent *event) override; bool eventFilter(QObject *obj, QEvent *event) override;
signals: signals:
......
...@@ -241,7 +241,7 @@ void EffectTreeModel::editCustomAsset(const QString newName,const QString newDes ...@@ -241,7 +241,7 @@ void EffectTreeModel::editCustomAsset(const QString newName,const QString newDes
if (dir.exists(newName + QStringLiteral(".xml"))){ if (dir.exists(newName + QStringLiteral(".xml"))){
QMessageBox message; QMessageBox message;
message.critical(0, i18n("Error"), i18n("Effect name %1 already exists.\n Try another name?", newName)); message.critical(nullptr, i18n("Error"), i18n("Effect name %1 already exists.\n Try another name?", newName));
message.setFixedSize(400, 200); message.setFixedSize(400, 200);
return; return;
} }
......
...@@ -28,7 +28,7 @@ static void mlt_log_handler(void *service, int mlt_level, const char *format, va ...@@ -28,7 +28,7 @@ static void mlt_log_handler(void *service, int mlt_level, const char *format, va
if (mlt_level > mlt_log_get_level()) if (mlt_level > mlt_log_get_level())
return; return;
QString message; QString message;
mlt_properties properties = service? MLT_SERVICE_PROPERTIES((mlt_service) service) : NULL; mlt_properties properties = service? MLT_SERVICE_PROPERTIES((mlt_service) service) : nullptr;
if (properties) { if (properties) {
char *mlt_type = mlt_properties_get(properties, "mlt_type"); char *mlt_type = mlt_properties_get(properties, "mlt_type");
char *service_name = mlt_properties_get(properties, "mlt_service"); char *service_name = mlt_properties_get(properties, "mlt_service");
......
...@@ -130,7 +130,7 @@ GLWidget::GLWidget(int id, QObject *parent) ...@@ -130,7 +130,7 @@ GLWidget::GLWidget(int id, QObject *parent)
m_blackClip->set("out", 3); m_blackClip->set("out", 3);
connect(&m_refreshTimer, &QTimer::timeout, this, &GLWidget::refresh); connect(&m_refreshTimer, &QTimer::timeout, this, &GLWidget::refresh);
m_producer = m_blackClip; m_producer = m_blackClip;
rootContext()->setContextProperty("markersModel", 0); rootContext()->setContextProperty("markersModel", nullptr);
if (!initGPUAccel()) { if (!initGPUAccel()) {
disableGPUAccel(); disableGPUAccel();
} }
...@@ -906,7 +906,7 @@ int GLWidget::setProducer(const std::shared_ptr<Mlt::Producer> &producer, bool i ...@@ -906,7 +906,7 @@ int GLWidget::setProducer(const std::shared_ptr<Mlt::Producer> &producer, bool i
} }
m_producer = m_blackClip; m_producer = m_blackClip;
// Reset markersModel // Reset markersModel
rootContext()->setContextProperty("markersModel", 0); rootContext()->setContextProperty("markersModel", nullptr);
} }
// redundant check. postcondition of above is m_producer != null // redundant check. postcondition of above is m_producer != null
m_producer->set_speed(0); m_producer->set_speed(0);
......
...@@ -3561,7 +3561,7 @@ void TimelineModel::registerTrack(std::shared_ptr<TrackModel> track, int pos, bo ...@@ -3561,7 +3561,7 @@ void TimelineModel::registerTrack(std::shared_ptr<TrackModel> track, int pos, bo
m_iteratorTable[id] = it; m_iteratorTable[id] = it;
endInsertRows(); endInsertRows();
int cache = (int)QThread::idealThreadCount() + ((int)m_allTracks.size() + 1) * 2; int cache = (int)QThread::idealThreadCount() + ((int)m_allTracks.size() + 1) * 2;
mlt_service_cache_set_size(NULL, "producer_avformat", qMax(4, cache)); mlt_service_cache_set_size(nullptr, "producer_avformat", qMax(4, cache));
} }
void TimelineModel::registerClip(const std::shared_ptr<ClipModel> &clip, bool registerProducer) void TimelineModel::registerClip(const std::shared_ptr<ClipModel> &clip, bool registerProducer)
...@@ -3624,7 +3624,7 @@ Fun TimelineModel::deregisterTrack_lambda(int id) ...@@ -3624,7 +3624,7 @@ Fun TimelineModel::deregisterTrack_lambda(int id)
// Finish operation // Finish operation
endRemoveRows(); endRemoveRows();
int cache = (int)QThread::idealThreadCount() + ((int)m_allTracks.size() + 1) * 2; int cache = (int)QThread::idealThreadCount() + ((int)m_allTracks.size() + 1) * 2;
mlt_service_cache_set_size(NULL, "producer_avformat", qMax(4, cache)); mlt_service_cache_set_size(nullptr, "producer_avformat", qMax(4, cache));
return true; return true;
}; };
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment