mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-02 14:14:10 +00:00
Enable clazy const-signal-or-slot
This commit is contained in:
parent
e03943fae9
commit
91bce4a0a3
|
@ -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,incorrect-emit,qhash-namespace,detaching-temporary,range-loop,qdeleteall,inefficient-qlist-soft,qstring-left" ninja
|
||||
- CLAZY_CHECKS="level0,incorrect-emit,qhash-namespace,detaching-temporary,range-loop,qdeleteall,inefficient-qlist-soft,qstring-left,const-signal-or-slot" 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: '*'}\""
|
||||
|
|
|
@ -600,12 +600,6 @@ class OKULARCORE_EXPORT Generator : public QObject
|
|||
*/
|
||||
void requestFontData(const Okular::FontInfo &font, QByteArray *data);
|
||||
|
||||
/**
|
||||
* Returns the last print error in case print() failed
|
||||
* @since 0.11 (KDE 4.5)
|
||||
*/
|
||||
Okular::Generator::PrintError printError() const;
|
||||
|
||||
/**
|
||||
* This method can be called to trigger a partial pixmap update for the given request
|
||||
* Make sure you call it in a way it's executed in the main thread.
|
||||
|
@ -614,6 +608,13 @@ class OKULARCORE_EXPORT Generator : public QObject
|
|||
void signalPartialPixmapRequest( Okular::PixmapRequest *request, const QImage &image );
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Returns the last print error in case print() failed
|
||||
* @since 0.11 (KDE 4.5)
|
||||
*/
|
||||
// TODO Make print() return a PrintError instead of bool and remove this function when a BIC change happens somewhere else
|
||||
Q_INVOKABLE Okular::Generator::PrintError printError() const;
|
||||
|
||||
/// @cond PRIVATE
|
||||
Generator(GeneratorPrivate &dd, QObject *parent, const QVariantList &args);
|
||||
Q_DECLARE_PRIVATE( Generator )
|
||||
|
|
|
@ -143,6 +143,7 @@ public:
|
|||
void export_finished(const DVIExport*);
|
||||
//void editor_finished(const DVISourceEditor*);
|
||||
|
||||
QVector<PreBookmark> getPrebookmarks() const { return prebookmarks; }
|
||||
|
||||
Q_SIGNALS:
|
||||
/**
|
||||
|
@ -167,8 +168,6 @@ public Q_SLOTS:
|
|||
|
||||
SimplePageSize sizeOfPage(const PageNumber& page);
|
||||
|
||||
QVector<PreBookmark> getPrebookmarks() const { return prebookmarks; }
|
||||
|
||||
const QVector<DVI_SourceFileAnchor>& sourceAnchors() { return sourceHyperLinkAnchors; }
|
||||
|
||||
private Q_SLOTS:
|
||||
|
|
|
@ -101,10 +101,10 @@ class PDFGenerator : public Okular::Generator, public Okular::ConfigInterface, p
|
|||
SwapBackingFileResult swapBackingFile( QString const &newFileName, QVector<Okular::Page*> & newPagesVector ) override;
|
||||
bool doCloseDocument() override;
|
||||
Okular::TextPage* textPage( Okular::TextRequest *request ) override;
|
||||
Q_INVOKABLE Okular::Generator::PrintError printError() const;
|
||||
|
||||
protected Q_SLOTS:
|
||||
void requestFontData(const Okular::FontInfo &font, QByteArray *data);
|
||||
Okular::Generator::PrintError printError() const;
|
||||
|
||||
private:
|
||||
Okular::Document::OpenResult init(QVector<Okular::Page*> & pagesVector, const QString &password);
|
||||
|
|
Loading…
Reference in a new issue