Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Scott Petrovic
kdenlive
Commits
34632959
Commit
34632959
authored
Sep 09, 2015
by
Vincent Pinon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop showing wizard for every version change
parent
96e8336e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
25 deletions
+12
-25
src/mainwindow.cpp
src/mainwindow.cpp
+12
-25
No files found.
src/mainwindow.cpp
View file @
34632959
...
...
@@ -1281,43 +1281,30 @@ void MainWindow::readOptions()
{
KSharedConfigPtr
config
=
KSharedConfig
::
openConfig
();
pCore
->
projectManager
()
->
recentFilesAction
()
->
loadEntries
(
KConfigGroup
(
config
,
"Recent Files"
));
KConfigGroup
initialGroup
(
config
,
"version"
);
bool
upgrade
=
false
;
if
(
initialGroup
.
exists
())
{
if
(
initialGroup
.
readEntry
(
"version"
,
QString
()).
section
(
' '
,
0
,
0
)
!=
QString
(
version
).
section
(
' '
,
0
,
0
))
{
upgrade
=
true
;
}
if
(
initialGroup
.
readEntry
(
"version"
)
==
"0.7"
)
{
//Add new settings from 0.7.1
if
(
KdenliveSettings
::
defaultprojectfolder
().
isEmpty
())
{
QDir
dir
(
QDir
::
homePath
());
if
(
!
dir
.
mkdir
(
"kdenlive"
))
{
qDebug
()
<<
"/// ERROR CREATING PROJECT FOLDER: "
;
}
else
{
dir
.
cd
(
"kdenlive"
);
KdenliveSettings
::
setDefaultprojectfolder
(
dir
.
path
());
}
}
}
}
if
(
KdenliveSettings
::
ffmpegpath
().
isEmpty
()
||
KdenliveSettings
::
ffplaypath
().
isEmpty
())
{
upgrade
=
true
;
if
(
KdenliveSettings
::
defaultprojectfolder
().
isEmpty
())
{
QDir
dir
(
QDir
::
homePath
());
if
(
!
dir
.
mkdir
(
"kdenlive"
))
{
qDebug
()
<<
"/// ERROR CREATING PROJECT FOLDER: "
;
}
else
{
dir
.
cd
(
"kdenlive"
);
KdenliveSettings
::
setDefaultprojectfolder
(
dir
.
path
());
}
}
if
(
!
initialGroup
.
exists
()
||
upgrade
)
{
KConfigGroup
initialGroup
(
config
,
"version"
);
if
(
!
initialGroup
.
exists
()
||
KdenliveSettings
::
ffmpegpath
().
isEmpty
()
||
KdenliveSettings
::
ffplaypath
().
isEmpty
())
{
// this is our first run, show Wizard
QPointer
<
Wizard
>
w
=
new
Wizard
(
upgrad
e
,
this
);
QPointer
<
Wizard
>
w
=
new
Wizard
(
fals
e
,
this
);
if
(
w
->
exec
()
==
QDialog
::
Accepted
&&
w
->
isOk
())
{
w
->
adjustSettings
();
initialGroup
.
writeEntry
(
"version"
,
version
);
delete
w
;
}
else
{
delete
w
;
::
exit
(
1
);
}
}
initialGroup
.
writeEntry
(
"version"
,
version
);
}
void
MainWindow
::
slotRunWizard
()
...
...
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