Commit 46d1ba0e authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Enable clazy missing-qobject-macro

parent 6d0d61c2
......@@ -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_IGNORE_DIRS="settings_core.cpp|settings.cpp" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,no-qstring-allocations,no-missing-qobject-macro" ninja
- CLAZY_IGNORE_DIRS="settings_core.[cpp|h]|settings.[cpp.h]|pdfsettings.h|gssettings.h" CLAZY_CHECKS="level0,level1,level2,no-ctor-missing-parent-argument,no-qstring-allocations" 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: '*'}\""
......@@ -14,6 +14,7 @@ namespace TestingUtils
*/
class CloseDialogHelper : public QObject
{
Q_OBJECT
public:
CloseDialogHelper(Okular::Part *p, QDialogButtonBox::StandardButton b);
......
......@@ -102,6 +102,7 @@ class PartTest
class PartThatHijacksQueryClose : public Okular::Part
{
Q_OBJECT
public:
PartThatHijacksQueryClose(QWidget* parentWidget, QObject* parent,
const QVariantList& args)
......
......@@ -36,6 +36,7 @@ using namespace Okular;
class OkularBookmarkAction : public KBookmarkAction
{
Q_OBJECT
public:
OkularBookmarkAction( const Okular::DocumentViewport& vp, const KBookmark& bk, KBookmarkOwner* owner, QObject *parent )
: KBookmarkAction( bk, owner, parent )
......@@ -748,4 +749,6 @@ KBookmark BookmarkManager::previousBookmark( const DocumentViewport &viewport )
#undef foreachObserver
#undef foreachObserverD
#include "bookmarkmanager.moc"
/* kate: replace-tabs on; indent-width 4; */
......@@ -68,8 +68,9 @@ struct GeneratorInfo
namespace Okular {
class BackendConfigDialog : public KConfigDialog
class OKULARCORE_EXPORT BackendConfigDialog : public KConfigDialog
{
Q_OBJECT
public:
BackendConfigDialog(QWidget *parent, const QString &name, KCoreConfigSkeleton *config)
: KConfigDialog(parent, name, config)
......
......@@ -23,6 +23,7 @@ namespace Okular {
*/
class OKULARCORE_EXPORT PrintOptionsWidget : public QWidget
{
Q_OBJECT
public:
explicit PrintOptionsWidget(QWidget * parent = nullptr)
: QWidget(parent) {}
......
......@@ -19,6 +19,7 @@
namespace Mobi {
class Converter : public Okular::TextDocumentConverter
{
Q_OBJECT
public:
Converter();
~Converter() override;
......
......@@ -22,6 +22,7 @@ class QFileStream;
namespace Mobi {
class MobiDocument : public QTextDocument {
Q_OBJECT
public:
explicit MobiDocument(const QString &fileName);
......
......@@ -22,6 +22,7 @@
class OKMenuTitle : public QWidgetAction
{
Q_OBJECT
public:
OKMenuTitle(QMenu *menu, const QString &text, const QIcon &icon = QIcon());
......
......@@ -221,6 +221,7 @@ QSize SidebarDelegate::sizeHint( const QStyleOptionViewItem &option, const QMode
/* A custom list widget that ignores the events for disabled items */
class SidebarListWidget : public QListWidget
{
Q_OBJECT
public:
SidebarListWidget( QWidget *parent = Q_NULLPTR );
~SidebarListWidget() override;
......
......@@ -38,6 +38,7 @@ class ThumbnailWidget;
class ThumbnailListPrivate : public QWidget
{
Q_OBJECT
public:
ThumbnailListPrivate( ThumbnailList *qq, Okular::Document *document );
~ThumbnailListPrivate() override;
......@@ -1018,6 +1019,6 @@ ThumbnailController::ThumbnailController( QWidget * parent, ThumbnailList * list
}
#include "moc_thumbnaillist.cpp"
#include "thumbnaillist.moc"
/* kate: replace-tabs on; indent-width 4; */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment