Git commit 4805e17fd4a5b0810ebeb8ebcdde9cd3b37e8ecb by Valeriy Malov. Committed on 30/04/2018 at 16:38. Pushed by valeriymalov into branch 'master'. Replace most NULLs with nullptr Use QPalette::WindowText color for crosshairs in calibration dialog to make them visible in dark themes M +2 -2 src/common/buttonshortcut.cpp M +2 -2 src/common/configadaptor.h M +4 -4 src/common/deviceprofile.cpp M +2 -2 src/common/enum.h M +6 -7 src/common/propertyadaptor.cpp M +2 -2 src/common/propertyset.h M +2 -2 src/common/tabletinformation.cpp M +1 -1 src/common/tabletprofile.cpp M +1 -1 src/kcmodule/calibrationdialog.cpp M +2 -2 src/kcmodule/tabletareaselectioncontroller.cpp M +3 -3 src/kcmodule/tabletpagewidget.cpp M +6 -6 src/kded/dbustabletservice.cpp M +3 -3 src/kded/procsystemadaptor.cpp M +1 -1 src/kded/tabletdaemon.cpp M +5 -5 src/kded/tablethandler.cpp M +3 -3 src/kded/x11tabletfinder.cpp M +6 -6 src/kded/xinputadaptor.cpp M +8 -8 src/kded/xsetwacomadaptor.cpp https://commits.kde.org/wacomtablet/4805e17fd4a5b0810ebeb8ebcdde9cd3b37e8ecb diff --git a/src/common/buttonshortcut.cpp b/src/common/buttonshortcut.cpp index 3ad03fe..114b01d 100644 --- a/src/common/buttonshortcut.cpp +++ b/src/common/buttonshortcut.cpp @@ -85,7 +85,7 @@ const char* ButtonShortcut::CONVERT_KEY_MAP_DATA[][2] =3D= { {"super_r", "meta"}, {"super", "meta"}, // "super" default {"underscore", "_"}, - {NULL, NULL} + {nullptr, nullptr} }; = namespace Wacom { @@ -441,7 +441,7 @@ QMap< QString, QString > ButtonShortcut::initConversion= Map(bool fromStorageMap) QMap map; = for (int i =3D 0 ; ; ++i) { - if (CONVERT_KEY_MAP_DATA[i][0] =3D=3D NULL || CONVERT_KEY_MAP_DATA= [i][1] =3D=3D NULL) { + if (CONVERT_KEY_MAP_DATA[i][0] =3D=3D nullptr || CONVERT_KEY_MAP_D= ATA[i][1] =3D=3D nullptr) { return map; } = diff --git a/src/common/configadaptor.h b/src/common/configadaptor.h index f7209ac..502b658 100644 --- a/src/common/configadaptor.h +++ b/src/common/configadaptor.h @@ -43,12 +43,12 @@ public: * * @param adaptee The property adapter where all properties are read = from (possibly NULL). */ - explicit ConfigAdaptor(PropertyAdaptor* adaptee) : PropertyAdaptor(ada= ptee) {}; + explicit ConfigAdaptor(PropertyAdaptor* adaptee) : PropertyAdaptor(ada= ptee) {} = /** * Default destructor */ - virtual ~ConfigAdaptor() {}; + virtual ~ConfigAdaptor() {} = /** * Loads a config from the given config group. The default implementat= ion diff --git a/src/common/deviceprofile.cpp b/src/common/deviceprofile.cpp index 5603cd2..c98eef3 100644 --- a/src/common/deviceprofile.cpp +++ b/src/common/deviceprofile.cpp @@ -44,16 +44,16 @@ public: }; } = -DeviceProfile::DeviceProfile() : PropertyAdaptor(NULL), d_ptr(new DevicePr= ofilePrivate) { } +DeviceProfile::DeviceProfile() : PropertyAdaptor(nullptr), d_ptr(new Devic= eProfilePrivate) { } = DeviceProfile::DeviceProfile(const DeviceType& type) - : PropertyAdaptor(NULL), d_ptr(new DeviceProfilePrivate) + : PropertyAdaptor(nullptr), d_ptr(new DeviceProfilePrivate) { setDeviceType(type); } = DeviceProfile::DeviceProfile(const DeviceProfile& profile) - : PropertyAdaptor(NULL), d_ptr(new DeviceProfilePrivate) + : PropertyAdaptor(nullptr), d_ptr(new DeviceProfilePrivate) { operator=3D(profile); } @@ -250,6 +250,6 @@ bool DeviceProfile::setProperty(const Property& propert= y, const QString& value) = bool DeviceProfile::supportsProperty(const Property& property) const { - return (DeviceProperty::map(property) !=3D NULL); + return (DeviceProperty::map(property) !=3D nullptr); } = diff --git a/src/common/enum.h b/src/common/enum.h index 162b6e8..5666c3b 100644 --- a/src/common/enum.h +++ b/src/common/enum.h @@ -123,7 +123,7 @@ public: * * @param key The key of the instance to search. * = - * @return A constant pointer to the instance or NULL if not found. + * @return A constant pointer to the instance or nullptr if not found. */ static const D* find(const K& key) { @@ -133,7 +133,7 @@ public: return &(*i); } } - return NULL; + return nullptr; } = = diff --git a/src/common/propertyadaptor.cpp b/src/common/propertyadaptor.cpp index 8d7d0ad..3cd12c4 100644 --- a/src/common/propertyadaptor.cpp +++ b/src/common/propertyadaptor.cpp @@ -32,14 +32,13 @@ namespace Wacom { */ class PropertyAdaptorPrivate { public: - PropertyAdaptor* adaptee; + PropertyAdaptor *adaptee =3D nullptr; }; } = PropertyAdaptor::PropertyAdaptor() : d_ptr(new PropertyAdaptorPrivate) { - Q_D( PropertyAdaptor ); - d->adaptee =3D NULL; + } = = @@ -59,7 +58,7 @@ const QList PropertyAdaptor::getProperties() co= nst { Q_D( const PropertyAdaptor ); = - if (d->adaptee !=3D NULL) { + if (d->adaptee) { return d->adaptee->getProperties(); } = @@ -71,7 +70,7 @@ const QString PropertyAdaptor::getProperty ( const Proper= ty& property ) const { Q_D( const PropertyAdaptor ); = - if (d->adaptee !=3D NULL) { + if (d->adaptee) { return d->adaptee->getProperty(property); } = @@ -90,7 +89,7 @@ bool PropertyAdaptor::setProperty ( const Property& prope= rty, const QString& val { Q_D( PropertyAdaptor ); = - if (d->adaptee !=3D NULL) { + if (d->adaptee) { return d->adaptee->setProperty(property, value); } = @@ -102,7 +101,7 @@ bool PropertyAdaptor::supportsProperty ( const Property= & property ) const { Q_D( const PropertyAdaptor ); = - if (d->adaptee !=3D NULL) { + if (d->adaptee) { return d->adaptee->supportsProperty(property); } = diff --git a/src/common/propertyset.h b/src/common/propertyset.h index 3cbc62a..146fdc6 100644 --- a/src/common/propertyset.h +++ b/src/common/propertyset.h @@ -78,7 +78,7 @@ public: * * @param id The property id to search for. * - * @return A constant pointer to the property or NULL if the property = is not supported by this set. + * @return A constant pointer to the property or nullptr if the proper= ty is not supported by this set. */ static const D* map (const Property& property) { @@ -90,7 +90,7 @@ public: } } = - return NULL; + return nullptr; } = /** diff --git a/src/common/tabletinformation.cpp b/src/common/tabletinformatio= n.cpp index ccfb053..939afe8 100644 --- a/src/common/tabletinformation.cpp +++ b/src/common/tabletinformation.cpp @@ -213,7 +213,7 @@ const DeviceInformation* TabletInformation::getDevice (= const DeviceType& deviceT TabletInformationPrivate::DeviceInformationMap::ConstIterator iter =3D= d->deviceMap.constFind(deviceType.key()); = if (iter =3D=3D d->deviceMap.constEnd()) { - return NULL; + return nullptr; } = return &(iter.value()); @@ -290,7 +290,7 @@ bool TabletInformation::hasDevice(int deviceId) const foreach (const DeviceType& type, DeviceType::list()) { const DeviceInformation* device =3D getDevice(type); = - if (device !=3D NULL && device->getDeviceId() =3D=3D deviceId) { + if (device && device->getDeviceId() =3D=3D deviceId) { return true; } } diff --git a/src/common/tabletprofile.cpp b/src/common/tabletprofile.cpp index e301aa9..a549cbf 100644 --- a/src/common/tabletprofile.cpp +++ b/src/common/tabletprofile.cpp @@ -107,7 +107,7 @@ bool TabletProfile::hasDevice(const QString& device) co= nst { const DeviceType* deviceType =3D DeviceType::find(device); = - if (deviceType =3D=3D NULL) { + if (!deviceType) { return false; } = diff --git a/src/kcmodule/calibrationdialog.cpp b/src/kcmodule/calibrationd= ialog.cpp index 9eadb74..f598c48 100644 --- a/src/kcmodule/calibrationdialog.cpp +++ b/src/kcmodule/calibrationdialog.cpp @@ -69,7 +69,7 @@ void CalibrationDialog::paintEvent( QPaintEvent *event ) Q_UNUSED( event ); = QPainter painter( this ); - painter.setPen( Qt::black ); + painter.setPen(palette().color(QPalette::WindowText)); = // vertical line painter.drawLine( m_shiftLeft + boxwidth / 2, diff --git a/src/kcmodule/tabletareaselectioncontroller.cpp b/src/kcmodule/= tabletareaselectioncontroller.cpp index c4d5acc..f7b5dd4 100644 --- a/src/kcmodule/tabletareaselectioncontroller.cpp +++ b/src/kcmodule/tabletareaselectioncontroller.cpp @@ -102,7 +102,7 @@ void TabletAreaSelectionController::setView(TabletAreaS= electionView* view) Q_D(TabletAreaSelectionController); = // cleanup signal/slot connections if we already have a view - if (d->view !=3D NULL) { + if (d->view) { disconnect(d->view, SIGNAL(signalCalibrateClicked()), this, SL= OT(onCalibrateClicked())); disconnect(d->view, SIGNAL(signalFullTabletSelection()), this, SL= OT(onFullTabletSelected())); disconnect(d->view, SIGNAL(signalScreenToggle()), this, SL= OT(onScreenToggle())); @@ -113,7 +113,7 @@ void TabletAreaSelectionController::setView(TabletAreaS= electionView* view) // save view and connect signals d->view =3D view; = - if (view !=3D NULL) { + if (view) { connect(view, SIGNAL(signalCalibrateClicked()), this, SLOT(onC= alibrateClicked())); connect(view, SIGNAL(signalFullTabletSelection()), this, SLOT(onF= ullTabletSelected())); connect(view, SIGNAL(signalScreenToggle()), this, SLOT(onS= creenToggle())); diff --git a/src/kcmodule/tabletpagewidget.cpp b/src/kcmodule/tabletpagewid= get.cpp index 0ef02df..d5899c2 100644 --- a/src/kcmodule/tabletpagewidget.cpp +++ b/src/kcmodule/tabletpagewidget.cpp @@ -174,7 +174,7 @@ void TabletPageWidget::onTabletMappingClicked() // get current rotation settings // we need to invert it as our rotation settings in this widget have a= canvas viewpoint const ScreenRotation* lookupRotation =3D ScreenRotation::find(getRotat= ion()); - ScreenRotation rotation =3D (lookupRotation !=3D NULL) ? = lookupRotation->invert() : ScreenRotation::NONE; + ScreenRotation rotation =3D lookupRotation ? lookupRotati= on->invert() : ScreenRotation::NONE; = TabletAreaSelectionDialog selectionDialog; selectionDialog.setupWidget( getScreenMap(), d->deviceNameStylus, rota= tion); @@ -197,7 +197,7 @@ void TabletPageWidget::onRotationChanged() = // we need to invert it as our rotation settings in this widget have a= canvas viewpoint // and our private member variable has a tablet viewpoint - d->tabletRotation =3D (lookupRotation !=3D NULL) ? lookupRotation->inv= ert() : ScreenRotation::NONE; + d->tabletRotation =3D lookupRotation ? lookupRotation->invert() : Scre= enRotation::NONE; = emit rotationChanged(d->tabletRotation); } @@ -336,7 +336,7 @@ void TabletPageWidget::setRotation(const QString& value) Q_D (TabletPageWidget); = const ScreenRotation* lookup =3D ScreenRotation::find(value); - ScreenRotation rotation =3D (lookup !=3D NULL) ? *lookup := ScreenRotation::NONE; + ScreenRotation rotation =3D lookup ? *lookup : ScreenRotat= ion::NONE; QString rotationValue =3D rotation.key(); = if (rotation =3D=3D ScreenRotation::AUTO) { diff --git a/src/kded/dbustabletservice.cpp b/src/kded/dbustabletservice.cpp index 8ccff9c..5cce716 100644 --- a/src/kded/dbustabletservice.cpp +++ b/src/kded/dbustabletservice.cpp @@ -92,7 +92,7 @@ QString DBusTabletService::getDeviceName(const QString &t= abletId, const QString& = const DeviceType *type =3D DeviceType::find(device); = - if (type =3D=3D NULL) { + if (!type) { errWacom << QString::fromLatin1("Unsupported device type '%1'!").a= rg(device); return unknown; } @@ -110,7 +110,7 @@ QString DBusTabletService::getInformation(const QString= &tabletId,const QString& = const TabletInfo* devinfo =3D TabletInfo::find(info); = - if (devinfo =3D=3D NULL) { + if (!devinfo) { errWacom << QString::fromLatin1("Can not get unsupported tablet in= formation '%1'!").arg(info); return unknown; } @@ -134,14 +134,14 @@ QString DBusTabletService::getProperty(const QString = &tabletId, const QString& d = const DeviceType* type =3D DeviceType::find(deviceType); = - if (type =3D=3D NULL) { + if (!type) { errWacom << QString::fromLatin1("Can not get property '%1' from in= valid device '%2'!").arg(property).arg(deviceType); return QString(); } = const Property* prop =3D Property::find(property); = - if (prop =3D=3D NULL) { + if (!prop) { errWacom << QString::fromLatin1("Can not get invalid property '%1'= from device '%2'!").arg(property).arg(deviceType); return QString(); } @@ -189,14 +189,14 @@ void DBusTabletService::setProperty(const QString &ta= bletId, const QString& devi = const DeviceType* type =3D DeviceType::find(deviceType); = - if (type =3D=3D NULL) { + if (!type) { errWacom << QString::fromLatin1("Can not set property '%1' on inva= lid device '%2' to '%3'!").arg(property).arg(deviceType).arg(value); return; } = const Property* prop =3D Property::find(property); = - if (prop =3D=3D NULL) { + if (!prop) { errWacom << QString::fromLatin1("Can not set invalid property '%1'= on device '%2' to '%3'!").arg(property).arg(deviceType).arg(value); return; } diff --git a/src/kded/procsystemadaptor.cpp b/src/kded/procsystemadaptor.cpp index fe9f0ba..bc268f2 100644 --- a/src/kded/procsystemadaptor.cpp +++ b/src/kded/procsystemadaptor.cpp @@ -36,9 +36,9 @@ class ProcSystemAdaptorPrivate = = ProcSystemAdaptor::ProcSystemAdaptor(const QString& deviceName) - : PropertyAdaptor(NULL), d_ptr(new ProcSystemAdaptorPrivate) + : PropertyAdaptor(nullptr), d_ptr(new ProcSystemAdaptorPrivate) { - Q_D( ProcSystemAdaptor ); + Q_D(ProcSystemAdaptor); d->deviceName =3D deviceName; } = @@ -104,6 +104,6 @@ bool ProcSystemAdaptor::setProperty(const Property& pro= perty, const QString& val = bool ProcSystemAdaptor::supportsProperty(const Property& property) const { - return (ProcSystemProperty::map(property) !=3D NULL); + return (ProcSystemProperty::map(property)); } = diff --git a/src/kded/tabletdaemon.cpp b/src/kded/tabletdaemon.cpp index 5181a81..62385c5 100644 --- a/src/kded/tabletdaemon.cpp +++ b/src/kded/tabletdaemon.cpp @@ -132,7 +132,7 @@ void TabletDaemon::setupActions() //if someone adds another action also add it to kcmodule/generalwidget= .cpp = // This method is called multiple times - make sure the action collect= ion is only created once. - if (d->actionCollection.get() =3D=3D NULL) { + if (!d->actionCollection) { d->actionCollection =3D std::shared_ptr(new GlobalA= ctions(false, this)); d->actionCollection->setConfigGlobal(true); } diff --git a/src/kded/tablethandler.cpp b/src/kded/tablethandler.cpp index dfc4dd2..7159173 100644 --- a/src/kded/tablethandler.cpp +++ b/src/kded/tablethandler.cpp @@ -62,7 +62,7 @@ namespace Wacom using namespace Wacom; = TabletHandler::TabletHandler() - : TabletHandlerInterface(NULL), d_ptr(new TabletHandlerPrivate) + : TabletHandlerInterface(nullptr), d_ptr(new TabletHandlerPrivate) { Q_D( TabletHandler ); = @@ -72,7 +72,7 @@ TabletHandler::TabletHandler() = = TabletHandler::TabletHandler(const QString& profileFile, const QString con= figFile) - : TabletHandlerInterface(NULL), d_ptr(new TabletHandlerPrivate) + : TabletHandlerInterface(nullptr), d_ptr(new TabletHandlerPrivate) { Q_D( TabletHandler ); = @@ -94,7 +94,7 @@ QString TabletHandler::getProperty(const QString &tabletI= d, const DeviceType& de { Q_D( const TabletHandler ); = - if( !d->tabletBackendList.contains(tabletId) || d->tabletBackendList.v= alue(tabletId) =3D=3D NULL) { + if( !d->tabletBackendList.contains(tabletId) || d->tabletBackendList.v= alue(tabletId) =3D=3D nullptr) { errWacom << QString::fromLatin1("Unable to get property '%1' from = device '%2' as no device is currently available!").arg(property.key()).arg(= deviceType.key()); return QString(); } @@ -127,7 +127,7 @@ void TabletHandler::onTabletAdded( const TabletInformat= ion& info ) // create tablet backend TabletBackendInterface *tbi =3D TabletBackendFactory::createBackend(in= fo); = - if (tbi =3D=3D NULL) { + if (!tbi) { errWacom << "Could not create tablet backend interface. Ignoring T= ablet"; return; // no valid backend found } @@ -606,7 +606,7 @@ bool TabletHandler::hasTablet(const QString &tabletId) = const Q_D( const TabletHandler ); = return (d->tabletBackendList.contains(tabletId) && - d->tabletBackendList.value(tabletId) !=3D NULL); + d->tabletBackendList.value(tabletId) !=3D nullptr); } = = diff --git a/src/kded/x11tabletfinder.cpp b/src/kded/x11tabletfinder.cpp index 81addc2..ea2e3ce 100644 --- a/src/kded/x11tabletfinder.cpp +++ b/src/kded/x11tabletfinder.cpp @@ -202,7 +202,7 @@ const DeviceType* X11TabletFinder::getDeviceType (const= QString& toolType) const return &(DeviceType::Stylus); } = - return NULL; + return nullptr; } = = @@ -272,7 +272,7 @@ const QString X11TabletFinder::getToolType (X11InputDev= ice& device) const = #if defined(HAVE_XCB_XINPUT) xcb_get_atom_name_cookie_t cookie =3D xcb_get_atom_name(QX11Info::= connection(), toolTypeAtoms.at(0)); - xcb_get_atom_name_reply_t* reply =3D xcb_get_atom_name_reply(QX11I= nfo::connection(), cookie, NULL); + xcb_get_atom_name_reply_t* reply =3D xcb_get_atom_name_reply(QX11I= nfo::connection(), cookie, nullptr); if (reply) { toolTypeName =3D QString::fromLatin1(QByteArray(xcb_get_atom_n= ame_name(reply), xcb_get_atom_name_name_length(reply))); free(reply); @@ -280,7 +280,7 @@ const QString X11TabletFinder::getToolType (X11InputDev= ice& device) const = #else // HAVE_XCB_XINPUT char *type_name =3D XGetAtomName (device.getDisplay(), (Atom)toolT= ypeAtoms.at(0)); - if (type_name !=3D NULL) { + if (type_name !=3D nullptr) { toolTypeName =3D QLatin1String(type_name); XFree( type_name ); } else { diff --git a/src/kded/xinputadaptor.cpp b/src/kded/xinputadaptor.cpp index fd626d9..6528350 100644 --- a/src/kded/xinputadaptor.cpp +++ b/src/kded/xinputadaptor.cpp @@ -47,7 +47,7 @@ class XinputAdaptorPrivate = = XinputAdaptor::XinputAdaptor(const QString& deviceName) - : PropertyAdaptor(NULL), d_ptr(new XinputAdaptorPrivate) + : PropertyAdaptor(nullptr), d_ptr(new XinputAdaptorPrivate) { Q_D( XinputAdaptor ); d->deviceName =3D deviceName; @@ -72,9 +72,9 @@ const QString XinputAdaptor::getProperty(const Property& = property) const { Q_D(const XinputAdaptor); = - const XinputProperty* xinputproperty =3D XinputProperty::map(property); + const XinputProperty *xinputproperty =3D XinputProperty::map(property); = - if (xinputproperty =3D=3D NULL) { + if (!xinputproperty) { errWacom << QString::fromLatin1("Can not get unsupported property = '%1' from device '%2' using xinput!").arg(property.key()).arg(d->deviceName= ); return QString(); } @@ -94,9 +94,9 @@ bool XinputAdaptor::setProperty(const Property& property,= const QString& value) = dbgWacom << QString::fromLatin1("Setting property '%1' to '%2'.").arg(= property.key()).arg(value); = - const XinputProperty* xinputproperty =3D XinputProperty::map(property); + const XinputProperty *xinputproperty =3D XinputProperty::map(property); = - if (xinputproperty =3D=3D NULL) { + if (!xinputproperty) { errWacom << QString::fromLatin1("Can not set unsupported property = '%1' to '%2' on device '%3' using xinput!").arg(property.key()).arg(value).= arg(d->deviceName); return false; } @@ -112,7 +112,7 @@ bool XinputAdaptor::setProperty(const Property& propert= y, const QString& value) = bool XinputAdaptor::supportsProperty(const Property& property) const { - return (XinputProperty::map(property) !=3D NULL); + return (XinputProperty::map(property) !=3D nullptr); } = = diff --git a/src/kded/xsetwacomadaptor.cpp b/src/kded/xsetwacomadaptor.cpp index ed6280b..256f325 100644 --- a/src/kded/xsetwacomadaptor.cpp +++ b/src/kded/xsetwacomadaptor.cpp @@ -41,7 +41,7 @@ class XsetwacomAdaptorPrivate = = XsetwacomAdaptor::XsetwacomAdaptor(const QString& deviceName) - : PropertyAdaptor(NULL), d_ptr(new XsetwacomAdaptorPrivate) + : PropertyAdaptor(nullptr), d_ptr(new XsetwacomAdaptorPrivate) { Q_D( XsetwacomAdaptor ); d->device =3D deviceName; @@ -49,7 +49,7 @@ XsetwacomAdaptor::XsetwacomAdaptor(const QString& deviceN= ame) = = XsetwacomAdaptor::XsetwacomAdaptor(const QString& deviceName, const QMap< = QString, QString >& buttonMap) - : PropertyAdaptor(NULL), d_ptr(new XsetwacomAdaptorPrivate) + : PropertyAdaptor(nullptr), d_ptr(new XsetwacomAdaptorPrivate) { Q_D( XsetwacomAdaptor ); = @@ -73,9 +73,9 @@ const QString XsetwacomAdaptor::getProperty(const Propert= y& property) const { Q_D( const XsetwacomAdaptor ); = - const XsetwacomProperty* xsetproperty =3D XsetwacomProperty::map(prope= rty); + const XsetwacomProperty *xsetproperty =3D XsetwacomProperty::map(prope= rty); = - if (xsetproperty =3D=3D NULL) { + if (!xsetproperty) { errWacom << QString::fromLatin1("Can not get unsupported property = '%1' using xsetwacom!").arg(property.key()); return QString(); } @@ -100,9 +100,9 @@ bool XsetwacomAdaptor::setProperty(const Property& prop= erty, const QString& valu = dbgWacom << QString::fromLatin1("Setting property '%1' to '%2' on devi= ce '%3'.").arg(property.key()).arg(value).arg(d->device); = - const XsetwacomProperty* xsetproperty =3D XsetwacomProperty::map(prope= rty); + const XsetwacomProperty *xsetproperty =3D XsetwacomProperty::map(prope= rty); = - if (xsetproperty =3D=3D NULL) { + if (!xsetproperty) { errWacom << QString::fromLatin1("Can not set unsupported property = '%1' to '%2' on device '%3' using xsetwacom!").arg(property.key()).arg(valu= e).arg(d->device); return false; } @@ -129,7 +129,7 @@ bool XsetwacomAdaptor::setProperty(const Property& prop= erty, const QString& valu = bool XsetwacomAdaptor::supportsProperty(const Property& property) const { - return (XsetwacomProperty::map(property) !=3D NULL); + return (XsetwacomProperty::map(property) !=3D nullptr); } = = @@ -228,7 +228,7 @@ bool XsetwacomAdaptor::setRotation(const QString& value) Q_D( const XsetwacomAdaptor ); = const ScreenRotation* lookup =3D ScreenRotation::find(value); - ScreenRotation rotation =3D (lookup !=3D NULL) ? *lookup : Scre= enRotation::NONE; + ScreenRotation rotation =3D lookup ? *lookup : ScreenRotation::= NONE; = // only accept real rotations if (rotation =3D=3D ScreenRotation::NONE || rotation =3D=3D ScreenRota= tion::CW ||