diff --git a/kdecoration/breezesettingsprovider.cpp b/kdecoration/breezesettingsprovider.cpp --- a/kdecoration/breezesettingsprovider.cpp +++ b/kdecoration/breezesettingsprovider.cpp @@ -105,7 +105,7 @@ if( className.isEmpty() ) { // retrieve class name - KWindowInfo info( client->windowId(), 0, NET::WM2WindowClass ); + KWindowInfo info( client->windowId(), nullptr, NET::WM2WindowClass ); QString window_className( QString::fromUtf8(info.windowClassName()) ); QString window_class( QString::fromUtf8(info.windowClassClass()) ); className = window_className + QStringLiteral(" ") + window_class; diff --git a/kdecoration/breezesizegrip.cpp b/kdecoration/breezesizegrip.cpp --- a/kdecoration/breezesizegrip.cpp +++ b/kdecoration/breezesizegrip.cpp @@ -227,7 +227,7 @@ */ QPoint rootPosition( position ); xcb_get_geometry_cookie_t cookie( xcb_get_geometry( connection, winId() ) ); - ScopedPointer reply( xcb_get_geometry_reply( connection, cookie, 0x0 ) ); + ScopedPointer reply( xcb_get_geometry_reply( connection, cookie, nullptr ) ); if( reply ) { @@ -237,7 +237,7 @@ -reply.data()->border_width, -reply.data()->border_width ) ); - ScopedPointer< xcb_translate_coordinates_reply_t> coordReply( xcb_translate_coordinates_reply( connection, coordCookie, 0x0 ) ); + ScopedPointer< xcb_translate_coordinates_reply_t> coordReply( xcb_translate_coordinates_reply( connection, coordCookie, nullptr ) ); if( coordReply ) { @@ -254,7 +254,7 @@ // create atom if not found const QString atomName( "_NET_WM_MOVERESIZE" ); xcb_intern_atom_cookie_t cookie( xcb_intern_atom( connection, false, atomName.size(), qPrintable( atomName ) ) ); - ScopedPointer reply( xcb_intern_atom_reply( connection, cookie, 0x0 ) ); + ScopedPointer reply( xcb_intern_atom_reply( connection, cookie, nullptr ) ); m_moveResizeAtom = reply ? reply->atom:0; } diff --git a/kdecoration/config/breezedetectwidget.cpp b/kdecoration/config/breezedetectwidget.cpp --- a/kdecoration/config/breezedetectwidget.cpp +++ b/kdecoration/config/breezedetectwidget.cpp @@ -110,7 +110,7 @@ // use a dialog, so that all user input is blocked // use WX11BypassWM and moving away so that it's not actually visible // grab only mouse, so that keyboard can be used e.g. for switching windows - m_grabber = new QDialog( 0, Qt::X11BypassWindowManagerHint ); + m_grabber = new QDialog( nullptr, Qt::X11BypassWindowManagerHint ); m_grabber->move( -1000, -1000 ); m_grabber->setModal( true ); m_grabber->show(); @@ -134,7 +134,7 @@ // delete old m_grabber delete m_grabber; - m_grabber = 0; + m_grabber = nullptr; // check button if( static_cast< QMouseEvent* >( e )->button() != Qt::LeftButton ) return true; diff --git a/kdecoration/config/breezeexceptiondialog.cpp b/kdecoration/config/breezeexceptiondialog.cpp --- a/kdecoration/config/breezeexceptiondialog.cpp +++ b/kdecoration/config/breezeexceptiondialog.cpp @@ -177,7 +177,7 @@ } delete m_detectDialog; - m_detectDialog = 0; + m_detectDialog = nullptr; } diff --git a/kdecoration/config/breezeexceptionlistwidget.h b/kdecoration/config/breezeexceptionlistwidget.h --- a/kdecoration/config/breezeexceptionlistwidget.h +++ b/kdecoration/config/breezeexceptionlistwidget.h @@ -41,7 +41,7 @@ public: //* constructor - explicit ExceptionListWidget( QWidget* = 0 ); + explicit ExceptionListWidget( QWidget* = nullptr ); //* set exceptions void setExceptions( const InternalSettingsList& ); diff --git a/kdecoration/config/breezeitemmodel.h b/kdecoration/config/breezeitemmodel.h --- a/kdecoration/config/breezeitemmodel.h +++ b/kdecoration/config/breezeitemmodel.h @@ -38,7 +38,7 @@ public: //* constructor - explicit ItemModel(QObject *parent = 0); + explicit ItemModel(QObject *parent = nullptr); //* destructor virtual ~ItemModel() diff --git a/kdecoration/config/breezelistmodel.h b/kdecoration/config/breezelistmodel.h --- a/kdecoration/config/breezelistmodel.h +++ b/kdecoration/config/breezelistmodel.h @@ -58,7 +58,7 @@ // typedef QSet Set; //! constructor - ListModel(QObject *parent = 0): + ListModel(QObject *parent = nullptr): ItemModel( parent ) {} @@ -72,7 +72,7 @@ //! flags Qt::ItemFlags flags(const QModelIndex &index) const override { - if (!index.isValid()) return 0; + if (!index.isValid()) return nullptr; return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } diff --git a/kstyle/animations/breezetransitionwidget.h b/kstyle/animations/breezetransitionwidget.h --- a/kstyle/animations/breezetransitionwidget.h +++ b/kstyle/animations/breezetransitionwidget.h @@ -150,7 +150,7 @@ //@} //* grap pixmap - QPixmap grab( QWidget* = 0, QRect = QRect() ); + QPixmap grab( QWidget* = nullptr, QRect = QRect() ); //* true if animated virtual bool isAnimated() const diff --git a/kstyle/animations/breezetransitionwidget.cpp b/kstyle/animations/breezetransitionwidget.cpp --- a/kstyle/animations/breezetransitionwidget.cpp +++ b/kstyle/animations/breezetransitionwidget.cpp @@ -212,7 +212,7 @@ if( widget->autoFillBackground() ) { widgets.append( widget ); } - QWidget *parent(0); + QWidget *parent(nullptr); // get highest level parent for( parent = widget->parentWidget(); parent; parent = parent->parentWidget() ) @@ -262,7 +262,7 @@ for( int i = widgets.size() - 1; i>=0; i-- ) { QWidget* w = widgets.at(i); - w->render( &p, -widget->mapTo( w, rect.topLeft() ), rect, 0 ); + w->render( &p, -widget->mapTo( w, rect.topLeft() ), rect, nullptr ); } // end diff --git a/kstyle/breezeframeshadow.cpp b/kstyle/breezeframeshadow.cpp --- a/kstyle/breezeframeshadow.cpp +++ b/kstyle/breezeframeshadow.cpp @@ -140,7 +140,7 @@ if( FrameShadow* shadow = qobject_cast(child) ) { shadow->hide(); - shadow->setParent(0); + shadow->setParent(nullptr); shadow->deleteLater(); } } @@ -202,7 +202,7 @@ //____________________________________________________________________________________ void FrameShadowFactory::installShadow( QWidget* widget, Helper& helper, Side area ) const { - FrameShadow *shadow(0); + FrameShadow *shadow(nullptr); shadow = new FrameShadow( area, helper ); shadow->setParent(widget); shadow->hide(); diff --git a/kstyle/breezehelper.cpp b/kstyle/breezehelper.cpp --- a/kstyle/breezehelper.cpp +++ b/kstyle/breezehelper.cpp @@ -48,7 +48,7 @@ //____________________________________________________________________ #if BREEZE_USE_KDE4 Helper::Helper( const QByteArray& name ): - _componentData( name, 0, KComponentData::SkipMainComponentRegistration ), + _componentData( name, nullptr, KComponentData::SkipMainComponentRegistration ), _config( _componentData.config() ) { init(); } #endif diff --git a/kstyle/breezeshadowhelper.cpp b/kstyle/breezeshadowhelper.cpp --- a/kstyle/breezeshadowhelper.cpp +++ b/kstyle/breezeshadowhelper.cpp @@ -409,7 +409,7 @@ if( !_gc ) { _gc = xcb_generate_id( Helper::connection() ); - xcb_create_gc( Helper::connection(), _gc, pixmap, 0, 0x0 ); + xcb_create_gc( Helper::connection(), _gc, pixmap, 0, nullptr ); } // create image from QPixmap and assign to pixmap diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -1088,7 +1088,7 @@ QMouseEvent* mouseEvent( static_cast( event ) ); // get frame framewidth - const int frameWidth( pixelMetric( PM_DefaultFrameWidth, 0, widget ) ); + const int frameWidth( pixelMetric( PM_DefaultFrameWidth, nullptr, widget ) ); // find list of scrollbars QList scrollBars; @@ -3609,7 +3609,7 @@ { // need to adjust clipRect in order not to render outside of frame - const int frameWidth( pixelMetric( PM_DefaultFrameWidth, 0, scrollArea ) ); + const int frameWidth( pixelMetric( PM_DefaultFrameWidth, nullptr, scrollArea ) ); painter->setClipRect( insideMargin( scrollArea->rect(), frameWidth ) ); painter->setBrush( scrollArea->viewport()->palette().color( scrollArea->viewport()->backgroundRole() ) ); painter->setPen( Qt::NoPen ); @@ -4701,7 +4701,7 @@ const auto color = _helper->focusColor( palette ); const auto outlineColor = _helper->focusOutlineColor( palette ); - Sides sides = 0; + Sides sides = nullptr; if( !menuItemOption->menuRect.isNull() ) { if( rect.top() <= menuItemOption->menuRect.top() ) sides |= SideTop; diff --git a/kstyle/breezestyleplugin.h b/kstyle/breezestyleplugin.h --- a/kstyle/breezestyleplugin.h +++ b/kstyle/breezestyleplugin.h @@ -37,7 +37,7 @@ public: //* constructor - explicit StylePlugin(QObject *parent = 0): + explicit StylePlugin(QObject *parent = nullptr): QStylePlugin(parent) {} diff --git a/kstyle/config/breezestyleconfig.cpp b/kstyle/config/breezestyleconfig.cpp --- a/kstyle/config/breezestyleconfig.cpp +++ b/kstyle/config/breezestyleconfig.cpp @@ -97,7 +97,7 @@ Kdelibs4Migration migration; const QString kde4ConfigDirPath = migration.saveLocation("config"); - QScopedPointer kde4Config(StyleConfigData::self()->config()->copyTo(kde4ConfigDirPath+"/breezerc", 0)); + QScopedPointer kde4Config(StyleConfigData::self()->config()->copyTo(kde4ConfigDirPath+"/breezerc", nullptr)); kde4Config->sync(); #endif