Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
39e4fad1
Commit
39e4fad1
authored
Mar 28, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: fix COM leak and handle errors
parent
cd273368
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+19
-15
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
39e4fad1
...
@@ -1240,38 +1240,42 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
...
@@ -1240,38 +1240,42 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
return
b_temp
;
return
b_temp
;
}
}
void
SPrefsPanel
::
assoDialog
()
{
#if !defined(__IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__)
#if !defined(__IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__)
#define __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__
#define __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__
const
GUID
IID_IApplicationAssociationRegistrationUI
=
{
0x1f76a169
,
0xf994
,
0x40ac
,
{
0x8f
,
0xc8
,
0x09
,
0x59
,
0xe8
,
0x87
,
0x47
,
0x10
}};
const
GUID
IID_IApplicationAssociationRegistrationUI
=
{
0x1f76a169
,
0xf994
,
0x40ac
,
{
0x8f
,
0xc8
,
0x09
,
0x59
,
0xe8
,
0x87
,
0x47
,
0x10
}};
const
GUID
CLSID_ApplicationAssociationRegistrationUI
=
{
0x1968106d
,
0xf3b5
,
0x44cf
,{
0x89
,
0x0e
,
0x11
,
0x6f
,
0xcb
,
0x9e
,
0xce
,
0xf1
}};
const
GUID
CLSID_ApplicationAssociationRegistrationUI
=
{
0x1968106d
,
0xf3b5
,
0x44cf
,{
0x89
,
0x0e
,
0x11
,
0x6f
,
0xcb
,
0x9e
,
0xce
,
0xf1
}};
#ifdef __cplusplus
interface
IApplicationAssociationRegistrationUI
:
public
IUnknown
interface
IApplicationAssociationRegistrationUI
:
public
IUnknown
{
{
virtual
HRESULT
STDMETHODCALLTYPE
LaunchAdvancedAssociationUI
(
virtual
HRESULT
STDMETHODCALLTYPE
LaunchAdvancedAssociationUI
(
LPCWSTR
pszAppRegName
)
=
0
;
LPCWSTR
pszAppRegName
)
=
0
;
};
};
#endif
/* __cplusplus */
#endif
/* __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__ */
#endif
/* __IApplicationAssociationRegistrationUI_INTERFACE_DEFINED__ */
IApplicationAssociationRegistrationUI
*
p_appassoc
;
void
SPrefsPanel
::
assoDialog
()
if
(
FAILED
(
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
))
)
{
vlc_assert_unreachable
()
;
HRESULT
hr
;
if
(
S_OK
==
CoCreateInstance
(
CLSID_ApplicationAssociationRegistrationUI
,
hr
=
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
NULL
,
CLSCTX_INPROC_SERVER
,
if
(
SUCCEEDED
(
hr
)
)
IID_IApplicationAssociationRegistrationUI
,
(
void
**
)
&
p_appassoc
)
)
{
{
if
(
S_OK
==
p_appassoc
->
LaunchAdvancedAssociationUI
(
L"VLC"
)
)
void
*
p
;
hr
=
CoCreateInstance
(
CLSID_ApplicationAssociationRegistrationUI
,
NULL
,
CLSCTX_INPROC_SERVER
,
IID_IApplicationAssociationRegistrationUI
,
&
p
);
if
(
SUCCEEDED
(
hr
)
)
{
{
CoUninitialize
();
IApplicationAssociationRegistrationUI
*
p_regui
=
return
;
(
IApplicationAssociationRegistrationUI
*
)
p
;
hr
=
p_regui
->
LaunchAdvancedAssociationUI
(
L"VLC"
);
p_regui
->
Release
();
}
}
CoUninitialize
();
}
}
CoUninitialize
();
if
(
SUCCEEDED
(
hr
)
)
return
;
QDialog
*
d
=
new
QDialog
(
this
);
QDialog
*
d
=
new
QDialog
(
this
);
d
->
setWindowTitle
(
qtr
(
"File associations"
)
);
d
->
setWindowTitle
(
qtr
(
"File associations"
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment