Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
20a270e4
Commit
20a270e4
authored
Jun 12, 2009
by
Thorbjørn Lindeijer
Browse files
Create the path of the settings database if it doesn't exist yet
Otherwise creation of the database fails on the first startup...
parent
f5e7fb9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/settingsdatabase.cpp
View file @
20a270e4
...
...
@@ -29,6 +29,7 @@
#include
"settingsdatabase.h"
#include
<QtCore/QDir>
#include
<QtCore/QMap>
#include
<QtSql/QSqlDatabase>
#include
<QtSql/QSqlError>
...
...
@@ -94,6 +95,10 @@ SettingsDatabase::SettingsDatabase(const QString &path,
const
QLatin1Char
slash
(
'/'
);
// TODO: Don't rely on a path, but determine automatically
QDir
pathDir
(
path
);
if
(
!
pathDir
.
exists
())
pathDir
.
mkpath
(
pathDir
.
absolutePath
());
QString
fileName
=
path
;
if
(
!
fileName
.
endsWith
(
slash
))
fileName
+=
slash
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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