diff --git a/conf/dlgaccessibility.cpp b/conf/dlgaccessibility.cpp index cabda5cd9..bc9b5931d 100644 --- a/conf/dlgaccessibility.cpp +++ b/conf/dlgaccessibility.cpp @@ -28,7 +28,7 @@ DlgAccessibility::DlgAccessibility( QWidget * parent ) page->hide(); m_color_pages[ m_selected ]->show(); - connect( m_dlg->kcfg_RenderMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotColorMode(int)) ); + connect(m_dlg->kcfg_RenderMode, static_cast(&KComboBox::currentIndexChanged), this, &DlgAccessibility::slotColorMode); } DlgAccessibility::~DlgAccessibility() diff --git a/conf/dlgeditor.cpp b/conf/dlgeditor.cpp index 84f1cdd7e..18e9c2641 100644 --- a/conf/dlgeditor.cpp +++ b/conf/dlgeditor.cpp @@ -23,7 +23,7 @@ DlgEditor::DlgEditor( QWidget * parent ) m_editors = Okular::buildEditorsMap(); - connect( m_dlg->kcfg_ExternalEditor, SIGNAL(currentIndexChanged(int)), this, SLOT(editorChanged(int)) ); + connect(m_dlg->kcfg_ExternalEditor, static_cast(&QComboBox::currentIndexChanged), this, &DlgEditor::editorChanged); m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "Custom Text Editor" ) ); m_dlg->kcfg_ExternalEditor->addItem( i18nc( "Text editor", "Kate" ), 1 ); diff --git a/conf/dlgperformance.cpp b/conf/dlgperformance.cpp index c35b0e975..9fa752e95 100644 --- a/conf/dlgperformance.cpp +++ b/conf/dlgperformance.cpp @@ -27,7 +27,7 @@ DlgPerformance::DlgPerformance( QWidget * parent ) m_dlg->cpuLabel->setPixmap( BarIcon( "cpu", 32 ) ); // m_dlg->memoryLabel->setPixmap( BarIcon( "kcmmemory", 32 ) ); // TODO: enable again when proper icon is available - connect( m_dlg->kcfg_MemoryLevel, SIGNAL(changed(int)), this, SLOT(radioGroup_changed(int)) ); + connect(m_dlg->kcfg_MemoryLevel, &KButtonGroup::changed, this, &DlgPerformance::radioGroup_changed); } DlgPerformance::~DlgPerformance() diff --git a/conf/dlgpresentation.cpp b/conf/dlgpresentation.cpp index 67aa8c534..4e7708429 100644 --- a/conf/dlgpresentation.cpp +++ b/conf/dlgpresentation.cpp @@ -47,7 +47,7 @@ DlgPresentation::DlgPresentation( QWidget * parent ) m_dlg->kcfg_SlidesAdvanceTime->setSuffix(ki18ncp("Advance every %1 seconds", " second", " seconds")); - connect( m_dlg->screenCombo, SIGNAL(activated(int)), this, SLOT(screenComboChanged(int)) ); + connect(m_dlg->screenCombo, static_cast(&QComboBox::activated), this, &DlgPresentation::screenComboChanged); } DlgPresentation::~DlgPresentation() diff --git a/core/document.cpp b/core/document.cpp index 028b10804..e7b70cd1c 100644 --- a/core/document.cpp +++ b/core/document.cpp @@ -2069,8 +2069,8 @@ Document::Document( QWidget *widget ) d->m_undoStack = new QUndoStack(this); connect( SettingsCore::self(), SIGNAL(configChanged()), this, SLOT(_o_configChanged()) ); - connect( d->m_undoStack, SIGNAL( canUndoChanged(bool) ), this, SIGNAL( canUndoChanged(bool))); - connect( d->m_undoStack, SIGNAL( canRedoChanged(bool) ), this, SIGNAL( canRedoChanged(bool) ) ); + connect(d->m_undoStack, &QUndoStack::canUndoChanged, this, &Document::canUndoChanged); + connect(d->m_undoStack, &QUndoStack::canRedoChanged, this, &Document::canRedoChanged); qRegisterMetaType(); } diff --git a/core/generator.cpp b/core/generator.cpp index 6b0beece9..76e6794d7 100644 --- a/core/generator.cpp +++ b/core/generator.cpp @@ -61,8 +61,7 @@ PixmapGenerationThread* GeneratorPrivate::pixmapGenerationThread() Q_Q( Generator ); mPixmapGenerationThread = new PixmapGenerationThread( q ); - QObject::connect( mPixmapGenerationThread, SIGNAL(finished()), - q, SLOT(pixmapGenerationFinished()), + QObject::connect( mPixmapGenerationThread, SIGNAL(finished()), q, SLOT(pixmapGenerationFinished()), Qt::QueuedConnection ); return mPixmapGenerationThread; @@ -75,8 +74,7 @@ TextPageGenerationThread* GeneratorPrivate::textPageGenerationThread() Q_Q( Generator ); mTextPageGenerationThread = new TextPageGenerationThread( q ); - QObject::connect( mTextPageGenerationThread, SIGNAL(finished()), - q, SLOT(textpageGenerationFinished()), + QObject::connect( mTextPageGenerationThread, SIGNAL(finished()), q, SLOT(textpageGenerationFinished()), Qt::QueuedConnection ); return mTextPageGenerationThread; diff --git a/core/generator_p.cpp b/core/generator_p.cpp index e31fca554..4cfbf789c 100644 --- a/core/generator_p.cpp +++ b/core/generator_p.cpp @@ -113,7 +113,7 @@ void FontExtractionThread::startExtraction( bool async ) { if ( async ) { - connect( this, SIGNAL(finished()), this, SLOT(deleteLater()) ); + connect(this, &FontExtractionThread::finished, this, &FontExtractionThread::deleteLater); start( QThread::InheritPriority ); } else