summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/config.cpp10
-rw-r--r--tools/assistant/docuparser.cpp36
-rw-r--r--tools/assistant/finddialog.ui.h2
-rw-r--r--tools/assistant/helpdialogimpl.cpp90
-rw-r--r--tools/assistant/helpwindow.cpp10
-rw-r--r--tools/assistant/index.cpp48
-rw-r--r--tools/assistant/lib/tqassistantclient.cpp12
-rw-r--r--tools/assistant/main.cpp26
-rw-r--r--tools/assistant/mainwindow.ui.h40
-rw-r--r--tools/assistant/profile.cpp4
-rw-r--r--tools/assistant/tabbedbrowser.ui.h10
-rw-r--r--tools/assistant/topicchooserimpl.cpp2
12 files changed, 145 insertions, 145 deletions
diff --git a/tools/assistant/config.cpp b/tools/assistant/config.cpp
index 43f17b6c1..ae3db7e1e 100644
--- a/tools/assistant/config.cpp
+++ b/tools/assistant/config.cpp
@@ -51,7 +51,7 @@ inline TQString getVersionString()
}
Config::Config()
- : hideSidebar( FALSE ), profil( 0 ), maximized(FALSE)
+ : hideSidebar( false ), profil( 0 ), maximized(false)
{
fontSiz = tqApp->font().pointSize();
if( !static_configuration ) {
@@ -116,7 +116,7 @@ void Config::load()
webBrows = settings.readEntry( key + "Webbrowser" );
home = settings.readEntry( profkey + "Homepage" );
pdfApp = settings.readEntry( key + "PDFApplication" );
- linkUnder = settings.readBoolEntry( key + "LinkUnderline", TRUE );
+ linkUnder = settings.readBoolEntry( key + "LinkUnderline", true );
linkCol = settings.readEntry( key + "LinkColor", "#0000FF" );
src = settings.readListEntry( profkey + "Source" );
sideBar = settings.readNumEntry( key + "SideBarPage" );
@@ -133,10 +133,10 @@ void Config::load()
settings.readNumEntry( key + "GeometryY", TQApplication::desktop()->availableGeometry().y() ),
settings.readNumEntry( key + "GeometryWidth", 800 ),
settings.readNumEntry( key + "GeometryHeight", 600 ) );
- maximized = settings.readBoolEntry( key + "GeometryMaximized", FALSE );
+ maximized = settings.readBoolEntry( key + "GeometryMaximized", false );
}
mainWinLayout = settings.readEntry( key + "MainwindowLayout" );
- rebuildDocs = settings.readBoolEntry( key + "RebuildDocDB", TRUE );
+ rebuildDocs = settings.readBoolEntry( key + "RebuildDocDB", true );
profileNames = settings.entryList( key + "Profile" );
}
@@ -284,7 +284,7 @@ TQStringList Config::mimePaths()
// Mime source for .dcf file path
TQFileInfo info( *it );
- TQString dcfPath = info.dirPath(TRUE);
+ TQString dcfPath = info.dirPath(true);
if (lst.contains(dcfPath) == 0)
lst << dcfPath;
diff --git a/tools/assistant/docuparser.cpp b/tools/assistant/docuparser.cpp
index c1077d154..8be590f32 100644
--- a/tools/assistant/docuparser.cpp
+++ b/tools/assistant/docuparser.cpp
@@ -70,7 +70,7 @@ DocuParser *DocuParser::createParser( const TQString &fileName )
int read = 0;
int maxlen = 1024;
int majVer = 0, minVer = 0, serVer = 0;
- static TQRegExp re( "assistantconfig +version=\"(\\d)\\.(\\d)\\.(\\d)\"", FALSE );
+ static TQRegExp re( "assistantconfig +version=\"(\\d)\\.(\\d)\\.(\\d)\"", false );
Q_ASSERT( re.isValid() );
while( read != -1 ) {
read = file.readLine( str, maxlen );
@@ -144,7 +144,7 @@ bool DocuParser310::startDocument()
contentList.clear();
indexList.clear();
- return TRUE;
+ return true;
}
@@ -169,8 +169,8 @@ bool DocuParser310::startElement( const TQString &, const TQString &,
state = StateKeyword;
indexRef = absolutify( attr.value( "ref" ) );
} else
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
bool DocuParser310::endElement( const TQString &nameSpace, const TQString &localName,
@@ -189,7 +189,7 @@ bool DocuParser310::endElement( const TQString &nameSpace, const TQString &local
state = StateSect;
break;
}
- return TRUE;
+ return true;
}
@@ -197,21 +197,21 @@ bool DocuParser310::characters( const TQString& ch )
{
TQString str = ch.simplifyWhiteSpace();
if ( str.isEmpty() )
- return TRUE;
+ return true;
switch ( state ) {
case StateInit:
case StateContent:
case StateSect:
- return FALSE;
+ return false;
break;
case StateKeyword:
indexList.append( new IndexItem( str, indexRef ) );
break;
default:
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
@@ -260,7 +260,7 @@ bool DocuParser320::startDocument()
prof->addDCF( fname );
- return TRUE;
+ return true;
}
bool DocuParser320::startElement( const TQString &, const TQString &,
@@ -316,7 +316,7 @@ bool DocuParser320::startElement( const TQString &, const TQString &,
break;
}
- return TRUE;
+ return true;
}
bool DocuParser320::endElement( const TQString &nameSpace,
@@ -335,7 +335,7 @@ bool DocuParser320::endElement( const TQString &nameSpace,
case StateProperty:
state = StateProfile;
if( propertyName.isEmpty() || propertyValue.isEmpty() )
- return FALSE;
+ return false;
{
static const TQStringList lst = TQStringList() << "startpage" << "abouturl"
<< "applicationicon" << "assistantdocs";
@@ -347,7 +347,7 @@ bool DocuParser320::endElement( const TQString &nameSpace,
case StateContent:
if( !iconName.isEmpty() ) prof->addDCFIcon( docTitle, iconName );
if( contentRef.isEmpty() )
- return FALSE;
+ return false;
prof->addDCFIndexPage( docTitle, conURL );
prof->addDCFTitle( fname, docTitle );
state = StateDocRoot;
@@ -359,20 +359,20 @@ bool DocuParser320::endElement( const TQString &nameSpace,
state = StateSect;
break;
}
- return TRUE;
+ return true;
}
bool DocuParser320::characters( const TQString& ch )
{
TQString str = ch.simplifyWhiteSpace();
if ( str.isEmpty() )
- return TRUE;
+ return true;
switch ( state ) {
case StateInit:
case StateContent:
case StateSect:
- return FALSE;
+ return false;
break;
case StateKeyword:
indexList.append( new IndexItem( str, indexRef ) );
@@ -381,9 +381,9 @@ bool DocuParser320::characters( const TQString& ch )
propertyValue = ch;
break;
default:
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
bool DocuParser320::fatalError( const TQXmlParseException& exception )
diff --git a/tools/assistant/finddialog.ui.h b/tools/assistant/finddialog.ui.h
index c95c41379..b515f31e2 100644
--- a/tools/assistant/finddialog.ui.h
+++ b/tools/assistant/finddialog.ui.h
@@ -36,7 +36,7 @@
void FindDialog::init()
{
lastBrowser = 0;
- onceFound = FALSE;
+ onceFound = false;
findExpr = "";
sb = new TQStatusBar( this );
FindDialogLayout->addWidget( sb );
diff --git a/tools/assistant/helpdialogimpl.cpp b/tools/assistant/helpdialogimpl.cpp
index 6a1d91b56..91b0fe9b8 100644
--- a/tools/assistant/helpdialogimpl.cpp
+++ b/tools/assistant/helpdialogimpl.cpp
@@ -82,9 +82,9 @@ static bool verifyDirectory(const TQString &str)
return TQDir().mkdir(str);
if (!dirInfo.isDir()) {
tqWarning("'%s' exists but is not a directory", str.latin1());
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
struct IndexKeyword {
@@ -145,7 +145,7 @@ void HelpNavigationListItem::addLink( const TQString &link )
}
TQString preHash = link.left( hash );
- if ( linkList.grep( preHash, FALSE ).count() > 0 )
+ if ( linkList.grep( preHash, false ).count() > 0 )
return;
linkList << link;
}
@@ -173,7 +173,7 @@ TQString HelpNavigationContentsItem::link() const
HelpDialog::HelpDialog( TQWidget *parent, MainWindow *h )
- : HelpDialogBase( parent, 0, FALSE ), lwClosed( FALSE ), help( h )
+ : HelpDialogBase( parent, 0, false ), lwClosed( false ), help( h )
{
}
@@ -226,9 +226,9 @@ void HelpDialog::initialize()
editIndex->installEventFilter( this );
listBookmarks->header()->hide();
- listBookmarks->header()->setStretchEnabled( TRUE );
+ listBookmarks->header()->setStretchEnabled( true );
listContents->header()->hide();
- listContents->header()->setStretchEnabled( TRUE );
+ listContents->header()->setStretchEnabled( true );
framePrepare->hide();
connect( tqApp, TQ_SIGNAL(lastWindowClosed()), TQ_SLOT(lastWinClosed()) );
@@ -239,15 +239,15 @@ void HelpDialog::initialize()
itemPopup->insertItem( tr( "Open Link in New Window" ), 1 );
itemPopup->insertItem( tr( "Open Link in New Tab" ), 2 );
- contentList.setAutoDelete( TRUE );
+ contentList.setAutoDelete( true );
contentList.clear();
- initDoneMsgShown = FALSE;
+ initDoneMsgShown = false;
fullTextIndex = 0;
- indexDone = FALSE;
- titleMapDone = FALSE;
- contentsInserted = FALSE;
- bookmarksInserted = FALSE;
+ indexDone = false;
+ titleMapDone = false;
+ contentsInserted = false;
+ bookmarksInserted = false;
setupTitleMap();
}
@@ -260,7 +260,7 @@ void HelpDialog::processEvents()
void HelpDialog::lastWinClosed()
{
- lwClosed = TRUE;
+ lwClosed = true;
}
@@ -302,7 +302,7 @@ void HelpDialog::loadIndexFile()
return;
setCursor( waitCursor );
- indexDone = TRUE;
+ indexDone = true;
labelPrepare->setText( tr( "Prepare..." ) );
framePrepare->show();
processEvents();
@@ -330,7 +330,7 @@ void HelpDialog::loadIndexFile()
}
}
- editIndex->setEnabled(FALSE);
+ editIndex->setEnabled(false);
TQDataStream ds( &indexFile );
TQ_UINT32 fileAges;
@@ -341,7 +341,7 @@ void HelpDialog::loadIndexFile()
if ( !indexFile.open( IO_ReadOnly ) ) {
TQMessageBox::warning( help, tr( "TQt Assistant" ),
tr( "Cannot open the index file %1" ).arg( TQFileInfo( indexFile ).absFilePath() ) );
- editIndex->setEnabled(TRUE);
+ editIndex->setEnabled(true);
return;
}
ds.setDevice( &indexFile );
@@ -373,7 +373,7 @@ void HelpDialog::loadIndexFile()
framePrepare->hide();
showInitDoneMessage();
setCursor( arrowCursor );
- editIndex->setEnabled(TRUE);
+ editIndex->setEnabled(true);
}
TQ_UINT32 HelpDialog::getFileAges()
@@ -467,13 +467,13 @@ void HelpDialog::setupTitleMap()
return;
if ( Config::configuration()->docRebuild() ) {
removeOldCacheFiles();
- Config::configuration()->setDocRebuild( FALSE );
+ Config::configuration()->setDocRebuild( false );
Config::configuration()->saveProfile( Config::configuration()->profile() );
}
if ( contentList.isEmpty() )
getAllContents();
- titleMapDone = TRUE;
+ titleMapDone = true;
titleMap.clear();
TQDictIterator<ContentList> lstIt( contentList );
for ( ; lstIt.current(); ++lstIt ) {
@@ -583,7 +583,7 @@ void HelpDialog::showInitDoneMessage()
{
if ( initDoneMsgShown )
return;
- initDoneMsgShown = TRUE;
+ initDoneMsgShown = true;
help->statusBar()->message( tr( "Done" ), 3000 );
}
@@ -628,9 +628,9 @@ void HelpDialog::showIndexTopic()
if ( !i )
return;
- editIndex->blockSignals( TRUE );
+ editIndex->blockSignals( true );
editIndex->setText( i->text() );
- editIndex->blockSignals( FALSE );
+ editIndex->blockSignals( false );
HelpNavigationListItem *item = (HelpNavigationListItem*)i;
@@ -681,7 +681,7 @@ TQString HelpDialog::titleOfLink( const TQString &link )
bool HelpDialog::eventFilter( TQObject * o, TQEvent * e )
{
if ( !o || !e )
- return TRUE;
+ return true;
if ( o == editIndex && e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
@@ -689,25 +689,25 @@ bool HelpDialog::eventFilter( TQObject * o, TQEvent * e )
int i = listIndex->currentItem();
if ( --i >= 0 ) {
listIndex->setCurrentItem( i );
- editIndex->blockSignals( TRUE );
+ editIndex->blockSignals( true );
editIndex->setText( listIndex->currentText() );
- editIndex->blockSignals( FALSE );
+ editIndex->blockSignals( false );
}
- return TRUE;
+ return true;
} else if ( ke->key() == Key_Down ) {
int i = listIndex->currentItem();
if ( ++i < int(listIndex->count()) ) {
listIndex->setCurrentItem( i );
- editIndex->blockSignals( TRUE );
+ editIndex->blockSignals( true );
editIndex->setText( listIndex->currentText() );
- editIndex->blockSignals( FALSE );
+ editIndex->blockSignals( false );
}
- return TRUE;
+ return true;
} else if ( ke->key() == Key_Next || ke->key() == Key_Prior ) {
TQApplication::sendEvent( listIndex, e);
- editIndex->blockSignals( TRUE );
+ editIndex->blockSignals( true );
editIndex->setText( listIndex->currentText() );
- editIndex->blockSignals( FALSE );
+ editIndex->blockSignals( false );
}
}
@@ -738,7 +738,7 @@ void HelpDialog::removeBookmark()
delete listBookmarks->currentItem();
saveBookmarks();
if ( listBookmarks->firstChild() ) {
- listBookmarks->setSelected( listBookmarks->firstChild(), TRUE );
+ listBookmarks->setSelected( listBookmarks->firstChild(), true );
}
help->updateBookmarkMenu();
}
@@ -747,7 +747,7 @@ void HelpDialog::insertBookmarks()
{
if ( bookmarksInserted )
return;
- bookmarksInserted = TRUE;
+ bookmarksInserted = true;
listBookmarks->clear();
TQFile f( cacheFilesPath + "bookmarks." + Config::configuration()->profileName() );
if ( !f.open( IO_ReadOnly ) )
@@ -801,7 +801,7 @@ void HelpDialog::insertContents()
if ( contentList.isEmpty() )
getAllContents();
- contentsInserted = TRUE;
+ contentsInserted = true;
listContents->clear();
setCursor( waitCursor );
if ( !titleMapDone )
@@ -817,7 +817,7 @@ void HelpDialog::insertContents()
TQPtrStack<HelpNavigationContentsItem> stack;
stack.clear();
int depth = 0;
- bool root = FALSE;
+ bool root = false;
HelpNavigationContentsItem *lastItem[64];
for( int j = 0; j < 64; ++j )
@@ -835,7 +835,7 @@ void HelpDialog::insertContents()
newEntry->setLink( item.reference );
stack.push( newEntry );
depth = 1;
- root = TRUE;
+ root = true;
}
else{
if( (item.depth > depth) && root ) {
@@ -928,9 +928,9 @@ void HelpDialog::setupFullTextIndex()
"Assistant will not work!"));
return;
}
- searchButton->setEnabled(FALSE);
- helpButton->setEnabled(FALSE);
- termsEdit->setEnabled(FALSE);
+ searchButton->setEnabled(false);
+ helpButton->setEnabled(false);
+ termsEdit->setEnabled(false);
fullTextIndex->setDictionaryFile( cacheFilesPath + "indexdb.dict." + pname );
fullTextIndex->setDocListFile( cacheFilesPath + "indexdb.doc." + pname );
@@ -982,9 +982,9 @@ void HelpDialog::setupFullTextIndex()
help->statusBar()->message( tr( "Done" ), 3000 );
setCursor( arrowCursor );
}
- searchButton->setEnabled(TRUE);
- termsEdit->setEnabled(TRUE);
- helpButton->setEnabled(TRUE);
+ searchButton->setEnabled(true);
+ termsEdit->setEnabled(true);
+ helpButton->setEnabled(true);
}
void HelpDialog::setIndexingProgress( int prog )
@@ -1047,7 +1047,7 @@ void HelpDialog::startSearch()
resultBox->insertItem( fullTextIndex->getDocumentTitle( *it ) );
terms.clear();
- bool isPhrase = FALSE;
+ bool isPhrase = false;
TQString s = "";
for ( int i = 0; i < (int)buf.length(); ++i ) {
if ( buf[i] == '\"' ) {
@@ -1103,9 +1103,9 @@ void HelpDialog::showItemMenu( TQListBoxItem *item, const TQPoint &pos )
} else if ( id > 0 ) {
HelpWindow *hw = help->browsers()->currentBrowser();
if ( stripAmpersand( tabWidget->tabLabel( tabWidget->currentPage() ) ).contains( tr( "Index" ) ) ) {
- editIndex->blockSignals( TRUE );
+ editIndex->blockSignals( true );
editIndex->setText( item->text() );
- editIndex->blockSignals( FALSE );
+ editIndex->blockSignals( false );
HelpNavigationListItem *hi = (HelpNavigationListItem*)item;
diff --git a/tools/assistant/helpwindow.cpp b/tools/assistant/helpwindow.cpp
index 014729c23..517595ee2 100644
--- a/tools/assistant/helpwindow.cpp
+++ b/tools/assistant/helpwindow.cpp
@@ -56,8 +56,8 @@
#endif
HelpWindow::HelpWindow( MainWindow *w, TQWidget *parent, const char *name )
- : TQTextBrowser( parent, name ), mw( w ), blockScroll( FALSE ),
- shiftPressed( FALSE ), newWindow( FALSE )
+ : TQTextBrowser( parent, name ), mw( w ), blockScroll( false ),
+ shiftPressed( false ), newWindow( false )
{
connect(this, TQ_SIGNAL(forwardAvailable(bool)), this, TQ_SLOT(updateForward(bool)));
connect(this, TQ_SIGNAL(backwardAvailable(bool)), this, TQ_SLOT(updateBackward(bool)));
@@ -78,7 +78,7 @@ void HelpWindow::setSource( const TQString &name )
TQFileInfo linkInfo( name );
TQString target = name;
if( linkInfo.isRelative() )
- target = currentInfo.dirPath( TRUE ) + "/" + name;
+ target = currentInfo.dirPath( true ) + "/" + name;
nmw->setup();
nmw->move( mw->geometry().topLeft() );
@@ -170,9 +170,9 @@ void HelpWindow::openLinkInNewWindow()
{
if ( lastAnchor.isEmpty() )
return;
- newWindow = TRUE;
+ newWindow = true;
setSource(lastAnchor);
- newWindow = FALSE;
+ newWindow = false;
}
void HelpWindow::openLinkInNewWindow( const TQString &link )
diff --git a/tools/assistant/index.cpp b/tools/assistant/index.cpp
index 37de8a85a..d41a744eb 100644
--- a/tools/assistant/index.cpp
+++ b/tools/assistant/index.cpp
@@ -67,8 +67,8 @@ TQDataStream &operator<<( TQDataStream &s, const Document &l )
Index::Index( const TQString &dp, const TQString &hp )
: TQObject( 0, 0 ), dict( 8999 ), docPath( dp )
{
- alreadyHaveDocList = FALSE;
- lastWindowClosed = FALSE;
+ alreadyHaveDocList = false;
+ lastWindowClosed = false;
connect( tqApp, TQ_SIGNAL( lastWindowClosed() ),
this, TQ_SLOT( setLastWinClosed() ) );
}
@@ -77,15 +77,15 @@ Index::Index( const TQStringList &dl, const TQString &hp )
: TQObject( 0, 0 ), dict( 8999 )
{
docList = dl;
- alreadyHaveDocList = TRUE;
- lastWindowClosed = FALSE;
+ alreadyHaveDocList = true;
+ lastWindowClosed = false;
connect( tqApp, TQ_SIGNAL( lastWindowClosed() ),
this, TQ_SLOT( setLastWinClosed() ) );
}
void Index::setLastWinClosed()
{
- lastWindowClosed = TRUE;
+ lastWindowClosed = true;
}
void Index::setDictionaryFile( const TQString &f )
@@ -167,7 +167,7 @@ void Index::parseDocument( const TQString &filename, int docNum )
if (text.isNull())
return;
- bool valid = TRUE;
+ bool valid = true;
const TQChar *buf = text.unicode();
TQChar str[64];
TQChar c = buf[0];
@@ -175,7 +175,7 @@ void Index::parseDocument( const TQString &filename, int docNum )
int i = 0;
while ( (uint)j < text.length() ) {
if ( c == '<' || c == '&' ) {
- valid = FALSE;
+ valid = false;
if ( i > 1 )
insertInDict( TQString(str,i), docNum );
i = 0;
@@ -183,7 +183,7 @@ void Index::parseDocument( const TQString &filename, int docNum )
continue;
}
if ( ( c == '>' || c == ';' ) && !valid ) {
- valid = TRUE;
+ valid = true;
c = buf[++j];
continue;
}
@@ -291,11 +291,11 @@ TQStringList Index::query( const TQStringList &terms, const TQStringList &termSe
TQValueList<Document> docs = t->documents;
C = minDocs.begin();
while ( C != minDocs.end() ) {
- bool found = FALSE;
+ bool found = false;
for ( It = docs.begin(); It != docs.end(); ++It ) {
if ( (*C).docNumber == (*It).docNumber ) {
(*C).frequency += (*It).frequency;
- found = TRUE;
+ found = true;
break;
}
}
@@ -333,8 +333,8 @@ TQString Index::getDocumentTitle( const TQString &fileName )
TQTextStream s( &file );
TQString text = s.read();
- int start = text.find( "<title>", 0, FALSE ) + 7;
- int end = text.find( "</title>", 0, FALSE );
+ int start = text.find( "<title>", 0, false ) + 7;
+ int end = text.find( "</title>", 0, false );
TQString title = ( end - start <= 0 ? tr("Untitled") : text.mid( start, end - start ) );
return title;
@@ -349,31 +349,31 @@ TQStringList Index::getWildcardTerms( const TQString &term )
TQDictIterator<Entry> it( dict );
for( ; it.current(); ++it ) {
int index = 0;
- bool found = FALSE;
+ bool found = false;
TQString text( it.currentKey() );
for ( iter = terms.begin(); iter != terms.end(); ++iter ) {
if ( *iter == "*" ) {
- found = TRUE;
+ found = true;
continue;
}
if ( iter == terms.begin() && (*iter)[0] != text[0] ) {
- found = FALSE;
+ found = false;
break;
}
index = text.find( *iter, index );
if ( *iter == terms.last() && index != (int)text.length()-1 ) {
index = text.findRev( *iter );
if ( index != (int)text.length() - (int)(*iter).length() ) {
- found = FALSE;
+ found = false;
break;
}
}
if ( index != -1 ) {
- found = TRUE;
+ found = true;
index += (*iter).length();
continue;
} else {
- found = FALSE;
+ found = false;
break;
}
}
@@ -451,7 +451,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList &
TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
tqWarning( "cannot open file " + fileName );
- return FALSE;
+ return false;
}
wordNum = 3;
@@ -462,7 +462,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList &
TQTextStream s( &file );
TQString text = s.read();
- bool valid = TRUE;
+ bool valid = true;
const TQChar *buf = text.unicode();
TQChar str[64];
TQChar c = buf[0];
@@ -470,7 +470,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList &
int i = 0;
while ( (uint)j < text.length() ) {
if ( c == '<' || c == '&' ) {
- valid = FALSE;
+ valid = false;
if ( i > 1 )
buildMiniDict( TQString(str,i) );
i = 0;
@@ -478,7 +478,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList &
continue;
}
if ( ( c == '>' || c == ';' ) && !valid ) {
- valid = TRUE;
+ valid = true;
c = buf[++j];
continue;
}
@@ -521,6 +521,6 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList &
}
}
if ( a.count() )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
diff --git a/tools/assistant/lib/tqassistantclient.cpp b/tools/assistant/lib/tqassistantclient.cpp
index d252a4438..c343c39e7 100644
--- a/tools/assistant/lib/tqassistantclient.cpp
+++ b/tools/assistant/lib/tqassistantclient.cpp
@@ -47,7 +47,7 @@ class TQAssistantClientPrivate
static TQMap<const TQAssistantClient*,TQAssistantClientPrivate*> *dpointers = 0;
-static TQAssistantClientPrivate *data( const TQAssistantClient *client, bool create=FALSE )
+static TQAssistantClientPrivate *data( const TQAssistantClient *client, bool create=false )
{
if( !dpointers )
dpointers = new TQMap<const TQAssistantClient*,TQAssistantClientPrivate*>;
@@ -71,7 +71,7 @@ static TQAssistantClientPrivate *data( const TQAssistantClient *client, bool cre
The TQAssistantClient instance can open (openAssistant()) or close
(closeAssistant()) TQt Assistant whenever required. If TQt Assistant
- is open, isOpen() returns TRUE.
+ is open, isOpen() returns true.
One TQAssistantClient instance interacts with one TQt Assistant
instance, so every time you call openAssistant(), showPage() or
@@ -157,7 +157,7 @@ TQAssistantClient::TQAssistantClient( const TQString &path, TQObject *parent, co
TQ_SLOT( socketConnectionClosed() ) );
connect( socket, TQ_SIGNAL( error( int ) ),
TQ_SLOT( socketError( int ) ) );
- opened = FALSE;
+ opened = false;
proc = new TQProcess( this );
port = 0;
pageBuffer = "";
@@ -290,7 +290,7 @@ bool TQAssistantClient::isOpen() const
void TQAssistantClient::socketConnected()
{
- opened = TRUE;
+ opened = true;
if ( !pageBuffer.isEmpty() )
showPage( pageBuffer );
emit assistantOpened();
@@ -298,7 +298,7 @@ void TQAssistantClient::socketConnected()
void TQAssistantClient::socketConnectionClosed()
{
- opened = FALSE;
+ opened = false;
emit assistantClosed();
}
@@ -329,6 +329,6 @@ void TQAssistantClient::readStdError()
*/
void TQAssistantClient::setArguments( const TQStringList &args )
{
- TQAssistantClientPrivate *d = data( this, TRUE );
+ TQAssistantClientPrivate *d = data( this, true );
d->arguments = args;
}
diff --git a/tools/assistant/main.cpp b/tools/assistant/main.cpp
index ba26d82c1..83c367d62 100644
--- a/tools/assistant/main.cpp
+++ b/tools/assistant/main.cpp
@@ -54,7 +54,7 @@
#define INDEX_CHECK( text ) if( i+1 >= argc ) { fprintf( stderr, text "\n" ); return 1; }
#endif
-static bool allowFirstRun = TRUE;
+static bool allowFirstRun = true;
class AssistantSocket : public TQSocket
{
@@ -142,7 +142,7 @@ void AssistantServer::newConnection( int socket )
int main( int argc, char ** argv )
{
- bool withGUI = TRUE;
+ bool withGUI = true;
if ( argc > 1 ) {
TQString arg( argv[1] );
arg = arg.lower();
@@ -152,7 +152,7 @@ int main( int argc, char ** argv )
|| arg == "-help"
#endif
)
- withGUI = FALSE;
+ withGUI = false;
}
TQApplication a(argc, argv, withGUI);
@@ -160,10 +160,10 @@ int main( int argc, char ** argv )
AssistantServer *as = 0;
TQStringList catlist;
TQString file, profileName, aDocPath;
- bool server = FALSE;
- bool hideSidebar = FALSE;
- bool startClean = FALSE;
- bool configLoaded = FALSE;
+ bool server = false;
+ bool hideSidebar = false;
+ bool startClean = false;
+ bool configLoaded = false;
if ( argc == 2 ) {
if ( (argv[1])[0] != '-' )
file = argv[1];
@@ -175,7 +175,7 @@ int main( int argc, char ** argv )
i++;
file = argv[i];
} else if ( TQString( argv[i] ).lower() == "-server" ) {
- server = TRUE;
+ server = true;
} else if ( TQString( argv[i] ).lower() == "-profile" ) {
INDEX_CHECK( "Missing profile argument!" );
profileName = argv[++i];
@@ -199,7 +199,7 @@ int main( int argc, char ** argv )
return 1;
}
parser->addTo( c->profile() );
- c->setDocRebuild( TRUE );
+ c->setDocRebuild( true );
c->save();
}
return 0;
@@ -227,7 +227,7 @@ int main( int argc, char ** argv )
return 1;
}
profile->removeDocFileEntry( file.absFilePath() );
- c->setDocRebuild( TRUE );
+ c->setDocRebuild( true );
c->save();
}
return 0;
@@ -238,9 +238,9 @@ int main( int argc, char ** argv )
Config *c = Config::loadConfig( TQString::null );
c->saveProfile(Profile::createDefaultProfile(dir.absPath()));
c->loadDefaultProfile();
- c->setDocRebuild( TRUE );
+ c->setDocRebuild( true );
c->save();
- configLoaded = TRUE;
+ configLoaded = true;
++i;
} else {
fprintf( stderr, "The specified path does not exist!\n");
@@ -248,7 +248,7 @@ int main( int argc, char ** argv )
return 1;
}
} else if ( TQString( argv[i] ).lower() == "-hidesidebar" ) {
- hideSidebar = TRUE;
+ hideSidebar = true;
} else if ( TQString( argv[i] ).lower() == "-help" ) {
TQString helpText( "Usage: assistant [option]\n"
"Options:\n"
diff --git a/tools/assistant/mainwindow.ui.h b/tools/assistant/mainwindow.ui.h
index 046ab043a..a976c506d 100644
--- a/tools/assistant/mainwindow.ui.h
+++ b/tools/assistant/mainwindow.ui.h
@@ -57,11 +57,11 @@ void MainWindow::init()
// certain user configs. See task: 34372
qt_ntfs_permission_lookup = 0;
#endif
- setupCompleted = FALSE;
+ setupCompleted = false;
goActions = new TQPtrList<TQAction>;
goActionDocFiles = new TQMap<TQAction*,TQString>;
- goActions->setAutoDelete( TRUE );
+ goActions->setAutoDelete( true );
if ( !windows )
windows = new TQPtrList<MainWindow>;
@@ -76,7 +76,7 @@ void MainWindow::init()
dw = new TQDockWindow( TQDockWindow::InDock, this );
helpDock = new HelpDialog( dw, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
addDockWindow( dw, DockLeft );
dw->setWidget( helpDock );
@@ -120,7 +120,7 @@ void MainWindow::setup()
tqApp->setOverrideCursor( TQCursor( TQt::WaitCursor ) );
statusBar()->message( tr( "Initializing TQt Assistant..." ) );
- setupCompleted = TRUE;
+ setupCompleted = true;
helpDock->initialize();
connect( actionGoPrevious, TQ_SIGNAL( activated() ), tabs, TQ_SLOT( backward() ) );
connect( actionGoNext, TQ_SIGNAL( activated() ), tabs, TQ_SLOT( forward() ) );
@@ -168,8 +168,8 @@ void MainWindow::setup()
helpDock->tabWidget->setCurrentPage( config->sideBarPage() );
tqApp->restoreOverrideCursor();
- actionGoPrevious->setEnabled( FALSE );
- actionGoNext->setEnabled( FALSE );
+ actionGoPrevious->setEnabled( false );
+ actionGoNext->setEnabled( false );
}
void MainWindow::setupGoActions()
@@ -178,7 +178,7 @@ void MainWindow::setupGoActions()
TQStringList titles = config->docTitles();
TQAction *action = 0;
- static bool separatorInserted = FALSE;
+ static bool separatorInserted = false;
TQAction *cur = goActions->first();
while( cur ) {
@@ -198,7 +198,7 @@ void MainWindow::setupGoActions()
if( !pix.isNull() ) {
if( !separatorInserted ) {
goMenu->insertSeparator();
- separatorInserted = TRUE;
+ separatorInserted = true;
}
action = new TQAction( title, TQIconSet( pix ), title, 0, 0 );
action->addTo( goMenu );
@@ -229,7 +229,7 @@ bool MainWindow::insertActionSeparator()
{
goMenu->insertSeparator();
Toolbar->addSeparator();
- return TRUE;
+ return true;
}
bool MainWindow::close( bool alsoDelete )
@@ -309,7 +309,7 @@ void MainWindow::findAgain()
find();
return;
}
- findDialog->doFind(TRUE);
+ findDialog->doFind(true);
}
void MainWindow::findAgainPrev()
@@ -318,7 +318,7 @@ void MainWindow::findAgainPrev()
find();
return;
}
- findDialog->doFind(FALSE);
+ findDialog->doFind(false);
}
void MainWindow::goHome()
@@ -329,7 +329,7 @@ void MainWindow::goHome()
void MainWindow::print()
{
TQPrinter printer( TQPrinter::HighResolution );
- printer.setFullPage( TRUE );
+ printer.setFullPage( true );
if ( printer.setup( this ) ) {
TQPainter p;
if ( !p.begin( &printer ) )
@@ -348,7 +348,7 @@ void MainWindow::print()
metrics.height() - 2 * margin );
TQSimpleRichText richText( browser->text(), browser->TQWidget::font(), browser->context(),
browser->styleSheet(), browser->mimeSourceFactory(),
- view.height(), TQt::black, FALSE );
+ view.height(), TQt::black, false );
richText.setWidth( &p, view.width() );
int page = 1;
do {
@@ -363,7 +363,7 @@ void MainWindow::print()
break;
printer.newPage();
page++;
- } while (TRUE);
+ } while (true);
tqApp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput );
tqApp->restoreOverrideCursor();
@@ -611,7 +611,7 @@ TabbedBrowser* MainWindow::browsers()
void MainWindow::showSearchLink( const TQString &link, const TQStringList &terms )
{
HelpWindow * hw = tabs->currentBrowser();
- hw->blockScrolling( TRUE );
+ hw->blockScrolling( true );
hw->setCursor( waitCursor );
if ( hw->source() == link )
hw->reload();
@@ -620,25 +620,25 @@ void MainWindow::showSearchLink( const TQString &link, const TQStringList &terms
hw->sync();
hw->setCursor( arrowCursor );
- hw->viewport()->setUpdatesEnabled( FALSE );
+ hw->viewport()->setUpdatesEnabled( false );
int minPar = INT_MAX;
int minIndex = INT_MAX;
TQStringList::ConstIterator it = terms.begin();
for ( ; it != terms.end(); ++it ) {
int para = 0;
int index = 0;
- bool found = hw->find( *it, FALSE, TRUE, TRUE, &para, &index );
+ bool found = hw->find( *it, false, true, true, &para, &index );
while ( found ) {
if ( para < minPar ) {
minPar = para;
minIndex = index;
}
hw->setColor( red );
- found = hw->find( *it, FALSE, TRUE, TRUE );
+ found = hw->find( *it, false, true, true );
}
}
- hw->blockScrolling( FALSE );
- hw->viewport()->setUpdatesEnabled( TRUE );
+ hw->blockScrolling( false );
+ hw->viewport()->setUpdatesEnabled( true );
hw->setCursorPosition( minPar, minIndex );
hw->updateContents();
}
diff --git a/tools/assistant/profile.cpp b/tools/assistant/profile.cpp
index a02170de7..b13b51687 100644
--- a/tools/assistant/profile.cpp
+++ b/tools/assistant/profile.cpp
@@ -50,7 +50,7 @@ Profile *Profile::createDefaultProfile( const TQString &docPath )
path = docPath;
path = path + "/html/";
Profile *profile = new Profile;
- profile->valid = TRUE;
+ profile->valid = true;
profile->type = DefaultProfile;
profile->props["name"] = "default";
profile->props["applicationicon"] = "appicon.png";
@@ -88,7 +88,7 @@ Profile *Profile::createDefaultProfile( const TQString &docPath )
Profile::Profile()
- : valid( TRUE ), dparser( 0 )
+ : valid( true ), dparser( 0 )
{
}
diff --git a/tools/assistant/tabbedbrowser.ui.h b/tools/assistant/tabbedbrowser.ui.h
index 68513fb90..920c99eaa 100644
--- a/tools/assistant/tabbedbrowser.ui.h
+++ b/tools/assistant/tabbedbrowser.ui.h
@@ -127,7 +127,7 @@ void TabbedBrowser::zoomOut()
void TabbedBrowser::init()
{
- tabLinkUnderline = FALSE;
+ tabLinkUnderline = false;
tabStyleSheet = new TQStyleSheet( TQStyleSheet::defaultSheet() );
lastCurrentTab = 0;
while( tab->count() )
@@ -146,7 +146,7 @@ void TabbedBrowser::init()
connect( tab, TQ_SIGNAL( currentChanged( TQWidget* ) ),
mainWindow(), TQ_SLOT( browserTabChanged() ) );
- TQTabBar *tabBar = (TQTabBar*)tab->child( 0, "TQTabBar", FALSE );
+ TQTabBar *tabBar = (TQTabBar*)tab->child( 0, "TQTabBar", false );
int m = ( tabBar ? style().pixelMetric( TQStyle::PM_TabBarTabVSpace, (TQWidget*)tabBar )
+ style().pixelMetric( TQStyle::PM_TabBarBaseHeight, (TQWidget*)tabBar ) : 0 );
int s = tab->height() - m;
@@ -161,7 +161,7 @@ void TabbedBrowser::init()
newTabButton->setPalette(pal);
tab->setCornerWidget( newTabButton, TQt::TopLeft );
newTabButton->setCursor( arrowCursor );
- newTabButton->setAutoRaise( TRUE );
+ newTabButton->setAutoRaise( true );
newTabButton->setPixmap( TQPixmap::fromMimeSource( "addtab.png" ) );
newTabButton->setFixedSize( s, s );
TQObject::connect( newTabButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( newTab() ) );
@@ -171,7 +171,7 @@ void TabbedBrowser::init()
closeTabButton->setPalette(pal);
tab->setCornerWidget( closeTabButton, TQt::TopRight );
closeTabButton->setCursor( arrowCursor );
- closeTabButton->setAutoRaise( TRUE );
+ closeTabButton->setAutoRaise( true );
TQIconSet is( TQPixmap::fromMimeSource( "closetab.png") );
TQPixmap disabledPix = TQPixmap::fromMimeSource( "d_closetab.png" );
is.setPixmap( disabledPix, TQIconSet::Small, TQIconSet::Disabled );
@@ -179,7 +179,7 @@ void TabbedBrowser::init()
closeTabButton->setFixedSize( s, s );
TQObject::connect( closeTabButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( closeTab() ) );
TQToolTip::add( closeTabButton, tr( "Close page" ) );
- closeTabButton->setEnabled( FALSE );
+ closeTabButton->setEnabled( false );
}
void TabbedBrowser::setMimePath( TQStringList lst )
diff --git a/tools/assistant/topicchooserimpl.cpp b/tools/assistant/topicchooserimpl.cpp
index d48005dc5..ed958cbc5 100644
--- a/tools/assistant/topicchooserimpl.cpp
+++ b/tools/assistant/topicchooserimpl.cpp
@@ -39,7 +39,7 @@
TopicChooser::TopicChooser( TQWidget *parent, const TQStringList &lnkNames,
const TQStringList &lnks, const TQString &title )
- : TopicChooserBase( parent, 0, TRUE ), links( lnks ), linkNames( lnkNames )
+ : TopicChooserBase( parent, 0, true ), links( lnks ), linkNames( lnkNames )
{
label->setText( tr( "Choose a topic for <b>%1</b>" ).arg( title ) );
listbox->insertStringList( linkNames );