|
|
|
@ -632,7 +632,7 @@ bool KCHMMainWindow::parseCmdLineArgs( )
|
|
|
|
|
search_index = args->getOption ("sindex");
|
|
|
|
|
|
|
|
|
|
if ( args->count() > 0 )
|
|
|
|
|
filename = args->arg(0);
|
|
|
|
|
filename = TQString::fromLocal8Bit(args->arg(0));
|
|
|
|
|
#else
|
|
|
|
|
// argv[0] in TQt is still a program name
|
|
|
|
|
for ( int i = 1; i < tqApp->argc(); i++ )
|
|
|
|
@ -651,13 +651,13 @@ bool KCHMMainWindow::parseCmdLineArgs( )
|
|
|
|
|
exit (1);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
filename = tqApp->argv()[i];
|
|
|
|
|
filename = TQSTring::fromLocal8Bit(tqApp->argv()[i]);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if ( !filename.isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
if ( !loadChmFile( TQString::fromLocal8Bit( filename )) )
|
|
|
|
|
if ( !loadChmFile( filename ) )
|
|
|
|
|
return true; // skip the latest checks, but do not exit from the program
|
|
|
|
|
|
|
|
|
|
if ( !search_index.isEmpty() )
|
|
|
|
@ -667,7 +667,7 @@ bool KCHMMainWindow::parseCmdLineArgs( )
|
|
|
|
|
tqApp->postEvent( this, new KCHMUserEvent( "findInIndex", event_args ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( !search_query.isEmpty() )
|
|
|
|
|
if ( !search_query.isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
TQStringList event_args;
|
|
|
|
|
event_args.push_back( search_query );
|
|
|
|
|