[Qt-interest] Qt Assistant in god-mode? (Simple Text Viewer Example)
slayer81 at gmx.de
slayer81 at gmx.de
Tue Mar 22 17:37:05 CET 2011
Hello Qt people :)
I adapted the SimpleTextViewer example, where a help file collection is started by spawning a QProcess running Qt Assistant.
Link: http://doc.qt.nokia.com/4.7-snapshot/help-simpletextviewer.html
When passing a non-existent help file as argument to Qt Assistant, it shows a error message, but QProcess does _not_ exit.
I wonder why that's the case, because the following lines in application.cpp (see commented code snippet) seem to check that error, dont they?
<<<<<<<<<<<<<<<< application.cpp (bool startAssistant)<<<<<<<<<<<<<<<<
QStringList args;
args << QLatin1String("-collectionFile")
<< QLibraryInfo::location(QLibraryInfo::ExamplesPath)
+ QLatin1String("/help/simpletextviewer/documentation/simpletextviewer.qhc")
<< QLatin1String("-enableRemoteControl");
/* call with wrong collection file argument ... */
proc->start(app, args);
/* ... and proc will be in state QProcess::Running ... */
if (!proc->waitForStarted()) {
/* ... therefore you'll not see this message box (in this case) */
QMessageBox::critical(0, QObject::tr("Simple Text Viewer"),
QObject::tr("Unable to launch Qt Assistant (%1)").arg(app));
return false;
}
<<<<<<<<<<<<<<<<
Doesnt change when calling with option "quiet".
I currently use Qt 4.6.3 on Windows 7.
Cheers,
Paule
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
More information about the Qt-interest-old
mailing list