Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1903e1f8
Commit
1903e1f8
authored
Dec 08, 2014
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix incorrect directory
parent
10d9e376
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
QGCApplication.cc
src/QGCApplication.cc
+11
-8
No files found.
src/QGCApplication.cc
View file @
1903e1f8
...
...
@@ -97,14 +97,17 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
// First thing we want to do is set up the qtlogging.ini file. If it doesn't already exist we copy
// it to the correct location. This way default debug builds will have logging turned off.
static
const
char
*
qtProjectDir
=
"QtProject"
;
static
const
char
*
qtLoggingFile
=
"qtlogging.ini"
;
bool
loggingDirectoryOk
=
false
;
QDir
iniFileLocation
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
GenericConfigLocation
));
if
(
!
iniFileLocation
.
cd
(
"QtProjects"
))
{
if
(
!
iniFileLocation
.
mkdir
(
"QtProjects"
))
{
qDebug
()
<<
"Unable to create qtlogging.ini directory"
<<
iniFileLocation
.
filePath
(
"QtProjects"
);
if
(
!
iniFileLocation
.
cd
(
qtProjectDir
))
{
if
(
!
iniFileLocation
.
mkdir
(
qtProjectDir
))
{
qDebug
()
<<
"Unable to create qtlogging.ini directory"
<<
iniFileLocation
.
filePath
(
qtProjectDir
);
}
else
{
if
(
!
iniFileLocation
.
cd
(
"QtProjects"
))
{
qDebug
()
<<
"Unable to access qtlogging.ini directory"
<<
iniFileLocation
.
filePath
(
"QtProjects"
);;
if
(
!
iniFileLocation
.
cd
(
qtProjectDir
))
{
qDebug
()
<<
"Unable to access qtlogging.ini directory"
<<
iniFileLocation
.
filePath
(
qtProjectDir
);;
}
loggingDirectoryOk
=
true
;
}
...
...
@@ -114,9 +117,9 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting) :
if
(
loggingDirectoryOk
)
{
qDebug
()
<<
iniFileLocation
;
if
(
!
iniFileLocation
.
exists
(
"qtlogging.ini"
))
{
if
(
!
QFile
::
copy
(
":QLoggingCategory/qtlogging.ini"
,
iniFileLocation
.
filePath
(
"qtlogging.ini"
)))
{
qDebug
()
<<
"Unable to copy
qtlogging.ini
to"
<<
iniFileLocation
;
if
(
!
iniFileLocation
.
exists
(
qtLoggingFile
))
{
if
(
!
QFile
::
copy
(
":QLoggingCategory/qtlogging.ini"
,
iniFileLocation
.
filePath
(
qtLoggingFile
)))
{
qDebug
()
<<
"Unable to copy
"
<<
QString
(
qtLoggingFile
)
<<
"
to"
<<
iniFileLocation
;
}
}
}
...
...
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