diff --git a/kdecoration/breezesizegrip.cpp b/kdecoration/breezesizegrip.cpp --- a/kdecoration/breezesizegrip.cpp +++ b/kdecoration/breezesizegrip.cpp @@ -162,7 +162,7 @@ case Qt::RightButton: { hide(); - QTimer::singleShot(5000, this, SLOT(show())); + QTimer::singleShot(5000, this, &QWidget::show); break; } diff --git a/kdecoration/config/breezeconfigwidget.cpp b/kdecoration/config/breezeconfigwidget.cpp --- a/kdecoration/config/breezeconfigwidget.cpp +++ b/kdecoration/config/breezeconfigwidget.cpp @@ -48,23 +48,23 @@ // track ui changes connect( m_ui.titleAlignment, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); connect( m_ui.buttonSize, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); - connect( m_ui.outlineCloseButton, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawBorderOnMaximizedWindows, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawSizeGrip, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawBackgroundGradient, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawTitleBarSeparator, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.outlineCloseButton, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); + connect( m_ui.drawBorderOnMaximizedWindows, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); + connect( m_ui.drawSizeGrip, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); + connect( m_ui.drawBackgroundGradient, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); + connect( m_ui.drawTitleBarSeparator, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); // track animations changes - connect( m_ui.animationsEnabled, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.animationsEnabled, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); connect( m_ui.animationsDuration, SIGNAL(valueChanged(int)), SLOT(updateChanged()) ); // track shadows changes connect( m_ui.shadowSize, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); connect( m_ui.shadowStrength, SIGNAL(valueChanged(int)), SLOT(updateChanged()) ); - connect( m_ui.shadowColor, SIGNAL(changed(QColor)), SLOT(updateChanged()) ); + connect( m_ui.shadowColor, &KColorButton::changed, this, &ConfigWidget::updateChanged ); // track exception changes - connect( m_ui.exceptions, SIGNAL(changed(bool)), SLOT(updateChanged()) ); + connect( m_ui.exceptions, &ExceptionListWidget::changed, this, &ConfigWidget::updateChanged ); } diff --git a/kdecoration/config/breezedetectwidget.cpp b/kdecoration/config/breezedetectwidget.cpp --- a/kdecoration/config/breezedetectwidget.cpp +++ b/kdecoration/config/breezedetectwidget.cpp @@ -52,7 +52,7 @@ // setup m_ui.setupUi( this ); - connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), SIGNAL(clicked()), this, SLOT(close()) ); + connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QWidget::close ); m_ui.windowClassCheckBox->setChecked( true ); #if BREEZE_HAVE_X11 diff --git a/kdecoration/config/breezeexceptiondialog.cpp b/kdecoration/config/breezeexceptiondialog.cpp --- a/kdecoration/config/breezeexceptiondialog.cpp +++ b/kdecoration/config/breezeexceptiondialog.cpp @@ -41,23 +41,23 @@ m_ui.setupUi( this ); - connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), SIGNAL(clicked()), this, SLOT(close()) ); + connect( m_ui.buttonBox->button( QDialogButtonBox::Cancel ), &QAbstractButton::clicked, this, &QWidget::close ); // store checkboxes from ui into list m_checkboxes.insert( BorderSize, m_ui.borderSizeCheckBox ); // detect window properties - connect( m_ui.detectDialogButton, SIGNAL(clicked()), SLOT(selectWindowProperties()) ); + connect( m_ui.detectDialogButton, &QAbstractButton::clicked, this, &ExceptionDialog::selectWindowProperties ); // connections connect( m_ui.exceptionType, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); - connect( m_ui.exceptionEditor, SIGNAL(textChanged(QString)), SLOT(updateChanged()) ); + connect( m_ui.exceptionEditor, &QLineEdit::textChanged, this, &ExceptionDialog::updateChanged ); connect( m_ui.borderSizeComboBox, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); for( CheckBoxMap::iterator iter = m_checkboxes.begin(); iter != m_checkboxes.end(); ++iter ) - { connect( iter.value(), SIGNAL(clicked()), SLOT(updateChanged()) ); } + { connect( iter.value(), &QAbstractButton::clicked, this, &ExceptionDialog::updateChanged ); } - connect( m_ui.hideTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.hideTitleBar, &QAbstractButton::clicked, this, &ExceptionDialog::updateChanged ); // hide detection dialog on non X11 platforms #if BREEZE_HAVE_X11 @@ -140,7 +140,7 @@ if( !m_detectDialog ) { m_detectDialog = new DetectDialog( this ); - connect( m_detectDialog, SIGNAL(detectionDone(bool)), SLOT(readWindowProperties(bool)) ); + connect( m_detectDialog, &DetectDialog::detectionDone, this, &ExceptionDialog::readWindowProperties ); } m_detectDialog->detect(0); diff --git a/kdecoration/config/breezeexceptionlistwidget.cpp b/kdecoration/config/breezeexceptionlistwidget.cpp --- a/kdecoration/config/breezeexceptionlistwidget.cpp +++ b/kdecoration/config/breezeexceptionlistwidget.cpp @@ -58,15 +58,15 @@ m_ui.removeButton->setIcon( QIcon::fromTheme( QStringLiteral( "list-remove" ) ) ); m_ui.editButton->setIcon( QIcon::fromTheme( QStringLiteral( "edit-rename" ) ) ); - connect( m_ui.addButton, SIGNAL(clicked()), SLOT(add()) ); - connect( m_ui.editButton, SIGNAL(clicked()), SLOT(edit()) ); - connect( m_ui.removeButton, SIGNAL(clicked()), SLOT(remove()) ); - connect( m_ui.moveUpButton, SIGNAL(clicked()), SLOT(up()) ); - connect( m_ui.moveDownButton, SIGNAL(clicked()), SLOT(down()) ); - - connect( m_ui.exceptionListView, SIGNAL(activated(QModelIndex)), SLOT(edit()) ); - connect( m_ui.exceptionListView, SIGNAL(clicked(QModelIndex)), SLOT(toggle(QModelIndex)) ); - connect( m_ui.exceptionListView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), SLOT(updateButtons()) ); + connect( m_ui.addButton, &QAbstractButton::clicked, this, &ExceptionListWidget::add ); + connect( m_ui.editButton, &QAbstractButton::clicked, this, &ExceptionListWidget::edit ); + connect( m_ui.removeButton, &QAbstractButton::clicked, this, &ExceptionListWidget::remove ); + connect( m_ui.moveUpButton, &QAbstractButton::clicked, this, &ExceptionListWidget::up ); + connect( m_ui.moveDownButton, &QAbstractButton::clicked, this, &ExceptionListWidget::down ); + + connect( m_ui.exceptionListView, &QAbstractItemView::activated, this, &ExceptionListWidget::edit ); + connect( m_ui.exceptionListView, &QAbstractItemView::clicked, this, &ExceptionListWidget::toggle ); + connect( m_ui.exceptionListView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ExceptionListWidget::updateButtons ); updateButtons(); resizeColumns(); diff --git a/kstyle/animations/breezeanimations.cpp b/kstyle/animations/breezeanimations.cpp --- a/kstyle/animations/breezeanimations.cpp +++ b/kstyle/animations/breezeanimations.cpp @@ -224,7 +224,7 @@ void Animations::registerEngine( BaseEngine* engine ) { _engines.append( engine ); - connect( engine, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterEngine(QObject*)) ); + connect( engine, &QObject::destroyed, this, &Animations::unregisterEngine ); } } diff --git a/kstyle/animations/breezescrollbardata.cpp b/kstyle/animations/breezescrollbardata.cpp --- a/kstyle/animations/breezescrollbardata.cpp +++ b/kstyle/animations/breezescrollbardata.cpp @@ -40,8 +40,8 @@ _subLineData._animation = new Animation( duration, this ); _grooveData._animation = new Animation( duration, this ); - connect( addLineAnimation().data(), SIGNAL(finished()), SLOT(clearAddLineRect()) ); - connect( subLineAnimation().data(), SIGNAL(finished()), SLOT(clearSubLineRect()) ); + connect( addLineAnimation().data(), &QAbstractAnimation::finished, this, &ScrollBarData::clearAddLineRect ); + connect( subLineAnimation().data(), &QAbstractAnimation::finished, this, &ScrollBarData::clearSubLineRect ); // setup animation setupAnimation( addLineAnimation(), "addLineOpacity" ); diff --git a/kstyle/animations/breezestackedwidgetdata.cpp b/kstyle/animations/breezestackedwidgetdata.cpp --- a/kstyle/animations/breezestackedwidgetdata.cpp +++ b/kstyle/animations/breezestackedwidgetdata.cpp @@ -37,7 +37,7 @@ { // configure transition - connect( _target.data(), SIGNAL(destroyed()), SLOT(targetDestroyed()) ); + connect( _target.data(), &QObject::destroyed, this, &StackedWidgetData::targetDestroyed ); connect( _target.data(), SIGNAL(currentChanged(int)), SLOT(animate()) ); // disable focus diff --git a/kstyle/animations/breezetransitionwidget.cpp b/kstyle/animations/breezetransitionwidget.cpp --- a/kstyle/animations/breezetransitionwidget.cpp +++ b/kstyle/animations/breezetransitionwidget.cpp @@ -58,7 +58,7 @@ _animation.data()->setPropertyName( "opacity" ); // hide when animation is finished - connect( _animation.data(), SIGNAL(finished()), SLOT(hide()) ); + connect( _animation.data(), &QAbstractAnimation::finished, this, &QWidget::hide ); } diff --git a/kstyle/breezeframeshadow.cpp b/kstyle/breezeframeshadow.cpp --- a/kstyle/breezeframeshadow.cpp +++ b/kstyle/breezeframeshadow.cpp @@ -75,7 +75,7 @@ _registeredWidgets.insert( widget ); // catch object destruction - connect( widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*)) ); + connect( widget, &QObject::destroyed, this, &FrameShadowFactory::widgetDestroyed ); // install shadow installShadows( widget, helper ); diff --git a/kstyle/breezemdiwindowshadow.cpp b/kstyle/breezemdiwindowshadow.cpp --- a/kstyle/breezemdiwindowshadow.cpp +++ b/kstyle/breezemdiwindowshadow.cpp @@ -151,7 +151,7 @@ widget->installEventFilter( this ); // catch object destruction - connect( widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*)) ); + connect( widget, &QObject::destroyed, this, &MdiWindowShadowFactory::widgetDestroyed ); return true; diff --git a/kstyle/breezeshadowhelper.cpp b/kstyle/breezeshadowhelper.cpp --- a/kstyle/breezeshadowhelper.cpp +++ b/kstyle/breezeshadowhelper.cpp @@ -132,7 +132,7 @@ widget->installEventFilter( this ); // connect destroy signal - connect( widget, SIGNAL(destroyed(QObject*)), SLOT(objectDeleted(QObject*)) ); + connect( widget, &QObject::destroyed, this, &ShadowHelper::objectDeleted ); return true; diff --git a/kstyle/config/breezestyleconfig.cpp b/kstyle/config/breezestyleconfig.cpp --- a/kstyle/config/breezestyleconfig.cpp +++ b/kstyle/config/breezestyleconfig.cpp @@ -45,22 +45,22 @@ // load setup from configData load(); - connect( _tabBarDrawCenteredTabs, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _toolBarDrawItemSeparator, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _viewDrawFocusIndicator, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _dockWidgetDrawFrame, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _titleWidgetDrawFrame, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _sidePanelDrawFrame, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _menuItemDrawThinFocus, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _sliderDrawTickMarks, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); - connect( _splitterProxyEnabled, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); + connect( _tabBarDrawCenteredTabs, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _toolBarDrawItemSeparator, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _viewDrawFocusIndicator, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _dockWidgetDrawFrame, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _titleWidgetDrawFrame, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _sidePanelDrawFrame, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _menuItemDrawThinFocus, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _sliderDrawTickMarks, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); + connect( _splitterProxyEnabled, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); connect( _mnemonicsMode, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); - connect( _animationsEnabled, SIGNAL(toggled(bool)), SLOT(updateChanged()) ); + connect( _animationsEnabled, &QAbstractButton::toggled, this, &StyleConfig::updateChanged ); connect( _animationsDuration, SIGNAL(valueChanged(int)), SLOT(updateChanged()) ); connect( _scrollBarAddLineButtons, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); connect( _scrollBarSubLineButtons, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); connect( _windowDragMode, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); - connect( _menuOpacity, SIGNAL(valueChanged(int)), SLOT(updateChanged()) ); + connect( _menuOpacity, &QAbstractSlider::valueChanged, this, &StyleConfig::updateChanged ); }