Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
99ef5e8c
Commit
99ef5e8c
authored
Dec 23, 2009
by
Hugo Beauzee-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --logfile parameter.
Corrected -vv parsing, removed debug.
parent
b4978ee5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
src/Tools/VlmcDebug.cpp
src/Tools/VlmcDebug.cpp
+13
-3
No files found.
src/Tools/VlmcDebug.cpp
View file @
99ef5e8c
...
...
@@ -29,17 +29,27 @@ VlmcDebug::VlmcDebug() : m_logFile( NULL )
{
//setup log level :
QStringList
args
=
qApp
->
arguments
();
if
(
args
.
contains
(
"-vv
"
)
=
=
true
)
if
(
args
.
indexOf
(
QRegExp
(
"-vv
v*"
)
)
>
=
0
)
SettingsManager
::
getInstance
()
->
setValue
(
"private"
,
"LogLevel"
,
QtDebugMsg
);
else
if
(
args
.
contains
(
"-v"
)
==
true
)
SettingsManager
::
getInstance
()
->
setValue
(
"private"
,
"LogLevel"
,
QtWarningMsg
);
else
SettingsManager
::
getInstance
()
->
setValue
(
"private"
,
"LogLevel"
,
QtCriticalMsg
);
int
pos
=
args
.
indexOf
(
QRegExp
(
"--logfile=.*"
)
);
if
(
pos
>
0
)
{
QString
arg
=
args
[
pos
];
QString
logFile
=
arg
.
mid
(
10
);
if
(
logFile
.
length
()
<=
0
)
qWarning
()
<<
tr
(
"Invalid value supplied for argument --logfile"
);
else
SettingsManager
::
getInstance
()
->
setValue
(
"private"
,
"LogFile"
,
logFile
);
}
//Yeah I just changed preferences, but I have to commit. Though I don't feel like a widget...
SettingsManager
::
getInstance
()
->
commit
();
fprintf
(
stderr
,
"%d
\n
"
,
SettingsManager
::
getInstance
()
->
getValue
(
"private"
,
"LogLevel"
)
->
get
().
toInt
()
);
const
SettingValue
*
setVal
=
SettingsManager
::
getInstance
()
->
getValue
(
"private"
,
"LogFile"
);
connect
(
setVal
,
SIGNAL
(
changed
(
QVariant
)
),
this
,
SLOT
(
logFileChanged
(
const
QVariant
&
)
)
);
QObject
::
connect
(
qApp
,
...
...
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