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
ffa7a222
Commit
ffa7a222
authored
Feb 09, 2014
by
Hugo Beauzée-Luyssen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MainWindow: don't bother list settings categories to load. Just load them all
parent
ad245bcc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
17 deletions
+5
-17
src/Gui/MainWindow.cpp
src/Gui/MainWindow.cpp
+4
-16
src/Gui/MainWindow.h
src/Gui/MainWindow.h
+1
-1
No files found.
src/Gui/MainWindow.cpp
View file @
ffa7a222
...
@@ -330,32 +330,20 @@ MainWindow::initVlmcPreferences()
...
@@ -330,32 +330,20 @@ MainWindow::initVlmcPreferences()
VLMC_CREATE_PRIVATE_PREFERENCE_STRING
(
"private/VlmcVersion"
,
PROJECT_VERSION_MAJOR
);
VLMC_CREATE_PRIVATE_PREFERENCE_STRING
(
"private/VlmcVersion"
,
PROJECT_VERSION_MAJOR
);
//Load saved preferences :
//Load saved preferences :
loadVlmcPreferences
(
"private"
);
loadVlmcPreferences
();
if
(
VLMC_GET_STRING
(
"private/VlmcVersion"
)
==
PROJECT_VERSION_MAJOR
)
{
loadVlmcPreferences
(
"keyboard"
);
loadVlmcPreferences
(
"general"
);
loadVlmcPreferences
(
"youtube"
);
loadVlmcPreferences
(
"network"
);
}
else
{
QSettings
s
;
s
.
clear
();
}
SettingsManager
::
getInstance
()
->
setValue
(
"private/VlmcVersion"
,
PROJECT_VERSION_MAJOR
,
SettingsManager
::
Vlmc
);
SettingsManager
::
getInstance
()
->
setValue
(
"private/VlmcVersion"
,
PROJECT_VERSION_MAJOR
,
SettingsManager
::
Vlmc
);
}
}
void
void
MainWindow
::
loadVlmcPreferences
(
const
QString
&
subPart
)
MainWindow
::
loadVlmcPreferences
()
{
{
//FIXME: Manually load vlmc version to force settings clear?
QSettings
s
;
QSettings
s
;
s
.
beginGroup
(
subPart
);
foreach
(
QString
key
,
s
.
allKeys
()
)
foreach
(
QString
key
,
s
.
allKeys
()
)
{
{
QVariant
value
=
s
.
value
(
key
);
QVariant
value
=
s
.
value
(
key
);
vlmcDebug
()
<<
"Loading"
<<
key
<<
"=>"
<<
value
;
vlmcDebug
()
<<
"Loading"
<<
key
<<
"=>"
<<
value
;
SettingsManager
::
getInstance
()
->
setValue
(
subPart
+
"/"
+
key
,
value
,
SettingsManager
::
Vlmc
);
SettingsManager
::
getInstance
()
->
setValue
(
key
,
value
,
SettingsManager
::
Vlmc
);
}
}
}
}
...
...
src/Gui/MainWindow.h
View file @
ffa7a222
...
@@ -71,7 +71,7 @@ private:
...
@@ -71,7 +71,7 @@ private:
void
createProjectPreferences
();
void
createProjectPreferences
();
void
clearTemporaryFiles
();
void
clearTemporaryFiles
();
void
initVlmcPreferences
();
void
initVlmcPreferences
();
void
loadVlmcPreferences
(
const
QString
&
subPart
);
void
loadVlmcPreferences
();
void
loadGlobalProxySettings
();
void
loadGlobalProxySettings
();
void
initToolbar
();
void
initToolbar
();
bool
saveSettings
();
bool
saveSettings
();
...
...
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