Commit 4edf2cc9 authored by David Edmundson's avatar David Edmundson

Port connections to new syntax

Summary: Porting done by clazy.

Test Plan: Compiles

Reviewers: #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26823
parent 3968649a
......@@ -162,7 +162,7 @@ namespace Breeze
case Qt::RightButton:
{
hide();
QTimer::singleShot(5000, this, SLOT(show()));
QTimer::singleShot(5000, this, &QWidget::show);
break;
}
......
......@@ -48,23 +48,23 @@ namespace Breeze
// 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 );
}
......
......@@ -52,7 +52,7 @@ namespace Breeze
// 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
......
......@@ -41,23 +41,23 @@ namespace Breeze
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 @@ namespace Breeze
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);
......
......@@ -58,15 +58,15 @@ namespace Breeze
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();
......
......@@ -224,7 +224,7 @@ namespace Breeze
void Animations::registerEngine( BaseEngine* engine )
{
_engines.append( engine );
connect( engine, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterEngine(QObject*)) );
connect( engine, &QObject::destroyed, this, &Animations::unregisterEngine );
}
}
......@@ -40,8 +40,8 @@ namespace Breeze
_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" );
......
......@@ -37,7 +37,7 @@ namespace Breeze
{
// 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
......
......@@ -58,7 +58,7 @@ namespace Breeze
_animation.data()->setPropertyName( "opacity" );
// hide when animation is finished
connect( _animation.data(), SIGNAL(finished()), SLOT(hide()) );
connect( _animation.data(), &QAbstractAnimation::finished, this, &QWidget::hide );
}
......
......@@ -75,7 +75,7 @@ namespace Breeze
_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 );
......
......@@ -151,7 +151,7 @@ namespace Breeze
widget->installEventFilter( this );
// catch object destruction
connect( widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*)) );
connect( widget, &QObject::destroyed, this, &MdiWindowShadowFactory::widgetDestroyed );
return true;
......
......@@ -132,7 +132,7 @@ namespace Breeze
widget->installEventFilter( this );
// connect destroy signal
connect( widget, SIGNAL(destroyed(QObject*)), SLOT(objectDeleted(QObject*)) );
connect( widget, &QObject::destroyed, this, &ShadowHelper::objectDeleted );
return true;
......
......@@ -45,22 +45,22 @@ namespace Breeze
// 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 );
}
......
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