From 87157ceddca5e4af1e53537f88e0687fd77e96e0 Mon Sep 17 00:00:00 2001 From: Salva Ardid Date: Tue, 17 Mar 2020 09:29:05 -0400 Subject: [PATCH] V0.8.11 --- CMakeLists.txt | 2 +- ChangeLog | 5 ++++ breezedecoration.cpp | 1 - breezesettingsprovider.h | 2 +- breezesizegrip.cpp | 4 +-- config/breezeconfigwidget.cpp | 24 +++++++++--------- config/breezedetectwidget.cpp | 4 +-- config/breezeexceptiondialog.cpp | 20 +++++++-------- config/breezeexceptiondialog.h | 2 +- config/breezeexceptionlistwidget.cpp | 17 +++++++------ config/breezeitemmodel.h | 2 +- config/breezelistmodel.h | 2 +- libbreezecommon/breezeboxshadowrenderer.cpp | 27 --------------------- 13 files changed, 45 insertions(+), 67 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb62b26..53d05e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ project(sierrabreezeenhanced) -set(PROJECT_VERSION "0.8.10") +set(PROJECT_VERSION "0.8.11") set(PROJECT_VERSION_MAJOR 0) cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) diff --git a/ChangeLog b/ChangeLog index 73698b6..dd94690 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +V0.8.11 +--------- + +* Changes to be in sync with upstream Breeze + V0.8.10 --------- diff --git a/breezedecoration.cpp b/breezedecoration.cpp index c30abe5..4e360a0 100644 --- a/breezedecoration.cpp +++ b/breezedecoration.cpp @@ -46,7 +46,6 @@ #include #include #include -// #include #if BREEZE_HAVE_X11 #include diff --git a/breezesettingsprovider.h b/breezesettingsprovider.h index 25e0257..20bda39 100644 --- a/breezesettingsprovider.h +++ b/breezesettingsprovider.h @@ -54,7 +54,7 @@ namespace Breeze private: - //* contructor + //* constructor SettingsProvider(); //* default configuration diff --git a/breezesizegrip.cpp b/breezesizegrip.cpp index 37060bc..645c4c0 100644 --- a/breezesizegrip.cpp +++ b/breezesizegrip.cpp @@ -162,7 +162,7 @@ namespace Breeze case Qt::RightButton: { hide(); - QTimer::singleShot(5000, this, SLOT(show())); + QTimer::singleShot(5000, this, &QWidget::show); break; } @@ -181,7 +181,7 @@ namespace Breeze } - + } //_______________________________________________________________________________ diff --git a/config/breezeconfigwidget.cpp b/config/breezeconfigwidget.cpp index 07b01d5..f2db028 100644 --- a/config/breezeconfigwidget.cpp +++ b/config/breezeconfigwidget.cpp @@ -50,34 +50,34 @@ namespace Breeze connect( m_ui.buttonSize, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); connect( m_ui.buttonSpacing, QOverload::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} ); connect( m_ui.buttonPadding, SIGNAL(valueChanged(int)), SLOT(updateChanged()) ); - connect( m_ui.unisonHovering, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.unisonHovering, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); connect( m_ui.cornerRadiusSpinBox, QOverload::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} ); - connect( m_ui.drawBorderOnMaximizedWindows, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawSizeGrip, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.opaqueTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawBackgroundGradient, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.drawBorderOnMaximizedWindows, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); + connect( m_ui.drawSizeGrip, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); + connect( m_ui.opaqueTitleBar, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); + connect( m_ui.drawBackgroundGradient, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); connect( m_ui.buttonStyle, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); connect( m_ui.opacitySpinBox, QOverload::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} ); connect( m_ui.gradientSpinBox, QOverload::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} ); - connect( m_ui.drawTitleBarSeparator, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.drawTitleBarSeparator, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); connect( m_ui.hideTitleBar, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); - connect( m_ui.matchColorForTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.matchColorForTitleBar, &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.specificShadowsInactiveWindows, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.shadowColor, &KColorButton::changed, this, &ConfigWidget::updateChanged ); + connect( m_ui.specificShadowsInactiveWindows, &QAbstractButton::clicked, this, &ConfigWidget::updateChanged ); connect( m_ui.shadowSizeInactiveWindows, SIGNAL(currentIndexChanged(int)), SLOT(updateChanged()) ); connect( m_ui.shadowStrengthInactiveWindows, SIGNAL(valueChanged(int)), SLOT(updateChanged()) ); - connect( m_ui.shadowColorInactiveWindows, SIGNAL(changed(QColor)), SLOT(updateChanged()) ); + connect( m_ui.shadowColorInactiveWindows, &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/config/breezedetectwidget.cpp b/config/breezedetectwidget.cpp index 7c52088..fff5b53 100644 --- a/config/breezedetectwidget.cpp +++ b/config/breezedetectwidget.cpp @@ -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 @@ -127,7 +127,7 @@ namespace Breeze if( o != m_grabber ) return false; if( e->type() != QEvent::MouseButtonRelease ) return false; - // need to explicitely release cursor for Qt5 + // need to explicitly release cursor for Qt5 qApp->restoreOverrideCursor(); // delete old m_grabber diff --git a/config/breezeexceptiondialog.cpp b/config/breezeexceptiondialog.cpp index dfca32d..ca90c14 100644 --- a/config/breezeexceptiondialog.cpp +++ b/config/breezeexceptiondialog.cpp @@ -41,32 +41,32 @@ 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, &QWidget::close ); // 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(currentIndexChanged(int)), SLOT(updateChanged()) ); - connect( m_ui.matchColorForTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawTitleBarSeparator, SIGNAL(clicked()), SLOT(updateChanged()) ); - connect( m_ui.drawBackgroundGradient, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.matchColorForTitleBar, &QAbstractButton::clicked, this, &QWidget::close ); + connect( m_ui.drawTitleBarSeparator, &QAbstractButton::clicked, this, &QWidget::close ); + connect( m_ui.drawBackgroundGradient, &QAbstractButton::clicked, this, &QWidget::close ); m_ui.gradientOverrideLabelSpinBox->setSpecialValueText(tr("None")); connect( m_ui.gradientOverrideLabelSpinBox, QOverload::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} ); - connect( m_ui.opaqueTitleBar, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.opaqueTitleBar, &QAbstractButton::clicked, this, &QWidget::close ); m_ui.opacityOverrideLabelSpinBox->setSpecialValueText(tr("None")); connect( m_ui.opacityOverrideLabelSpinBox, QOverload::of(&QSpinBox::valueChanged), [=](int /*i*/){updateChanged();} ); - connect( m_ui.isDialog, SIGNAL(clicked()), SLOT(updateChanged()) ); + connect( m_ui.isDialog, &QAbstractButton::clicked, this, &QWidget::close ); // hide detection dialog on non X11 platforms #if BREEZE_HAVE_X11 @@ -170,7 +170,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); diff --git a/config/breezeexceptiondialog.h b/config/breezeexceptiondialog.h index 9846ff2..7c53b48 100644 --- a/config/breezeexceptiondialog.h +++ b/config/breezeexceptiondialog.h @@ -63,7 +63,7 @@ namespace Breeze Q_SIGNALS: - //* emmited when changed + //* emitted when changed void changed( bool ); protected: diff --git a/config/breezeexceptionlistwidget.cpp b/config/breezeexceptionlistwidget.cpp index 712f473..fd32654 100644 --- a/config/breezeexceptionlistwidget.cpp +++ b/config/breezeexceptionlistwidget.cpp @@ -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.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, 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.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(); @@ -86,6 +86,7 @@ namespace Breeze InternalSettingsList ExceptionListWidget::exceptions() { return model().get(); + setChanged( false ); } //__________________________________________________________ diff --git a/config/breezeitemmodel.h b/config/breezeitemmodel.h index 3af4ab3..150493b 100644 --- a/config/breezeitemmodel.h +++ b/config/breezeitemmodel.h @@ -73,7 +73,7 @@ namespace Breeze void privateSort() { privateSort( m_sortColumn, m_sortOrder ); } - //* private sort, with no signals emmitted + //* private sort, with no signals emitted virtual void privateSort( int column, Qt::SortOrder order ) = 0; //* used to sort items in list diff --git a/config/breezelistmodel.h b/config/breezelistmodel.h index 4d18404..e94c32a 100644 --- a/config/breezelistmodel.h +++ b/config/breezelistmodel.h @@ -282,7 +282,7 @@ namespace Breeze } //! return all values - const List& get() const + const List& get( void ) const { return _values; } //! return value for given index diff --git a/libbreezecommon/breezeboxshadowrenderer.cpp b/libbreezecommon/breezeboxshadowrenderer.cpp index 001a36d..22c6bdd 100644 --- a/libbreezecommon/breezeboxshadowrenderer.cpp +++ b/libbreezecommon/breezeboxshadowrenderer.cpp @@ -21,17 +21,9 @@ // own #include "breezeboxshadowrenderer.h" -// auto-generated -#include "config-breezecommon.h" - // Qt #include - -#ifdef BREEZE_COMMON_USE_KDE4 -#include -#else #include -#endif namespace Breeze { @@ -96,10 +88,7 @@ static QVector computeLobes(int radius) break; default: -#if !BREEZE_COMMON_USE_KDE4 Q_UNREACHABLE(); -#endif - break; } Q_ASSERT(major + minor + final == blurRadius); @@ -258,16 +247,10 @@ static void renderShadow(QPainter *painter, const QRect &rect, qreal borderRadiu const QSize inflation = calculateBlurExtent(radius); const QSize size = rect.size() + 2 * inflation; -#if BREEZE_COMMON_USE_KDE4 - const qreal dpr = 1.0; -#else const qreal dpr = painter->device()->devicePixelRatioF(); -#endif QImage shadow(size * dpr, QImage::Format_ARGB32_Premultiplied); -#if !BREEZE_COMMON_USE_KDE4 shadow.setDevicePixelRatio(dpr); -#endif shadow.fill(Qt::transparent); QRect boxRect(QPoint(0, 0), rect.size()); @@ -335,30 +318,20 @@ QImage BoxShadowRenderer::render() const } QSize canvasSize; -#if BREEZE_COMMON_USE_KDE4 - foreach (const Shadow &shadow, m_shadows) { -#else for (const Shadow &shadow : qAsConst(m_shadows)) { -#endif canvasSize = canvasSize.expandedTo( calculateMinimumShadowTextureSize(m_boxSize, shadow.radius, shadow.offset)); } QImage canvas(canvasSize * m_dpr, QImage::Format_ARGB32_Premultiplied); -#if !BREEZE_COMMON_USE_KDE4 canvas.setDevicePixelRatio(m_dpr); -#endif canvas.fill(Qt::transparent); QRect boxRect(QPoint(0, 0), m_boxSize); boxRect.moveCenter(QRect(QPoint(0, 0), canvasSize).center()); QPainter painter(&canvas); -#if BREEZE_COMMON_USE_KDE4 - foreach (const Shadow &shadow, m_shadows) { -#else for (const Shadow &shadow : qAsConst(m_shadows)) { -#endif renderShadow(&painter, boxRect, m_borderRadius, shadow.offset, shadow.radius, shadow.color); } painter.end();