Commit 93540ac1 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Enable most of clazy level2

parent 968e9d60
Pipeline #15447 passed with stage
in 13 minutes and 17 seconds
......@@ -48,7 +48,7 @@ build_clazy_clang_tidy:
script:
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" 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
- CLAZY_CHECKS="level0,level1,old-style-connect" ninja
- CLAZY_IGNORE_DIRS="settings_core.cpp|settings.cpp" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,no-copyable-polymorphic,no-qstring-allocations,no-missing-qobject-macro" ninja
# Fix the poppler header, remove when debian:unstable ships poppler 0.82 or later
- sed -i "N;N;N;N; s#class MediaRendition\;\nclass MovieAnnotation\;\nclass ScreenAnnotation;#class MediaRendition\;#g" /usr/include/poppler/qt5/poppler-link.h
- "run-clang-tidy -header-filter='.*/okular/.*' -checks='-*,performance-*,bugprone-*,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,modernize-loop-convert,modernize-use-nullptr,-bugprone-macro-parentheses,-bugprone-narrowing-conversions,-bugprone-branch-clone,-bugprone-incorrect-roundings' -config=\"{WarningsAsErrors: '*'}\""
......@@ -127,7 +127,7 @@ NormalizedRect::NormalizedRect( double l, double t, double r, double b )
// note: check for swapping coords?
: left( l ), top( t ), right( r ), bottom( b ) {}
NormalizedRect::NormalizedRect( const QRect & r, double xScale, double yScale )
NormalizedRect::NormalizedRect( const QRect & r, double xScale, double yScale ) // clazy:exclude=function-args-by-value TODO when BIC changes are allowed
: left( (double)r.left() / xScale ), top( (double)r.top() / yScale ),
right( (double)r.right() / xScale ), bottom( (double)r.bottom() / yScale ) {}
......
......@@ -185,7 +185,7 @@ QString DocumentPrivate::namePaperSize(double inchesWidth, double inchesHeight)
}
}
QString DocumentPrivate::localizedSize(const QSizeF &size) const
QString DocumentPrivate::localizedSize(const QSizeF size) const
{
double inchesWidth = 0, inchesHeight = 0;
switch (m_generator->pagesSizeMetric())
......
......@@ -136,7 +136,7 @@ class DocumentPrivate
bool updateMetadataXmlNameAndDocSize();
QString pagesSizeString() const;
QString namePaperSize(double inchesWidth, double inchesHeight) const;
QString localizedSize(const QSizeF &size) const;
QString localizedSize(const QSizeF size) const;
qulonglong calculateMemoryToFree();
void cleanupPixmapMemory();
void cleanupPixmapMemory( qulonglong memoryToFree );
......
......@@ -31,7 +31,7 @@
using namespace Okular;
int FilePrinter::printFile(QPrinter &printer, const QString file, // NOLINT(performance-unnecessary-value-param) TODO when BIC changes are allowed
int FilePrinter::printFile(QPrinter &printer, const QString file, // NOLINT(performance-unnecessary-value-param) clazy:exclude=function-args-by-ref TODO when BIC changes are allowed
QPrinter::Orientation documentOrientation, FileDeletePolicy fileDeletePolicy,
PageSelectPolicy pageSelectPolicy, const QString &pageRange )
{
......@@ -39,7 +39,7 @@ int FilePrinter::printFile(QPrinter &printer, const QString file, // NOLINT(perf
pageSelectPolicy, pageRange, ScaleMode::FitToPrintArea );
}
int FilePrinter::printFile(QPrinter &printer, const QString file, // NOLINT(performance-unnecessary-value-param) TODO when BIC changes are allowed
int FilePrinter::printFile(QPrinter &printer, const QString file, // NOLINT(performance-unnecessary-value-param) clazy:exclude=function-args-by-ref TODO when BIC changes are allowed
QPrinter::Orientation documentOrientation,
FileDeletePolicy fileDeletePolicy, PageSelectPolicy pageSelectPolicy,
const QString &pageRange, ScaleMode scaleMode )
......@@ -49,7 +49,7 @@ int FilePrinter::printFile(QPrinter &printer, const QString file, // NOLINT(perf
documentOrientation, scaleMode );
}
int FilePrinter::doPrintFiles(QPrinter &printer, const QStringList fileList, FileDeletePolicy fileDeletePolicy, // NOLINT(performance-unnecessary-value-param) TODO when BIC changes are allowed
int FilePrinter::doPrintFiles(QPrinter &printer, const QStringList fileList, FileDeletePolicy fileDeletePolicy, // NOLINT(performance-unnecessary-value-param) clazy:exclude=function-args-by-ref TODO when BIC changes are allowed
PageSelectPolicy pageSelectPolicy, const QString &pageRange,
QPrinter::Orientation documentOrientation )
{
......
......@@ -518,7 +518,7 @@ void Generator::requestFontData(const Okular::FontInfo & /*font*/, QByteArray *
}
void Generator::setDPI(const QSizeF & dpi)
void Generator::setDPI(const QSizeF & dpi) // clazy:exclude=function-args-by-value TODO remove the & when we do a BIC change elsewhere
{
Q_D( Generator );
d->m_dpi = dpi;
......
......@@ -455,7 +455,7 @@ class OKULARCORE_EXPORT Generator : public QObject
*
* @since 0.19 (KDE 4.13)
*/
void setDPI(const QSizeF &dpi);
void setDPI(const QSizeF &dpi); // TODO remove the & when we do a BIC change elsewhere
/**
* Returns the 'layers model' object of the document or NULL if
......
......@@ -86,7 +86,7 @@ QString Movie::url() const
return d->m_url;
}
void Movie::setSize( const QSize &aspect )
void Movie::setSize( const QSize &aspect ) // clazy:exclude=function-args-by-value TODO remove the & when we do a BIC change elsewhere
{
d->m_aspect = aspect;
}
......
......@@ -62,7 +62,7 @@ class OKULARCORE_EXPORT Movie
/**
* Sets the size for the movie.
*/
void setSize( const QSize &aspect );
void setSize( const QSize &aspect ); // TODO remove the & when we do a BIC change elsewhere
/**
* Returns the size of the movie.
......
......@@ -70,7 +70,7 @@ KJSObject JSOCG::object( KJSContext *ctx )
return g_OCGProto->constructObject( ctx, nullptr );
}
KJSObject JSOCG::wrapOCGObject( KJSContext *ctx, QAbstractItemModel *model, const int &i, const int &j )
KJSObject JSOCG::wrapOCGObject( KJSContext *ctx, QAbstractItemModel *model, const int i, const int j )
{
QPair< int, int > *pair = new QPair< int ,int >( i, j );
g_OCGCache->insert( pair, model );
......
......@@ -21,7 +21,7 @@ class JSOCG
public:
static void initType( KJSContext *ctx );
static KJSObject object( KJSContext *ctx );
static KJSObject wrapOCGObject( KJSContext *ctx, QAbstractItemModel *model, const int &i, const int &j );
static KJSObject wrapOCGObject( KJSContext *ctx, QAbstractItemModel *model, const int i, const int j );
static void clearCachedFields();
};
......
......@@ -94,7 +94,7 @@ static bool segmentsOverlap(double left1, double right1, double left2, double ri
return false;
}
static bool doesConsumeY(const QRect& first, const QRect& second, int threshold)
static bool doesConsumeY(const QRect first, const QRect second, int threshold)
{
return segmentsOverlap(first.top(), first.bottom(), second.top(), second.bottom(), threshold);
}
......@@ -290,7 +290,7 @@ public:
{
};
RegionText(const WordsWithCharacters &wordsWithCharacters, const QRect &area)
RegionText(const WordsWithCharacters &wordsWithCharacters, const QRect area)
: m_region_wordWithCharacters(wordsWithCharacters), m_area(area)
{
}
......@@ -314,7 +314,7 @@ public:
return m_area;
}
inline void setArea(const QRect &area)
inline void setArea(const QRect area)
{
m_area = area;
}
......
......@@ -26,7 +26,7 @@
using namespace Okular;
QRect Utils::rotateRect( const QRect & source, int width, int height, int orientation )
QRect Utils::rotateRect( const QRect & source, int width, int height, int orientation ) // clazy:exclude=function-args-by-value TODO remove the & when we do a BIC change elsewhere
{
QRect ret;
......
......@@ -32,7 +32,7 @@ class OKULARCORE_EXPORT Utils
* Rotate the rect \p source in the area \p width x \p height with the
* specified \p orientation .
*/
static QRect rotateRect( const QRect & source, int width, int height, int orientation );
static QRect rotateRect( const QRect & source, int width, int height, int orientation ); // TODO remove the & when we do a BIC change elsewhere
/**
* Return the real DPI of the display containing given widget
......
......@@ -54,7 +54,7 @@ QDataStream &operator>>( QDataStream &s, Document &l )
return s;
}
QDataStream &operator<<( QDataStream &s, const Document &l )
QDataStream &operator<<( QDataStream &s, const Document l )
{
s << (short)l.docNumber;
s << (short)l.frequency;
......
......@@ -38,22 +38,22 @@ struct Document
{
Document( int d, int f ) : docNumber( d ), frequency( f ) {}
Document() : docNumber( -1 ), frequency( 0 ) {}
bool operator==( const Document &doc ) const
bool operator==( const Document doc ) const
{
return docNumber == doc.docNumber;
}
bool operator<( const Document &doc ) const
bool operator<( const Document doc ) const
{
return frequency > doc.frequency;
}
bool operator<=( const Document &doc ) const
bool operator<=( const Document doc ) const
{
return frequency >= doc.frequency;
}
bool operator>( const Document &doc ) const
bool operator>( const Document doc ) const
{
return frequency < doc.frequency;
}
......@@ -63,7 +63,7 @@ struct Document
};
QDataStream &operator>>( QDataStream &s, Document &l );
QDataStream &operator<<( QDataStream &s, const Document &l );
QDataStream &operator<<( QDataStream &s, const Document l );
class Index : public QObject
{
......@@ -124,4 +124,6 @@ class Index : public QObject
};
Q_DECLARE_TYPEINFO(QtAs::Document, Q_MOVABLE_TYPE);
#endif // EBOOK_SEARCH_INDEX_H
......@@ -26,7 +26,7 @@
#include <stdio.h>
QDebug &operator<<( QDebug & s, const ddjvu_rect_t &r )
QDebug &operator<<( QDebug & s, const ddjvu_rect_t r )
{
s.nospace() << "[" << r.x << "," << r.y << " - " << r.w << "x" << r.h << "]";
return s.space();
......
......@@ -42,7 +42,7 @@ class Anchor {
@param pg number of the page
@param _distance_from_top distance from the top of the page
*/
Anchor(const PageNumber& pg, const Length& _distance_from_top): page(pg), distance_from_top(_distance_from_top) {}
Anchor(const PageNumber pg, const Length _distance_from_top): page(pg), distance_from_top(_distance_from_top) {}
/** \brief quick validity check for anchors
......
......@@ -680,7 +680,7 @@ void dviRenderer::setResolution(double resolution_in_DPI)
}
void dviRenderer::handleSRCLink(const QString &linkText, const QPoint& point, DocumentWidget *widget)
void dviRenderer::handleSRCLink(const QString &linkText, const QPoint point, DocumentWidget *widget)
{
Q_UNUSED( linkText );
Q_UNUSED( point );
......
......@@ -46,7 +46,7 @@ extern const int MFResolutions[];
class DVI_SourceFileAnchor {
public:
DVI_SourceFileAnchor() {}
DVI_SourceFileAnchor(const QString& name, quint32 ln, quint32 pg, const Length& _distance_from_top)
DVI_SourceFileAnchor(const QString& name, quint32 ln, quint32 pg, const Length _distance_from_top)
: fileName(name), line(ln), page(pg),
distance_from_top(_distance_from_top) {}
......@@ -159,14 +159,14 @@ public Q_SLOTS:
void exportPS(const QString& fname = QString(), const QStringList& options = QStringList(), QPrinter* printer = nullptr, QPrinter::Orientation orientation = QPrinter::Portrait);
void exportPDF();
void handleSRCLink(const QString &linkText, const QPoint& point, DocumentWidget *widget);
void handleSRCLink(const QString &linkText, const QPoint point, DocumentWidget *widget);
void embedPostScript();
virtual void drawPage(RenderedDocumentPagePixmap* page);
virtual void getText(RenderedDocumentPagePixmap* page);
SimplePageSize sizeOfPage(const PageNumber& page);
SimplePageSize sizeOfPage(const PageNumber page);
const QVector<DVI_SourceFileAnchor>& sourceAnchors() { return sourceHyperLinkAnchors; }
......
......@@ -14,7 +14,7 @@
#include "dviRenderer.h"
SimplePageSize dviRenderer::sizeOfPage(const PageNumber& page)
SimplePageSize dviRenderer::sizeOfPage(const PageNumber page)
{
#if !defined(QT_NO_THREAD)
// Wait for all access to this DocumentRenderer to finish
......
......@@ -117,13 +117,13 @@ bool DviGenerator::doCloseDocument()
}
void DviGenerator::fillViewportFromAnchor( Okular::DocumentViewport &vp,
const Anchor &anch, const Okular::Page *page ) const
const Anchor anch, const Okular::Page *page ) const
{
fillViewportFromAnchor( vp, anch, page->width(), page->height() );
}
void DviGenerator::fillViewportFromAnchor( Okular::DocumentViewport &vp,
const Anchor &anch, int pW, int pH ) const
const Anchor anch, int pW, int pH ) const
{
vp.pageNumber = anch.page - 1;
......
......@@ -60,9 +60,9 @@ class DviGenerator : public Okular::Generator
void loadPages( QVector< Okular::Page * > & pagesVector );
Okular::TextPage *extractTextFromPage( dviPageInfo *pageInfo );
void fillViewportFromAnchor( Okular::DocumentViewport &vp, const Anchor &anch,
void fillViewportFromAnchor( Okular::DocumentViewport &vp, const Anchor anch,
int pW, int pH ) const;
void fillViewportFromAnchor( Okular::DocumentViewport &vp, const Anchor &anch,
void fillViewportFromAnchor( Okular::DocumentViewport &vp, const Anchor anch,
const Okular::Page *page ) const;
QLinkedList<Okular::ObjectRect*> generateDviLinks( const dviPageInfo *pageInfo );
};
......
......@@ -39,7 +39,7 @@ public:
@param re value for the box
@param lT valus for the text field
*/
Hyperlink(quint32 bl, const QRect& re, const QString& lT): baseline(bl), box(re), linkText(lT) {}
Hyperlink(quint32 bl, const QRect re, const QString& lT): baseline(bl), box(re), linkText(lT) {}
/** \brief Base line of a hyperlink
......
......@@ -118,15 +118,15 @@ class Length
int getLength_in_pixel(double res) const { return int(getLength_in_inch() * res); }
/** @returns true is lengths differ by no more than 2mm */
bool isNearlyEqual(const Length &o) const {return fabs(length_in_mm-o.getLength_in_mm()) <= 2.0;}
bool isNearlyEqual(const Length o) const {return fabs(length_in_mm-o.getLength_in_mm()) <= 2.0;}
/** Comparison of two lengthes */
bool operator > (const Length &o) const {return (length_in_mm > o.getLength_in_mm());}
bool operator < (const Length &o) const {return (length_in_mm < o.getLength_in_mm());}
bool operator > (const Length o) const {return (length_in_mm > o.getLength_in_mm());}
bool operator < (const Length o) const {return (length_in_mm < o.getLength_in_mm());}
/** Comparison of two lengthes */
bool operator >= (const Length &o) const {return (length_in_mm >= o.getLength_in_mm());}
bool operator <= (const Length &o) const {return (length_in_mm <= o.getLength_in_mm());}
bool operator >= (const Length o) const {return (length_in_mm >= o.getLength_in_mm());}
bool operator <= (const Length o) const {return (length_in_mm <= o.getLength_in_mm());}
/** Ratio of two lengthes
......@@ -136,19 +136,19 @@ class Length
@returns the ratio of the two lengthes as a double
*/
double operator / (const Length &o) const {return (length_in_mm/o.getLength_in_mm());}
double operator / (const Length o) const {return (length_in_mm/o.getLength_in_mm());}
/** Sum of two lengthes
@returns the sum of the lengthes as a Length
*/
Length operator + (const Length &o) const {Length r; r.length_in_mm = length_in_mm + o.length_in_mm; return r; }
Length operator + (const Length o) const {Length r; r.length_in_mm = length_in_mm + o.length_in_mm; return r; }
/** Difference of two lengthes
@returns the difference of the lengthes as a Length
*/
Length operator - (const Length &o) const {Length r; r.length_in_mm = length_in_mm - o.length_in_mm; return r; }
Length operator - (const Length o) const {Length r; r.length_in_mm = length_in_mm - o.length_in_mm; return r; }
/** Division of a length
......
......@@ -65,7 +65,7 @@ ghostscript_interface::~ghostscript_interface() {
}
void ghostscript_interface::setPostScript(const PageNumber& page, const QString& PostScript) {
void ghostscript_interface::setPostScript(const PageNumber page, const QString& PostScript) {
#ifdef DEBUG_PSGS
qCDebug(OkularDviDebug) << "ghostscript_interface::setPostScript( " << page << ", ... )";
#endif
......@@ -89,7 +89,7 @@ void ghostscript_interface::setIncludePath(const QString &_includePath) {
}
void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent) {
void ghostscript_interface::setBackgroundColor(const PageNumber page, const QColor& background_color, bool permanent) {
#ifdef DEBUG_PSGS
qCDebug(OkularDviDebug) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )";
#endif
......@@ -110,7 +110,7 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QCo
}
}
void ghostscript_interface::restoreBackgroundColor(const PageNumber& page)
void ghostscript_interface::restoreBackgroundColor(const PageNumber page)
{
#ifdef DEBUG_PSGS
qCDebug(OkularDviDebug) << "ghostscript_interface::restoreBackgroundColor( " << page << " )";
......@@ -125,7 +125,7 @@ void ghostscript_interface::restoreBackgroundColor(const PageNumber& page)
// Returns the background color for a certain page. This color is
// always guaranteed to be valid
QColor ghostscript_interface::getBackgroundColor(const PageNumber& page) const {
QColor ghostscript_interface::getBackgroundColor(const PageNumber page) const {
#ifdef DEBUG_PSGS
qCDebug(OkularDviDebug) << "ghostscript_interface::getBackgroundColor( " << page << " )";
#endif
......@@ -146,7 +146,7 @@ void ghostscript_interface::clear() {
}
void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, const QString& filename, long magnification) {
void ghostscript_interface::gs_generate_graphics_file(const PageNumber page, const QString& filename, long magnification) {
#ifdef DEBUG_PSGS
qCDebug(OkularDviDebug) << "ghostscript_interface::gs_generate_graphics_file( " << page << ", " << filename << " )";
#endif
......@@ -293,7 +293,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
}
void ghostscript_interface::graphics(const PageNumber& page, double dpi, long magnification, QPainter* paint) {
void ghostscript_interface::graphics(const PageNumber page, double dpi, long magnification, QPainter* paint) {
#ifdef DEBUG_PSGS
qCDebug(OkularDviDebug) << "ghostscript_interface::graphics( " << page << ", " << dpi << ", ... ) called.";
#endif
......
......@@ -47,7 +47,7 @@ public:
void clear();
// sets the PostScript which is used on a certain page
void setPostScript(const PageNumber& page, const QString& PostScript);
void setPostScript(const PageNumber page, const QString& PostScript);
// sets path from additional postscript files may be read
void setIncludePath(const QString &_includePath);
......@@ -56,19 +56,19 @@ public:
// background color can be restored by calling restoreBackground(page).
// The Option permanent = false is used when we want to display a different paper
// color as the one specified in the dvi file.
void setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent = true);
void setBackgroundColor(const PageNumber page, const QColor& background_color, bool permanent = true);
// Restore the background to the color which was specified by the last call to setBackgroundColor()
// With option permanent = true.
void restoreBackgroundColor(const PageNumber& page);
void restoreBackgroundColor(const PageNumber page);
// Draws the graphics of the page into the painter, if possible. If
// the page does not contain any graphics, nothing happens
void graphics(const PageNumber& page, double dpi, long magnification, QPainter* paint);
void graphics(const PageNumber page, double dpi, long magnification, QPainter* paint);
// Returns the background color for a certain page. If no color was
// set, Qt::white is returned.
QColor getBackgroundColor(const PageNumber& page) const;
QColor getBackgroundColor(const PageNumber page) const;
QString *PostScriptHeaderString;
......@@ -82,7 +82,7 @@ public:
static QString locateEPSfile(const QString &filename, const QUrl &base);
private:
void gs_generate_graphics_file(const PageNumber& page, const QString& filename, long magnification);
void gs_generate_graphics_file(const PageNumber page, const QString& filename, long magnification);
QHash<quint16,pageInfo*> pageList;
double resolution; // in dots per inch
......
......@@ -45,7 +45,7 @@ class SimplePageSize
@param width
@param height
*/
SimplePageSize(const Length& width, const Length& height) { pageWidth = width; pageHeight = height; }
SimplePageSize(const Length width, const Length height) { pageWidth = width; pageHeight = height; }
virtual ~SimplePageSize() {}
......@@ -57,7 +57,7 @@ class SimplePageSize
@param width
@param height
*/
virtual void setPageSize(const Length& width, const Length& height) { pageWidth = width; pageHeight = height; }
virtual void setPageSize(const Length width, const Length height) { pageWidth = width; pageHeight = height; }
/** \brief Returns the page width. */
Length width() const { return pageWidth; }
......
......@@ -42,7 +42,7 @@ public:
@param re value for the box
@param lT valus for the text field
*/
TextBox(const QRect& re, const QString& lT): box(re), text(lT) {}
TextBox(const QRect re, const QString& lT): box(re), text(lT) {}
/** \brief Bounding box of the text or hyperlink
......
......@@ -131,7 +131,7 @@ void Converter::_handle_anchors(const QTextBlock &start, const QString &name) {
}
}
void Converter::_insert_local_links(const QString &key, const QPair<int, int> &value)
void Converter::_insert_local_links(const QString &key, const QPair<int, int> value)
{
if(mLocalLinks.contains(key)){
mLocalLinks[key].append(value);
......
......@@ -31,7 +31,7 @@ namespace Epub {
void _emitData(Okular::DocumentInfo::Key key, enum epub_metadata type);
void _handle_anchors(const QTextBlock &start, const QString &name);
void _insert_local_links(const QString &key, const QPair<int, int> &value);
void _insert_local_links(const QString &key, const QPair<int, int> value);
EpubDocument *mTextDocument;
QHash<QString, QTextBlock> mSectionMap;
......
......@@ -277,7 +277,7 @@ void StyleFormatProperty::setTextFormat( const TextFormatProperty &format )
mTextFormat = format;
}
void StyleFormatProperty::setTableColumnFormat( const TableColumnFormatProperty &format )
void StyleFormatProperty::setTableColumnFormat( const TableColumnFormatProperty format )
{
mTableColumnFormat = format;
}
......
......@@ -219,7 +219,7 @@ class StyleFormatProperty
void setParagraphFormat( const ParagraphFormatProperty &format );
void setTextFormat( const TextFormatProperty &format );
void setTableColumnFormat( const TableColumnFormatProperty &format );
void setTableColumnFormat( const TableColumnFormatProperty format );
void setTableCellFormat( const TableCellFormatProperty &format );
private:
......
......@@ -168,7 +168,7 @@ static bool nextAbbPathToken(AbbPathToken *token)
/**
Read point (two reals delimited by comma) from abbreviated path data
*/
static QPointF getPointFromString(AbbPathToken *token, bool relative, const QPointF &currentPosition) {
static QPointF getPointFromString(AbbPathToken *token, bool relative, const QPointF currentPosition) {
//TODO Check grammar
QPointF result;
......
......@@ -3045,17 +3045,17 @@ void Part::slotPrintPreview()
}
}
void Part::slotShowTOCMenu(const Okular::DocumentViewport &vp, const QPoint &point, const QString &title)
void Part::slotShowTOCMenu(const Okular::DocumentViewport &vp, const QPoint point, const QString &title)
{
showMenu(m_document->page(vp.pageNumber), point, title, vp, true);
}
void Part::slotShowMenu(const Okular::Page *page, const QPoint &point)
void Part::slotShowMenu(const Okular::Page *page, const QPoint point)
{
showMenu(page, point);
}
void Part::showMenu(const Okular::Page *page, const QPoint &point, const QString &bookmarkTitle, const Okular::DocumentViewport &vp, bool showTOCActions)
void Part::showMenu(const Okular::Page *page, const QPoint point, const QString &bookmarkTitle, const Okular::DocumentViewport &vp, bool showTOCActions)
{
if ( m_embedMode == PrintPreviewMode )
return;
......@@ -3669,7 +3669,7 @@ bool Part::eventFilter(QObject * watched, QEvent * event)
break;
}
return false;
return KParts::ReadWritePart::eventFilter(watched, event);
}
void Part::updateAboutBackendAction()
......