summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/player/directshowmetadatacontrol.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-12 11:43:51 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-12 15:19:04 +0200
commit0c9bc813c6dabbed8d57843ad1e7ea21fe1008f1 (patch)
tree452299ba747e2340d4956c09542e534d83d72bce /src/plugins/directshow/player/directshowmetadatacontrol.cpp
parentd25ed5222aec9e642ac534aea463a91c1952f229 (diff)
DirectShow: Introduce nullptr
Apply Fixits by Qt Creator. Change-Id: Idbd52ceaac6ee02f23d05f5a9b1ab6d58298b6a5 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Diffstat (limited to 'src/plugins/directshow/player/directshowmetadatacontrol.cpp')
-rw-r--r--src/plugins/directshow/player/directshowmetadatacontrol.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/directshow/player/directshowmetadatacontrol.cpp b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
index c87ce82cf..46674143e 100644
--- a/src/plugins/directshow/player/directshowmetadatacontrol.cpp
+++ b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
@@ -209,7 +209,7 @@ static QString nameForGUIDString(const QString &guid)
}
typedef HRESULT (WINAPI *q_SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
-static q_SHCreateItemFromParsingName sHCreateItemFromParsingName = 0;
+static q_SHCreateItemFromParsingName sHCreateItemFromParsingName = nullptr;
#endif
#if QT_CONFIG(wmsdk)
@@ -299,7 +299,7 @@ static QVariant getValue(IWMHeaderInfo *header, const wchar_t *key)
WMT_ATTR_DATATYPE type = WMT_TYPE_DWORD;
WORD size = 0;
- if (header->GetAttributeByName(&streamNumber, key, &type, 0, &size) == S_OK) {
+ if (header->GetAttributeByName(&streamNumber, key, &type, nullptr, &size) == S_OK) {
switch (type) {
case WMT_TYPE_DWORD:
if (size == sizeof(DWORD)) {
@@ -471,7 +471,7 @@ static QString convertBSTR(BSTR *string)
::SysStringLen(*string));
::SysFreeString(*string);
- string = 0;
+ string = nullptr;
return value;
}
@@ -491,11 +491,11 @@ void DirectShowMetaDataControl::updateMetadata(const QString &fileSrc, QVariantM
}
if (!fileSrc.isEmpty() && sHCreateItemFromParsingName) {
- IShellItem2* shellItem = 0;
+ IShellItem2* shellItem = nullptr;
if (sHCreateItemFromParsingName(reinterpret_cast<const WCHAR*>(fileSrc.utf16()),
- 0, IID_PPV_ARGS(&shellItem)) == S_OK) {
+ nullptr, IID_PPV_ARGS(&shellItem)) == S_OK) {
- IPropertyStore *pStore = 0;
+ IPropertyStore *pStore = nullptr;
if (shellItem->GetPropertyStore(GPS_DEFAULT, IID_PPV_ARGS(&pStore)) == S_OK) {
DWORD cProps;
if (SUCCEEDED(pStore->GetCount(&cProps))) {
@@ -650,17 +650,17 @@ void DirectShowMetaDataControl::updateMetadata(IFilterGraph2 *graph, IBaseFilter
return;
#endif
{
- IAMMediaContent *content = 0;
+ IAMMediaContent *content = nullptr;
if ((!graph || graph->QueryInterface(
IID_IAMMediaContent, reinterpret_cast<void **>(&content)) != S_OK)
&& (!source || source->QueryInterface(
IID_IAMMediaContent, reinterpret_cast<void **>(&content)) != S_OK)) {
- content = 0;
+ content = nullptr;
}
if (content) {
- BSTR string = 0;
+ BSTR string = nullptr;
if (content->get_AuthorName(&string) == S_OK)
metadata.insert(QMediaMetaData::Author, convertBSTR(&string));