Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a53a2402 authored by Kevin Funk's avatar Kevin Funk

clang-tidy: modernize-use-nullptr run

Semi-ACK'd by Albert :)
parent a2bb8fbb
......@@ -34,7 +34,7 @@ private:
void AddRemoveAnnotationTest::initTestCase()
{
Okular::SettingsCore::instance( QStringLiteral("addannotationtest") );
m_document = new Okular::Document( 0 );
m_document = new Okular::Document( nullptr );
}
void AddRemoveAnnotationTest::init()
......
......@@ -39,7 +39,7 @@ private:
void AnnotationTest::initTestCase()
{
Okular::SettingsCore::instance( QStringLiteral("annotationtest") );
m_document = new Okular::Document( 0 );
m_document = new Okular::Document( nullptr );
const QString testFile = QStringLiteral(KDESRCDIR "data/file1.pdf");
QMimeDatabase db;
const QMimeType mime = db.mimeTypeForFile( testFile );
......
......@@ -31,7 +31,7 @@ class DocumentTest
void DocumentTest::testCloseDuringRotationJob()
{
Okular::SettingsCore::instance( QStringLiteral("documenttest") );
Okular::Document *m_document = new Okular::Document( 0 );
Okular::Document *m_document = new Okular::Document( nullptr );
const QString testFile = QStringLiteral(KDESRCDIR "data/file1.pdf");
QMimeDatabase db;
const QMimeType mime = db.mimeTypeForFile( testFile );
......
......@@ -95,7 +95,7 @@ void MockEditor::slotAnnotationContentsChangedByUndoRedo(Okular::Annotation* ann
void EditAnnotationContentsTest::initTestCase()
{
Okular::SettingsCore::instance( QStringLiteral("editannotationcontentstest") );
m_document = new Okular::Document( 0 );
m_document = new Okular::Document( nullptr );
}
void EditAnnotationContentsTest::cleanupTestCase()
......
......@@ -55,7 +55,7 @@ private:
void EditFormsTest::initTestCase()
{
Okular::SettingsCore::instance( QStringLiteral("editformstest") );
m_document = new Okular::Document( 0 );
m_document = new Okular::Document( nullptr );
}
void EditFormsTest::cleanupTestCase()
......
......@@ -100,7 +100,7 @@ QList<Shell*> getShells()
return shells;
}
Shell *findShell(Shell *ignore = 0)
Shell *findShell(Shell *ignore = nullptr)
{
foreach (QWidget *widget, QApplication::topLevelWidgets())
{
......@@ -108,7 +108,7 @@ Shell *findShell(Shell *ignore = 0)
if (s && s != ignore)
return s;
}
return 0;
return nullptr;
}
void MainShellTest::initTestCase()
......@@ -349,7 +349,7 @@ void MainShellTest::testShell()
{
QCOMPARE(paths.count(), 1);
Okular::Part *part = s->findChild<Okular::Part*>();
QTRY_VERIFY(presentationWidget(part) != 0);
QTRY_VERIFY(presentationWidget(part) != nullptr);
}
if (externalProcessExpectPresentation)
......@@ -366,7 +366,7 @@ void MainShellTest::testShell()
part = dynamic_cast<Okular::Part*>(s->m_tabs[1].part);
}
QTRY_VERIFY(presentationWidget(part) != 0);
QTRY_VERIFY(presentationWidget(part) != nullptr);
}
if (helper)
......
......@@ -41,7 +41,7 @@ private:
void ModifyAnnotationPropertiesTest::initTestCase()
{
Okular::SettingsCore::instance( QStringLiteral("editannotationcontentstest") );
m_document = new Okular::Document( 0 );
m_document = new Okular::Document( nullptr );
}
void ModifyAnnotationPropertiesTest::cleanupTestCase()
......
......@@ -78,7 +78,7 @@ bool PartTest::openDocument(Okular::Part *part, const QString &filePath)
void PartTest::testReload()
{
QVariantList dummyArgs;
Okular::Part part(NULL, NULL, dummyArgs);
Okular::Part part(nullptr, nullptr, dummyArgs);
QVERIFY( openDocument(&part, QStringLiteral(KDESRCDIR "data/file1.pdf")) );
part.reload();
qApp->processEvents();
......@@ -88,7 +88,7 @@ void PartTest::testReload()
void PartTest::testCanceledReload()
{
QVariantList dummyArgs;
PartThatHijacksQueryClose part(NULL, NULL, dummyArgs);
PartThatHijacksQueryClose part(nullptr, nullptr, dummyArgs);
QVERIFY( openDocument(&part, QStringLiteral(KDESRCDIR "data/file1.pdf")) );
// When queryClose() returns false, the reload operation is canceled (as if
......@@ -103,7 +103,7 @@ void PartTest::testCanceledReload()
void PartTest::testTOCReload()
{
QVariantList dummyArgs;
Okular::Part part(NULL, NULL, dummyArgs);
Okular::Part part(nullptr, nullptr, dummyArgs);
QVERIFY( openDocument(&part, QStringLiteral(KDESRCDIR "data/tocreload.pdf")) );
QCOMPARE(part.m_toc->expandedNodes().count(), 0);
part.m_toc->m_treeView->expandAll();
......@@ -118,7 +118,7 @@ void PartTest::testFowardPDF()
QFETCH(QString, dir);
QVariantList dummyArgs;
Okular::Part part(NULL, NULL, dummyArgs);
Okular::Part part(nullptr, nullptr, dummyArgs);
// Create temp dir named like this: ${system temp dir}/${random string}/${dir}
const QTemporaryDir tempDir;
......@@ -173,7 +173,7 @@ void PartTest::testGeneratorPreferences()
{
KConfigDialog * dialog;
QVariantList dummyArgs;
Okular::Part part(NULL, NULL, dummyArgs);
Okular::Part part(nullptr, nullptr, dummyArgs);
// Test that we don't crash while opening the dialog
dialog = part.slotGeneratorPreferences();
......@@ -190,7 +190,7 @@ void PartTest::testGeneratorPreferences()
void PartTest::testSelectText()
{
QVariantList dummyArgs;
Okular::Part part(NULL, NULL, dummyArgs);
Okular::Part part(nullptr, nullptr, dummyArgs);
QVERIFY(openDocument(&part, QStringLiteral(KDESRCDIR "data/file2.pdf")));
part.widget()->show();
QTest::qWaitForWindowExposed(part.widget());
......@@ -228,7 +228,7 @@ void PartTest::testSelectText()
void PartTest::testClickInternalLink()
{
QVariantList dummyArgs;
Okular::Part part(NULL, NULL, dummyArgs);
Okular::Part part(nullptr, nullptr, dummyArgs);
QVERIFY(openDocument(&part, QStringLiteral(KDESRCDIR "data/file2.pdf")));
part.widget()->show();
QTest::qWaitForWindowExposed(part.widget());
......
......@@ -166,7 +166,7 @@ void SearchTest::testNextAndPrevious()
void SearchTest::test311232()
{
Okular::Document d(0);
Okular::Document d(nullptr);
SearchFinishedReceiver receiver;
QSignalSpy spy(&d, SIGNAL(searchFinished(int,Okular::Document::SearchStatus)));
......@@ -207,7 +207,7 @@ void SearchTest::test323262()
CREATE_PAGE;
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("a"), Okular::FromBottom, Qt::CaseSensitive, NULL);
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("a"), Okular::FromBottom, Qt::CaseSensitive, nullptr);
QVERIFY(result);
delete result;
......@@ -226,7 +226,7 @@ void SearchTest::test323263()
CREATE_PAGE;
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("ab"), Okular::FromTop, Qt::CaseSensitive, NULL);
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("ab"), Okular::FromTop, Qt::CaseSensitive, nullptr);
QVERIFY(result);
Okular::RegularAreaRect expected;
expected.append(rect[1]);
......@@ -257,7 +257,7 @@ void SearchTest::testDottedI()
CREATE_PAGE;
Okular::RegularAreaRect* result = tp->findText(0, QString::fromUtf8("İ"), Okular::FromTop, Qt::CaseInsensitive, NULL);
Okular::RegularAreaRect* result = tp->findText(0, QString::fromUtf8("İ"), Okular::FromTop, Qt::CaseInsensitive, nullptr);
QVERIFY(result);
delete result;
......@@ -283,7 +283,7 @@ void SearchTest::testHyphenAtEndOfLineWithoutYOverlap()
CREATE_PAGE;
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("supercalifragilisticexpialidocious"),
Okular::FromTop, Qt::CaseSensitive, NULL);
Okular::FromTop, Qt::CaseSensitive, nullptr);
QVERIFY(result);
Okular::RegularAreaRect expected;
for (int i = 0; i < text.size(); i++) {
......@@ -356,14 +356,14 @@ void SearchTest::testHyphenAtEndOfPage()
{
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("a"),
Okular::FromTop, Qt::CaseSensitive, NULL);
Okular::FromTop, Qt::CaseSensitive, nullptr);
QVERIFY(result);
delete result;
}
{
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("a"),
Okular::FromBottom, Qt::CaseSensitive, NULL);
Okular::FromBottom, Qt::CaseSensitive, nullptr);
QVERIFY(result);
delete result;
}
......@@ -395,7 +395,7 @@ void SearchTest::testOneColumn()
CREATE_PAGE;
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("Only one column"),
Okular::FromTop, Qt::CaseSensitive, NULL);
Okular::FromTop, Qt::CaseSensitive, nullptr);
QVERIFY(result);
delete result;
......@@ -423,7 +423,7 @@ void SearchTest::testTwoColumns()
CREATE_PAGE;
Okular::RegularAreaRect* result = tp->findText(0, QStringLiteral("This text in"),
Okular::FromTop, Qt::CaseSensitive, NULL);
Okular::FromTop, Qt::CaseSensitive, nullptr);
QVERIFY(!result);
delete result;
......
......@@ -67,7 +67,7 @@ private:
void TranslateAnnotationTest::initTestCase()
{
Okular::SettingsCore::instance( QStringLiteral("editannotationcontentstest") );
m_document = new Okular::Document( 0 );
m_document = new Okular::Document( nullptr );
// translate m_annot1
m_deltaA = Okular::NormalizedPoint(0.05, 0.1);
......
......@@ -28,7 +28,7 @@
EditAnnotToolDialog::EditAnnotToolDialog( QWidget *parent, const QDomElement &initialState )
: QDialog( parent ), m_stubann( 0 ), m_annotationWidget( 0 )
: QDialog( parent ), m_stubann( nullptr ), m_annotationWidget( nullptr )
{
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel);
QVBoxLayout *mainLayout = new QVBoxLayout;
......
......@@ -29,10 +29,10 @@ PreferencesDialog::PreferencesDialog( QWidget * parent, KConfigSkeleton * skelet
m_general = new DlgGeneral( this, embedMode );
m_performance = new DlgPerformance( this );
m_accessibility = new DlgAccessibility( this );
m_presentation = 0;
m_annotations = 0;
m_annotationsPage = 0;
m_editor = 0;
m_presentation = nullptr;
m_annotations = nullptr;
m_annotationsPage = nullptr;
m_editor = nullptr;
#ifdef OKULAR_DEBUG_CONFIGPAGE
m_debug = new DlgDebug( this );
#endif
......
......@@ -419,7 +419,7 @@ class Okular::MovieActionPrivate : public Okular::ActionPrivate
{
public:
MovieActionPrivate( MovieAction::OperationType operation )
: ActionPrivate(), m_operation( operation ), m_annotation( 0 )
: ActionPrivate(), m_operation( operation ), m_annotation( nullptr )
{
}
......@@ -471,7 +471,7 @@ class Okular::RenditionActionPrivate : public Okular::ActionPrivate
public:
RenditionActionPrivate( RenditionAction::OperationType operation, Okular::Movie *movie, enum ScriptType scriptType, const QString &script )
: ActionPrivate(), m_operation( operation ), m_movie( movie ), m_scriptType( scriptType ),
m_script( script ), m_annotation( 0 )
m_script( script ), m_annotation( nullptr )
{
}
......
......@@ -91,10 +91,10 @@ Annotation * AnnotationUtils::createAnnotation( const QDomElement & annElement )
{
// safety check on annotation element
if ( !annElement.hasAttribute( QStringLiteral("type") ) )
return 0;
return nullptr;
// build annotation of given type
Annotation * annotation = 0;
Annotation * annotation = nullptr;
int typeNumber = annElement.attribute( QStringLiteral("type") ).toInt();
switch ( typeNumber )
{
......@@ -425,7 +425,7 @@ class Annotation::Revision::Private
{
public:
Private()
: m_annotation( 0 ), m_scope( Reply ), m_type( None )
: m_annotation( nullptr ), m_scope( Reply ), m_type( None )
{
}
......@@ -490,7 +490,7 @@ Annotation::RevisionType Annotation::Revision::type() const
AnnotationPrivate::AnnotationPrivate()
: m_page( 0 ), m_flags( 0 ), m_disposeFunc( 0 )
: m_page( nullptr ), m_flags( 0 ), m_disposeFunc( nullptr )
{
}
......@@ -2519,7 +2519,7 @@ class Okular::FileAttachmentAnnotationPrivate : public Okular::AnnotationPrivate
{
public:
FileAttachmentAnnotationPrivate()
: AnnotationPrivate(), icon( QStringLiteral("PushPin") ), embfile( 0 )
: AnnotationPrivate(), icon( QStringLiteral("PushPin") ), embfile( nullptr )
{
}
~FileAttachmentAnnotationPrivate() override
......@@ -2618,7 +2618,7 @@ class Okular::SoundAnnotationPrivate : public Okular::AnnotationPrivate
{
public:
SoundAnnotationPrivate()
: AnnotationPrivate(), icon( QStringLiteral("Speaker") ), sound( 0 )
: AnnotationPrivate(), icon( QStringLiteral("Speaker") ), sound( nullptr )
{
}
~SoundAnnotationPrivate() override
......@@ -2716,7 +2716,7 @@ class Okular::MovieAnnotationPrivate : public Okular::AnnotationPrivate
{
public:
MovieAnnotationPrivate()
: AnnotationPrivate(), movie( 0 )
: AnnotationPrivate(), movie( nullptr )
{
}
~MovieAnnotationPrivate() override
......@@ -2811,7 +2811,7 @@ class Okular::ScreenAnnotationPrivate : public Okular::AnnotationPrivate
};
ScreenAnnotationPrivate::ScreenAnnotationPrivate()
: m_action( 0 )
: m_action( nullptr )
{
}
......@@ -2886,7 +2886,7 @@ Action* ScreenAnnotation::additionalAction( AdditionalActionType type ) const
{
Q_D( const ScreenAnnotation );
if ( !d->m_additionalActions.contains( type ) )
return 0;
return nullptr;
else
return d->m_additionalActions.value( type );
}
......@@ -2987,7 +2987,7 @@ Action* WidgetAnnotation::additionalAction( AdditionalActionType type ) const
{
Q_D( const WidgetAnnotation );
if ( !d->m_additionalActions.contains( type ) )
return 0;
return nullptr;
else
return d->m_additionalActions.value( type );
}
......@@ -3008,7 +3008,7 @@ class Okular::RichMediaAnnotationPrivate : public Okular::AnnotationPrivate
};
RichMediaAnnotationPrivate::RichMediaAnnotationPrivate()
: movie( 0 ), embeddedFile( 0 )
: movie( nullptr ), embeddedFile( nullptr )
{
}
......
......@@ -279,12 +279,12 @@ QDebug operator<<( QDebug str, const Okular::NormalizedRect& r )
}
RegularAreaRect::RegularAreaRect()
: RegularArea< NormalizedRect, QRect >(), d( 0 )
: RegularArea< NormalizedRect, QRect >(), d( nullptr )
{
}
RegularAreaRect::RegularAreaRect( const RegularAreaRect& rar )
: RegularArea< NormalizedRect, QRect >( rar ), d( 0 )
: RegularArea< NormalizedRect, QRect >( rar ), d( nullptr )
{
}
......@@ -463,7 +463,7 @@ AnnotationObjectRect::~AnnotationObjectRect()
{
// the annotation pointer is kept elsewehere (in Page, most probably),
// so just release its pointer
m_object = 0;
m_object = nullptr;
}
void AnnotationObjectRect::transform( const QTransform &matrix )
......
......@@ -859,7 +859,7 @@ class HighlightAreaRect : public RegularAreaRect
* Creates a new highlight area rect with the coordinates of
* the given @p area.
*/
HighlightAreaRect( const RegularAreaRect *area = 0 );
HighlightAreaRect( const RegularAreaRect *area = nullptr );
/**
* The search ID of the highlight owner.
......
......@@ -31,7 +31,7 @@ using namespace Okular;
class SoundInfo
{
public:
explicit SoundInfo( const Sound * s = 0, const SoundAction * ls = 0 )
explicit SoundInfo( const Sound * s = nullptr, const SoundAction * ls = nullptr )
: sound( s ), volume( 0.5 ), synchronous( false ), repeat( false ),
mix( false )
{
......@@ -56,7 +56,7 @@ class PlayData
{
public:
PlayData()
: m_mediaobject( 0 ), m_output( 0 ), m_buffer( 0 )
: m_mediaobject( nullptr ), m_output( nullptr ), m_buffer( nullptr )
{
}
......@@ -166,7 +166,7 @@ bool AudioPlayerPrivate::play( const SoundInfo& si )
if ( !valid )
{
delete data;
data = 0;
data = nullptr;
}
if ( data )
{
......
......@@ -60,7 +60,7 @@ class OKULARCORE_EXPORT AudioPlayer : public QObject
* Enqueue the specified @p sound for playing, optionally taking more
* information about the playing from the @p soundlink .
*/
void playSound( const Sound * sound, const SoundAction * linksound = 0 );
void playSound( const Sound * sound, const SoundAction * linksound = nullptr );
/**
* Tell the AudioPlayer to stop all the playbacks.
......
......@@ -95,7 +95,7 @@ class BookmarkManager::Private : public KBookmarkOwner
{
public:
Private( BookmarkManager * qq )
: KBookmarkOwner(), q( qq ), document( 0 ), manager( 0 )
: KBookmarkOwner(), q( qq ), document( nullptr ), manager( nullptr )
{
}
......@@ -111,7 +111,7 @@ class BookmarkManager::Private : public KBookmarkOwner
bool enableOption(BookmarkOption option) const override;
void openBookmark( const KBookmark & bm, Qt::MouseButtons, Qt::KeyboardModifiers ) override;
QHash<QUrl, QString>::iterator bookmarkFind( const QUrl& url, bool doCreate, KBookmarkGroup *result = 0);
QHash<QUrl, QString>::iterator bookmarkFind( const QUrl& url, bool doCreate, KBookmarkGroup *result = nullptr);
// slots
void _o_changed( const QString & groupAddress, const QString & caller );
......@@ -603,7 +603,7 @@ QList< QAction * > BookmarkManager::actionsForUrl(const QUrl &url ) const
if ( b.isSeparator() || b.isGroup() )
continue;
ret.append( new OkularBookmarkAction( DocumentViewport( b.url().fragment(QUrl::FullyDecoded) ), b, d, 0 ) );
ret.append( new OkularBookmarkAction( DocumentViewport( b.url().fragment(QUrl::FullyDecoded) ), b, d, nullptr ) );
}
break;
}
......
......@@ -22,7 +22,7 @@ class ChooseEngineDialog : public QDialog
Q_OBJECT
public:
ChooseEngineDialog( const QStringList &generators, const QMimeType &mime, QWidget * parent = 0 );
ChooseEngineDialog( const QStringList &generators, const QMimeType &mime, QWidget * parent = nullptr );
~ChooseEngineDialog();
int selectedGenerator() const;
......
This diff is collapsed.
......@@ -302,7 +302,7 @@ class OKULARCORE_EXPORT Document : public QObject
* Sets the list of visible page rectangles.
* @see VisiblePageRect
*/
void setVisiblePageRects( const QVector< VisiblePageRect * > & visiblePageRects, DocumentObserver *excludeObserver = 0 );
void setVisiblePageRects( const QVector< VisiblePageRect * > & visiblePageRects, DocumentObserver *excludeObserver = nullptr );
/**
* Returns the list of visible page rectangles.
......@@ -419,7 +419,7 @@ class OKULARCORE_EXPORT Document : public QObject
* @param excludeObserver The observer ids which shouldn't be effected by this change.
* @param smoothMove Whether the move shall be animated smoothly.
*/
void setViewportPage( int page, DocumentObserver *excludeObserver = 0, bool smoothMove = false );
void setViewportPage( int page, DocumentObserver *excludeObserver = nullptr, bool smoothMove = false );
/**
* Sets the current document viewport to the given @p viewport.
......@@ -427,7 +427,7 @@ class OKULARCORE_EXPORT Document : public QObject
* @param excludeObserver The observer which shouldn't be effected by this change.
* @param smoothMove Whether the move shall be animated smoothly.
*/
void setViewport( const DocumentViewport &viewport, DocumentObserver *excludeObserver = 0, bool smoothMove = false );
void setViewport( const DocumentViewport &viewport, DocumentObserver *excludeObserver = nullptr, bool smoothMove = false );
/**
* Sets the current document viewport to the next viewport in the
......@@ -456,7 +456,7 @@ class OKULARCORE_EXPORT Document : public QObject
/**
* Sets the zoom for the current document.
*/
void setZoom( int factor, DocumentObserver *excludeObserver = 0 );
void setZoom( int factor, DocumentObserver *excludeObserver = nullptr );
/**
* Describes the possible options for the pixmap requests.
......
......@@ -79,27 +79,27 @@ class DocumentPrivate
public:
DocumentPrivate( Document *parent )
: m_parent( parent ),
m_tempFile( 0 ),
m_tempFile( nullptr ),
m_docSize( -1 ),
m_allocatedPixmapsTotalMemory( 0 ),
m_maxAllocatedTextPages( 0 ),
m_warnedOutOfMemory( false ),
m_rotation( Rotation0 ),
m_exportCached( false ),
m_bookmarkManager( 0 ),
m_memCheckTimer( 0 ),
m_saveBookmarksTimer( 0 ),
m_generator( 0 ),
m_walletGenerator( 0 ),
m_bookmarkManager( nullptr ),
m_memCheckTimer( nullptr ),
m_saveBookmarksTimer( nullptr ),
m_generator( nullptr ),
m_walletGenerator( nullptr ),
m_generatorsLoaded( false ),
m_pageController( 0 ),
m_closingLoop( 0 ),
m_scripter( 0 ),
m_archiveData( 0 ),
m_pageController( nullptr ),
m_closingLoop( nullptr ),
m_scripter( nullptr ),
m_archiveData( nullptr ),
m_fontsCached( false ),
m_annotationEditingEnabled ( true ),
m_annotationBeingModified( false ),
m_synctex_scanner( 0 )
m_synctex_scanner( nullptr )
{
calculateMaxTextPages();
}
......@@ -111,10 +111,10 @@ class DocumentPrivate
qulonglong calculateMemoryToFree();
void cleanupPixmapMemory();
void cleanupPixmapMemory( qulonglong memoryToFree );
AllocatedPixmap * searchLowestPriorityPixmap( bool unloadableOnly = false, bool thenRemoveIt = false, DocumentObserver *observer = 0 /* any */ );
AllocatedPixmap * searchLowestPriorityPixmap( bool unloadableOnly = false, bool thenRemoveIt = false, DocumentObserver *observer = nullptr /* any */ );
void calculateMaxTextPages();
qulonglong getTotalMemory();
qulonglong getFreeMemory( qulonglong *freeSwap = 0 );
qulonglong getFreeMemory( qulonglong *freeSwap = nullptr );
void loadDocumentInfo();
void loadDocumentInfo( QFile &infoFile );
void loadViewsInfo( View *view, const QDomElement &e );
......
......@@ -33,7 +33,7 @@ void moveViewportIfBoundingRectNotFullyVisible( Okular::NormalizedRect boundingR
searchViewport.rePos.enabled = true;
searchViewport.rePos.normalizedX = ( boundingRect.left + boundingRect.right ) / 2.0;
searchViewport.rePos.normalizedY = ( boundingRect.top + boundingRect.bottom ) / 2.0;
docPriv->m_parent->setViewport( searchViewport, 0, true );
docPriv->m_parent->setViewport( searchViewport, nullptr, true );
}
}
......
......@@ -18,7 +18,7 @@
using namespace Okular;
FormFieldPrivate::FormFieldPrivate( FormField::FieldType type )
: m_type( type ), m_activateAction( 0 )
: m_type( type ), m_activateAction( nullptr )
{
}
......
......@@ -31,10 +31,10 @@
using namespace Okular;
GeneratorPrivate::GeneratorPrivate()
: m_document( 0 ),
mPixmapGenerationThread( 0 ), mTextPageGenerationThread( 0 ),
m_mutex( 0 ), m_threadsMutex( 0 ), mPixmapReady( true ), mTextPageReady( true ),
m_closing( false ), m_closingLoop( 0 ),
: m_document( nullptr ),
mPixmapGenerationThread( nullptr ), mTextPageGenerationThread( nullptr ),
m_mutex( nullptr ), m_threadsMutex( nullptr ), mPixmapReady( true ), mTextPageReady( true ),
m_closing( false ), m_closingLoop( nullptr ),
m_dpi(72.0, 72.0)
{
}
......@@ -214,7 +214,7 @@ bool Generator::closeDocument()
loop.exec();
d->m_closingLoop = 0;
d->m_closingLoop = nullptr;
}
else
{
......@@ -289,7 +289,7 @@ QImage Generator::image( PixmapRequest *request )
TextPage* Generator::textPage( Page* )
{
return 0;
return nullptr;
}
DocumentInfo Generator::generateDocumentInfo(const QSet<DocumentInfo::Key> &keys) const
......@@ -301,7 +301,7 @@ DocumentInfo Generator::generateDocumentInfo(const QSet<DocumentInfo::Key> &keys
const DocumentSynopsis * Generator::generateDocumentSynopsis()
{
return 0;
return nullptr;
}
FontInfo::List Generator::fontsForPage( int )
......@@ -311,7 +311,7 @@ FontInfo::List Generator::fontsForPage( int )
const QList<EmbeddedFile*> * Generator::embeddedFiles() const
{
return 0;
return nullptr;
}
Generator::PageSizeMetric Generator::pagesSizeMetric() const
......@@ -407,7 +407,7 @@ c