From f4b4c6011fbc4f4515ef9dfd84cff8369e81e3b3 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 27 Aug 2015 21:33:38 +0300 Subject: [PATCH] Corrections to merge --HG-- branch : develop --- src/app/valentina/core/vapplication.cpp | 14 +++++++++++++- src/app/valentina/core/vcmdexport.cpp | 2 +- src/app/valentina/core/vcmdexport.h | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) 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); } //---------------------------------------------------------------------------------------------------------------------