Unfortunately on Windows argc and argv parameters are unreliable inside a Qt application, so I had to hardcode the report file name. :(

--HG--
branch : hotfix
hg/compatibility
dfighter1985 10 years ago
parent 2fe77d719f
commit 469e5583c1

@ -25,25 +25,8 @@ int main( int argc, char **argv )
{
QApplication app( argc, argv );
#if 0
if( argc < 2 )
{
QMessageBox::information( NULL,
QObject::tr( "Error" ),
QObject::tr( "Need to specify a path to the error report." ) );
return 1;
}
#endif
RCErrorWidget w;
#if 0
w.setFileName( argv[ 1 ] );
#else
w.setFileName( "log.log" );
#endif
w.setFileName( "rcerrorlog.txt" );
w.show();
return app.exec();

@ -52,7 +52,10 @@ void RCErrorWidget::onLoad()
bool b = f.open( QFile::ReadOnly | QFile::Text );
if( !b )
{
return;
QMessageBox::information( this,
tr( "No log file found" ),
tr( "There was no log file found, therefore nothing to report. Exiting..." ) );
close();
}
QTextStream ss( &f );

@ -64,10 +64,7 @@ void report ()
TReportResult report (const std::string &title, const std::string &header, const std::string &subject, const std::string &body, bool enableCheckIgnore, uint debugButton, bool ignoreButton, sint quitButton, bool sendReportButton, bool &ignoreNextTime, const string &attachedFile)
{
std::string fname;
time_t s = time( NULL );
fname = std::string( "log_" ) + toString( s ) + ".txt";
std::string fname = "rcerrorlog.txt";
std::ofstream f;
f.open( fname.c_str() );
@ -83,9 +80,6 @@ TReportResult report (const std::string &title, const std::string &header, const
#endif
}
NLMISC::CFile::deleteFile( fname );
#ifdef NL_OS_WINDOWS
#ifndef NL_COMP_MINGW
// disable the Windows popup telling that the application aborted and disable the dr watson report.

Loading…
Cancel
Save