TEMPLATE = app
CONFIG += uitools qt console release assistant
QT+=xml # <- this line
DESTDIR = ../bin
TARGET = HiQt
TEMPLATE = app
CONFIG += uitools qt console release assistant
QT+=xml # <- this line
DESTDIR = ../bin
TARGET = HiQt
To copy to clipboard, switch view to plain text mode
elcuco@pinky:~/src/qt4/HiQt/src$ diff -u HiQtDocBrowser.h{.orig,}
--- HiQtDocBrowser.h.orig 2007-07-21 17:38:11.000000000 +0300
+++ HiQtDocBrowser.h 2007-07-21 17:46:22.000000000 +0300
@@ -3,6 +3,7 @@
#include "ui_HiQtDocBrowser.h"
#include <QUrl>
+#include <QLibraryInfo>
#include <QMainWindow>
#include <QToolBar>
#include <QFileInfo>
@@ -15,7 +16,9 @@
ui.setupUi(this);
+ ui.browser->setSearchPaths(l);
connect(ui.previous_button,SIGNAL(clicked()),ui.browser,SLOT(backward()));
connect(ui.next_button,SIGNAL(clicked()),ui.browser,SLOT(forward()));
@@ -26,7 +29,7 @@
ui.
browser->setSource
(QUrl("index.html"));
}
- if (QFileInfo(QString(getenv("QTDIR"))+"/doc/html/"+word.
toLower()+".html").
exists()) ui.
browser->setSource
(QUrl(word.
toLower()+".html"));
}
public slots:
elcuco@pinky:~/src/qt4/HiQt/src$ diff -u HiQtDocBrowser.h{.orig,}
--- HiQtDocBrowser.h.orig 2007-07-21 17:38:11.000000000 +0300
+++ HiQtDocBrowser.h 2007-07-21 17:46:22.000000000 +0300
@@ -3,6 +3,7 @@
#include "ui_HiQtDocBrowser.h"
#include <QUrl>
+#include <QLibraryInfo>
#include <QMainWindow>
#include <QToolBar>
#include <QFileInfo>
@@ -15,7 +16,9 @@
HiQtDocBrowser(QWidget *parent=0) : QWidget(parent) {
ui.setupUi(this);
- ui.browser->setSearchPaths(QStringList(QString(getenv("QTDIR"))+"/doc/html"));
+ QStringList l;
+ l << QLibraryInfo::location(QLibraryInfo::DocumentationPath) + "/html";
+ ui.browser->setSearchPaths(l);
connect(ui.previous_button,SIGNAL(clicked()),ui.browser,SLOT(backward()));
connect(ui.next_button,SIGNAL(clicked()),ui.browser,SLOT(forward()));
@@ -26,7 +29,7 @@
ui.browser->setSource(QUrl("index.html"));
}
void open_keyword(QString word) {
- if (QFileInfo(QString(getenv("QTDIR"))+"/doc/html/"+word.toLower()+".html").exists())
+ if (QFileInfo( QLibraryInfo::location(QLibraryInfo::DocumentationPath) + "/" + word.toLower()+".html").exists())
ui.browser->setSource(QUrl(word.toLower()+".html"));
}
public slots:
To copy to clipboard, switch view to plain text mode
Bookmarks