Commit 96a42fa9 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

NULL -> nullptr

parent 97c1be86
......@@ -36,7 +36,7 @@ VLCSource::VLCSource( VLCBackend* backend, const QString& path )
, m_nbVideoTracks( 0 )
, m_nbAudioTracks( 0 )
, m_length( 0 )
, m_snapshot( NULL )
, m_snapshot( nullptr )
, m_isParsed( false )
, m_nbFrames( 0 )
{
......@@ -63,7 +63,7 @@ VLCSource::preparse()
Q_ASSERT( m_nbAudioTracks == 0 );
Q_ASSERT( m_nbVideoTracks == 0 );
VmemRenderer renderer( m_backend, this, NULL );
VmemRenderer renderer( m_backend, this, nullptr );
m_media.parse();
m_length = m_media.duration();
auto tracks = m_media.tracks();
......@@ -104,7 +104,7 @@ VLCSource::isParsed() const
bool
VLCSource::computeSnapshot( VmemRenderer& renderer )
{
Q_ASSERT( m_snapshot == NULL );
Q_ASSERT( m_snapshot == nullptr );
renderer.start();
{
QMutex mutex;
......@@ -121,7 +121,7 @@ VLCSource::computeSnapshot( VmemRenderer& renderer )
return false;
}
m_snapshot = renderer.waitSnapshot();
return m_snapshot != NULL;
return m_snapshot != nullptr;
}
unsigned int
......@@ -174,8 +174,8 @@ VLCSource::nbAudioTracks() const
const uint8_t*
VLCSource::snapshot() const
{
if ( hasVideo() == false || m_snapshot == NULL )
return NULL;
if ( hasVideo() == false || m_snapshot == nullptr )
return nullptr;
return m_snapshot->bits();
}
......
......@@ -359,7 +359,7 @@ VLCSourceRenderer::enableAudioOutputToMemory(void *data, AudioOutputLockCallback
void
VLCSourceRenderer::enableMemoryInput( void *data, MemoryInputLockCallback lockCallback, MemoryInputUnlockCallback unlockCallback )
{
Q_ASSERT( m_media != NULL );
Q_ASSERT( m_media != nullptr );
m_modes |= Imem;
char buffer[64];
......
......@@ -75,7 +75,7 @@ VmemRenderer::waitSnapshot()
QMutexLocker lock( &m_mutex );
m_snapshotRequired = true;
if ( m_waitCond.wait( &m_mutex, 3000 ) == false )
return NULL;
return nullptr;
return new QImage( *m_snapshot );
}
......
......@@ -229,7 +229,7 @@ Commands::Clip::Split::Split( TrackWorkflow *tw, ClipHelper *toSplit,
qint64 newClipPos, qint64 newClipBegin ) :
m_trackWorkflow( tw ),
m_toSplit( toSplit ),
m_newClip( NULL ),
m_newClip( nullptr ),
m_newClipPos( newClipPos ),
m_newClipBegin( newClipBegin )
{
......
......@@ -29,7 +29,7 @@
KeyboardShortcutHelper::KeyboardShortcutHelper( const QString& name, QWidget* parent ) :
QShortcut( parent ),
m_name( name ),
m_action( NULL )
m_action( nullptr )
{
SettingValue* setting = Core::getInstance()->settings()->value( name );
setKey( QKeySequence( setting->get().toString() ) );
......@@ -37,7 +37,7 @@ KeyboardShortcutHelper::KeyboardShortcutHelper( const QString& name, QWidget* pa
}
KeyboardShortcutHelper::KeyboardShortcutHelper( const QString& name, QAction *action,
QWidget *parent /*= NULL*/ ) :
QWidget *parent /*= nullptr*/ ) :
QShortcut( parent ),
m_name( name ),
m_action( action )
......@@ -50,7 +50,7 @@ KeyboardShortcutHelper::KeyboardShortcutHelper( const QString& name, QAction *ac
void
KeyboardShortcutHelper::shortcutUpdated( const QVariant& value )
{
if ( m_action == NULL )
if ( m_action == nullptr )
setKey( QKeySequence( value.toString() ) );
else
m_action->setShortcut( value.toString() );
......
......@@ -33,9 +33,9 @@ class KeyboardShortcutHelper : public QShortcut
Q_OBJECT
public:
KeyboardShortcutHelper( const QString &name, QWidget* parent = NULL );
KeyboardShortcutHelper( const QString &name, QWidget* parent = nullptr );
KeyboardShortcutHelper( const QString &name, QAction *action,
QWidget *parent = NULL );
QWidget *parent = nullptr );
virtual ~KeyboardShortcutHelper()
{
}
......
......@@ -31,7 +31,7 @@ Effect::Effect( const QString &fileName ) :
m_major( -1 ),
m_minor( -1 ),
m_nbParams( -1 ),
m_f0r_deinit( NULL )
m_f0r_deinit( nullptr )
{
}
......@@ -39,7 +39,7 @@ Effect::~Effect()
{
if ( isLoaded() == true )
{
if ( m_f0r_deinit != NULL )
if ( m_f0r_deinit != nullptr )
m_f0r_deinit();
unload();
}
......@@ -51,7 +51,7 @@ Effect::~Effect()
dest = reinterpret_cast<typeof( dest )>( resolve( symbolName ) )
#define LOAD_FREI0R_SYMBOL_CHECKED( dest, symbolName ) \
if ( ( LOAD_FREI0R_SYMBOL( dest, symbolName ) ) == NULL ) \
if ( ( LOAD_FREI0R_SYMBOL( dest, symbolName ) ) == nullptr ) \
{ \
vlmcCritical() << "Failed to load symbol:" << symbolName; \
return false; \
......@@ -85,12 +85,12 @@ Effect::load()
m_minor = infos.minor_version;
m_nbParams = infos.num_params;
m_author = infos.author;
if ( m_type == Filter && m_f0r_update == NULL )
if ( m_type == Filter && m_f0r_update == nullptr )
{
vlmcCritical() << "Failed to load symbol f0r_update. Dropping module" << fileName();
return false;
}
if ( ( m_type == Mixer2 || m_type == Mixer3 ) && m_f0r_update2 == NULL )
if ( ( m_type == Mixer2 || m_type == Mixer3 ) && m_f0r_update2 == nullptr )
{
vlmcCritical() << "Failed to load symbol f0r_update2. Dropping module" << fileName();
return false;
......
......@@ -30,7 +30,7 @@ EffectHelper::EffectHelper( EffectInstance *effectInstance, qint64 begin, qint64
const QString &uuid ) :
Helper( begin, end, uuid ),
m_effectInstance( effectInstance ),
m_target( NULL )
m_target( nullptr )
{
if ( Core::getInstance()->workflow()->getLengthFrame() > 0 )
m_end = Core::getInstance()->workflow()->getLengthFrame();
......@@ -60,7 +60,7 @@ void
EffectHelper::setTarget( EffectUser *target )
{
m_target = target;
if ( target != NULL )
if ( target != nullptr )
{
if ( target->length() > 0 && target->length() < m_end )
m_end = target->length();
......
......@@ -29,7 +29,7 @@ EffectInstance::EffectInstance( Effect *effect ) :
m_effect( effect ),
m_width( 0 ),
m_height( 0 ),
m_instance( NULL )
m_instance( nullptr )
{
init( 1, 1 );
......@@ -85,7 +85,7 @@ EffectInstance::init( quint32 width, quint32 height )
bool
EffectInstance::isInit() const
{
return m_instance != NULL;
return m_instance != nullptr;
}
Effect*
......
......@@ -31,7 +31,7 @@
EffectSettingValue::EffectSettingValue( const QString& key, Type type, EffectInstance* instance, quint32 index,
const char *name, const char *desc, Flags flags ) :
SettingValue( key, type, QVariant(), name, desc, flags ),
m_paramBuff( NULL ),
m_paramBuff( nullptr ),
m_buffSize( 0 ),
m_effectInstance( instance ),
m_index( index )
......@@ -100,7 +100,7 @@ EffectSettingValue::set( const QVariant &val )
void
EffectSettingValue::apply()
{
if ( m_paramBuff != NULL )
if ( m_paramBuff != nullptr )
m_effectInstance->effect()->m_f0r_set_param_value( m_effectInstance->m_instance,
m_paramBuff, m_index );
}
......
......@@ -56,9 +56,9 @@ class EffectSettingValue : public SettingValue
template <typename T>
void copyToFrei0rBuff( const T* ptr, quint32 size = sizeof( T ) )
{
if ( m_buffSize != size || m_paramBuff == NULL )
if ( m_buffSize != size || m_paramBuff == nullptr )
{
delete[] m_paramBuff; //Won't hurt if paramBuff is NULL
delete[] m_paramBuff; //Won't hurt if paramBuff is nullptr
m_paramBuff = new qint8[size];
m_buffSize = size;
}
......
......@@ -56,7 +56,7 @@ EffectUser::addEffect( Effect *effect, qint64 start /*= 0*/, qint64 end /*= -1*/
addEffect( ret );
return ret;
}
return NULL;
return nullptr;
}
void
......@@ -79,12 +79,12 @@ EffectUser::applyFilters( const Workflow::Frame* frame, qint64 currentFrame )
QReadLocker lock( m_effectsLock );
if ( m_filters.size() == 0 )
return NULL;
return nullptr;
EffectsEngine::EffectList::const_iterator it = m_filters.constBegin();
EffectsEngine::EffectList::const_iterator ite = m_filters.constEnd();
quint32 *buff1 = NULL;
quint32 *buff2 = NULL;
quint32 *buff1 = nullptr;
quint32 *buff2 = nullptr;
const quint32 *input = frame->buffer();
bool firstBuff = true;
......@@ -98,7 +98,7 @@ EffectUser::applyFilters( const Workflow::Frame* frame, qint64 currentFrame )
buff = &buff1;
else
buff = &buff2;
if ( *buff == NULL )
if ( *buff == nullptr )
*buff = new quint32[frame->nbPixels()];
EffectInstance *effect = (*it)->effectInstance();
effect->process( input, *buff );
......@@ -107,7 +107,7 @@ EffectUser::applyFilters( const Workflow::Frame* frame, qint64 currentFrame )
}
++it;
}
if ( buff1 != NULL || buff2 != NULL )
if ( buff1 != nullptr || buff2 != nullptr )
{
if ( firstBuff == true )
{
......@@ -120,7 +120,7 @@ EffectUser::applyFilters( const Workflow::Frame* frame, qint64 currentFrame )
return buff1;
}
}
return NULL;
return nullptr;
}
void
......@@ -170,7 +170,7 @@ EffectUser::getMixer( qint64 currentFrame )
}
++it;
}
return NULL;
return nullptr;
}
void
......@@ -187,11 +187,11 @@ EffectUser::loadEffects( const QDomElement &parent )
effect.hasAttribute( "end" ) == true )
{
Effect *e = Core::getInstance()->effectsEngine()->effect( effect.attribute( "name" ) );
if ( e != NULL )
if ( e != nullptr )
{
EffectHelper *helper = addEffect( e, effect.attribute( "start" ).toLongLong(),
effect.attribute( "end" ).toLongLong() );
if ( helper == NULL )
if ( helper == nullptr )
vlmcCritical() << "Can't load effect" << effect.attribute( "name" );
}
else
......@@ -245,7 +245,7 @@ EffectUser::removeEffect( Effect::Type type, qint32 idx )
if ( idx < m_filters.size() )
{
EffectHelper *helper = m_filters.takeAt( idx );
helper->setTarget( NULL );
helper->setTarget( nullptr );
emit effectRemoved( helper->uuid() );
}
}
......@@ -254,7 +254,7 @@ EffectUser::removeEffect( Effect::Type type, qint32 idx )
if ( idx < m_mixers.size() )
{
EffectHelper *helper = m_mixers.takeAt( idx );
helper->setTarget( NULL );
helper->setTarget( nullptr );
emit effectRemoved( helper->uuid() );
}
}
......@@ -274,7 +274,7 @@ EffectUser::removeEffect(EffectHelper *helper)
if ( (*it)->uuid() == helper->uuid() )
{
EffectHelper *eh = *it;
eh->setTarget( NULL );
eh->setTarget( nullptr );
m_filters.erase( it );
emit effectRemoved( eh->uuid() );
return ;
......
......@@ -63,7 +63,7 @@ EffectsEngine::effect( const QString& name )
QHash<QString, Effect*>::iterator it = m_effects.find( name );
if ( it != m_effects.end() )
return it.value();
return NULL;
return nullptr;
}
bool
......@@ -143,10 +143,10 @@ EffectsEngine::loadEffects()
}
#elif defined ( Q_OS_WIN32 )
TCHAR appDir[128];
if ( GetModuleFileName( NULL, appDir, 128 ) > 0 )
if ( GetModuleFileName( nullptr, appDir, 128 ) > 0 )
{
TCHAR *pos = strrchr( appDir, '\\' );
if ( pos == NULL )
if ( pos == nullptr )
{
vlmcWarning() << "Can't use ModuleFileName:" << appDir;
return ;
......
......@@ -46,7 +46,7 @@ ClipProperty::ClipProperty( Clip* clip, QWidget *parent ) :
ui->snapshotLabel->setPixmap( m_clip->getMedia()->snapshot().scaled( 128, 128, Qt::KeepAspectRatio ) );
//Metatags
const QPushButton* button = ui->buttonBox->button( QDialogButtonBox::Apply );
Q_ASSERT( button != NULL);
Q_ASSERT( button != nullptr);
connect( button, SIGNAL( clicked() ), this, SLOT( apply() ) );
m_model = new QStringListModel( m_clip->metaTags(), this );
......
......@@ -30,7 +30,7 @@
#define TS_PREFIX "vlmc_"
LanguageHelper::LanguageHelper() : m_translator( NULL ), m_qtTranslator( NULL )
LanguageHelper::LanguageHelper() : m_translator( nullptr ), m_qtTranslator( nullptr )
{
connect( qApp, SIGNAL( aboutToQuit() ), this, SLOT( deleteLater() ) );
}
......@@ -52,14 +52,14 @@ LanguageHelper::languageChanged( const QVariant &vLang )
void
LanguageHelper::languageChanged( const QString &lang )
{
if ( m_translator != NULL || m_qtTranslator != NULL )
if ( m_translator != nullptr || m_qtTranslator != nullptr )
{
qApp->removeTranslator( m_translator );
qApp->removeTranslator( m_qtTranslator );
delete m_translator;
delete m_qtTranslator;
m_translator = NULL;
m_qtTranslator = NULL;
m_translator = nullptr;
m_qtTranslator = nullptr;
}
m_translator = new QTranslator();
......
......@@ -73,9 +73,9 @@
MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
: QMainWindow( parent )
, m_backend( backend )
, m_fileRenderer( NULL )
, m_projectPreferences( NULL )
, m_wizard( NULL )
, m_fileRenderer( nullptr )
, m_projectPreferences( nullptr )
, m_wizard( nullptr )
{
m_ui.setupUi( this );
......@@ -120,7 +120,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
//Connecting Library stuff:
const ClipRenderer* clipRenderer = qobject_cast<const ClipRenderer*>( m_clipPreview->getGenericRenderer() );
Q_ASSERT( clipRenderer != NULL );
Q_ASSERT( clipRenderer != nullptr );
connect( m_mediaLibrary, SIGNAL( clipSelected( Clip* ) ),
clipRenderer, SLOT( setClip( Clip* ) ) );
connect( m_mediaLibrary, SIGNAL( importRequired() ),
......@@ -147,7 +147,7 @@ MainWindow::~MainWindow()
void
MainWindow::showWizard()
{
if ( m_wizard == NULL )
if ( m_wizard == nullptr )
{
m_wizard = new ProjectWizard( this );
m_wizard->setModal( true );
......@@ -351,7 +351,7 @@ void
MainWindow::on_actionSave_As_triggered()
{
//FIXME: This lacks the current project file path as a default location.
QString dest = QFileDialog::getSaveFileName( NULL, QObject::tr( "Enter the output file name" ),
QString dest = QFileDialog::getSaveFileName( nullptr, QObject::tr( "Enter the output file name" ),
QString(), QObject::tr( "VLMC project file(*.vlmc)" ) );
if ( dest.isEmpty() == true )
return;
......@@ -364,7 +364,7 @@ void
MainWindow::on_actionLoad_Project_triggered()
{
QString folder = VLMC_GET_STRING( "vlmc/WorkspaceLocation" );
QString fileName = QFileDialog::getOpenFileName( NULL, tr( "Please choose a project file" ),
QString fileName = QFileDialog::getOpenFileName( nullptr, tr( "Please choose a project file" ),
folder, tr( "VLMC project file(*.vlmc)" ) );
if ( fileName.isEmpty() == true )
return ;
......@@ -595,7 +595,7 @@ MainWindow::checkVideoLength()
{
if ( Core::getInstance()->workflow()->getLengthFrame() <= 0 )
{
QMessageBox::warning( NULL, tr ( "VLMC Renderer" ), tr( "There is nothing to render." ) );
QMessageBox::warning( nullptr, tr ( "VLMC Renderer" ), tr( "There is nothing to render." ) );
return false;
}
return true;
......@@ -889,7 +889,7 @@ MainWindow::canRedoChanged( bool canRedo )
void
MainWindow::onOudatedBackupFile()
{
if ( QMessageBox::question( NULL, QObject::tr( "Backup file" ),
if ( QMessageBox::question( nullptr, QObject::tr( "Backup file" ),
QObject::tr( "An outdated backup file was found. "
"Do you want to erase it?" ),
QMessageBox::Ok | QMessageBox::No ) == QMessageBox::Ok )
......
......@@ -98,10 +98,10 @@ EffectHelper*
EffectInstanceListModel::add( const QString &effectName )
{
if ( effectName.isEmpty() == true )
return NULL;
return nullptr;
Effect *effect = Core::getInstance()->effectsEngine()->effect( effectName );
if ( effect == NULL )
return NULL;
if ( effect == nullptr )
return nullptr;
beginInsertRows( QModelIndex(), m_user->count( Effect::Filter ), m_user->count( Effect::Filter ) );
EffectHelper *helper = m_user->addEffect( effect );
endInsertRows();
......
......@@ -89,7 +89,7 @@ EffectInstanceWidget::widgetFactory( EffectSettingValue *s )
case SettingValue::Color:
return new ColorWidget( s, this );
default:
return NULL;
return nullptr;
}
}
......
......@@ -110,6 +110,6 @@ void
EffectStack::add()
{
EffectHelper *helper = m_model->add( m_ui->addComboBox->currentText() );
if( helper != NULL )
if( helper != nullptr )
addInstanceWidget( helper->effectInstance() );
}
......@@ -70,7 +70,7 @@ void
RendererSettings::selectOutputFileName()
{
QString outputFileName =
QFileDialog::getSaveFileName( NULL, tr ( "Enter the output file name" ),
QFileDialog::getSaveFileName( nullptr, tr ( "Enter the output file name" ),
QDir::currentPath(), tr( "Videos(%1)" ).arg( Media::VideoExtensions ) );
m_ui.outputFileName->setText( outputFileName );
}
......
......@@ -33,7 +33,7 @@
ShareOnInternet::ShareOnInternet( QWidget* parent )
: QDialog( parent, Qt::Sheet | Qt::Dialog )
{
m_service = NULL;
m_service = nullptr;
m_serviceProvider = 0;
m_ui.setupUi( this );
m_ui.progressBar->setVisible( false );
......@@ -83,7 +83,7 @@ ShareOnInternet::publish()
if( m_service )
delete m_service;
m_service = NULL;
m_service = nullptr;
m_serviceProvider = m_ui.serviceBox->currentIndex();
}
......@@ -168,7 +168,7 @@ ShareOnInternet::uploadFinished( QString result )
msg = tr( "Some error has occured while processing your video."
"\nPlease check with your video service provider." );
if( QMessageBox::information( NULL, tr("Video Uploaded"), msg,
if( QMessageBox::information( nullptr, tr("Video Uploaded"), msg,
QMessageBox::Open | QMessageBox::Close ) == QMessageBox::Open )
{
QDesktopServices::openUrl( result );
......
......@@ -136,7 +136,7 @@ ImportController::changeEvent( QEvent *e )
void
ImportController::clipSelection( Clip* clip )
{
if ( clip != NULL )
if ( clip != nullptr )
{
const QUuid& uuid = clip->uuid();
if ( m_currentUuid == uuid )
......@@ -158,7 +158,7 @@ ImportController::importMedia( const QString &filePath )
return ;
Media* media = m_temporaryMedias->addMedia( filePath );
if ( media == NULL )
if ( media == nullptr )
return ;
connect( media, SIGNAL( metaDataComputed() ), this, SLOT( mediaLoaded() ) );
......@@ -222,7 +222,7 @@ ImportController::reject()
m_mediaListView->clear();
m_temporaryMedias->clear();
collapseAllButCurrentPath();
m_clipRenderer->setClip( NULL );
m_clipRenderer->setClip( nullptr );
done( Rejected );
}
......@@ -243,14 +243,14 @@ ImportController::accept()
if ( invalidMedias == true )
handleInvalidMedias();
m_temporaryMedias->removeAll();
m_clipRenderer->setClip( NULL );
m_clipRenderer->setClip( nullptr );
done( Accepted );
}
void
ImportController::handleInvalidMedias()
{
QMessageBox::StandardButton res = QMessageBox::question( NULL, tr( "Invalid medias" ),
QMessageBox::StandardButton res = QMessageBox::question( nullptr, tr( "Invalid medias" ),
tr( "Some of the medias you loaded can't be used for video editing. Do you want VLMC to convert them"
" so you can use them in your project?" ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes );
......
......@@ -34,7 +34,7 @@ TagWidget::TagWidget( QWidget *parent, int nbButton, QStringList tagList ) :
m_ui( new Ui::TagWidget ),
m_nbButton( nbButton ),
m_defaultTagList( tagList ),
m_currentClip( NULL )
m_currentClip( nullptr )
{
m_ui->setupUi( this );
m_defaultTagList << "Outdoor" << "Holiday" << "Seaside" << "Sunset" << "Family";
......@@ -76,7 +76,7 @@ TagWidget::clipSelected( Clip* clip )
void
TagWidget::setMetaTags()
{
if ( m_currentClip != NULL )
if ( m_currentClip != nullptr )
{
QStringList tagList = m_ui->TagTextEdit->document()->toPlainText().split( ",", QString::SkipEmptyParts );
m_currentClip->setMetaTags( tagList );
......@@ -86,7 +86,7 @@ TagWidget::setMetaTags()
void
TagWidget:: buttonTagClicked()
{
if ( m_currentClip != NULL )
if ( m_currentClip != nullptr )
{
QStringList tagList = m_currentClip->metaTags();
for (int i = 0; i < m_buttonList.count(); i++)
......@@ -106,7 +106,7 @@ void
TagWidget::setTagTextEdit()
{
QString tags;
if ( m_currentClip != NULL )
if ( m_currentClip != nullptr )
{
for( int i = 0; i < m_currentClip->metaTags().count(); i++ )
{
......@@ -123,7 +123,7 @@ TagWidget::setTagTextEdit()
void
TagWidget::setButtonList( QStringList tagList )
{
if ( m_currentClip != NULL )
if ( m_currentClip != nullptr )
{
for( int i = 0; i < tagList.count(); i++ )
{
......@@ -150,5 +150,5 @@ TagWidget::changeEvent( QEvent *e )
void
TagWidget::clipDestroyed()
{
m_currentClip = NULL;
m_currentClip = nullptr;
}
......@@ -290,13 +290,13 @@ MediaCellView::contextMenuEvent( QContextMenuEvent *event )
QAction* copyInWorkspace = menu.addAction( "Copy in workspace" );
QAction* selectedAction = menu.exec( event->globalPos() );
if ( selectedAction == NULL )
if ( selectedAction == nullptr )
return ;
if ( copyInWorkspace == selectedAction )
{
if ( Core::getInstance()->workspace()->copyToWorkspace( m_clip->getMedia() ) == false )
{
QMessageBox::warning( NULL, tr( "Can't copy to workspace" ),
QMessageBox::warning( nullptr, tr( "Can't copy to workspace" ),
tr( "Can't copy this media to workspace: %1" ).arg( Core::getInstance()->workspace()->lastError() ) );
}
}
......
......@@ -107,7 +107,7 @@ MediaLibrary::viewChanged( ViewController *view )
{
MediaListView *mlv = qobject_cast<MediaListView*>( view );
if ( mlv == NULL )
if ( mlv == nullptr )
return ;
m_mediaListView = mlv;
......@@ -176,7 +176,7 @@ MediaLibrary::dropEvent( QDropEvent *event )
Media *media = Core::getInstance()->library()->addMedia( fileName );
if ( media != NULL )
if ( media != nullptr )
{
Clip* clip = new Clip( media );
media->setBaseClip( clip );
......
......@@ -95,7 +95,7 @@ MediaListView::__clipRemoved( const QUuid &uuid )
removeCell( cell );
m_currentUuid = QUuid();
// cancel out selection state (mostly to inform the renderer)
emit clipSelected( NULL );
emit clipSelected( nullptr );
}
void
......
......@@ -28,10 +28,10 @@
#include <QTime>
ClipMetadataDisplayer::ClipMetadataDisplayer( QWidget *parent /*= NULL*/ ) :
ClipMetadataDisplayer::ClipMetadataDisplayer( QWidget *parent /*= nullptr*/ ) :
QWidget( parent ),
m_ui( new Ui::ClipMetadataDisplayer ),
m_watchedClip( NULL )
m_watchedClip( nullptr )
{
m_ui->setupUi( this );
}
......
......@@ -28,7 +28,7 @@
PreviewRuler::PreviewRuler( QWidget* parent ) :
QWidget( parent ),
m_renderer( NULL ),
m_renderer( nullptr ),
m_frame( 0 )
{
setMouseTracking( true );
......@@ -64,7 +64,7 @@ PreviewRuler::paintEvent( QPaintEvent * event )
painter.setBrush( QBrush( QColor( 50, 50, 50 ) ) );
painter.drawRect( marks );
if ( m_renderer != NULL && m_renderer->length() > 0 )
if ( m_renderer != nullptr && m_renderer->length() > 0 )
{
qreal linesToDraw = 0;
qreal spacing = 0;
......@@ -175,7 +175,7 @@ PreviewRuler::paintEvent( QPaintEvent * event )
int cursorPos;
if ( m_renderer != NULL && m_renderer->length() > 0 )
if ( m_renderer != nullptr && m_renderer->length() > 0 )
{