From 1227e9ebc032df4c559ade4ab15f86fad2a8c7ba Mon Sep 17 00:00:00 2001 From: Andy Vandijck Date: Sun, 18 Feb 2024 15:45:48 +0100 Subject: [PATCH] Fix Linux build Fix Linux build --- src/drivers/Qt/TasEditor/TasEditorWindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp index 6b6785d3..0e21e87f 100644 --- a/src/drivers/Qt/TasEditor/TasEditorWindow.cpp +++ b/src/drivers/Qt/TasEditor/TasEditorWindow.cpp @@ -1714,8 +1714,13 @@ bool TasEditorWindow::saveProjectAs(bool save_compact) int ret; std::string msg; +#if defined(__linux__) + msg = "Pre-existing TAS project file will be overwritten:\n\n" + + fi.fileName().toLocal8Bit().constData() + "\n\nReplace file?"; +#else msg = "Pre-existing TAS project file will be overwritten:\n\n" + fi.fileName().toLocal8Bit() + "\n\nReplace file?"; +#endif ret = QMessageBox::warning( this, QObject::tr("Overwrite Warning"), QString::fromStdString(msg), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ); @@ -2550,8 +2555,13 @@ bool TasEditorWindow::saveCompactGetFilename( QString &outputFilePath ) int ret; std::string msg; +#ifdef __linux__ + msg = "Pre-existing TAS project file will be overwritten:\n\n" + + fi.fileName().toLocal8Bit().constData() + "\n\nReplace file?"; +#else msg = "Pre-existing TAS project file will be overwritten:\n\n" + fi.fileName().toLocal8Bit() + "\n\nReplace file?"; +#endif ret = QMessageBox::warning( this, QObject::tr("Overwrite Warning"), QString::fromStdString(msg), QMessageBox::Yes | QMessageBox::No, QMessageBox::No );