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
19acda05
Commit
19acda05
authored
May 14, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: kill warnings and probably a crash on Win32
parent
146af0bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
14 deletions
+10
-14
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+4
-4
modules/gui/qt4/util/registry.cpp
modules/gui/qt4/util/registry.cpp
+5
-9
modules/gui/qt4/util/registry.hpp
modules/gui/qt4/util/registry.hpp
+1
-1
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
19acda05
...
...
@@ -912,7 +912,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
->
ReadRegistryString
(
psz_ext
,
""
,
""
),
psz_VLC
)
)
if
(
strstr
(
qvReg
->
ReadRegistryString
(
psz_ext
,
""
,
""
),
psz_VLC
)
)
{
current
->
setCheckState
(
0
,
Qt
::
Checked
);
b_temp
=
false
;
...
...
@@ -966,7 +966,7 @@ void SPrefsPanel::assoDialog()
videoType
->
setExpanded
(
true
);
videoType
->
setCheckState
(
0
,
Qt
::
Unchecked
);
otherType
->
setExpanded
(
true
);
otherType
->
setCheckState
(
0
,
Qt
::
Unchecked
);
QTreeWidgetItem
*
currentItem
;
QTreeWidgetItem
*
currentItem
=
NULL
;
int
i_temp
=
0
;
#define aTa( name ) i_temp += addType( name, currentItem, audioType, qvReg )
...
...
@@ -1066,7 +1066,7 @@ void addAsso( QVLCRegistry *qvReg, const char *psz_ext )
void
delAsso
(
QVLCRegistry
*
qvReg
,
const
char
*
psz_ext
)
{
char
psz_VLC
[]
=
"VLC"
;
char
*
psz_value
=
qvReg
->
ReadRegistryString
(
psz_ext
,
""
,
""
);
char
*
psz_value
=
qvReg
->
ReadRegistryString
(
psz_ext
,
""
,
""
);
if
(
psz_value
&&
!
strcmp
(
strcat
(
psz_VLC
,
psz_ext
),
psz_value
)
)
{
...
...
@@ -1081,7 +1081,7 @@ void delAsso( QVLCRegistry *qvReg, const char *psz_ext )
}
void
SPrefsPanel
::
saveAsso
()
{
QVLCRegistry
*
qvReg
;
QVLCRegistry
*
qvReg
=
NULL
;
for
(
int
i
=
0
;
i
<
listAsso
.
size
();
i
++
)
{
qvReg
=
new
QVLCRegistry
(
HKEY_CLASSES_ROOT
);
...
...
modules/gui/qt4/util/registry.cpp
View file @
19acda05
...
...
@@ -128,10 +128,12 @@ int QVLCRegistry::ReadRegistryInt( const char *path, const char *valueName, int
return
default_value
;
}
char
*
QVLCRegistry
::
ReadRegistryString
(
const
char
*
path
,
const
char
*
valueName
,
char
*
default_value
)
char
*
QVLCRegistry
::
ReadRegistryString
(
const
char
*
path
,
const
char
*
valueName
,
c
onst
c
har
*
default_value
)
{
HKEY
keyHandle
;
char
*
tempValue
=
NULL
;
char
*
tempValue2
=
NULL
;
DWORD
size1
;
DWORD
valueType
;
...
...
@@ -145,20 +147,14 @@ char * QVLCRegistry::ReadRegistryString( const char *path, const char *valueName
tempValue
=
(
char
*
)
malloc
(
size1
+
1
);
// +1 für NullByte`?
if
(
RegQueryValueEx
(
keyHandle
,
valueName
,
NULL
,
&
valueType
,
(
LPBYTE
)
tempValue
,
&
size1
)
==
ERROR_SUCCESS
)
{
default_value
=
tempValue
;
tempValue2
=
tempValue
;
};
}
}
RegCloseKey
(
keyHandle
);
}
if
(
tempValue
==
NULL
)
{
// wenn tempValue nicht aus registry gelesen wurde dafür sorgen das ein neuer String mit der Kopie von DefaultValue
// geliefert wird - das macht das Handling des Rückgabewertes der Funktion einfacher - immer schön mit free freigeben!
default_value
=
strdup
(
default_value
);
}
return
default_value
;
return
tempValue
==
NULL
?
strdup
(
default_value
)
:
tempValue2
;
}
double
QVLCRegistry
::
ReadRegistryDouble
(
const
char
*
path
,
const
char
*
valueName
,
double
default_value
)
...
...
modules/gui/qt4/util/registry.hpp
View file @
19acda05
...
...
@@ -39,7 +39,7 @@ public:
void
WriteRegistryDouble
(
const
char
*
path
,
const
char
*
valueName
,
double
value
);
int
ReadRegistryInt
(
const
char
*
path
,
const
char
*
valueName
,
int
default_value
);
char
*
ReadRegistryString
(
const
char
*
path
,
const
char
*
valueName
,
char
*
default_value
);
char
*
ReadRegistryString
(
const
char
*
path
,
const
char
*
valueName
,
c
onst
c
har
*
default_value
);
double
ReadRegistryDouble
(
const
char
*
path
,
const
char
*
valueName
,
double
default_value
);
bool
RegistryKeyExists
(
const
char
*
path
);
...
...
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