small bugfixes. Help works now under Linux.

TODO: the qhc must be registered in the assistant.
Can this be done using cmake?
The help does not show the icons, which works under MacOS though.
This commit is contained in:
Manuel Caroli 2010-07-05 16:16:56 +00:00
parent 3cf9ee4c67
commit 0715fb8896
1 changed files with 6 additions and 10 deletions

View File

@ -31,10 +31,6 @@ public:
// File menu: // File menu:
connect(ui->actionLoad_Points, SIGNAL(triggered()), connect(ui->actionLoad_Points, SIGNAL(triggered()),
s, SLOT(load_points())); s, SLOT(load_points()));
connect(ui->actionExport_pov, SIGNAL(triggered()),
s, SLOT(export_pov()));
connect(ui->actionExport_pov_2, SIGNAL(triggered()),
s, SLOT(export_pov()));
// Init menu: // Init menu:
connect(ui->actionEmpty_scene, SIGNAL(triggered()), connect(ui->actionEmpty_scene, SIGNAL(triggered()),
@ -112,11 +108,12 @@ public:
public slots: public slots:
void help() { void help() {
QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath); QString app = QLibraryInfo::location(QLibraryInfo::BinariesPath)
+ QDir::separator();
#if !defined(Q_OS_MAC) #if !defined(Q_OS_MAC)
app += QString("assistant"); app += QString("assistant");
#else #else
app += QString("/Assistant.app/Contents/MacOS/Assistant"); app += QString("Assistant.app/Contents/MacOS/Assistant");
#endif #endif
QStringList args; QStringList args;
@ -128,10 +125,9 @@ public slots:
return; return;
} }
QTextStream str(process); QString help_url = QString("qthelp://org.CGAL.demos.Periodic_3_triangulation_3/doc/index.html");
QString help_file; help_url = QString("setSource ") + help_url + '\0';
help_file = QString("setSource gthelp://org.CGAL.demos.Periodic_3_triangulation_3/doc/index.html") + '\0'; process->write(help_url.toLocal8Bit());
str << help_file;
} }
void about() { void about() {