diff options
Diffstat (limited to 'src/platformsupport')
20 files changed, 81 insertions, 81 deletions
diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp index 969a9c17e0..733d6dc531 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp @@ -428,7 +428,7 @@ static void populateFromPattern(FcPattern *pattern) if (res == FcResultMatch) { bool hasLang = false; #if FC_VERSION >= 20297 - FcChar8 *cap = Q_NULLPTR; + FcChar8 *cap = nullptr; FcResult capRes = FcResultNoMatch; #endif for (int j = 1; j < QFontDatabase::WritingSystemsCount; ++j) { @@ -438,7 +438,7 @@ static void populateFromPattern(FcPattern *pattern) if (langRes != FcLangDifferentLang) { #if FC_VERSION >= 20297 if (*capabilityForWritingSystem[j] && requiresOpenType(j)) { - if (cap == Q_NULLPTR) + if (cap == nullptr) capRes = FcPatternGetString(pattern, FC_CAPABILITY, 0, &cap); if (capRes == FcResultMatch && strstr(reinterpret_cast<const char *>(cap), capabilityForWritingSystem[j]) == 0) continue; diff --git a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp index 64a0ef6fe8..cf0314fa47 100644 --- a/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp +++ b/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp @@ -1542,7 +1542,7 @@ QFontEngineFT::QGlyphSet *QFontEngineFT::loadGlyphSet(const QTransform &matrix) // FT_Set_Transform only supports scalable fonts if (!FT_IS_SCALABLE(freetype->face)) - return matrix.type() <= QTransform::TxTranslate ? &defaultGlyphSet : Q_NULLPTR; + return matrix.type() <= QTransform::TxTranslate ? &defaultGlyphSet : nullptr; FT_Matrix m = QTransformToFTMatrix(matrix); @@ -1961,7 +1961,7 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixe static inline QImage alphaMapFromGlyphData(QFontEngineFT::Glyph *glyph, QFontEngine::GlyphFormat glyphFormat) { - if (glyph == Q_NULLPTR || glyph->height == 0 || glyph->width == 0) + if (glyph == nullptr || glyph->height == 0 || glyph->width == 0) return QImage(); QImage::Format format = QImage::Format_Invalid; @@ -2009,14 +2009,14 @@ QImage *QFontEngineFT::lockedAlphaMapForGlyph(glyph_t glyphIndex, QFixed subPixe currentlyLockedAlphaMap = alphaMapFromGlyphData(glyph, neededFormat); - const bool glyphHasGeometry = glyph != Q_NULLPTR && glyph->height != 0 && glyph->width != 0; + const bool glyphHasGeometry = glyph != nullptr && glyph->height != 0 && glyph->width != 0; if (!cacheEnabled && glyph != &emptyGlyph) { currentlyLockedAlphaMap = currentlyLockedAlphaMap.copy(); delete glyph; } if (!glyphHasGeometry) - return Q_NULLPTR; + return nullptr; if (currentlyLockedAlphaMap.isNull()) return QFontEngine::lockedAlphaMapForGlyph(glyphIndex, subPixelPosition, neededFormat, t, offset); @@ -2114,7 +2114,7 @@ QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, QFixed subPixelPosition, co QImage QFontEngineFT::bitmapForGlyph(glyph_t g, QFixed subPixelPosition, const QTransform &t) { Glyph *glyph = loadGlyphFor(g, subPixelPosition, defaultFormat, t); - if (glyph == Q_NULLPTR) + if (glyph == nullptr) return QImage(); QImage img; diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp index d3e4daa341..1f976be066 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase.cpp @@ -77,19 +77,19 @@ typedef HRESULT (WINAPI *DWriteCreateFactoryType)(DWRITE_FACTORY_TYPE, const IID static inline DWriteCreateFactoryType resolveDWriteCreateFactory() { if (QSysInfo::windowsVersion() < QSysInfo::WV_VISTA) - return Q_NULLPTR; + return nullptr; QSystemLibrary library(QStringLiteral("dwrite")); QFunctionPointer result = library.resolve("DWriteCreateFactory"); if (Q_UNLIKELY(!result)) { qWarning("Unable to load dwrite.dll"); - return Q_NULLPTR; + return nullptr; } return reinterpret_cast<DWriteCreateFactoryType>(result); } static void createDirectWriteFactory(IDWriteFactory **factory) { - *factory = Q_NULLPTR; + *factory = nullptr; static const DWriteCreateFactoryType dWriteCreateFactory = resolveDWriteCreateFactory(); if (!dWriteCreateFactory) @@ -539,7 +539,7 @@ namespace { class CustomFontFileLoader { public: - CustomFontFileLoader() : m_directWriteFontFileLoader(Q_NULLPTR) + CustomFontFileLoader() : m_directWriteFontFileLoader(nullptr) { createDirectWriteFactory(&m_directWriteFactory); @@ -1128,7 +1128,7 @@ static int QT_WIN_CALLBACK storeFont(const LOGFONT *logFont, const TEXTMETRIC *t // NEWTEXTMETRICEX (passed for TT fonts) is a NEWTEXTMETRIC, which according // to the documentation is identical to a TEXTMETRIC except for the last four // members, which we don't use anyway - const FONTSIGNATURE *signature = Q_NULLPTR; + const FONTSIGNATURE *signature = nullptr; if (type & TRUETYPE_FONTTYPE) signature = &reinterpret_cast<const NEWTEXTMETRICEX *>(textmetric)->ntmFontSig; addFontToDatabase(familyName, styleName, *logFont, textmetric, signature, type); @@ -1909,7 +1909,7 @@ QFontEngine *QWindowsFontDatabase::createEngine(const QFontDef &request, const Q } else { bool isColorFont = false; #if defined(QT_USE_DIRECTWRITE2) - IDWriteFontFace2 *directWriteFontFace2 = Q_NULLPTR; + IDWriteFontFace2 *directWriteFontFace2 = nullptr; if (SUCCEEDED(directWriteFontFace->QueryInterface(__uuidof(IDWriteFontFace2), reinterpret_cast<void **>(&directWriteFontFace2)))) { if (directWriteFontFace2->IsColorFont()) diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp index 3f03b30f10..78477de38a 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontdatabase_ft.cpp @@ -144,7 +144,7 @@ static FontKeys &fontKeys() return result; } -static const FontKey *findFontKey(const QString &name, int *indexIn = Q_NULLPTR) +static const FontKey *findFontKey(const QString &name, int *indexIn = nullptr) { const FontKeys &keys = fontKeys(); for (auto it = keys.constBegin(), cend = keys.constEnd(); it != cend; ++it) { @@ -157,7 +157,7 @@ static const FontKey *findFontKey(const QString &name, int *indexIn = Q_NULLPTR) } if (indexIn) *indexIn = -1; - return Q_NULLPTR; + return nullptr; } static bool addFontToDatabase(QString familyName, @@ -310,7 +310,7 @@ static int QT_WIN_CALLBACK storeFont(const LOGFONT *logFont, const TEXTMETRIC *t // NEWTEXTMETRICEX (passed for TT fonts) is a NEWTEXTMETRIC, which according // to the documentation is identical to a TEXTMETRIC except for the last four // members, which we don't use anyway - const FONTSIGNATURE *signature = Q_NULLPTR; + const FONTSIGNATURE *signature = nullptr; if (type & TRUETYPE_FONTTYPE) signature = &reinterpret_cast<const NEWTEXTMETRICEX *>(textmetric)->ntmFontSig; addFontToDatabase(faceName, styleName, fullName, *logFont, textmetric, signature, type); diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp index f07e711048..0e017c3b77 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp @@ -282,7 +282,7 @@ static UUID uuidIdWriteLocalFontFileLoader() QString QWindowsFontEngineDirectWrite::filenameFromFontFile(IDWriteFontFile *fontFile) { - IDWriteFontFileLoader *loader = Q_NULLPTR; + IDWriteFontFileLoader *loader = nullptr; HRESULT hr = fontFile->GetLoader(&loader); if (FAILED(hr)) { @@ -290,11 +290,11 @@ QString QWindowsFontEngineDirectWrite::filenameFromFontFile(IDWriteFontFile *fon return QString(); } - QIdWriteLocalFontFileLoader *localLoader = Q_NULLPTR; + QIdWriteLocalFontFileLoader *localLoader = nullptr; hr = loader->QueryInterface(uuidIdWriteLocalFontFileLoader(), reinterpret_cast<void **>(&localLoader)); - const void *fontFileReferenceKey = Q_NULLPTR; + const void *fontFileReferenceKey = nullptr; UINT32 fontFileReferenceKeySize = 0; if (SUCCEEDED(hr)) { hr = fontFile->GetReferenceKey(&fontFileReferenceKey, @@ -326,10 +326,10 @@ QString QWindowsFontEngineDirectWrite::filenameFromFontFile(IDWriteFontFile *fon ret = QString::fromWCharArray(filePath.data()); } - if (localLoader != Q_NULLPTR) + if (localLoader != nullptr) localLoader->Release(); - if (loader != Q_NULLPTR) + if (loader != nullptr) loader->Release(); return ret; } @@ -349,7 +349,7 @@ void QWindowsFontEngineDirectWrite::collectMetrics() m_lineGap = DESIGN_TO_LOGICAL(metrics.lineGap); m_underlinePosition = DESIGN_TO_LOGICAL(metrics.underlinePosition); - IDWriteFontFile *fontFile = Q_NULLPTR; + IDWriteFontFile *fontFile = nullptr; UINT32 numberOfFiles = 1; if (SUCCEEDED(m_directWriteFontFace->GetFiles(&numberOfFiles, &fontFile))) { m_faceId.filename = QFile::encodeName(filenameFromFontFile(fontFile)); @@ -713,7 +713,7 @@ QImage QWindowsFontEngineDirectWrite::imageForGlyph(glyph_t t, #if defined(QT_USE_DIRECTWRITE2) HRESULT hr = DWRITE_E_NOCOLOR; IDWriteColorGlyphRunEnumerator *enumerator = 0; - IDWriteFactory2 *factory2 = Q_NULLPTR; + IDWriteFactory2 *factory2 = nullptr; if (glyphFormat == QFontEngine::Format_ARGB && SUCCEEDED(m_fontEngineData->directWriteFactory->QueryInterface(__uuidof(IDWriteFactory2), reinterpret_cast<void **>(&factory2)))) { diff --git a/src/platformsupport/fontdatabases/windows/qwindowsnativeimage.cpp b/src/platformsupport/fontdatabases/windows/qwindowsnativeimage.cpp index f8fcff952a..67a6619b91 100644 --- a/src/platformsupport/fontdatabases/windows/qwindowsnativeimage.cpp +++ b/src/platformsupport/fontdatabases/windows/qwindowsnativeimage.cpp @@ -98,7 +98,7 @@ static inline HBITMAP createDIB(HDC hdc, int width, int height, bmi.blueMask = 0; } - uchar *bits = Q_NULLPTR; + uchar *bits = nullptr; HBITMAP bitmap = CreateDIBSection(hdc, reinterpret_cast<BITMAPINFO *>(&bmi), DIB_RGB_COLORS, reinterpret_cast<void **>(&bits), 0, 0); if (Q_UNLIKELY(!bitmap || !bits)) diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp index 5c87cb7c9c..d6c7173d3c 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp @@ -71,7 +71,7 @@ void QFdContainer::reset() Q_DECL_NOTHROW } QEvdevKeyboardHandler::QEvdevKeyboardHandler(const QString &device, QFdContainer &fd, bool disableZap, bool enableCompose, const QString &keymapFile) - : m_device(device), m_fd(fd.release()), m_notify(Q_NULLPTR), + : m_device(device), m_fd(fd.release()), m_notify(nullptr), m_modifiers(0), m_composing(0), m_dead_unicode(0xffff), m_no_zap(disableZap), m_do_compose(enableCompose), m_keymap(0), m_keymap_size(0), m_keycompose(0), m_keycompose_size(0) @@ -172,7 +172,7 @@ void QEvdevKeyboardHandler::readKeycode() // by the above error over and over again. if (errno == ENODEV) { delete m_notify; - m_notify = Q_NULLPTR; + m_notify = nullptr; m_fd.reset(); } return; diff --git a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp index 562e7e2821..bcc5a21669 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp +++ b/src/platformsupport/input/evdevmouse/qevdevmousehandler.cpp @@ -209,7 +209,7 @@ void QEvdevMouseHandler::readMouseData() // by the above error over and over again. if (errno == ENODEV) { delete m_notify; - m_notify = Q_NULLPTR; + m_notify = nullptr; qt_safe_close(m_fd); m_fd = -1; } diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 8cce403b31..15e00cea82 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -190,9 +190,9 @@ static inline bool testBit(long bit, const long *array) #endif QEvdevTouchScreenHandler::QEvdevTouchScreenHandler(const QString &device, const QString &spec, QObject *parent) - : QObject(parent), m_notify(Q_NULLPTR), m_fd(-1), d(Q_NULLPTR), m_device(Q_NULLPTR) + : QObject(parent), m_notify(nullptr), m_fd(-1), d(nullptr), m_device(nullptr) #if QT_CONFIG(mtdev) - , m_mtdev(Q_NULLPTR) + , m_mtdev(nullptr) #endif { setObjectName(QLatin1String("Evdev Touch Handler")); @@ -425,7 +425,7 @@ err: qErrnoWarning(errno, "evdevtouch: Could not read from input device"); if (errno == ENODEV) { // device got disconnected -> stop reading delete m_notify; - m_notify = Q_NULLPTR; + m_notify = nullptr; QT_CLOSE(m_fd); m_fd = -1; @@ -464,7 +464,7 @@ void QEvdevTouchScreenHandler::unregisterTouchDevice() delete m_device; } - m_device = Q_NULLPTR; + m_device = nullptr; } void QEvdevTouchScreenData::addTouchPoint(const Contact &contact, Qt::TouchPointStates *combinedStates) @@ -779,13 +779,13 @@ void QEvdevTouchScreenData::reportPoints() if (m_filtered) emit q->touchPointsUpdated(); else - QWindowSystemInterface::handleTouchEvent(Q_NULLPTR, q->touchDevice(), m_touchPoints); + QWindowSystemInterface::handleTouchEvent(nullptr, q->touchDevice(), m_touchPoints); } QEvdevTouchScreenHandlerThread::QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent) - : QDaemonThread(parent), m_device(device), m_spec(spec), m_handler(Q_NULLPTR), m_touchDeviceRegistered(false) + : QDaemonThread(parent), m_device(device), m_spec(spec), m_handler(nullptr), m_touchDeviceRegistered(false) , m_touchUpdatePending(false) - , m_filterWindow(Q_NULLPTR) + , m_filterWindow(nullptr) , m_touchRate(-1) { start(); @@ -810,7 +810,7 @@ void QEvdevTouchScreenHandlerThread::run() exec(); delete m_handler; - m_handler = Q_NULLPTR; + m_handler = nullptr; } bool QEvdevTouchScreenHandlerThread::isTouchDeviceRegistered() const @@ -951,7 +951,7 @@ void QEvdevTouchScreenHandlerThread::filterAndSendTouchPoints() m_filteredPoints = filteredPoints; - QWindowSystemInterface::handleTouchEvent(Q_NULLPTR, + QWindowSystemInterface::handleTouchEvent(nullptr, m_handler->touchDevice(), points); } diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h b/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h index b93744815c..04e22e1b5e 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler_p.h @@ -75,7 +75,7 @@ class QEvdevTouchScreenHandler : public QObject Q_OBJECT public: - explicit QEvdevTouchScreenHandler(const QString &device, const QString &spec = QString(), QObject *parent = Q_NULLPTR); + explicit QEvdevTouchScreenHandler(const QString &device, const QString &spec = QString(), QObject *parent = nullptr); ~QEvdevTouchScreenHandler(); QTouchDevice *touchDevice() const; @@ -108,7 +108,7 @@ class QEvdevTouchScreenHandlerThread : public QDaemonThread { Q_OBJECT public: - explicit QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent = Q_NULLPTR); + explicit QEvdevTouchScreenHandlerThread(const QString &device, const QString &spec, QObject *parent = nullptr); ~QEvdevTouchScreenHandlerThread(); void run() override; diff --git a/src/platformsupport/input/libinput/qlibinputhandler.cpp b/src/platformsupport/input/libinput/qlibinputhandler.cpp index 961eb3539f..4775eb0724 100644 --- a/src/platformsupport/input/libinput/qlibinputhandler.cpp +++ b/src/platformsupport/input/libinput/qlibinputhandler.cpp @@ -94,7 +94,7 @@ QLibInputHandler::QLibInputHandler(const QString &key, const QString &spec) if (Q_UNLIKELY(!m_udev)) qFatal("Failed to get udev context for libinput"); - m_li = libinput_udev_create_context(&liInterface, Q_NULLPTR, m_udev); + m_li = libinput_udev_create_context(&liInterface, nullptr, m_udev); if (Q_UNLIKELY(!m_li)) qFatal("Failed to get libinput context"); @@ -137,7 +137,7 @@ void QLibInputHandler::onReadyRead() } libinput_event *ev; - while ((ev = libinput_get_event(m_li)) != Q_NULLPTR) { + while ((ev = libinput_get_event(m_li)) != nullptr) { processEvent(ev); libinput_event_destroy(ev); } diff --git a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp index f14a2e8f04..21f7fde7c8 100644 --- a/src/platformsupport/input/libinput/qlibinputkeyboard.cpp +++ b/src/platformsupport/input/libinput/qlibinputkeyboard.cpp @@ -143,7 +143,7 @@ QLibInputKeyboard::QLibInputKeyboard() qWarning("Failed to create xkb context"); return; } - m_keymap = xkb_keymap_new_from_names(m_ctx, Q_NULLPTR, XKB_KEYMAP_COMPILE_NO_FLAGS); + m_keymap = xkb_keymap_new_from_names(m_ctx, nullptr, XKB_KEYMAP_COMPILE_NO_FLAGS); if (!m_keymap) { qWarning("Failed to compile keymap"); return; @@ -211,7 +211,7 @@ void QLibInputKeyboard::processKey(libinput_event_keyboard *e) xkb_state_update_key(m_state, k, pressed ? XKB_KEY_DOWN : XKB_KEY_UP); - QWindowSystemInterface::handleExtendedKeyEvent(Q_NULLPTR, + QWindowSystemInterface::handleExtendedKeyEvent(nullptr, pressed ? QEvent::KeyPress : QEvent::KeyRelease, qtkey, mods, k, sym, mods, text); @@ -237,7 +237,7 @@ void QLibInputKeyboard::processKey(libinput_event_keyboard *e) #ifndef QT_NO_XKBCOMMON_EVDEV void QLibInputKeyboard::handleRepeat() { - QWindowSystemInterface::handleExtendedKeyEvent(Q_NULLPTR, QEvent::KeyPress, + QWindowSystemInterface::handleExtendedKeyEvent(nullptr, QEvent::KeyPress, m_repeatData.qtkey, m_repeatData.mods, m_repeatData.nativeScanCode, m_repeatData.virtualKey, m_repeatData.nativeMods, m_repeatData.unicodeText, true, m_repeatData.repeatCount); diff --git a/src/platformsupport/input/libinput/qlibinputpointer.cpp b/src/platformsupport/input/libinput/qlibinputpointer.cpp index bdeac8db7e..b20cc4c095 100644 --- a/src/platformsupport/input/libinput/qlibinputpointer.cpp +++ b/src/platformsupport/input/libinput/qlibinputpointer.cpp @@ -78,7 +78,7 @@ void QLibInputPointer::processButton(libinput_event_pointer *e) m_buttons.setFlag(button, pressed); - QWindowSystemInterface::handleMouseEvent(Q_NULLPTR, m_pos, m_pos, m_buttons, QGuiApplication::keyboardModifiers()); + QWindowSystemInterface::handleMouseEvent(nullptr, m_pos, m_pos, m_buttons, QGuiApplication::keyboardModifiers()); } void QLibInputPointer::processMotion(libinput_event_pointer *e) @@ -91,7 +91,7 @@ void QLibInputPointer::processMotion(libinput_event_pointer *e) m_pos.setX(qBound(g.left(), qRound(m_pos.x() + dx), g.right())); m_pos.setY(qBound(g.top(), qRound(m_pos.y() + dy), g.bottom())); - QWindowSystemInterface::handleMouseEvent(Q_NULLPTR, m_pos, m_pos, m_buttons, QGuiApplication::keyboardModifiers()); + QWindowSystemInterface::handleMouseEvent(nullptr, m_pos, m_pos, m_buttons, QGuiApplication::keyboardModifiers()); } void QLibInputPointer::processAxis(libinput_event_pointer *e) @@ -100,15 +100,15 @@ void QLibInputPointer::processAxis(libinput_event_pointer *e) const double v = libinput_event_pointer_get_axis_value(e) * 120; const Qt::Orientation ori = libinput_event_pointer_get_axis(e) == LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL ? Qt::Vertical : Qt::Horizontal; - QWindowSystemInterface::handleWheelEvent(Q_NULLPTR, m_pos, m_pos, qRound(-v), ori, QGuiApplication::keyboardModifiers()); + QWindowSystemInterface::handleWheelEvent(nullptr, m_pos, m_pos, qRound(-v), ori, QGuiApplication::keyboardModifiers()); #else if (libinput_event_pointer_has_axis(e, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL)) { const double v = libinput_event_pointer_get_axis_value(e, LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL) * 120; - QWindowSystemInterface::handleWheelEvent(Q_NULLPTR, m_pos, m_pos, qRound(-v), Qt::Vertical, QGuiApplication::keyboardModifiers()); + QWindowSystemInterface::handleWheelEvent(nullptr, m_pos, m_pos, qRound(-v), Qt::Vertical, QGuiApplication::keyboardModifiers()); } if (libinput_event_pointer_has_axis(e, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL)) { const double v = libinput_event_pointer_get_axis_value(e, LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL) * 120; - QWindowSystemInterface::handleWheelEvent(Q_NULLPTR, m_pos, m_pos, qRound(-v), Qt::Horizontal, QGuiApplication::keyboardModifiers()); + QWindowSystemInterface::handleWheelEvent(nullptr, m_pos, m_pos, qRound(-v), Qt::Horizontal, QGuiApplication::keyboardModifiers()); } #endif } diff --git a/src/platformsupport/input/libinput/qlibinputtouch.cpp b/src/platformsupport/input/libinput/qlibinputtouch.cpp index 42925a18e1..a65bc91c39 100644 --- a/src/platformsupport/input/libinput/qlibinputtouch.cpp +++ b/src/platformsupport/input/libinput/qlibinputtouch.cpp @@ -53,7 +53,7 @@ QWindowSystemInterface::TouchPoint *QLibInputTouch::DeviceState::point(int32_t s if (m_points.at(i).id == id) return &m_points[i]; - return Q_NULLPTR; + return nullptr; } QLibInputTouch::DeviceState *QLibInputTouch::deviceState(libinput_event_touch *e) @@ -150,7 +150,7 @@ void QLibInputTouch::processTouchCancel(libinput_event_touch *e) { DeviceState *state = deviceState(e); if (state->m_touchDevice) - QWindowSystemInterface::handleTouchCancelEvent(Q_NULLPTR, state->m_touchDevice, QGuiApplication::keyboardModifiers()); + QWindowSystemInterface::handleTouchCancelEvent(nullptr, state->m_touchDevice, QGuiApplication::keyboardModifiers()); else qWarning("TouchCancel without registered device"); } @@ -165,7 +165,7 @@ void QLibInputTouch::processTouchFrame(libinput_event_touch *e) if (state->m_points.isEmpty()) return; - QWindowSystemInterface::handleTouchEvent(Q_NULLPTR, state->m_touchDevice, state->m_points, + QWindowSystemInterface::handleTouchEvent(nullptr, state->m_touchDevice, state->m_points, QGuiApplication::keyboardModifiers()); for (int i = 0; i < state->m_points.count(); ++i) { diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp index 48ad984bf5..f001f3219d 100644 --- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp +++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp @@ -170,7 +170,7 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources, const int crtc = crtcForConnector(resources, connector); if (crtc < 0) { qWarning() << "No usable crtc/encoder pair for connector" << connectorName; - return Q_NULLPTR; + return nullptr; } OutputConfiguration configuration; @@ -217,14 +217,14 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources, if (configuration == OutputConfigOff) { qCDebug(qLcKmsDebug) << "Turning off output" << connectorName; - drmModeSetCrtc(m_dri_fd, crtc_id, 0, 0, 0, 0, 0, Q_NULLPTR); - return Q_NULLPTR; + drmModeSetCrtc(m_dri_fd, crtc_id, 0, 0, 0, 0, 0, nullptr); + return nullptr; } // Skip disconnected output if (configuration == OutputConfigPreferred && connector->connection == DRM_MODE_DISCONNECTED) { qCDebug(qLcKmsDebug) << "Skipping disconnected output" << connectorName; - return Q_NULLPTR; + return nullptr; } // Get the current mode on the current crtc @@ -235,7 +235,7 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources, drmModeFreeEncoder(encoder); if (!crtc) - return Q_NULLPTR; + return nullptr; if (crtc->mode_valid) crtc_mode = crtc->mode; @@ -305,7 +305,7 @@ QPlatformScreen *QKmsDevice::createScreenForConnector(drmModeResPtr resources, if (selected_mode < 0) { qWarning() << "No modes available for output" << connectorName; - return Q_NULLPTR; + return nullptr; } else { int width = modes[selected_mode].hdisplay; int height = modes[selected_mode].vdisplay; @@ -438,7 +438,7 @@ drmModePropertyPtr QKmsDevice::connectorProperty(drmModeConnectorPtr connector, drmModeFreeProperty(prop); } - return Q_NULLPTR; + return nullptr; } drmModePropertyBlobPtr QKmsDevice::connectorPropertyBlob(drmModeConnectorPtr connector, const QByteArray &name) diff --git a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp index b24491b187..5b5ed2c9b7 100644 --- a/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp +++ b/src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp @@ -196,7 +196,7 @@ void QOpenGLCompositorBackingStore::flush(QWindow *window, const QRegion ®ion dstCtx->makeCurrent(dstWin); updateTexture(); m_textures->clear(); - m_textures->appendTexture(Q_NULLPTR, m_bsTexture, window->geometry()); + m_textures->appendTexture(nullptr, m_bsTexture, window->geometry()); compositor->update(); } @@ -234,7 +234,7 @@ void QOpenGLCompositorBackingStore::composeAndFlush(QWindow *window, const QRegi textures->clipRect(i), textures->flags(i)); updateTexture(); - m_textures->appendTexture(Q_NULLPTR, m_bsTexture, window->geometry()); + m_textures->appendTexture(nullptr, m_bsTexture, window->geometry()); textures->lock(true); m_lockedWidgetTextures = textures; @@ -281,7 +281,7 @@ void QOpenGLCompositorBackingStore::resize(const QSize &size, const QRegion &sta if (m_bsTexture) { glDeleteTextures(1, &m_bsTexture); m_bsTexture = 0; - m_bsTextureContext = Q_NULLPTR; + m_bsTextureContext = nullptr; } } diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuadaptor.cpp b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuadaptor.cpp index 354b9c3a2e..eabb4b4122 100644 --- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuadaptor.cpp +++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusmenuadaptor.cpp @@ -122,7 +122,7 @@ void QDBusMenuAdaptor::Event(int id, const QString &eventId, const QDBusVariant emit item->hovered(); if (eventId == QLatin1String("closed")) { // There is no explicit AboutToHide method, so map closed event to aboutToHide method - const QDBusPlatformMenu *menu = Q_NULLPTR; + const QDBusPlatformMenu *menu = nullptr; if (item) menu = static_cast<const QDBusPlatformMenu *>(item->menu()); else if (id == 0) diff --git a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp index 51c690d43a..fc1b37f2f2 100644 --- a/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp +++ b/src/platformsupport/themes/genericunix/dbusmenu/qdbusplatformmenu.cpp @@ -68,7 +68,7 @@ QDBusPlatformMenuItem::~QDBusPlatformMenuItem() { menuItemsByID.remove(m_dbusID); if (m_subMenu) - static_cast<QDBusPlatformMenu *>(m_subMenu)->setContainingMenuItem(Q_NULLPTR); + static_cast<QDBusPlatformMenu *>(m_subMenu)->setContainingMenuItem(nullptr); } void QDBusPlatformMenuItem::setText(const QString &text) @@ -88,7 +88,7 @@ void QDBusPlatformMenuItem::setIcon(const QIcon &icon) void QDBusPlatformMenuItem::setMenu(QPlatformMenu *menu) { if (m_subMenu) - static_cast<QDBusPlatformMenu *>(m_subMenu)->setContainingMenuItem(Q_NULLPTR); + static_cast<QDBusPlatformMenu *>(m_subMenu)->setContainingMenuItem(nullptr); m_subMenu = menu; if (menu) static_cast<QDBusPlatformMenu *>(menu)->setContainingMenuItem(this); @@ -147,7 +147,7 @@ QDBusPlatformMenuItem *QDBusPlatformMenuItem::byId(int id) // a default-constructed nullptr value into menuItemsByID if (menuItemsByID.contains(id)) return menuItemsByID[id]; - return Q_NULLPTR; + return nullptr; } QList<const QDBusPlatformMenuItem *> QDBusPlatformMenuItem::byIds(const QList<int> &ids) @@ -165,14 +165,14 @@ QDBusPlatformMenu::QDBusPlatformMenu() : m_isEnabled(true) , m_isVisible(true) , m_revision(1) - , m_containingMenuItem(Q_NULLPTR) + , m_containingMenuItem(nullptr) { } QDBusPlatformMenu::~QDBusPlatformMenu() { if (m_containingMenuItem) - m_containingMenuItem->setMenu(Q_NULLPTR); + m_containingMenuItem->setMenu(nullptr); } void QDBusPlatformMenu::insertMenuItem(QPlatformMenuItem *menuItem, QPlatformMenuItem *before) diff --git a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp index 9baf94726d..8480c15fb7 100644 --- a/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp +++ b/src/platformsupport/themes/genericunix/dbustray/qdbustrayicon.cpp @@ -102,17 +102,17 @@ static int instanceCount = 0; */ QDBusTrayIcon::QDBusTrayIcon() - : m_dbusConnection(Q_NULLPTR) + : m_dbusConnection(nullptr) , m_adaptor(new QStatusNotifierItemAdaptor(this)) - , m_menuAdaptor(Q_NULLPTR) - , m_menu(Q_NULLPTR) - , m_notifier(Q_NULLPTR) + , m_menuAdaptor(nullptr) + , m_menu(nullptr) + , m_notifier(nullptr) , m_instanceId(KDEItemFormat.arg(QCoreApplication::applicationPid()).arg(++instanceCount)) , m_category(QStringLiteral("ApplicationStatus")) , m_defaultStatus(QStringLiteral("Active")) // be visible all the time. QSystemTrayIcon has no API to control this. , m_status(m_defaultStatus) - , m_tempIcon(Q_NULLPTR) - , m_tempAttentionIcon(Q_NULLPTR) + , m_tempIcon(nullptr) + , m_tempAttentionIcon(nullptr) , m_registered(false) { qCDebug(qLcTray); @@ -149,9 +149,9 @@ void QDBusTrayIcon::cleanup() if (m_registered) dBusConnection()->unregisterTrayIcon(this); delete m_dbusConnection; - m_dbusConnection = Q_NULLPTR; + m_dbusConnection = nullptr; delete m_notifier; - m_notifier = Q_NULLPTR; + m_notifier = nullptr; m_registered = false; } @@ -203,7 +203,7 @@ QTemporaryFile *QDBusTrayIcon::tempIcon(const QIcon &icon) necessity_checked = true; } if (!necessary) - return Q_NULLPTR; + return nullptr; qreal dpr = qGuiApp->devicePixelRatio(); QTemporaryFile *ret = new QTemporaryFile(TempFileTemplate, this); ret->open(); diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp index be0fac4b55..eeb03eb958 100644 --- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -197,7 +197,7 @@ QPlatformSystemTrayIcon *QGenericUnixTheme::createPlatformSystemTrayIcon() const { if (isDBusTrayAvailable()) return new QDBusTrayIcon(); - return Q_NULLPTR; + return nullptr; } #endif @@ -672,7 +672,7 @@ QPlatformSystemTrayIcon *QKdeTheme::createPlatformSystemTrayIcon() const { if (isDBusTrayAvailable()) return new QDBusTrayIcon(); - return Q_NULLPTR; + return nullptr; } #endif @@ -691,7 +691,7 @@ const char *QGnomeTheme::name = "gnome"; class QGnomeThemePrivate : public QPlatformThemePrivate { public: - QGnomeThemePrivate() : systemFont(Q_NULLPTR), fixedFont(Q_NULLPTR) {} + QGnomeThemePrivate() : systemFont(nullptr), fixedFont(nullptr) {} ~QGnomeThemePrivate() { delete systemFont; delete fixedFont; } void configureFonts(const QString >kFontName) const @@ -791,7 +791,7 @@ QPlatformSystemTrayIcon *QGnomeTheme::createPlatformSystemTrayIcon() const { if (isDBusTrayAvailable()) return new QDBusTrayIcon(); - return Q_NULLPTR; + return nullptr; } #endif @@ -829,7 +829,7 @@ QPlatformTheme *QGenericUnixTheme::createUnixTheme(const QString &name) #endif if (name == QLatin1String(QGnomeTheme::name)) return new QGnomeTheme; - return Q_NULLPTR; + return nullptr; } QStringList QGenericUnixTheme::themeNames() |