Convert NULL to nullptr (#6220)
This commit is contained in:
parent
587e72b8c3
commit
139bc1f5aa
|
@ -1,4 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
set(SINGLEAPP-SOURCES
|
set(SINGLEAPP-SOURCES
|
||||||
qtlocalpeer.cpp
|
qtlocalpeer.cpp
|
||||||
|
|
|
@ -164,7 +164,7 @@ bool QtLocalPeer::sendMessage(const QByteArray &message, int timeout)
|
||||||
Sleep(DWORD(ms));
|
Sleep(DWORD(ms));
|
||||||
#else
|
#else
|
||||||
struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
|
struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 };
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, nullptr);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (!connOk)
|
if (!connOk)
|
||||||
|
|
|
@ -65,11 +65,14 @@ Qt::HANDLE QtLockedFile::getMutexHandle(int idx, bool doCreate)
|
||||||
|
|
||||||
Qt::HANDLE mutex;
|
Qt::HANDLE mutex;
|
||||||
if (doCreate) {
|
if (doCreate) {
|
||||||
QT_WA( { mutex = CreateMutexW(NULL, FALSE, (WCHAR*)mname.utf16()); },
|
QT_WA({ mutex = CreateMutexW(nullptr, FALSE, (WCHAR*)mname.utf16()); },
|
||||||
{ mutex = CreateMutexA(NULL, FALSE, mname.toLocal8Bit().constData()); } );
|
{
|
||||||
if (!mutex) {
|
mutex =
|
||||||
qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
|
CreateMutexA(nullptr, FALSE, mname.toLocal8Bit().constData());
|
||||||
return 0;
|
});
|
||||||
|
if (!mutex) {
|
||||||
|
qErrnoWarning("QtLockedFile::lock(): CreateMutex failed");
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
set(QXT-SOURCES
|
set(QXT-SOURCES
|
||||||
qxtglobal.cpp
|
qxtglobal.cpp
|
||||||
|
|
|
@ -50,7 +50,8 @@ bool QxtGlobalShortcutPrivate::eventFilter(void* message)
|
||||||
if (GetEventClass(event) == kEventClassKeyboard && GetEventKind(event) == kEventHotKeyPressed)
|
if (GetEventClass(event) == kEventClassKeyboard && GetEventKind(event) == kEventHotKeyPressed)
|
||||||
{
|
{
|
||||||
EventHotKeyID keyID;
|
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);
|
Identifier id = keyIDs.key(keyID.id);
|
||||||
activateShortcut(id.second, id.first);
|
activateShortcut(id.second, id.first);
|
||||||
}
|
}
|
||||||
|
@ -178,7 +179,8 @@ bool QxtGlobalShortcutPrivate::registerShortcut(quint32 nativeKey, quint32 nativ
|
||||||
EventTypeSpec t;
|
EventTypeSpec t;
|
||||||
t.eventClass = kEventClassKeyboard;
|
t.eventClass = kEventClassKeyboard;
|
||||||
t.eventKind = kEventHotKeyPressed;
|
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;
|
EventHotKeyID keyID;
|
||||||
|
|
Loading…
Reference in New Issue