Commit be5f55e5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: use QString iso std::string

parent 084f3f4c
...@@ -903,7 +903,6 @@ void SPrefsPanel::configML() ...@@ -903,7 +903,6 @@ void SPrefsPanel::configML()
#ifdef WIN32 #ifdef WIN32
#include <QDialogButtonBox> #include <QDialogButtonBox>
#include "util/registry.hpp" #include "util/registry.hpp"
#include <string>
bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current, bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
QTreeWidgetItem* parent, QVLCRegistry *qvReg ) QTreeWidgetItem* parent, QVLCRegistry *qvReg )
...@@ -1026,8 +1025,8 @@ void SPrefsPanel::assoDialog() ...@@ -1026,8 +1025,8 @@ void SPrefsPanel::assoDialog()
void addAsso( QVLCRegistry *qvReg, const char *psz_ext ) void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
{ {
std::string s_path( "VLC" ); s_path += psz_ext; QString s_path( "VLC" ); s_path += psz_ext;
std::string s_path2 = s_path; QString s_path2 = s_path;
/* Save a backup if already assigned */ /* Save a backup if already assigned */
char *psz_value = qvReg->ReadRegistryString( psz_ext, "", "" ); char *psz_value = qvReg->ReadRegistryString( psz_ext, "", "" );
...@@ -1037,27 +1036,26 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext ) ...@@ -1037,27 +1036,26 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
delete psz_value; delete psz_value;
/* Put a "link" to VLC.EXT as default */ /* Put a "link" to VLC.EXT as default */
qvReg->WriteRegistryString( psz_ext, "", s_path.c_str() ); qvReg->WriteRegistryString( psz_ext, "", qtu( s_path ) );
/* Create the needed Key if they weren't done in the installer */ /* Create the needed Key if they weren't done in the installer */
if( !qvReg->RegistryKeyExists( s_path.c_str() ) ) if( !qvReg->RegistryKeyExists( qtu( s_path ) ) )
{ {
qvReg->WriteRegistryString( psz_ext, "", s_path.c_str() ); qvReg->WriteRegistryString( psz_ext, "", qtu( s_path ) );
qvReg->WriteRegistryString( s_path.c_str(), "", "Media file" ); qvReg->WriteRegistryString( qtu( s_path ), "", "Media file" );
qvReg->WriteRegistryString( s_path.append( "\\shell" ).c_str() , "", "Play" ); qvReg->WriteRegistryString( qtu( s_path.append( "\\shell" ) ), "", "Play" );
/* Get the installer path */ /* Get the installer path */
QVLCRegistry *qvReg2 = new QVLCRegistry( HKEY_LOCAL_MACHINE ); QVLCRegistry *qvReg2 = new QVLCRegistry( HKEY_LOCAL_MACHINE );
std::string str_temp; str_temp.assign( QString str_temp = qvReg2->ReadRegistryString( "Software\\VideoLAN\\VLC", "", "" );
qvReg2->ReadRegistryString( "Software\\VideoLAN\\VLC", "", "" ) );
if( str_temp.size() ) if( str_temp.size() )
{ {
qvReg->WriteRegistryString( s_path.append( "\\Play\\command" ).c_str(), qvReg->WriteRegistryString( qtu( s_path.append( "\\Play\\command" ) ),
"", str_temp.append(" --started-from-file \"%1\"" ).c_str() ); "", qtu( str_temp.append(" --started-from-file \"%1\"" ) ) );
qvReg->WriteRegistryString( s_path2.append( "\\DefaultIcon" ).c_str(), qvReg->WriteRegistryString( qtu( s_path2.append( "\\DefaultIcon" ) ),
"", str_temp.append(",0").c_str() ); "", qtu( str_temp.append(",0") ) );
} }
delete qvReg2; delete qvReg2;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment