Commit bb25081b authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5543 from DonLakeFlyer/Fixes

Fixes: Mission linux libs, Console save to file
parents bd287607 6e132728
......@@ -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 \
......
......@@ -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;
......
......@@ -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:
......
......@@ -118,7 +118,7 @@ QGCView {
selectExisting: false
title: qsTr("Select log save file")
onAcceptedForSave: {
debugMessageModel.writeMessages(fileUrl);
debugMessageModel.writeMessages(file);
visible = false;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment