Convert NULL to nullptr (#6220)

This commit is contained in:
Jonas Kvinge 2018-11-29 22:26:51 +01:00 committed by John Maguire
parent 587e72b8c3
commit 139bc1f5aa
5 changed files with 15 additions and 8 deletions

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.6)
set(CMAKE_CXX_STANDARD 11)
set(SINGLEAPP-SOURCES
qtlocalpeer.cpp

View File

@ -164,7 +164,7 @@ bool QtLocalPeer::sendMessage(const QByteArray &message, int timeout)
Sleep(DWORD(ms));
#else
struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
nanosleep(&ts, NULL);
nanosleep(&ts, nullptr);
#endif
}
if (!connOk)

View File

@ -65,11 +65,14 @@ Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate)
Qt::HANDLE mutex;
if (doCreate) {
QT_WA( { mutex = CreateMutexW(NULL, FALSE, (WCHAR*)mname.utf16()); },
{ mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } );
if (!mutex) {
qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
return 0;
QT_WA({ mutex = CreateMutexW(nullptr, FALSE, (WCHAR*)mname.utf16()); },
{
mutex =
CreateMutexA(nullptr, FALSE, mname.toLocal8Bit().constData());
});
if (!mutex) {
qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
return 0;
}
}
else {

View File

@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 2.6)
set(CMAKE_CXX_STANDARD 11)
set(QXT-SOURCES
qxtglobal.cpp

View File

@ -50,7 +50,8 @@ bool QxtGlobalShortcutPrivate::eventFilter(void* message)
if (GetEventClass(event) == kEventClassKeyboard && GetEventKind(event) == kEventHotKeyPressed)
{
EventHotKeyID keyID;
GetEventParameter(event, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(keyID), NULL, &keyID);
GetEventParameter(event, kEventParamDirectObject, typeEventHotKeyID,
nullptr, sizeof(keyID), nullptr, &keyID);
Identifier id = keyIDs.key(keyID.id);
activateShortcut(id.second, id.first);
}
@ -178,7 +179,8 @@ bool QxtGlobalShortcutPrivate::registerShortcut(quint32 nativeKey, quint32 nativ
EventTypeSpec t;
t.eventClass = kEventClassKeyboard;
t.eventKind = kEventHotKeyPressed;
InstallApplicationEventHandler(&qxt_mac_handle_hot_key, 1, &t, NULL, NULL);
InstallApplicationEventHandler(&qxt_mac_handle_hot_key, 1, &t, nullptr,
nullptr);
}
EventHotKeyID keyID;