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
868cc0e5
Commit
868cc0e5
authored
Jul 06, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: rename registry functions
parent
e6b734ba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
26 deletions
+26
-26
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+14
-14
modules/gui/qt4/util/registry.cpp
modules/gui/qt4/util/registry.cpp
+6
-6
modules/gui/qt4/util/registry.hpp
modules/gui/qt4/util/registry.hpp
+6
-6
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
868cc0e5
...
...
@@ -1216,7 +1216,7 @@ void SPrefsPanel::saveLang() {
else
{
QVLCRegistry
qvReg
(
HKEY_CURRENT_USER
);
qvReg
.
WriteRegistry
String
(
"Software
\\
VideoLAN
\\
VLC
\\
"
,
"Lang"
,
lang
);
qvReg
.
WriteRegistry
(
"Software
\\
VideoLAN
\\
VLC
\\
"
,
"Lang"
,
lang
);
}
}
...
...
@@ -1227,7 +1227,7 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
const
char
*
psz_VLC
=
"VLC"
;
current
=
new
QTreeWidgetItem
(
parent
,
QStringList
(
psz_ext
)
);
if
(
strstr
(
qvReg
->
ReadRegistry
String
(
psz_ext
,
""
,
""
),
psz_VLC
)
)
if
(
strstr
(
qvReg
->
ReadRegistry
(
psz_ext
,
""
,
""
),
psz_VLC
)
)
{
current
->
setCheckState
(
0
,
Qt
::
Checked
);
b_temp
=
true
;
...
...
@@ -1416,32 +1416,32 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
QString
s_path2
=
s_path
;
/* Save a backup if already assigned */
char
*
psz_value
=
qvReg
->
ReadRegistry
String
(
psz_ext
,
""
,
""
);
char
*
psz_value
=
qvReg
->
ReadRegistry
(
psz_ext
,
""
,
""
);
if
(
!
EMPTY_STR
(
psz_value
)
&&
strcmp
(
qtu
(
s_path
),
psz_value
)
)
qvReg
->
WriteRegistry
String
(
psz_ext
,
"VLC.backup"
,
psz_value
);
qvReg
->
WriteRegistry
(
psz_ext
,
"VLC.backup"
,
psz_value
);
free
(
psz_value
);
/* Put a "link" to VLC.EXT as default */
qvReg
->
WriteRegistry
String
(
psz_ext
,
""
,
qtu
(
s_path
)
);
qvReg
->
WriteRegistry
(
psz_ext
,
""
,
qtu
(
s_path
)
);
/* Create the needed Key if they weren't done in the installer */
if
(
!
qvReg
->
RegistryKeyExists
(
qtu
(
s_path
)
)
)
{
qvReg
->
WriteRegistry
String
(
psz_ext
,
""
,
qtu
(
s_path
)
);
qvReg
->
WriteRegistry
String
(
qtu
(
s_path
),
""
,
"Media file"
);
qvReg
->
WriteRegistry
String
(
qtu
(
s_path
.
append
(
"
\\
shell"
)
),
""
,
"Play"
);
qvReg
->
WriteRegistry
(
psz_ext
,
""
,
qtu
(
s_path
)
);
qvReg
->
WriteRegistry
(
qtu
(
s_path
),
""
,
"Media file"
);
qvReg
->
WriteRegistry
(
qtu
(
s_path
.
append
(
"
\\
shell"
)
),
""
,
"Play"
);
/* Get the installer path */
QVLCRegistry
qvReg2
(
HKEY_LOCAL_MACHINE
);
QString
str_temp
=
qvReg2
.
ReadRegistry
String
(
"Software
\\
VideoLAN
\\
VLC"
,
""
,
""
);
QString
str_temp
=
qvReg2
.
ReadRegistry
(
"Software
\\
VideoLAN
\\
VLC"
,
""
,
""
);
if
(
str_temp
.
size
()
)
{
qvReg
->
WriteRegistry
String
(
qtu
(
s_path
.
append
(
"
\\
Play
\\
command"
)
),
qvReg
->
WriteRegistry
(
qtu
(
s_path
.
append
(
"
\\
Play
\\
command"
)
),
""
,
qtu
(
str_temp
.
append
(
" --started-from-file
\"
%1
\"
"
)
)
);
qvReg
->
WriteRegistry
String
(
qtu
(
s_path2
.
append
(
"
\\
DefaultIcon"
)
),
qvReg
->
WriteRegistry
(
qtu
(
s_path2
.
append
(
"
\\
DefaultIcon"
)
),
""
,
qtu
(
str_temp
.
append
(
",0"
)
)
);
}
}
...
...
@@ -1450,14 +1450,14 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
void
delAsso
(
QVLCRegistry
*
qvReg
,
const
char
*
psz_ext
)
{
QString
s_path
(
"VLC"
);
s_path
+=
psz_ext
;
char
*
psz_value
=
qvReg
->
ReadRegistry
String
(
psz_ext
,
""
,
""
);
char
*
psz_value
=
qvReg
->
ReadRegistry
(
psz_ext
,
""
,
""
);
if
(
psz_value
&&
!
strcmp
(
qtu
(
s_path
),
psz_value
)
)
{
free
(
psz_value
);
psz_value
=
qvReg
->
ReadRegistry
String
(
psz_ext
,
"VLC.backup"
,
""
);
psz_value
=
qvReg
->
ReadRegistry
(
psz_ext
,
"VLC.backup"
,
""
);
if
(
psz_value
)
qvReg
->
WriteRegistry
String
(
psz_ext
,
""
,
psz_value
);
qvReg
->
WriteRegistry
(
psz_ext
,
""
,
psz_value
);
qvReg
->
DeleteValue
(
psz_ext
,
"VLC.backup"
);
}
...
...
modules/gui/qt4/util/registry.cpp
View file @
868cc0e5
...
...
@@ -64,7 +64,7 @@ bool QVLCRegistry::RegistryValueExists( const char *path, const char *valueName
return
temp
;
}
void
QVLCRegistry
::
WriteRegistry
Int
(
const
char
*
path
,
const
char
*
valueName
,
int
value
)
void
QVLCRegistry
::
WriteRegistry
(
const
char
*
path
,
const
char
*
valueName
,
int
value
)
{
HKEY
keyHandle
;
...
...
@@ -77,7 +77,7 @@ void QVLCRegistry::WriteRegistryInt( const char *path, const char *valueName, in
}
}
void
QVLCRegistry
::
WriteRegistry
String
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
value
)
void
QVLCRegistry
::
WriteRegistry
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
value
)
{
HKEY
keyHandle
;
...
...
@@ -90,7 +90,7 @@ void QVLCRegistry::WriteRegistryString( const char *path, const char *valueName,
}
}
void
QVLCRegistry
::
WriteRegistry
Double
(
const
char
*
path
,
const
char
*
valueName
,
double
value
)
void
QVLCRegistry
::
WriteRegistry
(
const
char
*
path
,
const
char
*
valueName
,
double
value
)
{
HKEY
keyHandle
;
if
(
RegCreateKeyExA
(
m_RootKey
,
path
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
...
...
@@ -101,7 +101,7 @@ void QVLCRegistry::WriteRegistryDouble( const char *path, const char *valueName,
}
}
int
QVLCRegistry
::
ReadRegistry
Int
(
const
char
*
path
,
const
char
*
valueName
,
int
default_value
)
{
int
QVLCRegistry
::
ReadRegistry
(
const
char
*
path
,
const
char
*
valueName
,
int
default_value
)
{
HKEY
keyHandle
;
int
tempValue
;
DWORD
size1
;
...
...
@@ -124,7 +124,7 @@ int QVLCRegistry::ReadRegistryInt( const char *path, const char *valueName, int
return
default_value
;
}
char
*
QVLCRegistry
::
ReadRegistry
String
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
default_value
)
char
*
QVLCRegistry
::
ReadRegistry
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
default_value
)
{
HKEY
keyHandle
;
char
*
tempValue
=
NULL
;
...
...
@@ -153,7 +153,7 @@ char * QVLCRegistry::ReadRegistryString( const char *path, const char *valueName
return
tempValue
==
NULL
?
strdup
(
default_value
)
:
tempValue2
;
}
double
QVLCRegistry
::
ReadRegistry
Double
(
const
char
*
path
,
const
char
*
valueName
,
double
default_value
)
double
QVLCRegistry
::
ReadRegistry
(
const
char
*
path
,
const
char
*
valueName
,
double
default_value
)
{
HKEY
keyHandle
;
double
tempValue
;
...
...
modules/gui/qt4/util/registry.hpp
View file @
868cc0e5
...
...
@@ -33,13 +33,13 @@ public:
QVLCRegistry
(
HKEY
rootKey
);
~
QVLCRegistry
(
void
)
{}
void
WriteRegistry
Int
(
const
char
*
path
,
const
char
*
valueName
,
int
value
);
void
WriteRegistry
String
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
value
);
void
WriteRegistry
Double
(
const
char
*
path
,
const
char
*
valueName
,
double
value
);
void
WriteRegistry
(
const
char
*
path
,
const
char
*
valueName
,
int
value
);
void
WriteRegistry
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
value
);
void
WriteRegistry
(
const
char
*
path
,
const
char
*
valueName
,
double
value
);
int
ReadRegistry
Int
(
const
char
*
path
,
const
char
*
valueName
,
int
default_value
);
char
*
ReadRegistry
String
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
default_value
);
double
ReadRegistry
Double
(
const
char
*
path
,
const
char
*
valueName
,
double
default_value
);
int
ReadRegistry
(
const
char
*
path
,
const
char
*
valueName
,
int
default_value
);
char
*
ReadRegistry
(
const
char
*
path
,
const
char
*
valueName
,
const
char
*
default_value
);
double
ReadRegistry
(
const
char
*
path
,
const
char
*
valueName
,
double
default_value
);
bool
RegistryKeyExists
(
const
char
*
path
);
bool
RegistryValueExists
(
const
char
*
path
,
const
char
*
valueName
);
...
...
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