]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/simple_preferences.cpp
Win32: get rid of calls to GetVersion (CoCreateInstance will fail anyway if the featu...
[vlc] / modules / gui / qt4 / components / simple_preferences.cpp
index e8542daa5ee45b0c2edd675ae7f3a485565dfdb5..8927cf0c62b54a46d4d50bcb5f9c2072b1b7683e 100644 (file)
@@ -859,28 +859,23 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
 
 void SPrefsPanel::assoDialog()
 {
-    OSVERSIONINFO winVer;
-    winVer.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
-    //Vista specific file associations
-    if( GetVersionEx(&winVer) && winVer.dwMajorVersion > 5 )
-    {
-            LPAPPASSOCREGUI p_appassoc;
-            CoInitialize( 0 );
-
-            if( S_OK == CoCreateInstance( &clsid_IApplication2,
-                        NULL, CLSCTX_INPROC_SERVER,
-                        &IID_IApplicationAssociationRegistrationUI,
-                        (void **)&p_appassoc) )
-            {
-                if(S_OK == p_appassoc->vt->LaunchAdvancedAssociationUI(p_appassoc, L"VLC" ) )
-                {
-                    CoUninitialize();
-                    return;
-                }
-            }
+    LPAPPASSOCREGUI p_appassoc;
+    CoInitialize( 0 );
 
+    if( S_OK == CoCreateInstance( &clsid_IApplication2,
+                NULL, CLSCTX_INPROC_SERVER,
+                &IID_IApplicationAssociationRegistrationUI,
+                (void **)&p_appassoc) )
+    {
+        if(S_OK == p_appassoc->vt->LaunchAdvancedAssociationUI(p_appassoc, L"VLC" ) )
+        {
             CoUninitialize();
+            return;
+        }
     }
+
+    CoUninitialize();
+
     QDialog *d = new QDialog( this );
     QGridLayout *assoLayout = new QGridLayout( d );