Corrections to merge

--HG--
branch : develop
This commit is contained in:
Alex 2015-08-27 21:33:38 +03:00
parent 7f1d2934a7
commit f4b4c6011f
3 changed files with 16 additions and 4 deletions

View file

@ -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
}

View file

@ -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<VCommandLine*>(this)->parser.showHelp(FAILED_HELP_SHOWN_STATUS);
}

View file

@ -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);
}
//---------------------------------------------------------------------------------------------------------------------