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
6e132728
Commit
6e132728
authored
Aug 08, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix console save to file
parent
0a16a1fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
AppMessages.cc
src/QmlControls/AppMessages.cc
+2
-2
AppMessages.h
src/QmlControls/AppMessages.h
+1
-1
AppMessages.qml
src/QmlControls/AppMessages.qml
+1
-1
No files found.
src/QmlControls/AppMessages.cc
View file @
6e132728
...
...
@@ -60,14 +60,14 @@ AppLogModel::AppLogModel() : QStringListModel()
connect
(
this
,
&
AppLogModel
::
emitLog
,
this
,
&
AppLogModel
::
threadsafeLog
,
contype
);
}
void
AppLogModel
::
writeMessages
(
const
Q
Url
dest_file
)
void
AppLogModel
::
writeMessages
(
const
Q
String
dest_file
)
{
const
QString
writebuffer
(
stringList
().
join
(
'\n'
).
append
(
'\n'
));
QtConcurrent
::
run
([
dest_file
,
writebuffer
]
{
emit
debug_model
->
writeStarted
();
bool
success
=
false
;
QFile
file
(
dest_file
.
toLocalFile
()
);
QFile
file
(
dest_file
);
if
(
file
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
))
{
QTextStream
out
(
&
file
);
out
<<
writebuffer
;
...
...
src/QmlControls/AppMessages.h
View file @
6e132728
...
...
@@ -23,7 +23,7 @@ class AppLogModel : public QStringListModel
{
Q_OBJECT
public:
Q_INVOKABLE
void
writeMessages
(
const
Q
Url
dest_file
);
Q_INVOKABLE
void
writeMessages
(
const
Q
String
dest_file
);
static
void
log
(
const
QString
message
);
signals:
...
...
src/QmlControls/AppMessages.qml
View file @
6e132728
...
...
@@ -118,7 +118,7 @@ QGCView {
selectExisting
:
false
title
:
qsTr
(
"
Select log save file
"
)
onAcceptedForSave
:
{
debugMessageModel
.
writeMessages
(
file
Url
);
debugMessageModel
.
writeMessages
(
file
);
visible
=
false
;
}
}
...
...
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