diff --git a/kcm/src/collapsablebutton.h b/kcm/src/collapsablebutton.h --- a/kcm/src/collapsablebutton.h +++ b/kcm/src/collapsablebutton.h @@ -29,7 +29,7 @@ Q_OBJECT public: - explicit CollapsableButton(const QString &text, QWidget *parent = 0); + explicit CollapsableButton(const QString &text, QWidget *parent = nullptr); virtual ~CollapsableButton(); void setCollapsed(bool collapsed); diff --git a/kcm/src/controlpanel.cpp b/kcm/src/controlpanel.cpp --- a/kcm/src/controlpanel.cpp +++ b/kcm/src/controlpanel.cpp @@ -30,7 +30,7 @@ ControlPanel::ControlPanel(QWidget *parent) : QFrame(parent) - , mUnifiedOutputCfg(0) + , mUnifiedOutputCfg(nullptr) { setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); @@ -46,7 +46,7 @@ qDeleteAll(mOutputConfigs); mOutputConfigs.clear(); delete mUnifiedOutputCfg; - mUnifiedOutputCfg = 0; + mUnifiedOutputCfg = nullptr; if (mConfig) { mConfig->disconnect(this); @@ -108,12 +108,12 @@ continue; } - config->setVisible(output == 0); + config->setVisible(output == nullptr); } if (output.isNull()) { mUnifiedOutputCfg->deleteLater(); - mUnifiedOutputCfg = 0; + mUnifiedOutputCfg = nullptr; } else { mUnifiedOutputCfg = new UnifiedOutputConfig(mConfig, this); mUnifiedOutputCfg->setOutput(output); diff --git a/kcm/src/kcm_kscreen.cpp b/kcm/src/kcm_kscreen.cpp --- a/kcm/src/kcm_kscreen.cpp +++ b/kcm/src/kcm_kscreen.cpp @@ -49,7 +49,7 @@ KCMKScreen::KCMKScreen(QWidget* parent, const QVariantList& args) : KCModule(parent, args) - , mKScreenWidget(0) + , mKScreenWidget(nullptr) { Log::instance(); @@ -74,7 +74,7 @@ mMainLayout->setMargin(0); if (op->hasError()) { - mKScreenWidget = 0; + mKScreenWidget = nullptr; delete mKScreenWidget; QLabel *errorLabel = new QLabel(this); mMainLayout->addWidget(errorLabel); diff --git a/kcm/src/outputconfig.cpp b/kcm/src/outputconfig.cpp --- a/kcm/src/outputconfig.cpp +++ b/kcm/src/outputconfig.cpp @@ -42,7 +42,7 @@ OutputConfig::OutputConfig(QWidget *parent) : QWidget(parent) - , mOutput(0) + , mOutput(nullptr) { } diff --git a/kcm/src/previewwidget.cpp b/kcm/src/previewwidget.cpp --- a/kcm/src/previewwidget.cpp +++ b/kcm/src/previewwidget.cpp @@ -33,7 +33,7 @@ m_internalPreview(new QWidget) // deliberately no parent, we don't want it to have a screen { Ui::StylePreview ui; - ui.setupUi(m_internalPreview ); + ui.setupUi(m_internalPreview); } PreviewWidget::~PreviewWidget() diff --git a/kcm/src/resolutionslider.cpp b/kcm/src/resolutionslider.cpp --- a/kcm/src/resolutionslider.cpp +++ b/kcm/src/resolutionslider.cpp @@ -39,11 +39,11 @@ ResolutionSlider::ResolutionSlider(const KScreen::OutputPtr &output, QWidget *parent) : QWidget(parent) , mOutput(output) - , mSmallestLabel(0) - , mBiggestLabel(0) - , mCurrentLabel(0) - , mSlider(0) - , mComboBox(0) + , mSmallestLabel(nullptr) + , mBiggestLabel(nullptr) + , mCurrentLabel(nullptr) + , mSlider(nullptr) + , mComboBox(nullptr) { connect(output.data(), &KScreen::Output::currentModeIdChanged, this, &ResolutionSlider::slotOutputModeChanged); diff --git a/kcm/src/widget.cpp b/kcm/src/widget.cpp --- a/kcm/src/widget.cpp +++ b/kcm/src/widget.cpp @@ -53,9 +53,9 @@ Widget::Widget(QWidget *parent): QWidget(parent), - mScreen(0), - mConfig(0), - mPrevConfig(0) + mScreen(nullptr), + mConfig(nullptr), + mPrevConfig(nullptr) { qRegisterMetaType(); diff --git a/kded/daemon.cpp b/kded/daemon.cpp --- a/kded/daemon.cpp +++ b/kded/daemon.cpp @@ -46,7 +46,7 @@ KScreenDaemon::KScreenDaemon(QObject* parent, const QList< QVariant >& ) : KDEDModule(parent) - , m_monitoredConfig(0) + , m_monitoredConfig(nullptr) , m_iteration(Generator::None) , m_monitoring(false) , m_changeCompressor(new QTimer(this)) diff --git a/kded/device.cpp b/kded/device.cpp --- a/kded/device.cpp +++ b/kded/device.cpp @@ -23,7 +23,7 @@ #include -Device* Device::m_instance = 0; +Device* Device::m_instance = nullptr; Device* Device::self() { @@ -37,7 +37,7 @@ void Device::destroy() { delete m_instance; - m_instance = 0; + m_instance = nullptr; } Device::Device(QObject* parent) diff --git a/kded/generator.cpp b/kded/generator.cpp --- a/kded/generator.cpp +++ b/kded/generator.cpp @@ -41,7 +41,7 @@ } #endif -Generator* Generator::instance = 0; +Generator* Generator::instance = nullptr; bool operator<(const QSize &s1, const QSize &s2) { @@ -69,7 +69,7 @@ void Generator::destroy() { delete Generator::instance; - Generator::instance = 0; + Generator::instance = nullptr; } Generator::~Generator() @@ -298,7 +298,6 @@ QSet commonSizes; const QSize maxScreenSize = m_currentConfig->screen()->maxSize(); - QList> modes; Q_FOREACH(const KScreen::OutputPtr &output, connectedOutputs) { QSet modeSizes; Q_FOREACH(const KScreen::ModePtr &mode, output->modes()) {