mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
Port to new connect api
This commit is contained in:
parent
aee3d94161
commit
d386ea257e
|
@ -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<void (KComboBox::*)(int)>(&KComboBox::currentIndexChanged), this, &DlgAccessibility::slotColorMode);
|
||||
}
|
||||
|
||||
DlgAccessibility::~DlgAccessibility()
|
||||
|
|
|
@ -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<void (QComboBox::*)(int)>(&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 );
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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<void (QComboBox::*)(int)>(&QComboBox::activated), this, &DlgPresentation::screenComboChanged);
|
||||
}
|
||||
|
||||
DlgPresentation::~DlgPresentation()
|
||||
|
|
|
@ -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<Okular::FontInfo>();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue