src/gvcore/filethumbnailview: replace NULL -> nullptr

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
pull/22/head
Alexander Golubev 3 months ago
parent f4878aa42e
commit 486b7ac573

@ -215,9 +215,6 @@ In thumbnail view with text on the right, this is always displayed.&lt;/p&gt;</s
<property name="text"> <property name="text">
<string>&amp;Image size</string> <string>&amp;Image size</string>
</property> </property>
<property name="toolTip" stdset="0">
<string></string>
</property>
<property name="whatsThis" stdset="0"> <property name="whatsThis" stdset="0">
<string>&lt;p&gt;Whether to display the image dimensions in thumbnail view with information on the bottom if available.&lt;/p&gt; <string>&lt;p&gt;Whether to display the image dimensions in thumbnail view with information on the bottom if available.&lt;/p&gt;
&lt;p&gt; &lt;p&gt;

@ -169,7 +169,7 @@ FileThumbnailView::FileThumbnailView(TQWidget* parent)
d->mThumbnailUpdateTimer=new TQTimer(this); d->mThumbnailUpdateTimer=new TQTimer(this);
d->mMarginSize=FileViewConfig::thumbnailMarginSize(); d->mMarginSize=FileViewConfig::thumbnailMarginSize();
d->mItemDetails=FileViewConfig::thumbnailDetails(); d->mItemDetails=FileViewConfig::thumbnailDetails();
d->mPrefetch = NULL; d->mPrefetch = nullptr;
d->mThumbnailSize = 0; d->mThumbnailSize = 0;
d->mThumbnailsDetailDialog = 0; d->mThumbnailsDetailDialog = 0;
@ -388,7 +388,7 @@ void FileThumbnailView::doStartThumbnailUpdate(const KFileItemList* list) {
void FileThumbnailView::stopThumbnailUpdate() { void FileThumbnailView::stopThumbnailUpdate() {
if (!d->mThumbnailLoadJob.isNull()) { if (!d->mThumbnailLoadJob.isNull()) {
d->mThumbnailLoadJob->kill(false); d->mThumbnailLoadJob->kill(false);
d->mThumbnailLoadJob=NULL; d->mThumbnailLoadJob=nullptr;
} }
} }
@ -679,11 +679,11 @@ void FileThumbnailView::slotCurrentChanged(TQIconViewItem* item ) {
prefetchDone(); prefetchDone();
// if the first image is selected, no matter how, preload the next one // if the first image is selected, no matter how, preload the next one
for( TQIconViewItem* pos = item; for( TQIconViewItem* pos = item;
pos != NULL; pos != nullptr;
pos = pos->nextItem()) { pos = pos->nextItem()) {
FileThumbnailViewItem* cur = static_cast< FileThumbnailViewItem* >( pos ); FileThumbnailViewItem* cur = static_cast< FileThumbnailViewItem* >( pos );
if( cur->fileItem()->isDir() || Archive::fileItemIsArchive(cur->fileItem())) continue; if( cur->fileItem()->isDir() || Archive::fileItemIsArchive(cur->fileItem())) continue;
if( pos == item && pos->nextItem() != NULL ) { if( pos == item && pos->nextItem() != nullptr ) {
d->mPrefetch = ImageLoader::loader( d->mPrefetch = ImageLoader::loader(
static_cast<const FileThumbnailViewItem*>( cur->nextItem() )->fileItem()->url(), static_cast<const FileThumbnailViewItem*>( cur->nextItem() )->fileItem()->url(),
this, BUSY_PRELOADING ); this, BUSY_PRELOADING );
@ -703,7 +703,7 @@ void FileThumbnailView::updateVisibilityInfo( int x, int y ) {
TQRect rect( x, y, visibleWidth(), visibleHeight()); TQRect rect( x, y, visibleWidth(), visibleHeight());
FileThumbnailViewItem* first = static_cast< FileThumbnailViewItem* >( findFirstVisibleItem( rect )); FileThumbnailViewItem* first = static_cast< FileThumbnailViewItem* >( findFirstVisibleItem( rect ));
if (!first) { if (!first) {
d->mThumbnailLoadJob->setPriorityItems(NULL,NULL,NULL); d->mThumbnailLoadJob->setPriorityItems(nullptr,nullptr,nullptr);
return; return;
} }
@ -732,8 +732,8 @@ void FileThumbnailView::keyPressEvent( TQKeyEvent* e ) {
TQIconViewItem* current = currentItem(); TQIconViewItem* current = currentItem();
TDEIconView::keyPressEvent( e ); TDEIconView::keyPressEvent( e );
TQIconViewItem* next = NULL; TQIconViewItem* next = nullptr;
if( current != currentItem() && currentItem() != NULL ) { // it actually moved if( current != currentItem() && currentItem() != nullptr ) { // it actually moved
switch( e->key()) { switch( e->key()) {
case Key_Left: case Key_Left:
next = currentItem()->prevItem(); next = currentItem()->prevItem();
@ -744,13 +744,13 @@ void FileThumbnailView::keyPressEvent( TQKeyEvent* e ) {
case Key_Up: case Key_Up:
// This relies on the thumbnails being in a grid ( x() == x() ) // This relies on the thumbnails being in a grid ( x() == x() )
for( next = currentItem()->prevItem(); for( next = currentItem()->prevItem();
next != NULL && next->x() != currentItem()->x(); next != nullptr && next->x() != currentItem()->x();
next = next->prevItem()) next = next->prevItem())
; ;
break; break;
case Key_Down: case Key_Down:
for( next = currentItem()->nextItem(); for( next = currentItem()->nextItem();
next != NULL && next->x() != currentItem()->x(); next != nullptr && next->x() != currentItem()->x();
next = next->nextItem()) next = next->nextItem())
; ;
break; break;
@ -758,7 +758,7 @@ void FileThumbnailView::keyPressEvent( TQKeyEvent* e ) {
} }
prefetchDone(); prefetchDone();
if( next != NULL ) { if( next != nullptr ) {
d->mPrefetch = ImageLoader::loader( d->mPrefetch = ImageLoader::loader(
static_cast<const FileThumbnailViewItem*>( next )->fileItem()->url(), static_cast<const FileThumbnailViewItem*>( next )->fileItem()->url(),
this, BUSY_PRELOADING ); this, BUSY_PRELOADING );
@ -767,9 +767,9 @@ void FileThumbnailView::keyPressEvent( TQKeyEvent* e ) {
} }
void FileThumbnailView::prefetchDone() { void FileThumbnailView::prefetchDone() {
if( d->mPrefetch != NULL ) { if( d->mPrefetch != nullptr ) {
d->mPrefetch->release( this ); d->mPrefetch->release( this );
d->mPrefetch = NULL; d->mPrefetch = nullptr;
} }
} }

Loading…
Cancel
Save