diff --git a/src/app/valentina/core/vapplication.cpp b/src/app/valentina/core/vapplication.cpp index f8c12517a..985849e81 100644 --- a/src/app/valentina/core/vapplication.cpp +++ b/src/app/valentina/core/vapplication.cpp @@ -136,7 +136,7 @@ inline void noisyFailureMsgHandler(QtMsgType type, const QMessageLogContext &con } else { - qStdErr() << msg << "\n"; + vStdErr() << msg << "\n"; } } @@ -372,6 +372,18 @@ QString VApplication::TapeFilePath() const { return file.absoluteFilePath(); } + else + { + QFileInfo tapeFile(QApplication::applicationDirPath() + "/" + tape); + if (tapeFile.exists()) + { + return tapeFile.absoluteFilePath(); + } + else + { + return tape; + } + } #endif } diff --git a/src/app/valentina/core/vcmdexport.cpp b/src/app/valentina/core/vcmdexport.cpp index e1e376f1d..e7921fdba 100644 --- a/src/app/valentina/core/vcmdexport.cpp +++ b/src/app/valentina/core/vcmdexport.cpp @@ -246,7 +246,7 @@ VCommandLinePtr VCommandLine::Get(const QCoreApplication& app) //------------------------------------------------------------------------------------------------------ NORET_ATTR void VCommandLine::Error(const QString &text) const { - qStdErr() << text << "\n"; + vStdErr() << text << "\n"; const_cast(this)->parser.showHelp(FAILED_HELP_SHOWN_STATUS); } diff --git a/src/app/valentina/core/vcmdexport.h b/src/app/valentina/core/vcmdexport.h index 60d1f2e78..f252c7b53 100644 --- a/src/app/valentina/core/vcmdexport.h +++ b/src/app/valentina/core/vcmdexport.h @@ -22,7 +22,7 @@ constexpr auto FAILED_GEN_BASE_STATUS = 240; //--------------------------------------------------------------------------------------------------------------------- -inline QTextStream& qStdErr() +inline QTextStream& vStdErr() { static QTextStream ts( stderr ); return ts; @@ -33,7 +33,7 @@ NORET_ATTR inline void AppAbort(const QString& text, int code = GENERAL_ERROR_ST { //well ..std::runtime_error was leading to zombies in memory and a lot of dumping all the time ...better to do just exit //possibly compiler do not have -fexceptions set - qStdErr() << text << "\n"; + vStdErr() << text << "\n"; std::exit(code); } //---------------------------------------------------------------------------------------------------------------------