Commit e2a17057 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

CI: Enable clazy connect-not-normalized

parent 3af705b3
......@@ -48,7 +48,7 @@ build_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="qstring-arg,incorrect-emit,qhash-namespace,detaching-temporary,range-loop,qdeleteall"" ninja
- CLAZY_CHECKS="qstring-arg,incorrect-emit,qhash-namespace,detaching-temporary,range-loop,qdeleteall,connect-not-normalized" 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: '*'}\""
......@@ -5058,7 +5058,7 @@ QByteArray Document::fontData(const FontInfo &font) const
if (d->m_generator)
{
QMetaObject::invokeMethod(d->m_generator, "requestFontData", Qt::DirectConnection, Q_ARG(Okular::FontInfo, font), Q_ARG(QByteArray *, &result));
QMetaObject::invokeMethod(d->m_generator, "requestFontData", Qt::DirectConnection, Q_ARG(Okular::FontInfo, font), Q_ARG(QByteArray*, &result));
}
return result;
......
......@@ -106,7 +106,7 @@ bool EBookSearch::generateIndex( EBook * ebookFile, QDataStream & stream )
delete m_Index;
m_Index = new QtAs::Index();
connect( m_Index, SIGNAL( indexingProgress( int, const QString& ) ), this, SLOT( updateProgress( int, const QString& ) ) );
connect( m_Index, &QtAs::Index::indexingProgress, this, &EBookSearch::updateProgress );
// Process the list of files in CHM archive and keep only HTML document files from there
for ( const QUrl &allDocumentsI : qAsConst( alldocuments ) )
......
......@@ -719,7 +719,7 @@ void Shell::applyOptionsToPart( QObject* part, const QString &serializedOptions
if ( ShellUtils::showPrintDialogAndExit(serializedOptions) )
QMetaObject::invokeMethod( part, "enableExitAfterPrint" );
if(!find.isEmpty())
QMetaObject::invokeMethod( part, "enableStartWithFind", Q_ARG( const QString &, find ));
QMetaObject::invokeMethod( part, "enableStartWithFind", Q_ARG(QString, find ));
}
void Shell::connectPart( QObject* part )
......
......@@ -155,8 +155,8 @@ void FormWidgetsController::registerRadioButton( FormWidgetIface *fwButton, Okul
if (siblings.isEmpty())
newdata.group->setExclusive( false );
connect( newdata.group, SIGNAL( buttonClicked(QAbstractButton* ) ),
this, SLOT( slotButtonClicked( QAbstractButton* ) ) );
connect( newdata.group, QOverload<QAbstractButton *>::of(&QButtonGroup::buttonClicked),
this, &FormWidgetsController::slotButtonClicked );
m_radios.append( newdata );
}
......@@ -937,7 +937,7 @@ void FileEdit::slotHandleFileChangedByUndoRedo( int pageNumber,
setText( contents );
lineEdit()->setCursorPosition( anchorPos );
lineEdit()->cursorForward( true, cursorPos - anchorPos );
connect( this, SIGNAL(cursorPositionChanged( int, int ) ), this, SLOT( slotChanged() ) );
connect( this, SIGNAL(cursorPositionChanged(int,int)), this, SLOT( slotChanged() ) );
m_prevCursorPos = cursorPos;
m_prevAnchorPos = anchorPos;
setFocus();
......
......@@ -268,10 +268,10 @@ FormWidgetsController* PageViewPrivate::formWidgetsController()
if ( !formsWidgetController )
{
formsWidgetController = new FormWidgetsController( document );
QObject::connect( formsWidgetController, SIGNAL( changed( int ) ),
q, SLOT( slotFormChanged( int ) ) );
QObject::connect( formsWidgetController, SIGNAL( action( Okular::Action* ) ),
q, SLOT( slotAction( Okular::Action* ) ) );
QObject::connect( formsWidgetController, &FormWidgetsController::changed,
q, &PageView::slotFormChanged );
QObject::connect( formsWidgetController, &FormWidgetsController::action,
q, &PageView::slotAction );
QObject::connect( formsWidgetController, &FormWidgetsController::formatAction,
q, [this] (const Okular::Action *action, Okular::FormFieldText *fft ) {
document->processFormatAction( action, fft );
......
......@@ -129,6 +129,9 @@ Q_OBJECT
void slotSelectPage();
void slotAction( Okular::Action *action );
void slotFormChanged( int pageNumber );
Q_SIGNALS:
void rightClick( const Okular::Page *, const QPoint & );
void mouseBackButtonClick();
......@@ -266,7 +269,6 @@ Q_OBJECT
void slotTrimMarginsToggled( bool );
void slotTrimToSelectionToggled( bool );
void slotToggleForms();
void slotFormChanged( int pageNumber );
void slotRefreshPage();
#ifdef HAVE_SPEECH
void slotSpeakDocument();
......@@ -274,7 +276,6 @@ Q_OBJECT
void slotStopSpeaks();
void slotPauseResumeSpeech();
#endif
void slotAction( Okular::Action *action );
void externalKeyPressEvent( QKeyEvent *e );
void slotAnnotationWindowDestroyed( QObject *window );
void slotProcessMovieAction( const Okular::MovieAction *action );
......
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