Commit 0a2287be authored by Albert Astals Cid's avatar Albert Astals Cid

CI: Enable two readability clang-tidy checks

Use jq to filter compile_commands.json to not include the compilation of
autogenerated files, we don't want to check those

Also filter out the synctex folder, since that is imported code
parent 54494cc3
......@@ -26,9 +26,9 @@ build_clang_tidy:
- echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
- apt-get update
- apt-get build-dep --yes --no-install-recommends okular
- apt-get install --yes --no-install-recommends ninja-build clang clang-tidy python python-yaml libkf5crash-dev libkf5purpose-dev libegl-dev
- apt-get install --yes --no-install-recommends ninja-build clang clang-tidy python python-yaml libkf5crash-dev libkf5purpose-dev libegl-dev jq
script:
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clang++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja $srcdir
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clang++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja $srcdir && cat compile_commands.json | jq '[.[] | select(.file | contains("'"$srcdir"'"))]' > compile_commands.aux.json && cat compile_commands.aux.json | jq '[.[] | select(.file | contains("/synctex/")| not)]' > compile_commands.json
- ninja
- "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace' -config=\"{WarningsAsErrors: '*'}\""
- "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,readability-inconsistent-declaration-parameter-name,readability-string-compare,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-make-unique,modernize-make-shared,modernize-use-override,modernize-use-equals-delete,modernize-use-emplace' -config=\"{WarningsAsErrors: '*'}\""
......@@ -96,7 +96,7 @@ class PartTest
static bool openDocument(Okular::Part *part, const QString &filePath);
signals:
void urlHandler(const QUrl &url);
void urlHandler(const QUrl &url); // NOLINT(readability-inconsistent-declaration-parameter-name)
private slots:
void testReload();
......
......@@ -30,7 +30,7 @@ class PreferencesDialog : public KConfigDialog
Q_OBJECT
public:
PreferencesDialog( QWidget * parent, KConfigSkeleton * config, Okular::EmbedMode embedMode );
PreferencesDialog( QWidget * parent, KConfigSkeleton * skeleton, Okular::EmbedMode embedMode );
void switchToAnnotationsPage();
......
......@@ -151,16 +151,16 @@ QDomElement AnnotationUtils::findChildElement( const QDomNode & parentNode,
return QDomElement();
}
QRect AnnotationUtils::annotationGeometry( const Annotation * ann,
double scaledWidth, double scaledHeight )
QRect AnnotationUtils::annotationGeometry( const Annotation * annotation,
double scaleX, double scaleY )
{
const QRect rect = ann->transformedBoundingRectangle().geometry( (int)scaledWidth, (int)scaledHeight );
if ( ann->subType() == Annotation::AText && ( ( (TextAnnotation*)ann )->textType() == TextAnnotation::Linked ) )
const QRect rect = annotation->transformedBoundingRectangle().geometry( (int)scaleX, (int)scaleY );
if ( annotation->subType() == Annotation::AText && ( ( (TextAnnotation*)annotation )->textType() == TextAnnotation::Linked ) )
{
// To be honest i have no clue of why the 24,24 is here, maybe to make sure it's not too small?
// But why only for linked text?
const QRect rect24 = QRect( (int)( ann->transformedBoundingRectangle().left * scaledWidth ),
(int)( ann->transformedBoundingRectangle().top * scaledHeight ), 24, 24 );
const QRect rect24 = QRect( (int)( annotation->transformedBoundingRectangle().left * scaleX ),
(int)( annotation->transformedBoundingRectangle().top * scaleY ), 24, 24 );
return rect24.united(rect);
}
......@@ -510,10 +510,10 @@ Annotation::Annotation( AnnotationPrivate &dd )
{
}
Annotation::Annotation( AnnotationPrivate &dd, const QDomNode & annNode )
Annotation::Annotation( AnnotationPrivate &dd, const QDomNode & description )
: d_ptr( &dd )
{
d_ptr->setAnnotationProperties( annNode );
d_ptr->setAnnotationProperties( description );
}
Annotation::~Annotation()
......@@ -1043,8 +1043,8 @@ TextAnnotation::TextAnnotation()
{
}
TextAnnotation::TextAnnotation( const QDomNode & node )
: Annotation( *new TextAnnotationPrivate(), node )
TextAnnotation::TextAnnotation( const QDomNode & description )
: Annotation( *new TextAnnotationPrivate(), description )
{
}
......@@ -1349,8 +1349,8 @@ LineAnnotation::LineAnnotation()
{
}
LineAnnotation::LineAnnotation( const QDomNode & node )
: Annotation( *new LineAnnotationPrivate(), node )
LineAnnotation::LineAnnotation( const QDomNode & description )
: Annotation( *new LineAnnotationPrivate(), description )
{
}
......@@ -1663,8 +1663,8 @@ GeomAnnotation::GeomAnnotation()
{
}
GeomAnnotation::GeomAnnotation( const QDomNode & node )
: Annotation( *new GeomAnnotationPrivate(), node )
GeomAnnotation::GeomAnnotation( const QDomNode & description )
: Annotation( *new GeomAnnotationPrivate(), description )
{
}
......@@ -1949,8 +1949,8 @@ HighlightAnnotation::HighlightAnnotation()
{
}
HighlightAnnotation::HighlightAnnotation( const QDomNode & node )
: Annotation( *new HighlightAnnotationPrivate(), node )
HighlightAnnotation::HighlightAnnotation( const QDomNode & description )
: Annotation( *new HighlightAnnotationPrivate(), description )
{
}
......@@ -2139,8 +2139,8 @@ StampAnnotation::StampAnnotation()
{
}
StampAnnotation::StampAnnotation( const QDomNode & node )
: Annotation( *new StampAnnotationPrivate(), node )
StampAnnotation::StampAnnotation( const QDomNode & description )
: Annotation( *new StampAnnotationPrivate(), description )
{
}
......@@ -2239,8 +2239,8 @@ InkAnnotation::InkAnnotation()
{
}
InkAnnotation::InkAnnotation( const QDomNode & node )
: Annotation( *new InkAnnotationPrivate(), node )
InkAnnotation::InkAnnotation( const QDomNode & description )
: Annotation( *new InkAnnotationPrivate(), description )
{
}
......@@ -2489,8 +2489,8 @@ CaretAnnotation::CaretAnnotation()
{
}
CaretAnnotation::CaretAnnotation( const QDomNode & node )
: Annotation( *new CaretAnnotationPrivate(), node )
CaretAnnotation::CaretAnnotation( const QDomNode & description )
: Annotation( *new CaretAnnotationPrivate(), description )
{
}
......@@ -2580,8 +2580,8 @@ FileAttachmentAnnotation::FileAttachmentAnnotation()
{
}
FileAttachmentAnnotation::FileAttachmentAnnotation( const QDomNode & node )
: Annotation( *new FileAttachmentAnnotationPrivate(), node )
FileAttachmentAnnotation::FileAttachmentAnnotation( const QDomNode & description )
: Annotation( *new FileAttachmentAnnotationPrivate(), description )
{
}
......@@ -2610,10 +2610,10 @@ QString FileAttachmentAnnotation::fileIconName() const
return d->icon;
}
void FileAttachmentAnnotation::setFileIconName( const QString &icon )
void FileAttachmentAnnotation::setFileIconName( const QString &iconName )
{
Q_D( FileAttachmentAnnotation );
d->icon = icon;
d->icon = iconName;
}
EmbeddedFile* FileAttachmentAnnotation::embeddedFile() const
......@@ -2679,8 +2679,8 @@ SoundAnnotation::SoundAnnotation()
{
}
SoundAnnotation::SoundAnnotation( const QDomNode & node )
: Annotation( *new SoundAnnotationPrivate(), node )
SoundAnnotation::SoundAnnotation( const QDomNode & description )
: Annotation( *new SoundAnnotationPrivate(), description )
{
}
......@@ -2709,10 +2709,10 @@ QString SoundAnnotation::soundIconName() const
return d->icon;
}
void SoundAnnotation::setSoundIconName( const QString &icon )
void SoundAnnotation::setSoundIconName( const QString &iconName )
{
Q_D( SoundAnnotation );
d->icon = icon;
d->icon = iconName;
}
Sound* SoundAnnotation::sound() const
......@@ -2776,8 +2776,8 @@ MovieAnnotation::MovieAnnotation()
{
}
MovieAnnotation::MovieAnnotation( const QDomNode & node )
: Annotation( *new MovieAnnotationPrivate(), node )
MovieAnnotation::MovieAnnotation( const QDomNode & description )
: Annotation( *new MovieAnnotationPrivate(), description )
{
}
......@@ -2866,8 +2866,8 @@ ScreenAnnotation::ScreenAnnotation()
{
}
ScreenAnnotation::ScreenAnnotation( const QDomNode & node )
: Annotation( *new ScreenAnnotationPrivate(), node )
ScreenAnnotation::ScreenAnnotation( const QDomNode & description )
: Annotation( *new ScreenAnnotationPrivate(), description )
{
}
......@@ -2967,8 +2967,8 @@ WidgetAnnotation::WidgetAnnotation()
{
}
WidgetAnnotation::WidgetAnnotation( const QDomNode & node )
: Annotation( *new WidgetAnnotationPrivate, node )
WidgetAnnotation::WidgetAnnotation( const QDomNode & description )
: Annotation( *new WidgetAnnotationPrivate, description )
{
}
......@@ -3063,8 +3063,8 @@ RichMediaAnnotation::RichMediaAnnotation()
{
}
RichMediaAnnotation::RichMediaAnnotation( const QDomNode & node )
: Annotation( *new RichMediaAnnotationPrivate, node )
RichMediaAnnotation::RichMediaAnnotation( const QDomNode & description )
: Annotation( *new RichMediaAnnotationPrivate, description )
{
}
......
......@@ -1437,9 +1437,9 @@ class OKULARCORE_EXPORT FileAttachmentAnnotation : public Annotation
QString fileIconName() const;
/**
* Sets the @p name of the icon for the file attachment annotation.
* Sets the @p iconName of the icon for the file attachment annotation.
*/
void setFileIconName( const QString &name );
void setFileIconName( const QString &iconName );
/**
* Gets the embedded file object.
......@@ -1447,10 +1447,10 @@ class OKULARCORE_EXPORT FileAttachmentAnnotation : public Annotation
EmbeddedFile* embeddedFile() const;
/**
* Sets the @p object representing the embedded file of the file
* Sets the @p ef representing the embedded file of the file
* attachment annotation.
*/
void setEmbeddedFile( EmbeddedFile *object );
void setEmbeddedFile( EmbeddedFile *ef );
/**
* Returns the sub type of the file attachment annotation.
......@@ -1497,9 +1497,9 @@ class OKULARCORE_EXPORT SoundAnnotation : public Annotation
QString soundIconName() const;
/**
* Sets the @p name of the icon for the sound annotation.
* Sets the @p iconName of the icon for the sound annotation.
*/
void setSoundIconName( const QString &name );
void setSoundIconName( const QString &iconName );
/**
* Gets the sound object.
......@@ -1507,10 +1507,10 @@ class OKULARCORE_EXPORT SoundAnnotation : public Annotation
Sound* sound() const;
/**
* Sets the @p object representing the sound of the file
* Sets the @p s representing the sound of the file
* attachment annotation.
*/
void setSound( Sound *object );
void setSound( Sound *s );
/**
* Returns the sub type of the sound annotation.
......@@ -1745,9 +1745,9 @@ class OKULARCORE_EXPORT RichMediaAnnotation : public Annotation
void setMovie( Movie *movie );
/**
* Sets the @p object representing the embedded file.
* Sets the @p embeddedFile representing the embedded file.
*/
void setEmbeddedFile( EmbeddedFile *object );
void setEmbeddedFile( EmbeddedFile *embeddedFile );
/**
* Gets the embedded file object.
......
......@@ -306,8 +306,8 @@ HighlightAreaRect::HighlightAreaRect( const RegularAreaRect *area )
/** class ObjectRect **/
ObjectRect::ObjectRect( double l, double t, double r, double b, bool ellipse, ObjectType type, void * pnt )
: m_objectType( type ), m_object( pnt )
ObjectRect::ObjectRect( double l, double t, double r, double b, bool ellipse, ObjectType type, void * object )
: m_objectType( type ), m_object( object )
{
// assign coordinates swapping them if negative width or height
QRectF rect( r > l ? l : r, b > t ? t : b, fabs( r - l ), fabs( b - t ) );
......@@ -319,10 +319,10 @@ ObjectRect::ObjectRect( double l, double t, double r, double b, bool ellipse, Ob
m_transformedPath = m_path;
}
ObjectRect::ObjectRect( const NormalizedRect& x, bool ellipse, ObjectType type, void * pnt )
: m_objectType( type ), m_object( pnt )
ObjectRect::ObjectRect( const NormalizedRect& r, bool ellipse, ObjectType type, void * object )
: m_objectType( type ), m_object( object )
{
QRectF rect( x.left, x.top, fabs( x.right - x.left ), fabs( x.bottom - x.top ) );
QRectF rect( r.left, r.top, fabs( r.right - r.left ), fabs( r.bottom - r.top ) );
if ( ellipse )
m_path.addEllipse( rect );
else
......@@ -331,8 +331,8 @@ ObjectRect::ObjectRect( const NormalizedRect& x, bool ellipse, ObjectType type,
m_transformedPath = m_path;
}
ObjectRect::ObjectRect( const QPolygonF &poly, ObjectType type, void * pnt )
: m_objectType( type ), m_object( pnt )
ObjectRect::ObjectRect( const QPolygonF &poly, ObjectType type, void * object )
: m_objectType( type ), m_object( object )
{
m_path.addPolygon( poly );
......
......@@ -481,7 +481,7 @@ class OKULARCORE_EXPORT ObjectRect
/**
* This is an overloaded member function, provided for convenience.
*/
ObjectRect( const NormalizedRect &rect, bool ellipse, ObjectType type, void *object );
ObjectRect( const NormalizedRect &r, bool ellipse, ObjectType type, void *object );
/**
* This is an overloaded member function, provided for convenience.
......@@ -599,9 +599,9 @@ class OKULARCORE_EXPORT SourceRefObjectRect : public ObjectRect
* Creates a new source reference object rectangle.
*
* @param point The point of the source reference.
* @param reference The storable source reference object.
* @param srcRef The storable source reference object.
*/
SourceRefObjectRect( const NormalizedPoint& point, void *reference );
SourceRefObjectRect( const NormalizedPoint& point, void *srcRef );
/**
* Returns the bounding rect of the source reference object rectangle for the
......@@ -765,14 +765,14 @@ bool RegularArea<NormalizedShape, Shape>::isNull() const
}
template <class NormalizedShape, class Shape>
bool RegularArea<NormalizedShape, Shape>::intersects( const NormalizedShape& rect ) const
bool RegularArea<NormalizedShape, Shape>::intersects( const NormalizedShape& shape ) const
{
if ( this->isEmpty() )
return false;
typename QList<NormalizedShape>::const_iterator it = this->begin(), itEnd = this->end();
for ( ; it != itEnd; ++it )
if ( !givePtr( *it )->isNull() && givePtr( *it )->intersects( rect ) )
if ( !givePtr( *it )->isNull() && givePtr( *it )->intersects( shape ) )
return true;
return false;
......
......@@ -387,12 +387,12 @@ QHash<QUrl, QString>::iterator BookmarkManager::Private::bookmarkFind( const QUr
return it;
}
void BookmarkManager::addBookmark( int n )
void BookmarkManager::addBookmark( int page )
{
if ( n >= 0 && n < (int)d->document->m_pagesVector.count() )
if ( page >= 0 && page < (int)d->document->m_pagesVector.count() )
{
if ( setPageBookmark( n ) )
foreachObserver( notifyPageChanged( n, DocumentObserver::Bookmark ) );
if ( setPageBookmark( page ) )
foreachObserver( notifyPageChanged( page, DocumentObserver::Bookmark ) );
}
}
......@@ -461,12 +461,12 @@ bool BookmarkManager::addBookmark(const QUrl &referurl, const Okular::DocumentVi
return true;
}
void BookmarkManager::removeBookmark( int n )
void BookmarkManager::removeBookmark( int page )
{
if ( n >= 0 && n < (int)d->document->m_pagesVector.count() )
if ( page >= 0 && page < (int)d->document->m_pagesVector.count() )
{
if ( removePageBookmark( n ) )
foreachObserver( notifyPageChanged( n, DocumentObserver::Bookmark ) );
if ( removePageBookmark( page ) )
foreachObserver( notifyPageChanged( page, DocumentObserver::Bookmark ) );
}
}
......@@ -745,6 +745,4 @@ KBookmark BookmarkManager::previousBookmark( const DocumentViewport &viewport )
#undef foreachObserver
#undef foreachObserverD
#include "moc_bookmarkmanager.cpp"
/* kate: replace-tabs on; indent-width 4; */
......@@ -3534,9 +3534,9 @@ void Document::requestPixmaps( const QLinkedList< PixmapRequest * > & requests,
o->notifyContentsCleared( Okular::DocumentObserver::Pixmap );
}
void Document::requestTextPage( uint page )
void Document::requestTextPage( uint pageNumber )
{
Page * kp = d->m_pagesVector[ page ];
Page * kp = d->m_pagesVector[ pageNumber ];
if ( !d->m_generator || !kp )
return;
......@@ -5644,41 +5644,41 @@ bool DocumentViewport::isValid() const
return pageNumber >= 0;
}
bool DocumentViewport::operator==( const DocumentViewport & vp ) const
bool DocumentViewport::operator==( const DocumentViewport & other ) const
{
bool equal = ( pageNumber == vp.pageNumber ) &&
( rePos.enabled == vp.rePos.enabled ) &&
( autoFit.enabled == vp.autoFit.enabled );
bool equal = ( pageNumber == other.pageNumber ) &&
( rePos.enabled == other.rePos.enabled ) &&
( autoFit.enabled == other.autoFit.enabled );
if ( !equal )
return false;
if ( rePos.enabled &&
(( rePos.normalizedX != vp.rePos.normalizedX) ||
( rePos.normalizedY != vp.rePos.normalizedY ) || rePos.pos != vp.rePos.pos) )
(( rePos.normalizedX != other.rePos.normalizedX) ||
( rePos.normalizedY != other.rePos.normalizedY ) || rePos.pos != other.rePos.pos) )
return false;
if ( autoFit.enabled &&
(( autoFit.width != vp.autoFit.width ) ||
( autoFit.height != vp.autoFit.height )) )
(( autoFit.width != other.autoFit.width ) ||
( autoFit.height != other.autoFit.height )) )
return false;
return true;
}
bool DocumentViewport::operator<( const DocumentViewport & vp ) const
bool DocumentViewport::operator<( const DocumentViewport & other ) const
{
// TODO: Check autoFit and Position
if ( pageNumber != vp.pageNumber )
return pageNumber < vp.pageNumber;
if ( pageNumber != other.pageNumber )
return pageNumber < other.pageNumber;
if ( !rePos.enabled && vp.rePos.enabled )
if ( !rePos.enabled && other.rePos.enabled )
return true;
if ( !vp.rePos.enabled )
if ( !other.rePos.enabled )
return false;
if ( rePos.normalizedY != vp.rePos.normalizedY )
return rePos.normalizedY < vp.rePos.normalizedY;
if ( rePos.normalizedY != other.rePos.normalizedY )
return rePos.normalizedY < other.rePos.normalizedY;
return rePos.normalizedX < vp.rePos.normalizedX;
return rePos.normalizedX < other.rePos.normalizedX;
}
......@@ -5908,6 +5908,4 @@ VisiblePageRect::VisiblePageRect( int page, const NormalizedRect &rectangle )
#undef foreachObserver
#undef foreachObserverD
#include "moc_document.cpp"
/* kate: replace-tabs on; indent-width 4; */
......@@ -491,9 +491,9 @@ class OKULARCORE_EXPORT Document : public QObject
void requestPixmaps( const QLinkedList<PixmapRequest*> &requests, PixmapRequestFlags reqOptions );
/**
* Sends a request for text page generation for the given page @p number.
* Sends a request for text page generation for the given page @p pageNumber.
*/
void requestTextPage( uint number );
void requestTextPage( uint pageNumber );
/**
* Adds a new @p annotation to the given @p page.
......@@ -669,18 +669,18 @@ class OKULARCORE_EXPORT Document : public QObject
void processAction( const Action *action );
/**
* Processes the given format @p action on @p field.
* Processes the given format @p action on @p fft.
*
* @since 1.9
*/
void processFormatAction( const Action *action, Okular::FormFieldText *field );
void processFormatAction( const Action *action, Okular::FormFieldText *fft );
/**
* Processes the given keystroke @p action on @p field.
* Processes the given keystroke @p action on @p fft.
*
* @since 1.9
*/
void processKeystrokeAction( const Action *action, Okular::FormFieldText *field, bool &returnCode );
void processKeystrokeAction( const Action *action, Okular::FormFieldText *fft, bool &returnCode );
/**
* Processes the given focus action on the field.
......@@ -690,11 +690,11 @@ class OKULARCORE_EXPORT Document : public QObject
void processFocusAction( const Action *action, Okular::FormField *field );
/**
* Processes the given keystroke @p action on @p field.
* Processes the given keystroke @p action on @p fft.
*
* @since 1.9
*/
void processValidateAction( const Action *action, Okular::FormFieldText *field, bool &returnCode );
void processValidateAction( const Action *action, Okular::FormFieldText *fft, bool &returnCode );
/**
* Returns a list of the bookmarked.pages
......@@ -1293,9 +1293,9 @@ class OKULARCORE_EXPORT DocumentViewport
DocumentViewport( int number = -1 );
/**
* Creates a new viewport from the given xml @p description.
* Creates a new viewport from the given @p xmlDesc.
*/
DocumentViewport( const QString &description );
DocumentViewport( const QString &xmlDesc );
/**
* Returns the viewport as xml description.
......
......@@ -263,9 +263,9 @@ class EditFormComboCommand : public EditTextCommand
EditFormComboCommand( Okular::DocumentPrivate* docPriv,
FormFieldChoice* form,
int pageNumber,
const QString & newText,
const QString & newContents,
int newCursorPos,
const QString & prevText,
const QString & prevContents,
int prevCursorPos,
int prevAnchorPos
);
......
......@@ -816,6 +816,4 @@ QDebug operator<<( QDebug str, const Okular::PixmapRequest &req )
return str;
}
#include "moc_generator.cpp"
/* kate: replace-tabs on; indent-width 4; */
......@@ -524,7 +524,7 @@ class OKULARCORE_EXPORT Generator : public QObject
* @warning this method may be executed in its own separated thread if the
* @ref Threaded is enabled!
*/
virtual QImage image( PixmapRequest *page );
virtual QImage image( PixmapRequest *request );
/**
* Returns the text page for the given @p request.
......
......@@ -174,5 +174,3 @@ void FontExtractionThread::run()
emit progress( i );
}
}
#include "moc_generator_p.cpp"
......@@ -116,7 +116,7 @@ class PixmapGenerationThread : public QThread
public:
explicit PixmapGenerationThread( Generator *generator );
void startGeneration( PixmapRequest *request, bool calcBoundingRect );
void startGeneration( PixmapRequest *request, bool calcBoundingBox );
void endGeneration();
......
......@@ -23,16 +23,16 @@ class TextSelection::Private
NormalizedPoint cur[2];
};
TextSelection::TextSelection( const NormalizedPoint & a, const NormalizedPoint & b )
TextSelection::TextSelection( const NormalizedPoint & start, const NormalizedPoint & end )
: d( new Private )
{
if (b.y-a.y<0 || (b.y-a.y==0 && b.x-a.x <0))
if (end.y-start.y<0 || (end.y-start.y==0 && end.x-start.x <0))
d->direction = 1;
else
d->direction = 0;
d->cur[0] = a;
d->cur[1] = b;
d->cur[0] = start;
d->cur[1] = end;
d->it[d->direction % 2] = -1;
d->it[(d->direction + 1) % 2] = -1;
}
......
......@@ -132,8 +132,8 @@ QTransform PagePrivate::rotationMatrix() const
/** class Page **/
Page::Page( uint page, double w, double h, Rotation o )
: d( new PagePrivate( this, page, w, h, o ) )
Page::Page( uint pageNumber, double w, double h, Rotation o )
: d( new PagePrivate( this, pageNumber, w, h, o ) )
{
}
......
......@@ -64,12 +64,12 @@ class OKULARCORE_EXPORT Page
/**
* Creates a new page.
*
* @param number The number of the page in the document.
* @param pageNumber The number of the page in the document.
* @param width The width of the page.
* @param height The height of the page.
* @param orientation The orientation of the page
*/
Page( uint number, double width, double height, Rotation orientation );
Page( uint pageNumber, double width, double height, Rotation orientation );
/**
* Destroys the page.
......@@ -192,14 +192,14 @@ class OKULARCORE_EXPORT Page
* Returns the page text (or part of it).
* @see TextPage::text()
*/
QString text( const RegularAreaRect * rect = nullptr ) const;
QString text( const RegularAreaRect * area = nullptr ) const;
/**
* Returns the page text (or part of it).
* @see TextPage::text()
* @since 0.10 (KDE 4.4)
*/
QString text( const RegularAreaRect * rect, TextPage::TextAreaInclusionBehaviour b ) const;
QString text( const RegularAreaRect * area, TextPage::TextAreaInclusionBehaviour b ) const;
/**
* Returns the page text (or part of it) including the bounding
......@@ -208,7 +208,7 @@ class OKULARCORE_EXPORT Page
* @see TextPage::words()
* @since 0.14 (KDE 4.8)
*/
TextEntity::List words( const RegularAreaRect * rect, TextPage::TextAreaInclusionBehaviour b ) const;
TextEntity::List words( const RegularAreaRect * area, TextPage::TextAreaInclusionBehaviour b ) const;
/**
* Returns the area and text of the word at the given point
......
......@@ -94,19 +94,19 @@ class PagePrivate
/**
* Clears current text selection highlight areas,
* creates new ones if @p areas is not nullptr,
* and deletes @p areas.
* creates new ones if @p r is not nullptr,
* and deletes @p r.
*
* @param areas Areas of new text selections.
* @param r Areas of new text selections.
* @param color Color of new text selections.
*/
void setTextSelections( RegularAreaRect *areas, const QColor & color );
void setTextSelections( RegularAreaRect *r, const QColor & color );
/**
* Sets the @p color and @p area of the highlight for the observer with
* Sets the @p color and @p rect of the highlight for the observer with
* the given @p id.
*/
void setHighlight( int id, RegularAreaRect *area, const QColor & color );
void setHighlight( int id, RegularAreaRect *rect, const QColor & color );
/**
* Deletes all highlight objects for the observer with the given @p id.
......
......@@ -44,5 +44,3 @@ void PageController::imageRotationDone(const ThreadWeaver::JobPointer &j)
emit rotationFinished( job->page()->m_number, job->page()->m_page );
}
}
#include "moc_pagecontroller_p.cpp"
......@@ -51,9 +51,9 @@ class OKULARCORE_EXPORT Sound
explicit Sound( const QByteArray& data );
/**
* Creates a new sound object with the given external @p filename.
* Creates a new sound object with the given external @p url.
*/
explicit Sound( const QString& filename );
explicit Sound( const QString& url );
/**