diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-05-26 17:39:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-28 15:31:12 +0200 |
commit | 00ee0c86d7da8ef8860ed79ae5757479f8e6e40f (patch) | |
tree | 76c61164e10645f57f3555e58e26e0c42d12bb22 /src/winextras/qwinjumplist.cpp | |
parent | 0d10bdb73e00fb7d7ba8bbbedd7664ad1592f91a (diff) |
Introduce structs for dynamically resolved functions per DLL.
Preparing the adding of the iconic preview functions; the current
approach of having one qt_ .. function does not scale well.
Task-number: QTBUG-36730
Change-Id: Id70b9b13b8cd09d4d9c2830e9d6d0a413fd812a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/winextras/qwinjumplist.cpp')
-rw-r--r-- | src/winextras/qwinjumplist.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/winextras/qwinjumplist.cpp b/src/winextras/qwinjumplist.cpp index fa233a2..eda940a 100644 --- a/src/winextras/qwinjumplist.cpp +++ b/src/winextras/qwinjumplist.cpp @@ -394,9 +394,11 @@ IShellLinkW *QWinJumpListPrivate::toIShellLink(const QWinJumpListItem *item) IShellItem2 *QWinJumpListPrivate::toIShellItem(const QWinJumpListItem *item) { IShellItem2 *shellitem = 0; - wchar_t *buffer = qt_qstringToNullTerminated(item->filePath()); - qt_SHCreateItemFromParsingName(buffer, 0, qIID_IShellItem2, reinterpret_cast<void **>(&shellitem)); - delete[] buffer; + qtShell32Dll.init(); + if (qtShell32Dll.sHCreateItemFromParsingName) { + QScopedArrayPointer<wchar_t> buffer(qt_qstringToNullTerminated(item->filePath())); + qtShell32Dll.sHCreateItemFromParsingName(buffer.data(), 0, qIID_IShellItem2, reinterpret_cast<void **>(&shellitem)); + } return shellitem; } |