Skip to content

Commit

Permalink
Merge pull request #5543 from DonLakeFlyer/Fixes
Browse files Browse the repository at this point in the history
Fixes: Mission linux libs, Console save to file
  • Loading branch information
DonLakeFlyer committed Aug 8, 2017
2 parents bd28760 + 6e13272 commit bb25081
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions QGCSetup.pri
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ LinuxBuild {
libQt5PrintSupport.so.5 \
libQt5Qml.so.5 \
libQt5Quick.so.5 \
libQt5QuickControls2.so.5 \
libQt5QuickTemplates2.so.5 \
libQt5QuickWidgets.so.5 \
libQt5SerialPort.so.5 \
libQt5Sql.so.5 \
Expand Down
4 changes: 2 additions & 2 deletions src/QmlControls/AppMessages.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ AppLogModel::AppLogModel() : QStringListModel()
connect(this, &AppLogModel::emitLog, this, &AppLogModel::threadsafeLog, contype);
}

void AppLogModel::writeMessages(const QUrl dest_file)
void AppLogModel::writeMessages(const QString 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;
Expand Down
2 changes: 1 addition & 1 deletion src/QmlControls/AppMessages.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class AppLogModel : public QStringListModel
{
Q_OBJECT
public:
Q_INVOKABLE void writeMessages(const QUrl dest_file);
Q_INVOKABLE void writeMessages(const QString dest_file);
static void log(const QString message);

signals:
Expand Down
2 changes: 1 addition & 1 deletion src/QmlControls/AppMessages.qml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ QGCView {
selectExisting: false
title: qsTr("Select log save file")
onAcceptedForSave: {
debugMessageModel.writeMessages(fileUrl);
debugMessageModel.writeMessages(file);
visible = false;
}
}
Expand Down

0 comments on commit bb25081

Please sign in to comment.