diff options
Diffstat (limited to 'parts/documentation/searchview.cpp')
-rw-r--r-- | parts/documentation/searchview.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/parts/documentation/searchview.cpp b/parts/documentation/searchview.cpp index 67dca0ed..26529239 100644 --- a/parts/documentation/searchview.cpp +++ b/parts/documentation/searchview.cpp @@ -36,9 +36,9 @@ #include <kcombobox.h> #include <tdelocale.h> #include <kdialog.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <tdeapplication.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeconfig.h> #include <tdemessagebox.h> #include <kdebug.h> @@ -102,13 +102,13 @@ SearchView::SearchView(DocumentationPart *part, TQWidget *parent, const char *na m_view->setAllColumnsShowFocus(true); m_view->setResizeMode( TQListView::LastColumn ); - connect(m_configButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateConfig())); - connect(m_indexButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateIndex())); - connect(m_edit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(search())); - connect(m_goSearchButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(search())); - connect(m_view, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(executed(TQListViewItem*))); - connect(m_view, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int )), - this, TQT_SLOT(itemMouseButtonPressed(int, TQListViewItem*, const TQPoint&, int ))); + connect(m_configButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(updateConfig())); + connect(m_indexButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(updateIndex())); + connect(m_edit, TQ_SIGNAL(returnPressed()), this, TQ_SLOT(search())); + connect(m_goSearchButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(search())); + connect(m_view, TQ_SIGNAL(executed(TQListViewItem*)), this, TQ_SLOT(executed(TQListViewItem*))); + connect(m_view, TQ_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int )), + this, TQ_SLOT(itemMouseButtonPressed(int, TQListViewItem*, const TQPoint&, int ))); } SearchView::~SearchView() @@ -143,7 +143,7 @@ void SearchView::search() { TDEConfig *config = m_part->config(); config->setGroup("htdig"); - if (config->readBoolEntry("IsSetup", false) == false) + if (!config->readBoolEntry("IsSetup", false)) { KMessageBox::information(this, i18n("Full text search has to be set up before usage.")); if (!m_part->configure(1)) @@ -152,7 +152,7 @@ void SearchView::search() updateIndex(); return; } - TQString exe = config->readPathEntry("htsearchbin", kapp->dirs()->findExe("htsearch")); + TQString exe = config->readPathEntry("htsearchbin", tdeApp->dirs()->findExe("htsearch")); if (exe.isEmpty()) { KMessageBox::error(this, i18n("Cannot find the htsearch executable.\nIt is part of the ht://Dig package that is used by TDevelop to perform full text search. Please install ht://Dig and use Documentation page in Configure TDevelop dialog to set the htsearch location.")); @@ -160,7 +160,7 @@ void SearchView::search() return; } - TQString indexdir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); + TQString indexdir = tdeApp->dirs()->saveLocation("data", "kdevdocumentation/search"); TQDir d; if (indexdir.isEmpty() || !TQFile::exists(indexdir + "/htdig.conf")) { @@ -177,7 +177,7 @@ void SearchView::search() } } - TQString savedir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); + TQString savedir = tdeApp->dirs()->saveLocation("data", "kdevdocumentation/search"); if (!d.exists(savedir)) d.mkdir(savedir); @@ -188,17 +188,17 @@ void SearchView::search() .arg("builtin-short") .arg(m_sortMethodBox->currentItem()==2? "date" : m_sortMethodBox->currentItem()==1? "title" : "score"); - kdDebug(9002) << "starting kprocess" << endl; + kdDebug(9002) << "starting tdeprocess" << endl; kdDebug(9002) << "htdig line:" << exe << " -c " << (indexdir + "/htdig.conf ") << query << endl; TDEProcess *proc = new TDEProcess; - TQString picdir = kapp->dirs()->findResourceDir("data", "kdevdocumentation/pics/htdig.png"); + TQString picdir = tdeApp->dirs()->findResourceDir("data", "kdevdocumentation/pics/htdig.png"); proc->setEnvironment("PICDIR", picdir); *proc << exe << "-c" << (indexdir + "/htdig.conf") << query; - connect( proc, TQT_SIGNAL(receivedStdout(TDEProcess *,char*,int)), - this, TQT_SLOT(htsearchStdout(TDEProcess *,char*,int)) ); - connect( proc, TQT_SIGNAL(processExited(TDEProcess *)), - this, TQT_SLOT(htsearchExited(TDEProcess *)) ); + connect( proc, TQ_SIGNAL(receivedStdout(TDEProcess *,char*,int)), + this, TQ_SLOT(htsearchStdout(TDEProcess *,char*,int)) ); + connect( proc, TQ_SIGNAL(processExited(TDEProcess *)), + this, TQ_SLOT(htsearchExited(TDEProcess *)) ); searchResult = ""; @@ -213,12 +213,12 @@ void SearchView::search() // While receiving data from the subprocess, we want // to block the user interface, but still get repaint // events. Hack taken from NetAccess... - kapp->setOverrideCursor(waitCursor); + tdeApp->setOverrideCursor(waitCursor); TQWidget blocker(0, 0, WType_Dialog | WShowModal); tqt_enter_modal(&blocker); - kapp->enter_loop(); + tdeApp->enter_loop(); tqt_leave_modal(&blocker); - kapp->restoreOverrideCursor(); + tdeApp->restoreOverrideCursor(); if (!proc->normalExit() || proc->exitStatus() != 0) { @@ -254,7 +254,7 @@ void SearchView::htsearchStdout(TDEProcess *, char *buffer, int len) void SearchView::htsearchExited(TDEProcess *) { - kapp->exit_loop(); + tdeApp->exit_loop(); } void SearchView::analyseSearchResults() @@ -303,7 +303,7 @@ void SearchView::executed(TQListViewItem *item) void SearchView::itemMouseButtonPressed(int button, TQListViewItem *item, const TQPoint &pos, int // c ) { - if ((button != Qt::RightButton) || (!item)) + if ((button != TQt::RightButton) || (!item)) return; DocumentationItem *docItem = dynamic_cast<DocumentationItem*>(item); if (!docItem) |