diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-28 12:35:55 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-28 12:35:55 +0900 |
commit | 278778f1151c2c3b4fade15afc7b94f624900b60 (patch) | |
tree | 3e5556534dce8216383a1026da88bfaef179ecc7 | |
parent | 15710da5567c0dcf1291d09cb869ef1bf6d08541 (diff) | |
download | kbibtex-master.tar.gz kbibtex-master.zip |
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
69 files changed, 500 insertions, 500 deletions
diff --git a/src/comment.h b/src/comment.h index 762caea..9176763 100644 --- a/src/comment.h +++ b/src/comment.h @@ -37,7 +37,7 @@ namespace BibTeX bool useCommand() const; void setUseCommand( bool useCommand ); - bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const; + bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = false ) const; Element* clone(); private: diff --git a/src/documentlistview.cpp b/src/documentlistview.cpp index 6d157cf..80c62d8 100644 --- a/src/documentlistview.cpp +++ b/src/documentlistview.cpp @@ -75,14 +75,14 @@ namespace KBibTeX setAllColumnsShowFocus( true ); setShowSortIndicator( true ); setSelectionMode( TQListView::Extended ); - header() ->setClickEnabled( TRUE ); - header() ->setMovingEnabled( TRUE ); + header() ->setClickEnabled( true ); + header() ->setMovingEnabled( true ); buildColumns(); setDragEnabled( true ); // setDragAutoScroll( true ); - setAcceptDrops( TRUE ); - setDropVisualizer( TRUE ); + setAcceptDrops( true ); + setDropVisualizer( true ); connect( header(), TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( setSortingColumn( int ) ) ); connect( this, TQ_SIGNAL( contextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ), this, TQ_SLOT( showBibtexListContextMenu( TDEListView *, TQListViewItem *, const TQPoint & ) ) ); @@ -105,7 +105,7 @@ namespace KBibTeX m_bibtexFile = bibtexFile; setItems(); - return TRUE; + return true; } BibTeX::File* DocumentListView::getBibTeXFile( ) @@ -117,13 +117,13 @@ namespace KBibTeX { TQApplication::setOverrideCursor( TQt::waitCursor ); - KProgressDialog *prgDlg = new KProgressDialog( this, "prgDlg", i18n( "List View" ), i18n( "Updating main view ..." ), TRUE ); + KProgressDialog *prgDlg = new KProgressDialog( this, "prgDlg", i18n( "List View" ), i18n( "Updating main view ..." ), true ); prgDlg->show(); KProgress *progress = prgDlg->progressBar(); progress->setTotalSteps( m_bibtexFile->count() ); bool update = viewport()->isUpdatesEnabled(); - viewport()->setUpdatesEnabled( FALSE ); + viewport()->setUpdatesEnabled( false ); int sortCol = sortColumn(); setSortColumn( -1 ); @@ -180,7 +180,7 @@ namespace KBibTeX m_bibtexFile->appendElement( element, after == NULL ? NULL : after->element() ); after = new DocumentListViewItem( m_bibtexFile, element, this, after ); - after->setUnreadStatus( TRUE ); + after->setUnreadStatus( true ); updateVisiblity( after ); m_unreadItems.append( after ); @@ -251,7 +251,7 @@ namespace KBibTeX { m_headerMenu = actionMenu->popupMenu(); m_headerMenu->insertTitle( i18n( "Show Columns" ) ); - m_headerMenu->setCheckable( TRUE ); + m_headerMenu->setCheckable( true ); connect( m_headerMenu, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( activateShowColumnMenu( int ) ) ); Settings * settings = Settings::self( m_bibtexFile ); @@ -392,10 +392,10 @@ namespace KBibTeX { insertItems( clipboardData, at ); delete clipboardData; - return TRUE; + return true; } else - return FALSE; + return false; } else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && BibTeX::FileImporterBibUtils::guessCanDecode( text ) ) { @@ -413,10 +413,10 @@ namespace KBibTeX { insertItems( clipboardData, at ); delete clipboardData; - return TRUE; + return true; } else - return FALSE; + return false; } else if ( BibTeX::FileImporterRIS::guessCanDecode( text ) ) { @@ -428,22 +428,22 @@ namespace KBibTeX { insertItems( clipboardData, at ); delete clipboardData; - return TRUE; + return true; } else - return FALSE; + return false; } else { /** Decoding the paste text as bibtex failed. Maybe the user wants to paste the text as link address, abstract, etc... */ if ( !at ) // no list view item selected to add data to - return FALSE; + return false; // fetch BibTeX element from current list view item BibTeX::Entry * element = dynamic_cast<BibTeX::Entry*>( at->element() ); if ( ! element ) - return FALSE; + return false; // build popup menu TDEPopupMenu * popup = new TDEPopupMenu( this, "pastePopup" ); @@ -460,7 +460,7 @@ namespace KBibTeX // show popup menu int selectedId = popup->exec( TQCursor::pos() ); if ( selectedId == cancelId || selectedId == -1 ) - return FALSE; // cancel menu + return false; // cancel menu // determine field to add clipboard value to BibTeX::EntryField::FieldType fieldType = ( BibTeX::EntryField::FieldType ) selectedId; @@ -489,7 +489,7 @@ namespace KBibTeX field->setValue( value ); - return TRUE; + return true; } } @@ -553,12 +553,12 @@ namespace KBibTeX if ( columnWidth( id ) > 0 ) { hideColumn( id ); - m_headerMenu->setItemChecked( id, FALSE ); + m_headerMenu->setItemChecked( id, false ); } else { showColumn( id ); - m_headerMenu->setItemChecked( id, TRUE ); + m_headerMenu->setItemChecked( id, true ); } } } @@ -646,7 +646,7 @@ namespace KBibTeX { for ( TQValueList<DocumentListViewItem*>::ConstIterator it = m_unreadItems.begin() ; it != m_unreadItems.end(); ++it ) { - ( *it ) ->setUnreadStatus( FALSE ); + ( *it ) ->setUnreadStatus( false ); ( *it ) ->repaint(); } @@ -685,7 +685,7 @@ namespace KBibTeX else if ( !TQTextDrag::decode( event, text ) ) return; - event->accept( TRUE ); + event->accept( true ); DocumentListViewItem * dlvi = dynamic_cast<KBibTeX::DocumentListViewItem *>( item ); paste( text, dlvi ); diff --git a/src/documentlistviewitem.cpp b/src/documentlistviewitem.cpp index eadaaeb..b09bc57 100644 --- a/src/documentlistviewitem.cpp +++ b/src/documentlistviewitem.cpp @@ -31,7 +31,7 @@ namespace KBibTeX { - DocumentListViewItem::DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent ) : TDEListViewItem( parent, parent->lastItem() ), m_element( element ), m_bibtexFile( file ), m_parent( parent ), m_unreadStatus( FALSE ) + DocumentListViewItem::DocumentListViewItem( BibTeX::File *file, BibTeX::Element *element, DocumentListView *parent ) : TDEListViewItem( parent, parent->lastItem() ), m_element( element ), m_bibtexFile( file ), m_parent( parent ), m_unreadStatus( false ) { setTexts(); } @@ -70,7 +70,7 @@ namespace KBibTeX if ( m_unreadStatus ) { TQFont f = p->font(); - f.setBold( TRUE ); + f.setBold( true ); p->setFont( f ); } diff --git a/src/documentsourceview.cpp b/src/documentsourceview.cpp index 30fb36f..4455609 100644 --- a/src/documentsourceview.cpp +++ b/src/documentsourceview.cpp @@ -88,10 +88,10 @@ namespace KBibTeX if ( clip ) { clip->paste(); - return TRUE; + return true; } else - return FALSE; + return false; } /** @@ -150,14 +150,14 @@ namespace KBibTeX void DocumentSourceView::find() { - KFindDialog dlg( TRUE, this ); + KFindDialog dlg( true, this ); dlg.setFindHistory( m_findHistory ); - dlg.setHasSelection( FALSE ); + dlg.setHasSelection( false ); #if KDE_IS_VERSION(3,4,0) - dlg.setSupportsWholeWordsFind( FALSE ); - dlg.setSupportsBackwardsFind( FALSE ); - dlg.setSupportsCaseSensitiveFind( FALSE ); - dlg.setSupportsRegularExpressionFind( FALSE ); + dlg.setSupportsWholeWordsFind( false ); + dlg.setSupportsBackwardsFind( false ); + dlg.setSupportsCaseSensitiveFind( false ); + dlg.setSupportsRegularExpressionFind( false ); #endif if ( dlg.exec() == TQDialog::Accepted ) { @@ -210,7 +210,7 @@ namespace KBibTeX { Settings * settings = Settings::self(); - bool result = FALSE; + bool result = false; m_progDlg = new KProgressDialog( this, NULL, i18n( "Source View" ), i18n( "Converting BibTeX document to plain text ..." ), true ); m_progDlg->setAllowCancel( false ); tdeApp->processEvents(); @@ -240,8 +240,8 @@ namespace KBibTeX { tdeApp->processEvents(); // very strange: to set the text, you have to set - // readwrite to TRUE... - m_document->setReadWrite( TRUE ); + // readwrite to true... + m_document->setReadWrite( true ); m_editInterface->setText( text ); m_document->setReadWrite( !m_isReadOnly ); } @@ -355,7 +355,7 @@ namespace KBibTeX do { - bool result = searchIf->searchText( fromLine, fromCol, m_lastSearchTerm, &foundAtLine, &foundAtCol, &matchLen, FALSE ); + bool result = searchIf->searchText( fromLine, fromCol, m_lastSearchTerm, &foundAtLine, &foundAtCol, &matchLen, false ); if ( result ) { selectionIf->setSelection( foundAtLine, foundAtCol, foundAtLine, foundAtCol + matchLen ); diff --git a/src/documentwidget.cpp b/src/documentwidget.cpp index 361a7bb..db02187 100644 --- a/src/documentwidget.cpp +++ b/src/documentwidget.cpp @@ -110,7 +110,7 @@ namespace KBibTeX void DocumentWidget::setupGUI() { - setAcceptDrops( TRUE ); + setAcceptDrops( true ); setFocusPolicy( TQWidget::ClickFocus ); // List view tab widget =============================== @@ -133,7 +133,7 @@ namespace KBibTeX m_listViewElements = new DocumentListView( this, m_isReadOnly, m_vertSplitter ); m_preview = new KTextEdit( m_vertSplitter ); - m_preview->setReadOnly( TRUE ); + m_preview->setReadOnly( true ); m_preview->setAlignment( TQt::AlignTop && TQt::AlignLeft ); // Source view tab widget ============================= @@ -161,7 +161,7 @@ namespace KBibTeX bool DocumentWidget::open( const TQString &fileName, bool mergeOnly ) { - bool result = FALSE; + bool result = false; if ( !mergeOnly ) m_dirWatch.removeFile( m_filename ); @@ -194,8 +194,8 @@ namespace KBibTeX bool DocumentWidget::open( TQIODevice *iodevice, bool mergeOnly, const TQString &label, BibTeX::FileImporter *importer ) { - bool result = FALSE; - setEnabled( FALSE ); + bool result = false; + setEnabled( false ); bool usingDefaultImporter = importer == NULL; if ( usingDefaultImporter ) @@ -241,40 +241,40 @@ namespace KBibTeX settings->addToCompletion( m_bibtexfile ); m_sideBar->refreshLists( m_bibtexfile ); - result = TRUE; + result = true; } else { kdDebug() << "Could not load bibliography file from io device" << endl; - result = FALSE; + result = false; } - setEnabled( TRUE ); + setEnabled( true ); return result; } bool DocumentWidget::save( const TQString &fileName, TQStringList *errorLog ) { - bool result = FALSE; + bool result = false; m_dirWatch.removeFile( m_filename ); Settings * settings = Settings::self( NULL ); BibTeX::File::FileFormat format = BibTeX::File::formatUndefined; - if ( fileName.endsWith( ".rtf", FALSE ) ) + if ( fileName.endsWith( ".rtf", false ) ) format = BibTeX::File::formatRTF; - else if ( fileName.endsWith( ".pdf", FALSE ) ) + else if ( fileName.endsWith( ".pdf", false ) ) format = BibTeX::File::formatPDF; - else if ( fileName.endsWith( ".bib", FALSE ) ) + else if ( fileName.endsWith( ".bib", false ) ) format = BibTeX::File::formatBibTeX; - else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".ref", FALSE ) || fileName.endsWith( ".refer", FALSE ) || fileName.endsWith( ".txt", FALSE ) || fileName.endsWith( ".rfr", FALSE ) ) ) + else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".ref", false ) || fileName.endsWith( ".refer", false ) || fileName.endsWith( ".txt", false ) || fileName.endsWith( ".rfr", false ) ) ) format = BibTeX::File::formatEndNote; - else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".isi", FALSE ) || fileName.endsWith( ".cgi", FALSE ) ) ) + else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".isi", false ) || fileName.endsWith( ".cgi", false ) ) ) format = BibTeX::File::formatISI; - else if ( fileName.endsWith( ".ris", FALSE ) ) + else if ( fileName.endsWith( ".ris", false ) ) format = BibTeX::File::formatRIS; - else if ( fileName.endsWith( ".ps", FALSE ) ) + else if ( fileName.endsWith( ".ps", false ) ) format = BibTeX::File::formatPS; - else if ( fileName.endsWith( ".xml", FALSE ) ) + else if ( fileName.endsWith( ".xml", false ) ) { TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) ); bool ok = false; @@ -286,7 +286,7 @@ namespace KBibTeX else if ( ok && !answer.isNull() && answer == "internal XML" ) format = BibTeX::File::formatXML; } - else if ( fileName.endsWith( ".html", FALSE ) || fileName.endsWith( ".xhtml", FALSE ) || fileName.endsWith( ".htm", FALSE ) ) + else if ( fileName.endsWith( ".html", false ) || fileName.endsWith( ".xhtml", false ) || fileName.endsWith( ".htm", false ) ) format = BibTeX::File::formatHTML; if ( format != BibTeX::File::formatUndefined ) @@ -320,8 +320,8 @@ namespace KBibTeX { Settings * settings = Settings::self( m_bibtexfile ); - bool result = FALSE; - setEnabled( FALSE ); + bool result = false; + setEnabled( false ); updateFromGUI(); @@ -418,7 +418,7 @@ namespace KBibTeX if ( settings->fileIO_EmbedFiles && !Settings::kpsewhich( "embedfile.sty" ) ) { KMessageBox::sorry( this, i18n( "Embedding files into the PDF file is enabled, but the required file 'embedfile.sty' was not found. Embedding files will be disabled." ), i18n( "Embedding files disabled" ) ); - settings->fileIO_EmbedFiles = FALSE; + settings->fileIO_EmbedFiles = false; } BibTeX::FileExporterPDF *pdfExporter = new BibTeX::FileExporterPDF( settings->fileIO_EmbedFiles ); @@ -428,7 +428,7 @@ namespace KBibTeX for ( TQStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it ) searchPaths.append( *it ); if ( m_bibtexfile->fileName != TQString::null ) - searchPaths.append( KURL( m_bibtexfile->fileName ).directory( FALSE, FALSE ) ); + searchPaths.append( KURL( m_bibtexfile->fileName ).directory( false, false ) ); pdfExporter->setDocumentSearchPaths( searchPaths ); exporter = pdfExporter; } @@ -456,7 +456,7 @@ namespace KBibTeX delete exporter; } - setEnabled( TRUE ); + setEnabled( true ); return result; } @@ -476,12 +476,12 @@ namespace KBibTeX m_bibtexfile->appendElement( macro ); settings->addToCompletion( macro ); m_sideBar->refreshLists( m_bibtexfile ); - return TRUE; + return true; } else { delete macro; - return FALSE; + return false; } } else if ( elementType.lower() == "comment" ) @@ -491,12 +491,12 @@ namespace KBibTeX { new DocumentListViewItem( m_bibtexfile, comment, m_listViewElements ); m_bibtexfile->appendElement( comment ); - return TRUE; + return true; } else { delete comment; - return FALSE; + return false; } } else if ( elementType.lower() == "preamble" ) @@ -506,12 +506,12 @@ namespace KBibTeX { new DocumentListViewItem( m_bibtexfile, preamble, m_listViewElements ); m_bibtexfile->appendElement( preamble ); - return TRUE; + return true; } else { delete preamble; - return FALSE; + return false; } } else @@ -519,20 +519,20 @@ namespace KBibTeX TQString name = nextNewEntry(); BibTeX::Entry *entry = new BibTeX::Entry( elementType, name ); m_dirWatch.stopScan(); - if ( EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, TRUE ) == TQDialog::Accepted ) + if ( EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, true ) == TQDialog::Accepted ) { new DocumentListViewItem( m_bibtexfile, entry, m_listViewElements ); m_bibtexfile->appendElement( entry ); settings->addToCompletion( entry ); m_sideBar->refreshLists( m_bibtexfile ); m_dirWatch.startScan(); - return TRUE; + return true; } else { delete entry; m_dirWatch.startScan(); - return FALSE; + return false; } } } @@ -593,10 +593,10 @@ namespace KBibTeX delete exporter; } - return TRUE; + return true; } - return FALSE; + return false; } void DocumentWidget::updateViews() @@ -667,7 +667,7 @@ namespace KBibTeX if ( currentElement != NULL ) entry = dynamic_cast<BibTeX::Entry*>( currentElement ); - m_viewDocumentActionMenu->setEnabled( FALSE ); + m_viewDocumentActionMenu->setEnabled( false ); if ( entry != NULL ) { KURL::List documentURLs = getEntryURLs( entry ); @@ -676,17 +676,17 @@ namespace KBibTeX for ( KURL::List::Iterator i = documentURLs.begin(); i != documentURLs.end(); ++i ) { TQString prettyURL = ( *i ).prettyURL(); - if ( prettyURL.endsWith( ".pdf", FALSE ) || prettyURL.find( "/pdf/" ) > 0 ) + if ( prettyURL.endsWith( ".pdf", false ) || prettyURL.find( "/pdf/" ) > 0 ) popup->insertItem( SmallIcon( "application-pdf" ), prettyURL ); - else if ( prettyURL.endsWith( ".ps", FALSE ) ) + else if ( prettyURL.endsWith( ".ps", false ) ) popup->insertItem( SmallIcon( "application-postscript" ), prettyURL ); - else if ( prettyURL.endsWith( ".html", FALSE ) || prettyURL.startsWith( "http://", FALSE ) ) + else if ( prettyURL.endsWith( ".html", false ) || prettyURL.startsWith( "http://", false ) ) popup->insertItem( SmallIcon( "text-html" ), prettyURL ); else popup->insertItem( prettyURL ); m_viewDocumentActionMenuURLs.append( prettyURL ); } - m_viewDocumentActionMenu->setEnabled( TRUE ); + m_viewDocumentActionMenu->setEnabled( true ); } } } @@ -772,9 +772,9 @@ namespace KBibTeX /** * Build menu */ - bool popupEmpty = FALSE; + bool popupEmpty = false; if ( allKeywords.isEmpty() ) - popupEmpty = TRUE; + popupEmpty = true; else if ( allKeywords.count() < 24 ) { for ( TQStringList::Iterator it = allKeywords.begin(); it != allKeywords.end(); ++it ) @@ -878,7 +878,7 @@ namespace KBibTeX void DocumentWidget::executeElement( DocumentListViewItem* item ) { Settings * settings = Settings::self( m_bibtexfile ); - bool openingDocumentOK = FALSE; + bool openingDocumentOK = false; if ( settings->editing_MainListDoubleClickAction == 1 ) { @@ -953,7 +953,7 @@ namespace KBibTeX TQDialog::DialogCode dialogResult = TQDialog::Rejected; BibTeX::Entry * entry = dynamic_cast<BibTeX::Entry*>( element ); if ( entry ) - dialogResult = KBibTeX::EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, FALSE ); + dialogResult = KBibTeX::EntryWidget::execute( entry, m_bibtexfile, m_isReadOnly, false ); else { BibTeX::Comment * comment = dynamic_cast<BibTeX::Comment*>( element ); @@ -1330,15 +1330,15 @@ namespace KBibTeX BibTeX::FileImporter * importer = NULL; BibTeX::File::FileFormat format = BibTeX::File::formatUndefined; - if ( fileName.endsWith( ".bib", FALSE ) ) + if ( fileName.endsWith( ".bib", false ) ) format = BibTeX::File::formatBibTeX; - else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".ref", FALSE ) || fileName.endsWith( ".refer", FALSE ) || fileName.endsWith( ".txt", FALSE ) || fileName.endsWith( ".rfr", FALSE ) ) ) + else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".ref", false ) || fileName.endsWith( ".refer", false ) || fileName.endsWith( ".txt", false ) || fileName.endsWith( ".rfr", false ) ) ) format = BibTeX::File::formatEndNote; - else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".isi", FALSE ) || fileName.endsWith( ".cgi", FALSE ) ) ) + else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( fileName.endsWith( ".isi", false ) || fileName.endsWith( ".cgi", false ) ) ) format = BibTeX::File::formatISI; - else if ( fileName.endsWith( ".ris", FALSE ) ) + else if ( fileName.endsWith( ".ris", false ) ) format = BibTeX::File::formatRIS; - else if ( fileName.endsWith( ".xml", FALSE ) ) + else if ( fileName.endsWith( ".xml", false ) ) { TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "MODS|EndNote XML|internal XML" : "internal XML" ) ); bool ok = false; @@ -1459,7 +1459,7 @@ namespace KBibTeX void DocumentWidget::slotTabChanged( TQWidget *tab ) { - setEnabled( FALSE ); + setEnabled( false ); TQApplication::setOverrideCursor( TQt::waitCursor ); BibTeX::File *bibTeXFile = NULL; @@ -1485,9 +1485,9 @@ namespace KBibTeX if ( m_actionEditCut && m_actionEditCopy && m_actionEditPaste ) { - m_actionEditCut->setEnabled( TRUE ); - m_actionEditCopy->setEnabled( TRUE ); - m_actionEditPaste->setEnabled( TRUE ); + m_actionEditCut->setEnabled( true ); + m_actionEditCopy->setEnabled( true ); + m_actionEditPaste->setEnabled( true ); } } else if ( tab == m_container && m_editMode != emList ) @@ -1511,7 +1511,7 @@ namespace KBibTeX m_editMode = emList; } - setEnabled( TRUE ); + setEnabled( true ); if ( tab == m_sourceView ) m_sourceView->setFocus(); @@ -1552,7 +1552,7 @@ namespace KBibTeX void DocumentWidget::slotRefreshDirtyFile() { if ( KMessageBox::questionYesNo( this, TQString( i18n( "File '%1' has been modified. Reload file to import changes or ignore changes?" ) ).arg( m_filename ), i18n( "Reload file?" ), KGuiItem( i18n( "Reload" ), "reload" ), KGuiItem( i18n( "Ignore" ), "ignore" ) ) == KMessageBox::Yes ) - open( m_filename, FALSE ); + open( m_filename, false ); else m_dirWatch.addFile( m_filename ); } diff --git a/src/documentwidget.h b/src/documentwidget.h index d40ecad..9afe0a2 100644 --- a/src/documentwidget.h +++ b/src/documentwidget.h @@ -56,8 +56,8 @@ namespace KBibTeX DocumentWidget( bool isReadOnly, TQWidget *parent = 0, const char *name = 0 ); ~DocumentWidget(); - bool open( const TQString &fileName, bool mergeOnly = FALSE ); - bool open( TQIODevice *iodevice, bool mergeOnly = FALSE, const TQString &label = TQString::null, BibTeX::FileImporter *importer = NULL ); + bool open( const TQString &fileName, bool mergeOnly = false ); + bool open( TQIODevice *iodevice, bool mergeOnly = false, const TQString &label = TQString::null, BibTeX::FileImporter *importer = NULL ); bool save( const TQString &fileName, TQStringList *errorLog = NULL ); bool save( TQIODevice *iodevice, BibTeX::File::FileFormat format = BibTeX::File::formatBibTeX, const TQString &label = TQString::null, TQStringList *errorLog = NULL ); diff --git a/src/element.cpp b/src/element.cpp index 9e813a0..0723702 100644 --- a/src/element.cpp +++ b/src/element.cpp @@ -38,11 +38,11 @@ namespace BibTeX bool Element::isSimpleString( const TQString &text ) { - bool result = TRUE; + bool result = true; const TQString goodChars = "abcdefghijklmnopqrstuvwxyz0123456789-_"; for ( unsigned int i = 0; result && i < text.length(); i++ ) - result &= goodChars.contains( text.at( i ), FALSE ); + result &= goodChars.contains( text.at( i ), false ); return result; } diff --git a/src/encoderxml.cpp b/src/encoderxml.cpp index bc85fe9..bc3d308 100644 --- a/src/encoderxml.cpp +++ b/src/encoderxml.cpp @@ -66,7 +66,7 @@ namespace BibTeX { int p2 = result.find( ";", p + 1 ); if ( p2 < 0 ) break; - bool ok = FALSE; + bool ok = false; int hex = result.mid( p + 3, p2 - p - 3 ).toInt( &ok, 16 ); if ( ok && hex > 0 ) result.replace( result.mid( p, p2 - p + 1 ), TQChar( hex ) ); @@ -80,7 +80,7 @@ namespace BibTeX { int p2 = result.find( ";", p + 1 ); if ( p2 < 0 ) break; - bool ok = FALSE; + bool ok = false; int dec = result.mid( p + 2, p2 - p - 2 ).toInt( &ok, 10 ); if ( ok && dec > 0 ) result.replace( result.mid( p, p2 - p + 1 ), TQChar( dec ) ); diff --git a/src/entry.cpp b/src/entry.cpp index a20d234..206318f 100644 --- a/src/entry.cpp +++ b/src/entry.cpp @@ -190,16 +190,16 @@ namespace BibTeX if ( plainText != NULL ) { TQString plain = plainText->text(); - int urlPos = plain.find( "\\url{", 0, FALSE ); + int urlPos = plain.find( "\\url{", 0, false ); if ( urlPos > -1 ) { plain = plain.mid( urlPos + 5 ); - urlPos = plain.find( "}", 0, FALSE ); + urlPos = plain.find( "}", 0, false ); if ( urlPos > 0 ) plain = plain.left( urlPos - 1 ); } - if ( fieldNames[ i ] == "doi" && !plain.startsWith( "http", FALSE ) ) + if ( fieldNames[ i ] == "doi" && !plain.startsWith( "http", false ) ) plain.prepend( "http://dx.doi.org/" ); result.append( plain ); @@ -213,7 +213,7 @@ namespace BibTeX bool Entry::addField( EntryField * field ) { m_fields.append( field ); - return TRUE; + return true; } EntryField* Entry::getField( const EntryField::FieldType fieldType ) const @@ -244,10 +244,10 @@ namespace BibTeX { delete( *it ); m_fields.remove( *it ); - return TRUE; + return true; } - return FALSE; + return false; } bool Entry::deleteField( const EntryField::FieldType fieldType ) @@ -257,10 +257,10 @@ namespace BibTeX { delete( *it ); m_fields.remove( it ); - return TRUE; + return true; } - return FALSE; + return false; } Entry::EntryFields::ConstIterator Entry::begin() const diff --git a/src/entry.h b/src/entry.h index 15386b9..e386805 100644 --- a/src/entry.h +++ b/src/entry.h @@ -59,7 +59,7 @@ namespace BibTeX void setId( const TQString& id ); TQString id() const; - bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, BibTeX::Element::FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const; + bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, BibTeX::Element::FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = false ) const; TQStringList urls() const; bool addField( EntryField *field ); diff --git a/src/entrywidget.cpp b/src/entrywidget.cpp index 7a7aadd..607caab 100644 --- a/src/entrywidget.cpp +++ b/src/entrywidget.cpp @@ -62,7 +62,7 @@ namespace KBibTeX { TQDialog::DialogCode EntryWidget::execute( BibTeX::Entry *entry, BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQWidget *parent, const char *name ) { - EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, TRUE, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel ); + EntryWidgetDialog *dlg = new EntryWidgetDialog( parent, name, true, i18n( "Edit BibTeX Entry" ), KDialogBase::Ok | KDialogBase::Cancel ); EntryWidget *entryWidget = new EntryWidget( entry, bibtexfile, isReadOnly, isNew, dlg, "entryWidget" ); dlg->setMainWidget( entryWidget ); @@ -77,7 +77,7 @@ namespace KBibTeX EntryWidget::EntryWidget( BibTeX::File *bibtexfile, bool isReadOnly, bool isNew, TQDialog *parent, const char *name ) : TQWidget( parent, name ), m_originalEntry( NULL ), m_bibtexfile( bibtexfile ), m_isReadOnly( isReadOnly ), m_isNew( isNew ), m_lastPage( NULL ), m_dlgParent( parent ), m_wqa( new WebQueryArXiv( NULL ) ) { - setupGUI( parent, FALSE ); + setupGUI( parent, false ); Settings * settings = Settings::self(); m_checkBoxEnableAll->setChecked( settings->editing_EnableAllFields ); @@ -199,12 +199,12 @@ namespace KBibTeX m_pushButtonForceDefaultIdSuggestion->setOn( m_defaultIdSuggestionAvailable && settings->idSuggestions_forceDefault && m_isNew ); m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable ); - bool foundEntryType = FALSE; + bool foundEntryType = false; for ( int i = 0; !foundEntryType && i < m_comboBoxEntryType->count(); i++ ) if (( BibTeX::Entry::EntryType ) i + BibTeX::Entry::etArticle == entry->entryType() ) { m_comboBoxEntryType->setCurrentItem( i ); - foundEntryType = TRUE; + foundEntryType = true; } if ( !foundEntryType ) m_comboBoxEntryType->setCurrentText( entry->entryTypeString() ); @@ -217,7 +217,7 @@ namespace KBibTeX void EntryWidget::slotForceDefaultIdSuggestion() { - m_isNew = FALSE; + m_isNew = false; m_lineEditID->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() ); m_pushButtonIdSuggestions->setEnabled( !m_pushButtonForceDefaultIdSuggestion->isOn() && !m_isReadOnly ); updateWarnings(); @@ -241,10 +241,10 @@ namespace KBibTeX ( *it ) ->apply( &temporaryEntry ); m_sourcePage->reset( &temporaryEntry ); - m_comboBoxEntryType->setEnabled( FALSE ); - m_lineEditID->setEnabled( FALSE ); - m_pushButtonIdSuggestions->setEnabled( FALSE ); - m_pushButtonForceDefaultIdSuggestion->setEnabled( FALSE ); + m_comboBoxEntryType->setEnabled( false ); + m_lineEditID->setEnabled( false ); + m_pushButtonIdSuggestions->setEnabled( false ); + m_pushButtonForceDefaultIdSuggestion->setEnabled( false ); } else if ( m_lastPage == m_sourcePage ) { @@ -276,7 +276,7 @@ namespace KBibTeX updateWarnings(); } - m_comboBoxEntryType->setEnabled( TRUE ); + m_comboBoxEntryType->setEnabled( true ); m_lineEditID->setEnabled( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() ); m_pushButtonIdSuggestions->setEnabled(( !m_defaultIdSuggestionAvailable || !m_pushButtonForceDefaultIdSuggestion->isOn() ) && !m_isReadOnly ); m_pushButtonForceDefaultIdSuggestion->setEnabled( !m_isReadOnly && m_defaultIdSuggestionAvailable ); @@ -313,7 +313,7 @@ namespace KBibTeX // in the top row on the left, put an entry type label and combobox TQLabel *label = new TQLabel( i18n( "E&ntry Type:" ), this ); layout->addWidget( label, 0, 0 ); - m_comboBoxEntryType = new TQComboBox( TRUE, this, "m_comboBoxEntryType" ); + m_comboBoxEntryType = new TQComboBox( true, this, "m_comboBoxEntryType" ); label->setBuddy( m_comboBoxEntryType ); m_comboBoxEntryType->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed ); m_comboBoxEntryType->setEnabled( !m_isReadOnly ); @@ -336,7 +336,7 @@ namespace KBibTeX layout->addWidget( m_pushButtonIdSuggestions, 0, 4 ); m_pushButtonForceDefaultIdSuggestion = new TQPushButton( TQIconSet( BarIcon( "favorites" ) ), "", this, "m_pushButtonForceDefaultIdSuggestion" ); - m_pushButtonForceDefaultIdSuggestion->setToggleButton( TRUE ); + m_pushButtonForceDefaultIdSuggestion->setToggleButton( true ); layout->addWidget( m_pushButtonForceDefaultIdSuggestion, 0, 5 ); TQToolTip::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id" ) ); TQWhatsThis::add( m_pushButtonForceDefaultIdSuggestion, i18n( "Use the default id suggestion to set the entry id.\nYou can edit and select the default id suggestion in the configuration dialog." ) ); @@ -534,7 +534,7 @@ namespace KBibTeX m_idToSuggestion.insert( m_menuIdSuggestions->insertItem( *it ), *it ); if ( m_idToSuggestion.count() == 0 ) - m_menuIdSuggestions->setItemEnabled( m_menuIdSuggestions->insertItem( i18n( "No suggestions available" ) ), FALSE ); + m_menuIdSuggestions->setItemEnabled( m_menuIdSuggestions->insertItem( i18n( "No suggestions available" ) ), false ); } void EntryWidget::insertIdSuggestion( int id ) diff --git a/src/entrywidget.h b/src/entrywidget.h index cdbb9bd..2366847 100644 --- a/src/entrywidget.h +++ b/src/entrywidget.h @@ -108,7 +108,7 @@ namespace KBibTeX WebQueryArXiv *m_wqa; TQString m_oldId; - void setupGUI( TQWidget *parent, bool showWarnings = TRUE ); + void setupGUI( TQWidget *parent, bool showWarnings = true ); void addTabWidgets(); void addTabWidget( EntryWidgetTab *widget, const TQString& title ); void setupEntryTypes(); diff --git a/src/entrywidgetexternal.cpp b/src/entrywidgetexternal.cpp index c470483..bd6b8de 100644 --- a/src/entrywidgetexternal.cpp +++ b/src/entrywidgetexternal.cpp @@ -132,7 +132,7 @@ namespace KBibTeX if ( url.isValid() ) Settings::openUrl( url, this ); else - m_pushButtonOpenURL->setEnabled( FALSE ); + m_pushButtonOpenURL->setEnabled( false ); } void EntryWidgetExternal::openURL( const TQString &url ) @@ -147,7 +147,7 @@ namespace KBibTeX if ( url.isValid() ) Settings::openUrl( url, this ); else - m_pushButtonOpenDoi->setEnabled( FALSE ); + m_pushButtonOpenDoi->setEnabled( false ); } void EntryWidgetExternal::openLocalFile() @@ -157,7 +157,7 @@ namespace KBibTeX if ( url.isValid() ) Settings::openUrl( url, this ); else - m_pushButtonOpenLocalFile->setEnabled( FALSE ); + m_pushButtonOpenLocalFile->setEnabled( false ); } void EntryWidgetExternal::browseLocalFile( int id ) diff --git a/src/entrywidgetkeyword.cpp b/src/entrywidgetkeyword.cpp index ec79e4b..c1537fa 100644 --- a/src/entrywidgetkeyword.cpp +++ b/src/entrywidgetkeyword.cpp @@ -63,7 +63,7 @@ namespace KBibTeX } } - EntryWidgetKeyword::EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_bibtexfile( bibtexfile ), m_isModified( FALSE ), m_numKeywords( 0 ) + EntryWidgetKeyword::EntryWidgetKeyword( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name ) : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_bibtexfile( bibtexfile ), m_isModified( false ), m_numKeywords( 0 ) { setupGUI(); } @@ -158,7 +158,7 @@ namespace KBibTeX if ( text.isEmpty() ) { item->setText( 0, m_beforeRenaming ); - kwlvi->setOn( FALSE ); + kwlvi->setOn( false ); } else if ( text != m_beforeRenaming ) { @@ -183,15 +183,15 @@ namespace KBibTeX } TQCheckListItem *checkedItem = dynamic_cast<TQCheckListItem*>( item ); if ( checkedItem != NULL ) - checkedItem->setOn( TRUE ); + checkedItem->setOn( true ); } } } void EntryWidgetKeyword::slotNewKeyword() { - KeywordListViewItem * item = new KeywordListViewItem( m_listviewKeywords, TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewKeyword%1" ) ).arg( ++m_numKeywords ), FALSE ); - m_listviewKeywords->setSelected( item, TRUE ); + KeywordListViewItem * item = new KeywordListViewItem( m_listviewKeywords, TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewKeyword%1" ) ).arg( ++m_numKeywords ), false ); + m_listviewKeywords->setSelected( item, true ); TQTimer::singleShot( 100, this, TQ_SLOT( slotEditKeyword() ) ); } @@ -230,7 +230,7 @@ namespace KBibTeX m_listviewKeywords->addColumn( i18n( "Keyword" ) ); m_listviewKeywords->addColumn( i18n( "Origin" ) ); gridLayout->addMultiCellWidget( m_listviewKeywords, 0, 4, 0, 0 ); - m_listviewKeywords->setAllColumnsShowFocus( TRUE ); + m_listviewKeywords->setAllColumnsShowFocus( true ); connect( m_listviewKeywords, TQ_SIGNAL( currentChanged( TQListViewItem* ) ), this, TQ_SLOT( slotSelectionChanged() ) ); connect( m_listviewKeywords, TQ_SIGNAL( clicked( TQListViewItem * ) ), this, TQ_SLOT( slotSelectionChanged() ) ); connect( m_listviewKeywords, TQ_SIGNAL( itemRenamed( TQListViewItem*, const TQString&, int ) ), this, TQ_SLOT( slotKeywordRenamed( TQListViewItem*, const TQString&, int ) ) ); @@ -246,14 +246,14 @@ namespace KBibTeX m_buttonEdit->setIconSet( TQIconSet( SmallIcon( "edit" ) ) ); TQToolTip::add( m_buttonEdit, i18n( "Edit the selected keyword" ) ); gridLayout->addWidget( m_buttonEdit, 1, 1 ); - m_buttonEdit->setEnabled( FALSE ); + m_buttonEdit->setEnabled( false ); connect( m_buttonEdit, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotEditKeyword() ) ); m_buttonToggleGlobal = new TQPushButton( i18n( "keyword", "Toggle &global" ), this ); m_buttonToggleGlobal->setIconSet( TQIconSet( SmallIcon( "package" ) ) ); TQToolTip::add( m_buttonToggleGlobal, i18n( "Add or remove the selected keyword to or from the global list" ) ); gridLayout->addWidget( m_buttonToggleGlobal, 2, 1 ); - m_buttonToggleGlobal->setEnabled( FALSE ); + m_buttonToggleGlobal->setEnabled( false ); connect( m_buttonToggleGlobal, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotToggleGlobal() ) ); TQLabel *label = new TQLabel( i18n( "There is no need to delete keywords. Simply uncheck unwanted keywords and make them non-global.\nGlobal keywords can also be edited in the settings dialog." ), this ); @@ -269,7 +269,7 @@ namespace KBibTeX { KeywordListViewItem *item = new KeywordListViewItem( m_listviewKeywords, *it, m_globalKeywords.contains( *it ) ); if ( m_usedKeywords.contains( *it ) ) - item->setOn( TRUE ); + item->setOn( true ); } } diff --git a/src/entrywidgetother.cpp b/src/entrywidgetother.cpp index 1e2fd5c..186a50f 100644 --- a/src/entrywidgetother.cpp +++ b/src/entrywidgetother.cpp @@ -40,7 +40,7 @@ namespace KBibTeX { EntryWidgetOther::EntryWidgetOther( BibTeX::File *bibtexfile, bool isReadOnly, TQWidget *parent, const char *name ) - : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_isModified( FALSE ) + : EntryWidgetTab( bibtexfile, isReadOnly, parent, name ), m_isModified( false ) { setupGUI(); } @@ -91,7 +91,7 @@ namespace KBibTeX } } - m_isModified = FALSE; + m_isModified = false; } void EntryWidgetOther::reset( BibTeX::Entry *entry ) @@ -113,7 +113,7 @@ namespace KBibTeX new ValueListViewItem( field->fieldTypeName(), field->value(), m_listViewFields ); } - m_isModified = FALSE; + m_isModified = false; } void EntryWidgetOther::updateWarnings( BibTeX::Entry::EntryType /*entryType*/, TQListView * /*listViewWarnings*/ ) @@ -153,7 +153,7 @@ namespace KBibTeX m_listViewFields->addColumn( i18n( "Key" ) ); m_listViewFields->addColumn( i18n( "Value" ) ); m_listViewFields->setAllColumnsShowFocus( true ); - m_listViewFields->setFullWidth( TRUE ); + m_listViewFields->setFullWidth( true ); gridLayout->addMultiCellWidget( m_listViewFields, 3, 5, 1, 1 ); label = new TQLabel( i18n( "&List:" ), this ); @@ -172,9 +172,9 @@ namespace KBibTeX spacer = new TQSpacerItem( 20, 110, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); gridLayout->addItem( spacer, 5, 2 ); - m_pushButtonOpen->setEnabled( FALSE ); - m_pushButtonAdd->setEnabled( FALSE ); - m_pushButtonDelete->setEnabled( FALSE ); + m_pushButtonOpen->setEnabled( false ); + m_pushButtonAdd->setEnabled( false ); + m_pushButtonDelete->setEnabled( false ); connect( m_listViewFields, TQ_SIGNAL( clicked( TQListViewItem*, const TQPoint&, int ) ), this, TQ_SLOT( fieldExecute( TQListViewItem* ) ) ); connect( m_lineEditKey, TQ_SIGNAL( textChanged( const TQString& ) ), this, TQ_SLOT( updateGUI() ) ); @@ -192,7 +192,7 @@ namespace KBibTeX bool isUnknown = BibTeX::EntryField::fieldTypeFromString( text ) == BibTeX::EntryField::ftUnknown; if ( contains ) - m_listViewFields->setSelected( item, TRUE ); + m_listViewFields->setSelected( item, true ); else m_listViewFields->clearSelection(); @@ -201,7 +201,7 @@ namespace KBibTeX m_pushButtonAdd->setText( contains ? i18n( "&Apply" ) : i18n( "&Add" ) ); m_pushButtonAdd->setIconSet( TQIconSet( SmallIcon( contains ? "apply" : "document-open" ) ) ); - bool validURL = FALSE; + bool validURL = false; if ( contains ) { KURL url = Settings::locateFile( item->text( 1 ), m_bibtexfile->fileName, this ); @@ -234,7 +234,7 @@ namespace KBibTeX updateGUI(); - m_isModified = TRUE; + m_isModified = true; } void EntryWidgetOther::deleteClicked() @@ -249,7 +249,7 @@ namespace KBibTeX updateGUI(); } - m_isModified = TRUE; + m_isModified = true; } void EntryWidgetOther::openClicked() @@ -261,7 +261,7 @@ namespace KBibTeX delete value; } else - m_fieldLineEditValue->setEnabled( FALSE ); + m_fieldLineEditValue->setEnabled( false ); } ValueListViewItem::ValueListViewItem( const TQString& title, BibTeX::Value *value, TQListView *parent ) diff --git a/src/entrywidgetpublication.cpp b/src/entrywidgetpublication.cpp index b23d2c8..09f6c7c 100644 --- a/src/entrywidgetpublication.cpp +++ b/src/entrywidgetpublication.cpp @@ -255,7 +255,7 @@ namespace KBibTeX void EntryWidgetPublication::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings ) { - bool crossRefValid = FALSE; + bool crossRefValid = false; BibTeX::Value *value = NULL; addMissingWarning( entryType, BibTeX::EntryField::ftHowPublished, m_fieldLineEditHowPublished->caption(), !m_fieldLineEditHowPublished->isEmpty(), m_fieldLineEditHowPublished, listViewWarnings ); diff --git a/src/entrywidgettitle.cpp b/src/entrywidgettitle.cpp index da7d669..d3d1a5e 100644 --- a/src/entrywidgettitle.cpp +++ b/src/entrywidgettitle.cpp @@ -90,7 +90,7 @@ namespace KBibTeX void EntryWidgetTitle::updateWarnings( BibTeX::Entry::EntryType entryType, TQListView *listViewWarnings ) { - bool crossRefValid = FALSE; + bool crossRefValid = false; addMissingWarning( entryType, BibTeX::EntryField::ftTitle, m_fieldLineEditTitle->caption(), !m_fieldLineEditTitle->isEmpty(), m_fieldLineEditTitle, listViewWarnings ); diff --git a/src/entrywidgetuserdefined.cpp b/src/entrywidgetuserdefined.cpp index e02d067..118f3aa 100644 --- a/src/entrywidgetuserdefined.cpp +++ b/src/entrywidgetuserdefined.cpp @@ -43,8 +43,8 @@ namespace KBibTeX bool EntryWidgetUserDefined::isModified() { - bool result = FALSE; - for ( TQValueList<FieldLineEdit*>::iterator it = m_widgets.begin(); !FALSE && it != m_widgets.end(); ++it ) + bool result = false; + for ( TQValueList<FieldLineEdit*>::iterator it = m_widgets.begin(); !false && it != m_widgets.end(); ++it ) result |= ( *it )->isModified(); return result; } diff --git a/src/fieldlineedit.cpp b/src/fieldlineedit.cpp index 43e99f1..29aa3c0 100644 --- a/src/fieldlineedit.cpp +++ b/src/fieldlineedit.cpp @@ -38,7 +38,7 @@ namespace KBibTeX { FieldLineEdit::FieldLineEdit( const TQString& caption, InputType inputType, bool isReadOnly, TQWidget *parent, const char *name ) - : TQWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_lineEdit( NULL ), m_textEdit( NULL ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_inputType( inputType ), m_isModified( FALSE ), m_fieldType( BibTeX::EntryField::ftUnknown ), m_completion( NULL ) + : TQWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_lineEdit( NULL ), m_textEdit( NULL ), m_isReadOnly( isReadOnly ), m_enabled( true ), m_inputType( inputType ), m_isModified( false ), m_fieldType( BibTeX::EntryField::ftUnknown ), m_completion( NULL ) { setupGUI( name ); } @@ -59,7 +59,7 @@ namespace KBibTeX m_value = new BibTeX::Value(); updateGUI(); - m_isModified = FALSE; + m_isModified = false; } BibTeX::Value *FieldLineEdit::value() @@ -149,7 +149,7 @@ namespace KBibTeX else m_value->items.append( new BibTeX::PlainText( text ) ); } - m_isModified = TRUE; + m_isModified = true; } updateGUI(); @@ -195,7 +195,7 @@ namespace KBibTeX updateGUI(); emit textChanged(); - m_isModified = TRUE; + m_isModified = true; } void FieldLineEdit::slotComplexClicked() @@ -204,7 +204,7 @@ namespace KBibTeX { updateGUI(); emit textChanged(); - m_isModified = TRUE; + m_isModified = true; } } @@ -224,7 +224,7 @@ namespace KBibTeX m_pushButtonString = new TQPushButton( this, subname ); m_pushButtonString->setIconSet( TQIconSet( SmallIcon( "flag" ) ) ); m_pushButtonString->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); - m_pushButtonString->setToggleButton( TRUE ); + m_pushButtonString->setToggleButton( true ); TQToolTip::add( m_pushButtonString, TQString( i18n( "Set '%1' to be a string key" ) ).arg( m_caption ) ); m_pushButtonString->setEnabled( !m_isReadOnly ); connect( m_pushButtonString, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotStringToggled() ) ); @@ -290,12 +290,12 @@ namespace KBibTeX if ( subname != NULL ) delete[] subname; - enableSignals( TRUE ); + enableSignals( true ); } void FieldLineEdit::updateGUI() { - enableSignals( FALSE ); + enableSignals( false ); bool inputEnable = ( m_value->items.count() <= 1 ) && m_enabled; m_pushButtonString->setEnabled( inputEnable && !m_isReadOnly ); @@ -344,7 +344,7 @@ namespace KBibTeX break; } - enableSignals( TRUE ); + enableSignals( true ); } void FieldLineEdit::enableSignals( bool enabled ) diff --git a/src/fieldlineedit.h b/src/fieldlineedit.h index 51eb05a..60f4185 100644 --- a/src/fieldlineedit.h +++ b/src/fieldlineedit.h @@ -39,7 +39,7 @@ namespace KBibTeX enum InputType {itSingleLine, itMultiLine}; enum ErrorType {etNoError, etInvalidStringKey}; - FieldLineEdit( const TQString& caption, InputType inputType = itSingleLine, bool readOnly = FALSE, TQWidget *parent = 0, const char *name = 0 ); + FieldLineEdit( const TQString& caption, InputType inputType = itSingleLine, bool readOnly = false, TQWidget *parent = 0, const char *name = 0 ); ~FieldLineEdit(); /** diff --git a/src/fieldlistview.cpp b/src/fieldlistview.cpp index 32bbf4c..6dd5eba 100644 --- a/src/fieldlistview.cpp +++ b/src/fieldlistview.cpp @@ -43,7 +43,7 @@ namespace KBibTeX { FieldListView::FieldListView( const TQString& caption, const TQString& prefixNew, bool isReadOnly, TQWidget *parent, const char *name ) - : TQWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_prefixNew( prefixNew ), m_isReadOnly( isReadOnly ), m_enabled( TRUE ), m_isComplex( FALSE ), m_isModified( FALSE ), m_newValueCounter( 0 ), m_fieldType( BibTeX::EntryField::ftUnknown ) + : TQWidget( parent, name ), m_value( new BibTeX::Value() ), m_caption( caption ), m_prefixNew( prefixNew ), m_isReadOnly( isReadOnly ), m_enabled( true ), m_isComplex( false ), m_isModified( false ), m_newValueCounter( 0 ), m_fieldType( BibTeX::EntryField::ftUnknown ) { setupGUI(); m_listViewElements->installEventFilter( this ); @@ -73,7 +73,7 @@ namespace KBibTeX reset(); updateGUI(); - m_isModified = FALSE; + m_isModified = false; } } @@ -110,7 +110,7 @@ namespace KBibTeX bool FieldListView::isEmpty() { - return m_value != NULL ? m_value->items.isEmpty() : TRUE; + return m_value != NULL ? m_value->items.isEmpty() : true; } bool FieldListView::isModified() @@ -186,13 +186,13 @@ namespace KBibTeX } else { - m_pushButtonAdd->setEnabled( FALSE ); - m_pushButtonEdit->setEnabled( FALSE ); - m_pushButtonDelete->setEnabled( FALSE ); - m_pushButtonUp->setEnabled( FALSE ); - m_pushButtonDown->setEnabled( FALSE ); - m_listViewElements->setEnabled( FALSE ); - m_checkBoxEtAl->setEnabled( FALSE ); + m_pushButtonAdd->setEnabled( false ); + m_pushButtonEdit->setEnabled( false ); + m_pushButtonDelete->setEnabled( false ); + m_pushButtonUp->setEnabled( false ); + m_pushButtonDown->setEnabled( false ); + m_listViewElements->setEnabled( false ); + m_checkBoxEtAl->setEnabled( false ); } connect( m_checkBoxEtAl, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( apply() ) ); } @@ -202,7 +202,7 @@ namespace KBibTeX if ( isSimple() ) { TDEListViewItem * item = new TDEListViewItem( m_listViewElements, m_listViewElements->lastItem(), TQString( "%1%2" ).arg( m_prefixNew ).arg( ++m_newValueCounter ) ); - m_listViewElements->setSelected( item, TRUE ); + m_listViewElements->setSelected( item, true ); updateGUI(); TQTimer::singleShot( 100, this, TQ_SLOT( slotEdit() ) ); } @@ -227,7 +227,7 @@ namespace KBibTeX apply(); updateGUI(); - m_isModified = TRUE; + m_isModified = true; } } @@ -240,7 +240,7 @@ namespace KBibTeX apply(); updateGUI(); - m_isModified = TRUE; + m_isModified = true; } } @@ -253,7 +253,7 @@ namespace KBibTeX apply(); updateGUI(); - m_isModified = TRUE; + m_isModified = true; } } @@ -264,7 +264,7 @@ namespace KBibTeX reset(); updateGUI(); - m_isModified = TRUE; + m_isModified = true; } } @@ -283,7 +283,7 @@ namespace KBibTeX } apply(); - m_isModified = TRUE; + m_isModified = true; } void FieldListView::setupGUI() @@ -300,14 +300,14 @@ namespace KBibTeX m_listViewElements->renameLineEdit() ->completionObject() ->setIgnoreCase( true ); m_listViewElements->setDefaultRenameAction( TQListView::Accept ); m_listViewElements->addColumn( m_caption ); - m_listViewElements->setSorting( -1, TRUE ); - m_listViewElements->setItemsRenameable( TRUE ); + m_listViewElements->setSorting( -1, true ); + m_listViewElements->setItemsRenameable( true ); if ( settings->editing_UseSpecialFont ) m_listViewElements->setFont( settings->editing_SpecialFont ); m_listViewElements->header() ->setFont( TDEGlobalSettings::generalFont() ); - m_listViewElements->header() ->setClickEnabled( FALSE ); - m_listViewElements->header() ->setStretchEnabled( TRUE, 0 ); + m_listViewElements->header() ->setClickEnabled( false ); + m_listViewElements->header() ->setStretchEnabled( true, 0 ); connect( m_listViewElements, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( updateGUI() ) ); connect( m_listViewElements, TQ_SIGNAL( clicked( TQListViewItem * ) ), this, TQ_SLOT( updateGUI() ) ); connect( m_listViewElements, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), this, TQ_SLOT( slotListViewDoubleClicked( TQListViewItem * ) ) ); @@ -405,9 +405,9 @@ namespace KBibTeX { disconnect( m_checkBoxEtAl, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( apply() ) ); m_listViewElements->clear(); - m_checkBoxEtAl->setChecked( FALSE ); + m_checkBoxEtAl->setChecked( false ); - m_isComplex = FALSE; + m_isComplex = false; for ( TQValueList<BibTeX::ValueItem*>::ConstIterator it = m_value->items.constBegin(); !m_isComplex && it != m_value->items.constEnd(); ++it ) { BibTeX::MacroKey *macroKey = dynamic_cast<BibTeX::MacroKey *>( *it ); @@ -428,7 +428,7 @@ namespace KBibTeX { TQString text = ( *pit )->text(); if ( text == "others" ) - m_checkBoxEtAl->setChecked( TRUE ); + m_checkBoxEtAl->setChecked( true ); else new TQListViewItem( m_listViewElements, m_listViewElements->lastItem(), text ); } diff --git a/src/fileexporterbibtex.cpp b/src/fileexporterbibtex.cpp index 598f3bf..011322e 100644 --- a/src/fileexporterbibtex.cpp +++ b/src/fileexporterbibtex.cpp @@ -32,7 +32,7 @@ namespace BibTeX { FileExporterBibTeX::FileExporterBibTeX() : FileExporter(), - m_iconvBufferSize( 16384 ), m_stringOpenDelimiter( '"' ), m_stringCloseDelimiter( '"' ), m_keywordCasing( kcCamelCase ), m_encoding( "latex" ), m_protectCasing( FALSE ), cancelFlag( FALSE ) + m_iconvBufferSize( 16384 ), m_stringOpenDelimiter( '"' ), m_stringCloseDelimiter( '"' ), m_keywordCasing( kcCamelCase ), m_encoding( "latex" ), m_protectCasing( false ), cancelFlag( false ) { m_iconvBuffer = new char[m_iconvBufferSize]; } @@ -45,7 +45,7 @@ namespace BibTeX bool FileExporterBibTeX::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList * /*errorLog*/ ) { m_mutex.lock(); - bool result = TRUE; + bool result = true; /** * Categorize elements from the bib file into four groups, @@ -148,7 +148,7 @@ namespace BibTeX bool FileExporterBibTeX::save( TQIODevice* iodevice, const Element* element, TQStringList * /*errorLog*/ ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; const char *encodingTo = m_encoding == "latex" ? "utf-8\0" : m_encoding.append( "\0" ).ascii(); m_iconvHandle = iconv_open( encodingTo, "utf-8" ); @@ -182,7 +182,7 @@ namespace BibTeX void FileExporterBibTeX::cancel() { - cancelFlag = TRUE; + cancelFlag = true; } bool FileExporterBibTeX::writeEntry( TQIODevice &device, const Entry* entry ) @@ -198,7 +198,7 @@ namespace BibTeX writeString( device, TQString( ",\n\t%1 = %2" ).arg( field->fieldTypeName() ).arg( text ) ); } writeString( device, "\n}\n\n" ); - return TRUE; + return true; } bool FileExporterBibTeX::writeMacro( TQIODevice &device, const Macro *macro ) @@ -209,7 +209,7 @@ namespace BibTeX writeString( device, TQString( "@%1{ %2 = %3 }\n\n" ).arg( applyKeywordCasing( "String" ) ).arg( macro->key() ).arg( text ) ); - return TRUE; + return true; } bool FileExporterBibTeX::writeComment( TQIODevice &device, const Comment *comment ) @@ -237,14 +237,14 @@ namespace BibTeX writeString( device, TQString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Comment" ) ).arg( text ) ); } - return TRUE; + return true; } bool FileExporterBibTeX::writePreamble( TQIODevice &device, const Preamble* preamble ) { writeString( device, TQString( "@%1{%2}\n\n" ).arg( applyKeywordCasing( "Preamble" ) ).arg( valueToString( preamble->value() ) ) ); - return TRUE; + return true; } bool FileExporterBibTeX::writeString( TQIODevice &device, const TQString& text ) @@ -299,7 +299,7 @@ namespace BibTeX return ""; TQString result; - bool isFirst = TRUE; + bool isFirst = true; EncoderLaTeX *encoder = EncoderLaTeX::currentEncoderLaTeX(); for ( TQValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); ++it ) @@ -307,7 +307,7 @@ namespace BibTeX if ( !isFirst ) result.append( " # " ); else - isFirst = FALSE; + isFirst = false; MacroKey *macroKey = dynamic_cast<MacroKey*>( *it ); if ( macroKey != NULL ) @@ -323,30 +323,30 @@ namespace BibTeX text = plainText->text(); else if ( keywordContainer != NULL ) { - bool first = TRUE; + bool first = true; for ( TQValueList<Keyword*>::Iterator it = keywordContainer->keywords.begin(); it != keywordContainer->keywords.end(); ++it ) { if ( !first ) text.append( ", " ); else - first = FALSE; + first = false; text.append(( *it )->text() ); } } else if ( personContainer != NULL ) { - bool first = TRUE; + bool first = true; for ( TQValueList<Person*>::Iterator it = personContainer->persons.begin(); it != personContainer->persons.end(); ++it ) { if ( !first ) text.append( " and " ); else - first = FALSE; + first = false; TQString v = ( *it )->firstName(); if ( !v.isEmpty() ) { - bool requiresQuoting = requiresPersonQuoting( v, FALSE ); + bool requiresQuoting = requiresPersonQuoting( v, false ); if ( requiresQuoting ) text.append( "{" ); text.append( v ); if ( requiresQuoting ) text.append( "}" ); @@ -385,7 +385,7 @@ namespace BibTeX text.append( von ); v = v.right( v.length() - von.length() ); } - bool requiresQuoting = requiresPersonQuoting( v, TRUE ); + bool requiresQuoting = requiresPersonQuoting( v, true ); if ( requiresQuoting ) text.append( "{" ); text.append( v ); if ( requiresQuoting ) text.append( "}" ); @@ -439,16 +439,16 @@ namespace BibTeX { if ( isLastName && !text.contains( " " ) ) /** Last name contains NO spaces, no quoting necessary */ - return FALSE; + return false; else if ( isLastName && text[0].category() == TQChar::Letter_Lowercase ) /** Last name starts with lower case character (e.g. as in "van der Linden") */ - return FALSE; + return false; else if ( !isLastName && !text.contains( " and " ) ) /** First name contains no " and " no quoting necessary */ - return FALSE; + return false; else if ( text[0] != '{' || text[text.length()-1] != '}' ) /** as either last name contains spaces or first name contains " and " and there is no protective quoting yet, there must be a protective quoting added */ - return TRUE; + return true; /** check for cases like "{..}..{..}", which must be surrounded with a protective quoting, too */ int bracketCounter = 0; @@ -459,9 +459,9 @@ namespace BibTeX else if ( text[i] == '}' ) --bracketCounter; if ( bracketCounter == 0 && i > 0 ) - return TRUE; + return true; } - return FALSE; + return false; } void FileExporterBibTeX::addProtectiveCasing( TQString &text ) @@ -472,16 +472,16 @@ namespace BibTeX return; } - bool addBrackets = TRUE; + bool addBrackets = true; if ( text[1] == '{' && text[text.length() - 2] == '}' ) { - addBrackets = FALSE; + addBrackets = false; int count = 0; for ( int i = text.length() - 2; !addBrackets && i >= 1; --i ) if ( text[i] == '{' )++count; else if ( text[i] == '}' )--count; - else if ( count == 0 ) addBrackets = TRUE; + else if ( count == 0 ) addBrackets = true; } if ( addBrackets ) diff --git a/src/fileexporterdocbook5.cpp b/src/fileexporterdocbook5.cpp index 25b568e..eb33e59 100644 --- a/src/fileexporterdocbook5.cpp +++ b/src/fileexporterdocbook5.cpp @@ -43,7 +43,7 @@ namespace BibTeX bool FileExporterDocBook5::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) @@ -64,7 +64,7 @@ namespace BibTeX bool FileExporterDocBook5::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) @@ -88,9 +88,9 @@ namespace BibTeX cmdLine << "java" << "-cp" << m_classPath << "net.sf.bib2db5.DB5Converter" << "-O" << "." << "bibtex-to-docbook5.bib"; if ( runProcess( cmdLine, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) ) - return TRUE; + return true; else - return FALSE; + return false; } } diff --git a/src/fileexporterexternal.cpp b/src/fileexporterexternal.cpp index d8d7180..da570f6 100644 --- a/src/fileexporterexternal.cpp +++ b/src/fileexporterexternal.cpp @@ -76,7 +76,7 @@ namespace BibTeX bool FileExporterExternal::generateOutput( TQBuffer &input, TQIODevice *output ) { - bool result = FALSE; + bool result = false; TQString commandLine; switch ( m_fileformat ) @@ -94,11 +94,11 @@ namespace BibTeX commandLine = "bibconv -informat=bibtex -outformat=html"; break; default: - return FALSE; + return false; } break; default: - return FALSE; + return false; } TQStringList args = TQStringList::split( ' ', commandLine ); diff --git a/src/fileexporterpdf.cpp b/src/fileexporterpdf.cpp index 8f78fe9..5130833 100644 --- a/src/fileexporterpdf.cpp +++ b/src/fileexporterpdf.cpp @@ -46,7 +46,7 @@ namespace BibTeX bool FileExporterPDF::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; m_embeddedFileList.clear(); if ( m_embedFiles ) { @@ -73,7 +73,7 @@ namespace BibTeX bool FileExporterPDF::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; m_embeddedFileList.clear(); if ( m_embedFiles ) fillEmbeddedFileList( element ); @@ -114,9 +114,9 @@ namespace BibTeX TQStringList cmdLines = TQStringList::split( '|', "pdflatex -halt-on-error bibtex-to-pdf.tex|bibtex bibtex-to-pdf|pdflatex -halt-on-error bibtex-to-pdf.tex|pdflatex -halt-on-error bibtex-to-pdf.tex" ); if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) ) - return TRUE; + return true; else - return FALSE; + return false; } bool FileExporterPDF::writeLatexFile( const TQString &filename ) @@ -156,10 +156,10 @@ namespace BibTeX ts << "\\bibliography{bibtex-to-pdf}\n"; ts << "\\end{document}\n"; latexFile.close(); - return TRUE; + return true; } else - return FALSE; + return false; } void FileExporterPDF::fillEmbeddedFileList( const File* bibtexfile ) diff --git a/src/fileexporterpdf.h b/src/fileexporterpdf.h index 54068f3..ffe6daa 100644 --- a/src/fileexporterpdf.h +++ b/src/fileexporterpdf.h @@ -31,7 +31,7 @@ namespace BibTeX class FileExporterPDF : public FileExporterToolchain { public: - FileExporterPDF( bool embedFiles = FALSE ); + FileExporterPDF( bool embedFiles = false ); ~FileExporterPDF(); bool save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog = NULL ); diff --git a/src/fileexporterps.cpp b/src/fileexporterps.cpp index b808288..04e0997 100644 --- a/src/fileexporterps.cpp +++ b/src/fileexporterps.cpp @@ -44,7 +44,7 @@ namespace BibTeX bool FileExporterPS::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) @@ -65,7 +65,7 @@ namespace BibTeX bool FileExporterPS::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) @@ -98,9 +98,9 @@ namespace BibTeX TQStringList cmdLines = TQStringList::split( '|', "latex -halt-on-error bibtex-to-ps.tex|bibtex bibtex-to-ps|latex -halt-on-error bibtex-to-ps.tex|latex -halt-on-error bibtex-to-ps.tex|dvips -o bibtex-to-ps.ps bibtex-to-ps.dvi" ); if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) ) - return TRUE; + return true; else - return FALSE; + return false; } bool FileExporterPS::writeLatexFile( const TQString &filename ) @@ -125,10 +125,10 @@ namespace BibTeX ts << "\\bibliography{bibtex-to-ps}\n"; ts << "\\end{document}\n"; latexFile.close(); - return TRUE; + return true; } else - return FALSE; + return false; } diff --git a/src/fileexporterris.cpp b/src/fileexporterris.cpp index 21f92e6..ae54e9d 100644 --- a/src/fileexporterris.cpp +++ b/src/fileexporterris.cpp @@ -39,7 +39,7 @@ namespace BibTeX bool FileExporterRIS::save( TQIODevice* iodevice, const Element* element, TQStringList* /*errorLog*/ ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; TQTextStream stream( iodevice ); const Entry *entry = dynamic_cast<const Entry*>( element ); @@ -53,8 +53,8 @@ namespace BibTeX bool FileExporterRIS::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList* /*errorLog*/ ) { m_mutex.lock(); - bool result = TRUE; - m_cancelFlag = FALSE; + bool result = true; + m_cancelFlag = false; TQTextStream stream( iodevice ); int numElements = (int) bibtexfile->count(), i = 0; @@ -77,12 +77,12 @@ namespace BibTeX void FileExporterRIS::cancel() { - m_cancelFlag = TRUE; + m_cancelFlag = true; } bool FileExporterRIS::writeEntry( TQTextStream &stream, const Entry* entry ) { - bool result = TRUE; + bool result = true; tqDebug( "Writing Entry" ); switch ( entry->entryType() ) @@ -120,13 +120,13 @@ namespace BibTeX result &= writeKeyValue( stream, field->fieldTypeName().right( 2 ), field->value()->simplifiedText() ); else if ( field->fieldType() == EntryField::ftAuthor ) { - TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() ); + TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", false ), field->value() ->simplifiedText() ); for ( TQStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it ) result &= writeKeyValue( stream, "AU", *it ); } else if ( field->fieldType() == EntryField::ftEditor ) { - TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() ); + TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", false ), field->value() ->simplifiedText() ); for ( TQStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it ) result &= writeKeyValue( stream, "ED", *it ); } @@ -194,7 +194,7 @@ namespace BibTeX stream << endl; tqDebug( "%s - %s", key.latin1(), value.latin1() ); - return TRUE; + return true; } } diff --git a/src/fileexporterrtf.cpp b/src/fileexporterrtf.cpp index a1d0423..c5f8749 100644 --- a/src/fileexporterrtf.cpp +++ b/src/fileexporterrtf.cpp @@ -43,7 +43,7 @@ namespace BibTeX bool FileExporterRTF::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) @@ -64,7 +64,7 @@ namespace BibTeX bool FileExporterRTF::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog ) { m_mutex.lock(); - bool result = FALSE; + bool result = false; TQFile bibtexFile( bibTeXFilename ); if ( bibtexFile.open( IO_WriteOnly ) ) @@ -97,9 +97,9 @@ namespace BibTeX TQStringList cmdLines = TQStringList::split( '|', "latex bibtex-to-rtf.tex|bibtex bibtex-to-rtf|latex bibtex-to-rtf.tex|latex2rtf bibtex-to-rtf.tex" ); if ( writeLatexFile( laTeXFilename ) && runProcesses( cmdLines, errorLog ) && writeFileToIODevice( outputFilename, iodevice ) ) - return TRUE; + return true; else - return FALSE; + return false; } bool FileExporterRTF::writeLatexFile( const TQString &filename ) @@ -124,10 +124,10 @@ namespace BibTeX ts << "\\bibliography{bibtex-to-rtf}\n"; ts << "\\end{document}\n"; latexFile.close(); - return TRUE; + return true; } else - return FALSE; + return false; } diff --git a/src/fileexportertoolchain.cpp b/src/fileexportertoolchain.cpp index 5450cc5..3fd57e1 100644 --- a/src/fileexportertoolchain.cpp +++ b/src/fileexportertoolchain.cpp @@ -43,7 +43,7 @@ namespace BibTeX bool FileExporterToolchain::runProcesses( const TQStringList &progs, TQStringList *errorLog ) { - bool result = TRUE; + bool result = true; int i = 0; emit progress( 0, progs.size() ); @@ -60,7 +60,7 @@ namespace BibTeX bool FileExporterToolchain::runProcess( const TQStringList &args, TQStringList *errorLog ) { - bool result = FALSE; + bool result = false; TQApplication::setOverrideCursor( TQt::waitCursor ); m_process = new TQProcess( args ); @@ -107,7 +107,7 @@ namespace BibTeX TQFile file( filename ); if ( file.open( IO_ReadOnly ) ) { - bool result = TRUE; + bool result = true; TQ_ULONG buffersize = 0x10000; TQ_LONG amount = 0; char* buffer = new char[ buffersize ]; @@ -122,7 +122,7 @@ namespace BibTeX return result; } else - return FALSE; + return false; } TQString FileExporterToolchain::createTempDir() @@ -201,7 +201,7 @@ namespace BibTeX bool FileExporterToolchain::kpsewhich( const TQString& filename ) { - bool result = FALSE; + bool result = false; int counter = 0; TQWaitCondition waitCond; diff --git a/src/fileexporterxml.cpp b/src/fileexporterxml.cpp index bbacd11..1b7c2e8 100644 --- a/src/fileexporterxml.cpp +++ b/src/fileexporterxml.cpp @@ -45,8 +45,8 @@ namespace BibTeX bool FileExporterXML::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList * /*errorLog*/ ) { m_mutex.lock(); - bool result = TRUE; - m_cancelFlag = FALSE; + bool result = true; + m_cancelFlag = false; TQTextStream stream( iodevice ); stream.setEncoding( TQTextStream::UnicodeUTF8 ); @@ -79,12 +79,12 @@ namespace BibTeX void FileExporterXML::cancel() { - m_cancelFlag = TRUE; + m_cancelFlag = true; } bool FileExporterXML::write( TQTextStream&stream, const Element *element, const File* bibtexfile ) { - bool result = FALSE; + bool result = false; const Entry *entry = dynamic_cast<const Entry*>( element ); if ( entry != NULL ) @@ -130,7 +130,7 @@ namespace BibTeX { TQString tag = field->fieldTypeName().lower(); stream << " <" << tag << "s>" << endl; - TQStringList persons = TQStringList::split( TQRegExp( "\\s+(,|and|&)+\\s+", FALSE ), EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) ); + TQStringList persons = TQStringList::split( TQRegExp( "\\s+(,|and|&)+\\s+", false ), EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) ); for ( TQStringList::Iterator it = persons.begin(); it != persons.end(); it++ ) stream << " <person>" << *it << "</person>" << endl; stream << " </" << tag << "s>" << endl; @@ -139,7 +139,7 @@ namespace BibTeX case EntryField::ftMonth: { stream << " <month"; - bool ok = FALSE; + bool ok = false; int month = -1; TQString tag = ""; @@ -157,7 +157,7 @@ namespace BibTeX month = i + 1; } content.append( Months[ i ] ); - ok = TRUE; + ok = true; break; } } @@ -186,7 +186,7 @@ namespace BibTeX } stream << " </entry>" << endl; - return TRUE; + return true; } bool FileExporterXML::writeMacro( TQTextStream &stream, const Macro *macro ) @@ -195,7 +195,7 @@ namespace BibTeX stream << EncoderXML::currentEncoderXML() ->encode( valueToString( macro->value() ) ); stream << "</string>" << endl; - return TRUE; + return true; } bool FileExporterXML::writeComment( TQTextStream &stream, const Comment *comment ) @@ -204,19 +204,19 @@ namespace BibTeX stream << EncoderXML::currentEncoderXML() ->encode( comment->text() ); stream << "</comment>" << endl; - return TRUE; + return true; } TQString FileExporterXML::valueToString( Value *value ) { TQString result; - bool isFirst = TRUE; + bool isFirst = true; for ( TQValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); it++ ) { if ( !isFirst ) result.append( ' ' ); - isFirst = FALSE; + isFirst = false; result.append(( *it ) ->simplifiedText() ); } diff --git a/src/fileexporterxslt.cpp b/src/fileexporterxslt.cpp index 0474de3..1cd3a89 100644 --- a/src/fileexporterxslt.cpp +++ b/src/fileexporterxslt.cpp @@ -59,11 +59,11 @@ namespace BibTeX htmlTS.setEncoding( TQTextStream::UnicodeUTF8 ); htmlTS << html << endl; m_mutex.unlock(); - return TRUE; + return true; } m_mutex.unlock(); - return FALSE; + return false; } bool FileExporterXSLT::save( TQIODevice* iodevice, const Element* element, TQStringList *errorLog ) @@ -85,11 +85,11 @@ namespace BibTeX output.setEncoding( TQTextStream::UnicodeUTF8 ); output << html << endl; m_mutex.unlock(); - return TRUE; + return true; } m_mutex.unlock(); - return FALSE; + return false; } } diff --git a/src/fileimporter.h b/src/fileimporter.h index e5c4c6e..c6f00e4 100644 --- a/src/fileimporter.h +++ b/src/fileimporter.h @@ -44,7 +44,7 @@ namespace BibTeX static bool guessCanDecode( const TQString & ) { - return FALSE; + return false; }; signals: diff --git a/src/fileimporterbibtex.cpp b/src/fileimporterbibtex.cpp index 3fc98fa..af8ef0e 100644 --- a/src/fileimporterbibtex.cpp +++ b/src/fileimporterbibtex.cpp @@ -39,9 +39,9 @@ namespace BibTeX const TQString extraAlphaNumChars = TQString( "?'`-_:.+/$\\\"&" ); const TQRegExp htmlRegExp = TQRegExp( "</?(a|pre)[^>]*>", false ); - FileImporterBibTeX::FileImporterBibTeX( bool personFirstNameFirst, TQString encoding ) : FileImporter(), m_personFirstNameFirst( personFirstNameFirst ), m_currentChar( ' ' ), m_ignoreComments( FALSE ), m_lineBufferSize( 4096 ), m_encoding( encoding ) + FileImporterBibTeX::FileImporterBibTeX( bool personFirstNameFirst, TQString encoding ) : FileImporter(), m_personFirstNameFirst( personFirstNameFirst ), m_currentChar( ' ' ), m_ignoreComments( false ), m_lineBufferSize( 4096 ), m_encoding( encoding ) { - cancelFlag = FALSE; + cancelFlag = false; m_lineBuffer = new char[m_lineBufferSize]; m_textStream = NULL; } @@ -55,7 +55,7 @@ namespace BibTeX File* FileImporterBibTeX::load( TQIODevice *iodevice ) { m_mutex.lock(); - cancelFlag = FALSE; + cancelFlag = false; TQString rawText; const char *encodingFrom = m_encoding == "latex" ? "utf-8\0" : m_encoding.append( "\0" ).ascii(); @@ -163,7 +163,7 @@ namespace BibTeX void FileImporterBibTeX::cancel() { - cancelFlag = TRUE; + cancelFlag = true; } Element *FileImporterBibTeX::nextElement() @@ -204,7 +204,7 @@ namespace BibTeX while ( m_currentChar != '{' && m_currentChar != '(' && !m_textStream->atEnd() ) m_currentChar = nextChar(); - return new Comment( readBracketString( m_currentChar ), TRUE ); + return new Comment( readBracketString( m_currentChar ), true ); } Comment *FileImporterBibTeX::readPlainCommentElement() @@ -219,7 +219,7 @@ namespace BibTeX result.append( readLine() ); m_currentChar = nextChar(); } - return new Comment( result, FALSE ); + return new Comment( result, false ); } Macro *FileImporterBibTeX::readMacroElement() @@ -245,7 +245,7 @@ namespace BibTeX Macro *macro = new Macro( key ); do { - bool isStringKey = FALSE; + bool isStringKey = false; TQString text = readString( isStringKey ).replace( TQRegExp( "\\s+" ), " " ); if ( isStringKey ) macro->value()->items.append( new MacroKey( text ) ); @@ -275,7 +275,7 @@ namespace BibTeX Preamble *preamble = new Preamble( ); do { - bool isStringKey = FALSE; + bool isStringKey = false; TQString text = readString( isStringKey ).replace( TQRegExp( "\\s+" ), " " ); if ( isStringKey ) preamble->value()->items.append( new MacroKey( text ) ); @@ -350,7 +350,7 @@ namespace BibTeX entry->addField( entryField ); } - while ( TRUE ); + while ( true ); return entry; } @@ -403,7 +403,7 @@ namespace BibTeX while ( m_currentChar.isSpace() ) m_currentChar = nextChar(); - isStringKey = FALSE; + isStringKey = false; switch ( m_currentChar.latin1() ) { case '{': @@ -412,7 +412,7 @@ namespace BibTeX case '"': return readQuotedString(); default: - isStringKey = TRUE; + isStringKey = true; return readSimpleString(); } } @@ -513,7 +513,7 @@ namespace BibTeX do { - bool isStringKey = FALSE; + bool isStringKey = false; TQString text = readString( isStringKey ).replace( TQRegExp( "\\s+" ), " " ); switch ( fieldType ) diff --git a/src/fileimporterbibtex.h b/src/fileimporterbibtex.h index a110734..754e111 100644 --- a/src/fileimporterbibtex.h +++ b/src/fileimporterbibtex.h @@ -41,7 +41,7 @@ namespace BibTeX class FileImporterBibTeX : public FileImporter { public: - FileImporterBibTeX( bool personFirstNameFirst = FALSE, TQString encoding = "latex" ); + FileImporterBibTeX( bool personFirstNameFirst = false, TQString encoding = "latex" ); ~FileImporterBibTeX(); File* load( TQIODevice *iodevice ); diff --git a/src/fileimporterexternal.cpp b/src/fileimporterexternal.cpp index e1d196b..732037e 100644 --- a/src/fileimporterexternal.cpp +++ b/src/fileimporterexternal.cpp @@ -67,13 +67,13 @@ namespace BibTeX bool FileImporterExternal::fetchInput( TQIODevice *input, TQBuffer &output ) { - bool result = FALSE; + bool result = false; TQString commandLine; switch ( m_fileformat ) { default: - return FALSE; + return false; } TQStringList args = TQStringList::split( ' ', commandLine ); diff --git a/src/fileimporterexternal.h b/src/fileimporterexternal.h index e341f99..5ace8a4 100644 --- a/src/fileimporterexternal.h +++ b/src/fileimporterexternal.h @@ -46,7 +46,7 @@ namespace BibTeX // FIXME: this is a stub: static bool guessCanDecode( const TQString & ) { - return TRUE; + return true; }; public slots: diff --git a/src/fileimporterris.cpp b/src/fileimporterris.cpp index 2a9055e..2b1a226 100644 --- a/src/fileimporterris.cpp +++ b/src/fileimporterris.cpp @@ -42,7 +42,7 @@ namespace BibTeX File* FileImporterRIS::load( TQIODevice *iodevice ) { m_mutex.lock(); - cancelFlag = FALSE; + cancelFlag = false; m_refNr = 0; TQTextStream textStream( iodevice ); @@ -76,7 +76,7 @@ namespace BibTeX void FileImporterRIS::cancel() { - cancelFlag = TRUE; + cancelFlag = true; } Element *FileImporterRIS::nextElement( TQTextStream &textStream ) @@ -161,7 +161,7 @@ namespace BibTeX splitRegExp = TQRegExp( "\\s*[,\\n]\\s*" ); else splitRegExp = TQRegExp( "\\n" ); - TQStringList newKeywords = TQStringList::split( splitRegExp, text, FALSE ); + TQStringList newKeywords = TQStringList::split( splitRegExp, text, false ); for ( TQStringList::Iterator it = newKeywords.begin(); it != newKeywords.end(); ++it ) keywordList.append( *it ); diff --git a/src/findduplicates.cpp b/src/findduplicates.cpp index ed0a4ba..bba1e66 100644 --- a/src/findduplicates.cpp +++ b/src/findduplicates.cpp @@ -413,7 +413,7 @@ namespace KBibTeX return -1; /** no value item found or is empty */ /** parse value item's text */ - bool ok = FALSE; + bool ok = false; int year = TQString( valueItem->text() ).toInt( &ok ); if ( !ok ) year = -1; diff --git a/src/idsuggestions.cpp b/src/idsuggestions.cpp index 8e38c9f..dcbafcf 100644 --- a/src/idsuggestions.cpp +++ b/src/idsuggestions.cpp @@ -123,7 +123,7 @@ namespace KBibTeX return -1; /** no value item found or is empty */ /** parse value item's text */ - bool ok = FALSE; + bool ok = false; TQRegExp yearRegExp( "\\b(\\d{2})?\\d{2}\\b" ); yearRegExp.search( valueItem->text() ); int year = TQString( yearRegExp.cap( 0 ) ).toInt( &ok ); @@ -223,8 +223,8 @@ namespace KBibTeX else return TQString::null; } - case 't': return translateTitleToken( entry, token.mid( 1 ), FALSE ); - case 'T': return translateTitleToken( entry, token.mid( 1 ), TRUE ); + case 't': return translateTitleToken( entry, token.mid( 1 ), false ); + case 'T': return translateTitleToken( entry, token.mid( 1 ), true ); case '"': return token.mid( 1 ); default: return TQString::null; } @@ -262,8 +262,8 @@ namespace KBibTeX unsigned int pos = 0; struct IdSuggestionTokenInfo result; result.len = 0x00ffffff; - result.toLower = FALSE; - result.toUpper = FALSE; + result.toLower = false; + result.toUpper = false; result.inBetween = TQString::null; if ( token.length() > pos ) @@ -297,12 +297,12 @@ namespace KBibTeX const TQStringList smallWords = settings->idSuggestions_smallWords; TQString result; - bool first = TRUE; + bool first = true; TQStringList titleWords = TQStringList::split( TQRegExp( "\\s+" ), extractTitle( entry ) ); for ( TQStringList::ConstIterator it = titleWords.begin(); it != titleWords.end(); ++it ) { if ( first ) - first = FALSE; + first = false; else result.append( tti.inBetween ); @@ -322,12 +322,12 @@ namespace KBibTeX /** convert a formatting string into a human readable version (even translated) */ TQString IdSuggestions::formatStrToHuman( const TQString& formatStr ) { - bool first = TRUE; + bool first = true; TQString text; TQStringList elements = TQStringList::split( '|', formatStr ); for ( TQStringList::iterator it = elements.begin();it != elements.end();++it ) { - if ( first ) first = FALSE; else text.append( "\n" ); + if ( first ) first = false; else text.append( "\n" ); if (( *it )[0] == 'a' || ( *it )[0] == 'A' || ( *it )[0] == 'z' ) { struct IdSuggestionTokenInfo info = evalToken(( *it ).mid( 1 ) ); diff --git a/src/idsuggestionswidget.cpp b/src/idsuggestionswidget.cpp index 5de293b..0265933 100644 --- a/src/idsuggestionswidget.cpp +++ b/src/idsuggestionswidget.cpp @@ -115,7 +115,7 @@ namespace KBibTeX TQLabel *label = new TQLabel( m_title, this ); TQFont labelFont( label->font() ); - labelFont.setBold( TRUE ); + labelFont.setBold( true ); label->setFont( labelFont ); label->setBackgroundColor( TDEGlobalSettings::highlightColor() ); label->setPaletteForegroundColor( TDEGlobalSettings::highlightedTextColor() ); @@ -139,7 +139,7 @@ namespace KBibTeX label = new TQLabel( i18n( "Casing:" ), this ); layout->addWidget( label, 2, 0 ); - m_comboBoxCasing = new KComboBox( FALSE, this ); + m_comboBoxCasing = new KComboBox( false, this ); label->setBuddy( m_comboBoxCasing ); layout->addWidget( m_comboBoxCasing, 2, 1 ); m_comboBoxCasing->insertItem( i18n( "No change" ) ); @@ -204,7 +204,7 @@ namespace KBibTeX TQLabel *label = new TQLabel( m_title, this ); TQFont labelFont( label->font() ); - labelFont.setBold( TRUE ); + labelFont.setBold( true ); label->setFont( labelFont ); label->setBackgroundColor( TDEGlobalSettings::highlightColor() ); label->setPaletteForegroundColor( TDEGlobalSettings::highlightedTextColor() ); @@ -220,7 +220,7 @@ namespace KBibTeX label = new TQLabel( i18n( "Casing:" ), this ); layout->addWidget( label, 2, 0 ); - m_comboBoxCasing = new KComboBox( FALSE, this ); + m_comboBoxCasing = new KComboBox( false, this ); label->setBuddy( m_comboBoxCasing ); layout->addWidget( m_comboBoxCasing, 2, 1 ); m_comboBoxCasing->insertItem( i18n( "No change" ) ); @@ -279,7 +279,7 @@ namespace KBibTeX TQLabel *label = new TQLabel( m_title, this ); TQFont labelFont( label->font() ); - labelFont.setBold( TRUE ); + labelFont.setBold( true ); label->setFont( labelFont ); label->setBackgroundColor( TDEGlobalSettings::highlightColor() ); label->setPaletteForegroundColor( TDEGlobalSettings::highlightedTextColor() ); @@ -314,7 +314,7 @@ namespace KBibTeX TQLabel *label = new TQLabel( m_title, this ); TQFont labelFont( label->font() ); - labelFont.setBold( TRUE ); + labelFont.setBold( true ); label->setFont( labelFont ); label->setBackgroundColor( TDEGlobalSettings::highlightColor() ); label->setPaletteForegroundColor( TDEGlobalSettings::highlightedTextColor() ); @@ -442,7 +442,7 @@ namespace KBibTeX void IdSuggestionsWidget::apply( TQString& formatStr ) { - bool first = TRUE; + bool first = true; formatStr = ""; TQLayoutIterator it = m_listOfComponents->layout()->iterator(); TQLayoutItem *child; @@ -452,7 +452,7 @@ namespace KBibTeX TQString text = TQString::null; if ( component != NULL && ( text = component->text() ) != TQString::null ) { - if ( first ) first = FALSE; else formatStr.append( "|" ); + if ( first ) first = false; else formatStr.append( "|" ); formatStr.append( text ); } ++it; @@ -477,7 +477,7 @@ namespace KBibTeX m_scrollViewComponents->addChild( m_listOfComponents ); gridLayout->addMultiCellWidget( m_scrollViewComponents, 2, 2, 0, 1 ); TQVBoxLayout *listLayout = new TQVBoxLayout( m_listOfComponents, 0, KDialog::spacingHint() ); - listLayout->setAutoAdd( TRUE ); + listLayout->setAutoAdd( true ); TDEPopupMenu *addMenu = new TDEPopupMenu( m_pushButtonAdd ); addMenu->insertItem( i18n( "Author" ), 1 ); @@ -520,7 +520,7 @@ namespace KBibTeX TQLayoutIterator it = m_listOfComponents->layout()->iterator(); TQLayoutItem *child = NULL; IdSuggestionComponent *lastComponent = NULL; - bool first = TRUE; + bool first = true; int i = 0; while (( child = it.current() ) != 0 ) { @@ -530,11 +530,11 @@ namespace KBibTeX { if ( first ) { - first = FALSE; - component->setEnableUpDown( FALSE, m_componentCount > 1 ); + first = false; + component->setEnableUpDown( false, m_componentCount > 1 ); } else - component->setEnableUpDown( TRUE, i < m_componentCount - 1 ); + component->setEnableUpDown( true, i < m_componentCount - 1 ); ++i; lastComponent = component; @@ -542,7 +542,7 @@ namespace KBibTeX } if ( lastComponent != NULL ) - lastComponent->setEnableUpDown( m_componentCount > 1, FALSE ); + lastComponent->setEnableUpDown( m_componentCount > 1, false ); m_scrollViewComponents->updateGeometry(); m_parent->enableButtonOK( m_componentCount > 0 ); diff --git a/src/kbibtex_part.cpp b/src/kbibtex_part.cpp index 07450d7..933693e 100644 --- a/src/kbibtex_part.cpp +++ b/src/kbibtex_part.cpp @@ -74,7 +74,7 @@ const TQString inPipeFilename = TQDir::homeDirPath() + "/.kbibtex.in"; KBibTeXPart::KBibTeXPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name ) - : KParts::ReadWritePart( parent, name ), m_defInitCounter( 0 ), m_settingsDlg( NULL ), m_initializationDone( FALSE ), m_inPipe( NULL ) + : KParts::ReadWritePart( parent, name ), m_defInitCounter( 0 ), m_settingsDlg( NULL ), m_initializationDone( false ), m_inPipe( NULL ) { m_mainWindow = dynamic_cast<TDEMainWindow*>( parent ); if ( m_mainWindow == NULL ) @@ -93,10 +93,10 @@ KBibTeXPart::KBibTeXPart( TQWidget *parentWidget, const char *widgetName, setupActions(); // we are read-write by default - setReadWrite( TRUE ); + setReadWrite( true ); // we are not modified since we haven't done anything yet - setModified( FALSE ); + setModified( false ); // read configuration readSettings(); @@ -149,7 +149,7 @@ bool KBibTeXPart::queryClose() writeSettings(); if ( !isReadWrite() || !isModified() ) - return TRUE; + return true; TQString docName = url().fileName(); if ( docName.isEmpty() ) docName = i18n( "Untitled" ); @@ -173,12 +173,12 @@ bool KBibTeXPart::queryClose() else save(); } - else if ( abortClose ) return FALSE; + else if ( abortClose ) return false; return waitSaveComplete(); case KMessageBox::No : - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -198,7 +198,7 @@ bool KBibTeXPart::closeURL() bool KBibTeXPart::openFile() { - return m_documentWidget->open( m_file, FALSE ); + return m_documentWidget->open( m_file, false ); } /** @@ -206,8 +206,8 @@ bool KBibTeXPart::openFile() */ bool KBibTeXPart::saveFile() { - if ( isReadWrite() == FALSE ) - return FALSE; + if ( isReadWrite() == false ) + return false; if ( !url().isValid() || url().isEmpty() ) return saveAs(); @@ -218,7 +218,7 @@ bool KBibTeXPart::saveFile() settings->createBackup( url(), widget() ); KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibsave" ) ); - tempBibFile.setAutoDelete( TRUE ); + tempBibFile.setAutoDelete( true ); bool success = m_documentWidget->save( tempBibFile.file() ); tempBibFile.close(); if ( success ) @@ -244,7 +244,7 @@ void KBibTeXPart::slotFileSaveAs() bool KBibTeXPart::saveAs() { - bool result = FALSE; + bool result = false; KBibTeX::Settings * settings = KBibTeX::Settings::self( NULL ); TQString startDir = ! url().isEmpty() ? url().url() : TQDir::currentDirPath(); @@ -253,13 +253,13 @@ bool KBibTeXPart::saveAs() if ( saveURL.isValid() && !saveURL.isEmpty() ) { - if ( TDEIO::NetAccess::exists( saveURL, FALSE, widget() ) && KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( saveURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue ) + if ( TDEIO::NetAccess::exists( saveURL, false, widget() ) && KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( saveURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue ) return result; if ( ReadWritePart::saveAs( saveURL ) ) { emit signalAddRecentURL( saveURL ); - result = TRUE; + result = true; } } @@ -274,7 +274,7 @@ void KBibTeXPart::slotFileExport() if ( exportURL.isValid() && !exportURL.isEmpty() ) { - if ( TDEIO::NetAccess::exists( exportURL, FALSE, widget() ) ) + if ( TDEIO::NetAccess::exists( exportURL, false, widget() ) ) { if ( KMessageBox::warningContinueCancel( widget(), i18n( "A file named '%1' already exists. Are you sure you want to overwrite it?" ).arg( exportURL.filename() ), TQString::null, i18n( "Overwrite" ) ) != KMessageBox::Continue ) return ; @@ -285,21 +285,21 @@ void KBibTeXPart::slotFileExport() } KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibexport" ) ); - tempBibFile.setAutoDelete( TRUE ); + tempBibFile.setAutoDelete( true ); BibTeX::File::FileFormat format = BibTeX::File::formatBibTeX; - if ( exportURL.fileName().endsWith( ".rtf", FALSE ) ) + if ( exportURL.fileName().endsWith( ".rtf", false ) ) format = BibTeX::File::formatRTF; - else if ( exportURL.fileName().endsWith( ".pdf", FALSE ) ) + else if ( exportURL.fileName().endsWith( ".pdf", false ) ) format = BibTeX::File::formatPDF; - else if ( exportURL.fileName().endsWith( ".ps", FALSE ) ) + else if ( exportURL.fileName().endsWith( ".ps", false ) ) format = BibTeX::File::formatPS; - else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".ref", FALSE ) || exportURL.fileName().endsWith( ".refer", FALSE ) || exportURL.fileName().endsWith( ".txt", FALSE ) || exportURL.fileName().endsWith( ".rfr", FALSE ) ) ) + else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".ref", false ) || exportURL.fileName().endsWith( ".refer", false ) || exportURL.fileName().endsWith( ".txt", false ) || exportURL.fileName().endsWith( ".rfr", false ) ) ) format = BibTeX::File::formatEndNote; - else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".isi", FALSE ) || exportURL.fileName().endsWith( ".cgi", FALSE ) ) ) + else if ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable && ( exportURL.fileName().endsWith( ".isi", false ) || exportURL.fileName().endsWith( ".cgi", false ) ) ) format = BibTeX::File::formatISI; - else if ( exportURL.fileName().endsWith( ".ris", FALSE ) ) + else if ( exportURL.fileName().endsWith( ".ris", false ) ) format = BibTeX::File::formatRIS; - else if ( exportURL.fileName().endsWith( ".xml", FALSE ) ) + else if ( exportURL.fileName().endsWith( ".xml", false ) ) { TQStringList options = TQStringList::split( '|', ( settings->external_xml2bibAvailable && settings->external_end2xmlAvailable ? "DocBook5|MODS|internal XML" : "DocBook5|internal XML" ) ); bool ok = false; @@ -311,7 +311,7 @@ void KBibTeXPart::slotFileExport() else if ( ok && !answer.isNull() && answer == "internal XML" ) format = BibTeX::File::formatXML; } - else if ( exportURL.fileName().endsWith( ".html", FALSE ) ) + else if ( exportURL.fileName().endsWith( ".html", false ) ) format = BibTeX::File::formatHTML; else { @@ -334,7 +334,7 @@ void KBibTeXPart::slotFileExport() if ( !error ) { tempBibFile.close(); - error = !TDEIO::NetAccess::file_copy( KURL( tempBibFile.name() ), exportURL, -1, TRUE, FALSE, widget() ); + error = !TDEIO::NetAccess::file_copy( KURL( tempBibFile.name() ), exportURL, -1, true, false, widget() ); } if ( error ) @@ -378,18 +378,18 @@ void KBibTeXPart::slotFileMerge() return; extension = extension.mid( extPos ); - if ( !TDEIO::NetAccess::exists( mergeURL, TRUE, widget() ) ) + if ( !TDEIO::NetAccess::exists( mergeURL, true, widget() ) ) { KMessageBox::error( widget(), i18n( "The given file could not be read, check if it exists or if it is readable for the current user." ) ); return ; } KTempFile tempBibFile = KTempFile( locateLocal( "tmp", "bibmerge" ), extension ); - tempBibFile.setAutoDelete( TRUE ); - bool error = !TDEIO::NetAccess::file_copy( mergeURL, KURL( tempBibFile.name() ), -1, TRUE, FALSE, widget() ); + tempBibFile.setAutoDelete( true ); + bool error = !TDEIO::NetAccess::file_copy( mergeURL, KURL( tempBibFile.name() ), -1, true, false, widget() ); if ( !error ) - error = !m_documentWidget->open( tempBibFile.name(), TRUE ); + error = !m_documentWidget->open( tempBibFile.name(), true ); tempBibFile.close(); @@ -399,7 +399,7 @@ void KBibTeXPart::slotFileMerge() return; } else - setModified( TRUE ); + setModified( true ); } void KBibTeXPart::slotPreferences() @@ -436,28 +436,28 @@ void KBibTeXPart::setupActions() m_actionEditCut = KStdAction::cut( m_documentWidget, TQ_SLOT( cutElements() ), actionCollection() ); m_actionEditCut->setToolTip( i18n( "Cut the selected BibTeX elements to the clipboard" ) ); - m_actionEditCut->setEnabled( FALSE ); + m_actionEditCut->setEnabled( false ); m_actionEditCopy = KStdAction::copy( m_documentWidget, TQ_SLOT( copyElements() ), actionCollection() ); m_actionEditCopy->setToolTip( i18n( "Copy the selected BibTeX elements to the clipboard" ) ); - m_actionEditCopy->setEnabled( FALSE ); + m_actionEditCopy->setEnabled( false ); m_actionEditUndo = KStdAction::undo( m_documentWidget, TQ_SLOT( undoEditor() ), actionCollection() ); connect( m_documentWidget, TQ_SIGNAL( undoChanged( bool ) ), this, TQ_SLOT( slotUndoChanged( bool ) ) ); m_actionEditCopyRef = new TDEAction( i18n( "Copy &Reference" ), CTRL + SHIFT + Key_C, m_documentWidget, TQ_SLOT( copyRefElements() ), actionCollection(), "edit_copyref" ); m_actionEditCopyRef->setToolTip( i18n( "Copy a reference of the selected BibTeX elements to the clipboard" ) ); - m_actionEditCopyRef->setEnabled( FALSE ); + m_actionEditCopyRef->setEnabled( false ); m_actionEditPaste = KStdAction::paste( m_documentWidget, TQ_SLOT( pasteElements() ), actionCollection() ); m_actionEditPaste->setToolTip( i18n( "Paste BibTeX elements from the clipboard" ) ); m_actionEditSelectAll = KStdAction::selectAll( m_documentWidget, TQ_SLOT( selectAll() ), actionCollection() ); m_actionEditSelectAll->setToolTip( i18n( "Select all BibTeX elements" ) ); m_actionElementSendToLyX = new TDEAction( i18n( "Send Reference to &LyX" ), CTRL + SHIFT + Key_L, m_documentWidget, TQ_SLOT( sendSelectedToLyx() ), actionCollection(), "element_sendtolyx" ); m_actionElementSendToLyX->setToolTip( i18n( "Send a reference of the selected BibTeX elements to LyX" ) ); - m_actionElementSendToLyX->setEnabled( FALSE ); + m_actionElementSendToLyX->setEnabled( false ); m_actionEditFind = KStdAction::find( m_documentWidget, TQ_SLOT( find() ), actionCollection() ); m_actionEditFind->setToolTip( i18n( "Find text" ) ); m_actionEditFindNext = KStdAction::findNext( m_documentWidget, TQ_SLOT( findNext() ), actionCollection() ); m_actionEditFindNext->setToolTip( i18n( "Find next occurrence" ) ); - m_actionEditFind->setEnabled( FALSE ); - m_actionEditFindNext->setEnabled( FALSE ); + m_actionEditFind->setEnabled( false ); + m_actionEditFindNext->setEnabled( false ); m_actionSearchOnlineDatabases = new TDEAction( i18n( "Search Online Databases" ), SmallIconSet( "network" ), CTRL + SHIFT + Key_S, m_documentWidget, TQ_SLOT( onlineSearch() ), actionCollection(), "search_onlinedatabases" ); m_actionSearchOnlineDatabases->setToolTip( i18n( "Search online databases to import bibliography data" ) ); @@ -465,23 +465,23 @@ void KBibTeXPart::setupActions() m_actionMenuSearchWebsites = new TDEActionMenu( i18n( "Search Document Online" ), actionCollection(), "search_document_online" ); m_actionMenuSearchWebsites->setToolTip( i18n( "Search websites for the selected BibTeX element" ) ); connect( m_actionMenuSearchWebsites->popupMenu(), TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( slotSearchWebsites( int ) ) ); - m_actionMenuSearchWebsites->setEnabled( FALSE ); + m_actionMenuSearchWebsites->setEnabled( false ); m_actionViewShowColumns = new TDEActionMenu( i18n( "&Show Columns" ), actionCollection(), "view_showcolumns" ); m_actionViewShowColumns->setToolTip( i18n( "Select columns to show in the main list" ) ); m_actionViewDocument = new TDEActionMenu( i18n( "View Document" ), actionCollection(), "view_document" ); m_actionViewDocument->setToolTip( i18n( "View the documents associated with this BibTeX entry" ) ); - m_actionViewDocument->setEnabled( FALSE ); + m_actionViewDocument->setEnabled( false ); m_actionViewFirstDocument = new TDEAction( i18n( "View Primary Document" ), 0, m_documentWidget, TQ_SLOT( slotViewFirstDocument() ), actionCollection(), "view_first_document" ); m_actionViewFirstDocument->setShortcut( TQt::Key_F4 ); m_actionViewDocumentOnlineRef = new TDEAction( i18n( "View Primary Online Reference" ), 0, m_documentWidget, TQ_SLOT( slotViewFirstDocumentsOnlineRef() ), actionCollection(), "view_first_documents_online_ref" ); m_actionViewDocumentOnlineRef->setShortcut( TQt::Key_F5 ); m_actionAssignKeywords = new TDEActionMenu( i18n( "Assign Keywords" ), actionCollection(), "assign_keywords" ); m_actionAssignKeywords->setToolTip( i18n( "Assign keywords to this entry" ) ); - m_actionAssignKeywords->setEnabled( FALSE ); + m_actionAssignKeywords->setEnabled( false ); m_actionNormalizeIds = new TDEAction( i18n( "Normalize Entry Ids" ), 0, m_documentWidget, TQ_SLOT( slotNormalizeIds() ), actionCollection( ), "normalize_ids" ); m_actionNormalizeIds->setToolTip( i18n( "Set entry ids as specified in the id suggestion settings" ) ); - m_actionNormalizeIds->setEnabled( FALSE ); + m_actionNormalizeIds->setEnabled( false ); m_actionPreferences = KStdAction::preferences( this, TQ_SLOT( slotPreferences() ), actionCollection() ); m_actionPreferences->setToolTip( i18n( "Configure KBibTeX" ) ); @@ -508,10 +508,10 @@ void KBibTeXPart::setupActions() m_actionEditElement = new TDEAction( i18n( "&Edit" ), 0, m_documentWidget, TQ_SLOT( editElement() ), actionCollection(), "element_edit" ); m_actionEditElement->setToolTip( i18n( "Edit the selected BibTeX element" ) ); - m_actionEditElement->setEnabled( FALSE ); + m_actionEditElement->setEnabled( false ); m_actionDeleteElement = new TDEAction( i18n( "&Delete" ), 0, m_documentWidget, TQ_SLOT( deleteElements() ), actionCollection(), "element_delete" ); m_actionDeleteElement->setToolTip( i18n( "Delete the selected BibTeX elements" ) ); - m_actionDeleteElement->setEnabled( FALSE ); + m_actionDeleteElement->setEnabled( false ); m_actionShowComments = new TDEToggleAction( i18n( "Show &Comments" ), 0, this, TQ_SLOT( slotToggleShowSpecialElements() ), actionCollection(), "view_showcomments" ); m_actionShowComments->setToolTip( i18n( "Show the comments of a BibTeX document" ) ); @@ -536,7 +536,7 @@ void KBibTeXPart::setupActions() TDEActionMenu *acmElementNew = new TDEActionMenu( i18n( "&New" ), TQIconSet( SmallIcon( "document-new" ) ), actionCollection(), "element_new" ); acmElementNew->setToolTip( i18n( "Add a new element to this BibTeX document" ) ); - acmElementNew->setEnabled( FALSE ); + acmElementNew->setEnabled( false ); } bool KBibTeXPart::slotNewElement() @@ -554,15 +554,15 @@ bool KBibTeXPart::slotNewElement() else if ( strcmp( sender() ->name(), "element_new_preamble" ) == 0 ) elementType = "preamble"; else - return FALSE; + return false; bool result = m_documentWidget->newElement( elementType ); if ( result ) - setModified( TRUE ); + setModified( true ); return result; } - return FALSE; + return false; } void KBibTeXPart::readSettings() @@ -684,7 +684,7 @@ void KBibTeXPart::slotDeferredInitialization() { m_documentWidget->setFactory( factory(), this ); m_documentWidget->deferredInitialization(); - m_initializationDone = TRUE; + m_initializationDone = true; } else { diff --git a/src/kbibtexshell.cpp b/src/kbibtexshell.cpp index e3195b3..7e672b5 100644 --- a/src/kbibtexshell.cpp +++ b/src/kbibtexshell.cpp @@ -115,21 +115,21 @@ bool KBibTeXShell::openURL( const KURL& url ) if ( m_part->url().isEmpty() && !m_part->isModified() ) { if ( !m_part->openURL( url ) ) - return FALSE; + return false; } else { KBibTeXShell *shell = new KBibTeXShell(); if ( !shell->part() ->openURL( url ) ) - return FALSE; + return false; else initializePart( shell->part() ); shell->show(); } m_recentFiles->addURL( url ); - return TRUE; + return true; } KParts::ReadWritePart * KBibTeXShell::part() @@ -281,7 +281,7 @@ void KBibTeXShell::applyNewToolbarConfig() bool KBibTeXShell::queryClose() { if ( m_part && !m_part ->closeURL() ) - return FALSE; + return false; writeConfig(); @@ -326,7 +326,7 @@ void KBibTeXShell::slotFileOpen( const KURL& url ) { if ( url.isEmpty() ) return ; - if ( !TDEIO::NetAccess::exists( url, TRUE, this ) ) + if ( !TDEIO::NetAccess::exists( url, true, this ) ) { m_recentFiles->removeURL( url ); KMessageBox::error( this, i18n( "The given file could not be read, check if it exists or if it is readable for the current user." ) ); diff --git a/src/macro.h b/src/macro.h index 50a5400..a620a8e 100644 --- a/src/macro.h +++ b/src/macro.h @@ -41,7 +41,7 @@ namespace BibTeX Value *value() const; void setValue( Value *value ); - bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const; + bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = false ) const; Element* clone(); void copyFrom( Macro *other ); diff --git a/src/macrowidget.cpp b/src/macrowidget.cpp index 307c76d..a227f41 100644 --- a/src/macrowidget.cpp +++ b/src/macrowidget.cpp @@ -36,7 +36,7 @@ namespace KBibTeX { TQDialog::DialogCode MacroWidget::execute( BibTeX::Macro *macro, bool isReadOnly, TQWidget *parent, const char *name ) { - KDialogBase * dlg = new KDialogBase( parent, name, TRUE, i18n( "Edit BibTeX Macro" ), KDialogBase::Ok | KDialogBase::Cancel ); + KDialogBase * dlg = new KDialogBase( parent, name, true, i18n( "Edit BibTeX Macro" ), KDialogBase::Ok | KDialogBase::Cancel ); MacroWidget* macroWidget = new MacroWidget( macro, isReadOnly, dlg, "MacroWidget" ); dlg->setMainWidget( macroWidget ); diff --git a/src/mergeelements.cpp b/src/mergeelements.cpp index 9eb2487..8120212 100644 --- a/src/mergeelements.cpp +++ b/src/mergeelements.cpp @@ -761,11 +761,11 @@ namespace KBibTeX { MergeElementsCliqueItem *meci = dynamic_cast<MergeElementsCliqueItem*>( item ); if ( meci != NULL && meci->entry != NULL ) - KBibTeX::EntryWidget::execute( meci->entry, NULL, TRUE, FALSE, this ); + KBibTeX::EntryWidget::execute( meci->entry, NULL, true, false, this ); else if ( meci != NULL && meci->macro != NULL ) - KBibTeX::MacroWidget::execute( meci->macro, TRUE, this ); + KBibTeX::MacroWidget::execute( meci->macro, true, this ); else if ( meci!=NULL&& meci->preamble!=NULL ) - KBibTeX::PreambleWidget::execute( meci->preamble, TRUE, this ); + KBibTeX::PreambleWidget::execute( meci->preamble, true, this ); } /* This function was taken form TDEMainWindow of KDE 3.5 and modified to fit KBibTeX */ diff --git a/src/preamble.h b/src/preamble.h index 29d0288..4d6be12 100644 --- a/src/preamble.h +++ b/src/preamble.h @@ -39,7 +39,7 @@ namespace BibTeX Value *value() const; void setValue( Value *value ); - bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = FALSE ) const; + bool containsPattern( const TQString& pattern, EntryField::FieldType fieldType = EntryField::ftUnknown, FilterType filterType = BibTeX::Element::ftExact, bool caseSensitive = false ) const; Element* clone(); void copyFrom( Preamble *other ); diff --git a/src/preamblewidget.cpp b/src/preamblewidget.cpp index 68b5ed5..2a85614 100644 --- a/src/preamblewidget.cpp +++ b/src/preamblewidget.cpp @@ -30,7 +30,7 @@ namespace KBibTeX TQDialog::DialogCode PreambleWidget::execute( BibTeX::Preamble *preamble, bool isReadOnly, TQWidget *parent, const char *name ) { - KDialogBase * dlg = new KDialogBase( parent, name, TRUE, i18n( "Edit BibTeX Preamble" ), KDialogBase::Ok | KDialogBase::Cancel ); + KDialogBase * dlg = new KDialogBase( parent, name, true, i18n( "Edit BibTeX Preamble" ), KDialogBase::Ok | KDialogBase::Cancel ); PreambleWidget* preambleWidget = new PreambleWidget( preamble, isReadOnly, dlg, "PreambleWidget" ); dlg->setMainWidget( preambleWidget ); diff --git a/src/searchbar.cpp b/src/searchbar.cpp index 290e31b..ede81cd 100644 --- a/src/searchbar.cpp +++ b/src/searchbar.cpp @@ -108,13 +108,13 @@ namespace KBibTeX TQLabel *label = new TQLabel( i18n( "&Search:" ), this ); layout->addWidget( label ); - m_comboboxFilter = new KHistoryCombo( TRUE, this, "search_combobox" ); + m_comboboxFilter = new KHistoryCombo( true, this, "search_combobox" ); layout->addWidget( m_comboboxFilter ); label->setBuddy( m_comboboxFilter ); m_comboboxFilter->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); m_comboboxFilter->setMaxCount( 256 ); - m_comboboxFilterType = new KComboBox( FALSE, this ); + m_comboboxFilterType = new KComboBox( false, this ); m_comboboxFilterType->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred ); layout->addWidget( m_comboboxFilterType ); @@ -125,7 +125,7 @@ namespace KBibTeX label = new TQLabel( i18n( "Restrict to:" ), this ); layout->addWidget( label ); - m_comboboxRestrictTo = new KComboBox( FALSE, this ); + m_comboboxRestrictTo = new KComboBox( false, this ); m_comboboxRestrictTo->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Preferred ); layout->addWidget( m_comboboxRestrictTo ); label->setBuddy( m_comboboxRestrictTo ); diff --git a/src/settings.cpp b/src/settings.cpp index 8cf020f..93523bc 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -61,10 +61,10 @@ namespace KBibTeX for ( int i = 0; i < numCompletions; ++i ) { m_completion[ i ] = new TDECompletion(); - m_completion[ i ] ->setIgnoreCase( TRUE ); + m_completion[ i ] ->setIgnoreCase( true ); } completionMacro = new TDECompletion(); - completionMacro->setIgnoreCase( FALSE ); + completionMacro->setIgnoreCase( false ); currentBibTeXFile = NULL; } @@ -99,9 +99,9 @@ namespace KBibTeX fileIO_BibtexStringOpenDelimiter = config->readEntry( "BibtexStringOpenDelimiter", "\"" ).at( 0 ); fileIO_BibtexStringCloseDelimiter = config->readEntry( "BibtexStringCloseDelimiter", "\"" ).at( 0 ); fileIO_KeywordCasing = ( BibTeX::FileExporterBibTeX::KeywordCasing ) config->readNumEntry( "KeywordCasing", ( int ) BibTeX::FileExporterBibTeX::kcCamelCase ); - fileIO_EmbedFiles = config->readBoolEntry( "EmbedFiles", FALSE ); - fileIO_EnclosingCurlyBrackets = config->readBoolEntry( "EnclosingCurlyBrackets", FALSE ); - fileIO_useBibUtils = config->readBoolEntry( "UseBibUtils", TRUE ); + fileIO_EmbedFiles = config->readBoolEntry( "EmbedFiles", false ); + fileIO_EnclosingCurlyBrackets = config->readBoolEntry( "EnclosingCurlyBrackets", false ); + fileIO_useBibUtils = config->readBoolEntry( "UseBibUtils", true ); updateBib2Db5ClassPath( config->readEntry( "Bib2Db5BasePath", TQString::null ) ); fileIO_NumberOfBackups = config->readNumEntry( "NumberOfBackups", 0 ); @@ -114,14 +114,14 @@ namespace KBibTeX editing_MainListColumnsWidth = config->readIntListEntry( "MainListColumnsWidth" ); editing_MainListColumnsIndex = config->readIntListEntry( "MainListColumnsIndex" ); editing_FilterHistory = config->readListEntry( "FilterHistory" ); - editing_ShowComments = config->readBoolEntry( "ShowComments", TRUE ); - editing_ShowMacros = config->readBoolEntry( "ShowMacros", TRUE ); + editing_ShowComments = config->readBoolEntry( "ShowComments", true ); + editing_ShowMacros = config->readBoolEntry( "ShowMacros", true ); editing_HorSplitterSizes = config->readIntListEntry( "HorizontalSplitterSizes" ); editing_VertSplitterSizes = config->readIntListEntry( "VerticalSplitterSizes" ); TQFont defaultFont = TDEGlobalSettings::generalFont(); editing_SpecialFont = config->readFontEntry( "SpecialFont", &defaultFont ); - editing_UseSpecialFont = config->readBoolEntry( "UseSpecialFont", FALSE ); - editing_FirstNameFirst = config->readBoolEntry( "FirstNameFirst", FALSE ); + editing_UseSpecialFont = config->readBoolEntry( "UseSpecialFont", false ); + editing_FirstNameFirst = config->readBoolEntry( "FirstNameFirst", false ); editing_DocumentSearchPaths = config->readListEntry( "DocumentSearchPath" ); editing_DragAction = ( DragAction ) config->readNumEntry( "DragAction", ( int ) COPYREFERENCE ); @@ -155,7 +155,7 @@ namespace KBibTeX { TQString descr = config->readEntry( TQString( "SearchURLDescription%1" ).arg( i ), TQString::null ); TQString url = config->readEntry( TQString( "SearchURL%1" ).arg( i ), TQString::null ); - bool includeAuthor = config->readBoolEntry( TQString( "IncludeAuthor%1" ).arg( i ), FALSE ); + bool includeAuthor = config->readBoolEntry( TQString( "IncludeAuthor%1" ).arg( i ), false ); if ( descr != TQString::null && url != TQString::null ) { SearchURL * searchURL = new SearchURL; @@ -179,7 +179,7 @@ namespace KBibTeX webQuery_LastEngine = config->readNumEntry( "LastEngine", 0 ); webQuery_LastSearchTerm = config->readEntry( "LastSearchTerm", "" ); webQuery_LastNumberOfResults = config->readNumEntry( "LastNumberOfResults", 10 ); - webQuery_ImportAll = config->readBoolEntry( "ImportAll", FALSE ); + webQuery_ImportAll = config->readBoolEntry( "ImportAll", false ); config->setGroup( "IdSuggestions" ); idSuggestions_formatStrList = config->readListEntry( "FormatStrList" ); @@ -187,12 +187,12 @@ namespace KBibTeX { idSuggestions_formatStrList = TQStringList::split( ',', "A,A2|y,A3|y,A4|y|\":|T5,al|\":|T,al|y,al|Y,Al\"-|\"-|y,Al\"+|Y,al|y|T,al|Y|T3,al|Y|T3l,a|\":|Y|\":|T1,a|y,A|\":|Y" ); idSuggestions_default = -1; - idSuggestions_forceDefault = FALSE; + idSuggestions_forceDefault = false; } else { idSuggestions_default = config->readNumEntry( "Default", -1 ); - idSuggestions_forceDefault = config->readBoolEntry( "ForceDefault", FALSE ); + idSuggestions_forceDefault = config->readBoolEntry( "ForceDefault", false ); } idSuggestions_smallWords = config->readListEntry( "SmallWords" ); if ( idSuggestions_smallWords.count() == 0 ) @@ -373,7 +373,7 @@ namespace KBibTeX while ( result.isNull() && !input.atEnd() ) { TQString line = input.readLine(); - if ( line.startsWith( "\\serverpipe ", FALSE ) ) + if ( line.startsWith( "\\serverpipe ", false ) ) { TQStringList cols = TQStringList::split( TQRegExp( "\\s+\"|\"" ), line ); if ( cols.size() >= 2 ) @@ -465,8 +465,8 @@ namespace KBibTeX if ( personContainer != NULL ) for ( TQValueList<BibTeX::Person*>::Iterator itp = personContainer->persons.begin();itp != personContainer->persons.end(); ++itp ) { - m_completion[ index ] ->addItem(( *itp )->text( TRUE ) ); - m_completion[ index ] ->addItem(( *itp )->text( FALSE ) ); + m_completion[ index ] ->addItem(( *itp )->text( true ) ); + m_completion[ index ] ->addItem(( *itp )->text( false ) ); } else { @@ -531,91 +531,91 @@ namespace KBibTeX SearchURL *searchURL = new SearchURL; searchURL->description = "Google"; searchURL->url = "http://www.google.com/search?q=%1&ie=UTF-8&oe=UTF-8"; - searchURL->includeAuthor = TRUE; + searchURL->includeAuthor = true; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "Google Scholar"; searchURL->url = "http://scholar.google.com/scholar?q=%1&ie=UTF-8&oe=UTF-8"; - searchURL->includeAuthor = TRUE; + searchURL->includeAuthor = true; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "Google .bib Search"; searchURL->url = "http://www.google.com/search?q=%1%20filetype%3Abib&ie=UTF-8&oe=UTF-8"; - searchURL->includeAuthor = TRUE; + searchURL->includeAuthor = true; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "Google Document Search"; searchURL->url = "http://www.google.com/search?q=%1%20filetype%3Apdf%20OR%20filetype%3Aps&ie=UTF-8&oe=UTF-8"; - searchURL->includeAuthor = TRUE; + searchURL->includeAuthor = true; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "PubMed"; searchURL->url = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&cmd=search&pmfilter_Fulltext=on&pmfilter_Relevance=on&term=%1&search=Find+Articles"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "PubMed Central"; searchURL->url = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=pubmed&cmd=search&term=%1"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "Amatex (US)"; searchURL->url = "http://www.2ndminute.org:8080/amatex/search.do?querry=%1&suchart=kwd&lang=DE"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "DBLP (Computer Science)"; searchURL->url = "http://www.informatik.uni-trier.de/ley/dbbin/dblpquery.cgi?title=%1"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "CiteSeer"; searchURL->url = "http://citeseer.ist.psu.edu/cis?q=%1&submit=Search+Documents"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "citebase"; searchURL->url = "http://www.citebase.org/search?type=metadata&author=&title=%1&publication=&yearfrom=&yearuntil=&order=DESC&rank=paperimpact&submitted=Search"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "BASE"; searchURL->url = "http://digital.ub.uni-bielefeld.de/index.php?q=%1&s=free"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "Forschungsportal.Net"; searchURL->url = "http://www.forschungsportal.net/fpj/q/?q=%1&pp=5&art=dok&html=1&pdf=1&ps=1&dvi=1"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "scirus"; searchURL->url = "http://www.scirus.com/srsapp/search?q=%1&ds=jnl&ds=nom&ds=web&g=s&t=all"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "ScientificCommons"; searchURL->url = "http://en.scientificcommons.org/#search_string=%1"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); searchURL = new SearchURL; searchURL->description = "SpringerLink"; searchURL->url = "http://www.springerlink.com/content/?k=%1"; - searchURL->includeAuthor = FALSE; + searchURL->includeAuthor = false; searchURLs.append( searchURL ); } @@ -746,7 +746,7 @@ namespace KBibTeX bool Settings::kpsewhich( const TQString& filename ) { - bool result = FALSE; + bool result = false; int counter = 0; TQWaitCondition waitCond; @@ -779,14 +779,14 @@ namespace KBibTeX if ( _filename.contains( "~/" ) && !userHome.isEmpty() ) _filename = _filename.replace( "~/", userHome.append( "/" ) ); KURL url( _filename ); - if ( url.isValid() && ( !url.isLocalFile() || TDEIO::NetAccess::exists( url, TRUE, window ) ) ) + if ( url.isValid() && ( !url.isLocalFile() || TDEIO::NetAccess::exists( url, true, window ) ) ) return url; if ( bibTeXFileName != TQString::null ) { - TQString path = KURL( bibTeXFileName ).directory( FALSE, FALSE ); + TQString path = KURL( bibTeXFileName ).directory( false, false ); url = KURL( path + "/" + _filename ); - if ( url.isValid() && TDEIO::NetAccess::exists( url, TRUE, window ) ) + if ( url.isValid() && TDEIO::NetAccess::exists( url, true, window ) ) return url; } @@ -794,7 +794,7 @@ namespace KBibTeX for ( TQStringList::Iterator it = settings->editing_DocumentSearchPaths.begin(); it != settings->editing_DocumentSearchPaths.end(); ++it ) { url = KURL( *it + "/" + _filename ); - if ( url.isValid() && TDEIO::NetAccess::exists( url, TRUE, window ) ) + if ( url.isValid() && TDEIO::NetAccess::exists( url, true, window ) ) return url; } @@ -811,7 +811,7 @@ namespace KBibTeX if ( linkFilename[0] == '/' ) return linkFilename; TQFileInfo fiO( originalFilename ); - TQFileInfo fiL( fiO.dirPath( TRUE ) + "/" + linkFilename ); + TQFileInfo fiL( fiO.dirPath( true ) + "/" + linkFilename ); return fiL.absFilePath(); } diff --git a/src/settingsdlg.cpp b/src/settingsdlg.cpp index 5f05e32..acc722e 100644 --- a/src/settingsdlg.cpp +++ b/src/settingsdlg.cpp @@ -103,14 +103,14 @@ namespace KBibTeX #ifdef HAVE_YAZ m_z3950config->readData(); #endif // HAVE_YAZ - enableButton( Apply, FALSE ); + enableButton( Apply, false ); return KDialogBase::exec(); } void SettingsDlg::slotConfigChanged() { - enableButton( Apply, TRUE ); + enableButton( Apply, true ); } void SettingsDlg::slotApplySettings() @@ -124,7 +124,7 @@ namespace KBibTeX #ifdef HAVE_YAZ m_z3950config->applyData(); #endif // HAVE_YAZ - enableButton( Apply, FALSE ); + enableButton( Apply, false ); } void SettingsDlg::accept() diff --git a/src/settingsediting.cpp b/src/settingsediting.cpp index 912183b..493c8bd 100644 --- a/src/settingsediting.cpp +++ b/src/settingsediting.cpp @@ -63,7 +63,7 @@ namespace KBibTeX TQToolTip::add( m_urlRequesterNewPath->button(), i18n( "Select a path to add" ) ); m_pushButtonAddDir = new KPushButton( i18n( "Add" ), this ); m_pushButtonAddDir->setIconSet( TQIconSet( SmallIcon( "add" ) ) ); - m_pushButtonAddDir->setEnabled( FALSE ); + m_pushButtonAddDir->setEnabled( false ); TQToolTip::add( m_pushButtonAddDir, i18n( "Add chosen path to list" ) ); layout->addWidget( m_pushButtonAddDir, 1, 2 ); @@ -77,7 +77,7 @@ namespace KBibTeX layout->addMultiCellWidget( m_listViewPathList, 3, 4, 0, 1 ); m_pushButtonDelDir = new KPushButton( i18n( "Delete" ), this ); layout->addWidget( m_pushButtonDelDir, 3, 2 ); - m_pushButtonDelDir->setEnabled( FALSE ); + m_pushButtonDelDir->setEnabled( false ); m_pushButtonDelDir->setIconSet( TQIconSet( SmallIcon( "edit-delete" ) ) ); TQToolTip::add( m_pushButtonDelDir, i18n( "Remove selected path from list" ) ); @@ -133,7 +133,7 @@ namespace KBibTeX { TQListViewItem *item = new TDEListViewItem( m_listViewPathList, path ); m_listViewPathList->ensureItemVisible( item ); - m_listViewPathList->setSelected( item, TRUE ); + m_listViewPathList->setSelected( item, true ); slotSelectionChanged(); } else @@ -160,7 +160,7 @@ namespace KBibTeX group = new TQGroupBox( 2, TQt::Horizontal, i18n( "Main List" ), this ); layout->addWidget( group ); TQLabel *label = new TQLabel( i18n( "&Sorting:" ), group ); - m_comboBoxSortingColumn = new TQComboBox( FALSE, group ); + m_comboBoxSortingColumn = new TQComboBox( false, group ); m_comboBoxSortingColumn->insertItem( i18n( "Element Type" ) ); m_comboBoxSortingColumn->insertItem( i18n( "Entry Id" ) ); for ( int i = 0; i <= ( int ) BibTeX::EntryField::ftYear - ( int ) BibTeX::EntryField::ftAbstract; i++ ) @@ -172,19 +172,19 @@ namespace KBibTeX label->setBuddy( m_comboBoxSortingColumn ); label = new TQLabel( i18n( "So&rting order:" ), group ); - m_comboBoxSortingOrder = new TQComboBox( FALSE, group ); + m_comboBoxSortingOrder = new TQComboBox( false, group ); m_comboBoxSortingOrder->insertItem( i18n( "Ascending" ) ); m_comboBoxSortingOrder->insertItem( i18n( "Descending" ) ); label->setBuddy( m_comboBoxSortingOrder ); label = new TQLabel( i18n( "&Double click action:" ), group ); - m_comboBoxDoubleClickAction = new TQComboBox( FALSE, group ); + m_comboBoxDoubleClickAction = new TQComboBox( false, group ); m_comboBoxDoubleClickAction->insertItem( i18n( "Edit element" ) ); m_comboBoxDoubleClickAction->insertItem( i18n( "Open document" ) ); label->setBuddy( m_comboBoxDoubleClickAction ); label = new TQLabel( i18n( "On dragging with mouse:" ), group ); - m_comboBoxDragAction = new TQComboBox( FALSE, group ); + m_comboBoxDragAction = new TQComboBox( false, group ); m_comboBoxDragAction->insertItem( i18n( "Copy reference (\\cite{...})" ) ); m_comboBoxDragAction->insertItem( i18n( "Copy BibTeX text (@article{...})" ) ); label->setBuddy( m_comboBoxDragAction ); diff --git a/src/settingsfileio.cpp b/src/settingsfileio.cpp index c79a633..4fe7e80 100644 --- a/src/settingsfileio.cpp +++ b/src/settingsfileio.cpp @@ -199,7 +199,7 @@ namespace KBibTeX if ( m_comboBoxExportSystemHTML->count() == 0 ) { m_comboBoxExportSystemHTML->insertItem( i18n( "No exporter available" ) ); - m_comboBoxExportSystemHTML->setEnabled( FALSE ); + m_comboBoxExportSystemHTML->setEnabled( false ); } m_checkBoxEmbedFiles->setChecked( settings->fileIO_EmbedFiles ); @@ -264,7 +264,7 @@ namespace KBibTeX m_comboBoxLanguage = new TQComboBox( groupBox ); label->setBuddy( m_comboBoxLanguage ); label = new TQLabel( i18n( "&Biblography style:" ), groupBox ); - m_comboBoxBibliographyStyle = new TQComboBox( TRUE, groupBox ); + m_comboBoxBibliographyStyle = new TQComboBox( true, groupBox ); label->setBuddy( m_comboBoxBibliographyStyle ); groupBox = new TQGroupBox( 1, Horizontal, i18n( "PDF Export" ), this ); @@ -293,7 +293,7 @@ namespace KBibTeX groupBox = new TQGroupBox( 2, Horizontal, i18n( "Export Systems" ), this ); layout->addWidget( groupBox ); label = new TQLabel( i18n( "HTML:" ), groupBox ); - m_comboBoxExportSystemHTML = new TQComboBox( FALSE, groupBox ); + m_comboBoxExportSystemHTML = new TQComboBox( false, groupBox ); label->setBuddy( m_comboBoxExportSystemHTML ); groupBox = new TQGroupBox( 1, Horizontal, i18n( "BibUtils" ), this ); diff --git a/src/settingsidsuggestions.cpp b/src/settingsidsuggestions.cpp index 057b293..12f491c 100644 --- a/src/settingsidsuggestions.cpp +++ b/src/settingsidsuggestions.cpp @@ -46,13 +46,13 @@ namespace KBibTeX IdSuggestionsListViewItem::IdSuggestionsListViewItem( TDEListView *list, const TQString& plainText, BibTeX::Entry *example ): TDEListViewItem( list ), m_original( plainText ), m_example( example ) { TDEListViewItem::setText( 0, parse( plainText ) ); - TDEListViewItem::setMultiLinesEnabled( TRUE ); + TDEListViewItem::setMultiLinesEnabled( true ); } IdSuggestionsListViewItem::IdSuggestionsListViewItem( TDEListView *list, TDEListViewItem *prev, const TQString& plainText, BibTeX::Entry *example ): TDEListViewItem( list, prev ), m_original( plainText ), m_example( example ) { TDEListViewItem::setText( 0, parse( plainText ) ); - TDEListViewItem::setMultiLinesEnabled( TRUE ); + TDEListViewItem::setMultiLinesEnabled( true ); } void IdSuggestionsListViewItem::setText( int col, const TQString& text ) @@ -170,7 +170,7 @@ namespace KBibTeX { IdSuggestionsListViewItem * item = new IdSuggestionsListViewItem( m_listIdSuggestions, "a|Y|T", m_example ); item->setPixmap( 0, SmallIcon( "filter" ) ); - m_listIdSuggestions->setSelected( item, TRUE ); + m_listIdSuggestions->setSelected( item, true ); TQTimer::singleShot( 100, this, TQ_SLOT( slotEditIdSuggestion() ) ); } @@ -333,9 +333,9 @@ namespace KBibTeX gridLayout->setColStretch( 0, 1 ); m_listIdSuggestions = new TDEListView( this ); - m_listIdSuggestions->setSorting( -1, FALSE ); + m_listIdSuggestions->setSorting( -1, false ); m_listIdSuggestions->addColumn( i18n( "Id Suggestions" ) ); - m_listIdSuggestions->header()->setClickEnabled( FALSE ); + m_listIdSuggestions->header()->setClickEnabled( false ); m_listIdSuggestions->setFullWidth( true ); gridLayout->addMultiCellWidget( m_listIdSuggestions, 0, 6, 0, 0 ); connect( m_listIdSuggestions, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( updateGUI() ) ); diff --git a/src/settingskeyword.cpp b/src/settingskeyword.cpp index 707147c..49a9b8d 100644 --- a/src/settingskeyword.cpp +++ b/src/settingskeyword.cpp @@ -82,7 +82,7 @@ namespace KBibTeX { TDEListViewItem * item = new TDEListViewItem( m_listKeywords, i18n( "New Keyword" ) ); item->setPixmap( 0, SmallIcon( "package" ) ); - m_listKeywords->setSelected( item, TRUE ); + m_listKeywords->setSelected( item, true ); m_listKeywords->ensureItemVisible( item ); TQTimer::singleShot( 100, this, TQ_SLOT( slotEditKeyword() ) ); } @@ -130,7 +130,7 @@ namespace KBibTeX KMessageBox::information( this, i18n( "1 keyword has been imported.", "%n keywords have been imported.", numImported ), i18n( "Keywords imported" ) ); - m_buttonImportKeywords->setEnabled( FALSE ); + m_buttonImportKeywords->setEnabled( false ); } void SettingsKeyword::slotItemRenamed( TQListViewItem *item ) @@ -159,7 +159,7 @@ namespace KBibTeX m_listKeywords = new TDEListView( this ); m_listKeywords->addColumn( i18n( "Keywords" ) ); - m_listKeywords->header()->setClickEnabled( FALSE ); + m_listKeywords->header()->setClickEnabled( false ); m_listKeywords->setFullWidth( true ); gridLayout->addMultiCellWidget( m_listKeywords, 0, 4, 0, 0 ); diff --git a/src/settingssearchurl.cpp b/src/settingssearchurl.cpp index ab791f2..99831bf 100644 --- a/src/settingssearchurl.cpp +++ b/src/settingssearchurl.cpp @@ -129,11 +129,11 @@ namespace KBibTeX m_listviewSearchURLs = new TDEListView( this ); layout->addMultiCellWidget( m_listviewSearchURLs, 0, 4, 0, 0 ); - m_listviewSearchURLs->setAllColumnsShowFocus( TRUE ); + m_listviewSearchURLs->setAllColumnsShowFocus( true ); m_listviewSearchURLs->addColumn( i18n( "Description" ) ); m_listviewSearchURLs->addColumn( i18n( "Author" ) ); m_listviewSearchURLs->addColumn( i18n( "URL" ) ); - m_listviewSearchURLs->header()->setClickEnabled( FALSE ); + m_listviewSearchURLs->header()->setClickEnabled( false ); m_listviewSearchURLs->setFullWidth( true ); m_listviewSearchURLs->setMinimumWidth( 384 ); @@ -167,7 +167,7 @@ namespace KBibTeX void SettingsSearchURL::urlDialog( TQListViewItem * item ) { - KDialogBase * dlg = new KDialogBase( this, "urldialog", TRUE, item == NULL ? i18n( "New URL" ) : i18n( "Edit URL" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, TRUE ); + KDialogBase * dlg = new KDialogBase( this, "urldialog", true, item == NULL ? i18n( "New URL" ) : i18n( "Edit URL" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ); TQWidget *container = new TQWidget( dlg, "container" ); TQGridLayout *layout = new TQGridLayout( container, 3, 2, 0, KDialog::spacingHint() ); TQLabel *label = new TQLabel( i18n( "Description:" ), container ); @@ -184,7 +184,7 @@ namespace KBibTeX TQToolTip::add( url, i18n( "Within the URL, '%1' will be replaced by the search term." ) ); label = new TQLabel( i18n( "Include Author:" ), container ); layout->addWidget( label, 2, 0 ); - TQComboBox *cbIncludeAuthor = new TQComboBox( FALSE, container ); + TQComboBox *cbIncludeAuthor = new TQComboBox( false, container ); layout->addWidget( cbIncludeAuthor, 2, 1 ); label->setBuddy( cbIncludeAuthor ); cbIncludeAuthor->insertItem( i18n( "Yes" ) ); diff --git a/src/settingsuserdefinedinput.cpp b/src/settingsuserdefinedinput.cpp index 9c66ea7..1c77f10 100644 --- a/src/settingsuserdefinedinput.cpp +++ b/src/settingsuserdefinedinput.cpp @@ -164,17 +164,17 @@ namespace KBibTeX gridLayout->setColStretch( 0, 1 ); m_listFields = new TDEListView( this ); - m_listFields->setSorting( -1, FALSE ); + m_listFields->setSorting( -1, false ); m_listFields->addColumn( i18n( "Name" ) ); - m_listFields->header()->setClickEnabled( FALSE ); + m_listFields->header()->setClickEnabled( false ); m_listFields->addColumn( i18n( "Label" ) ); - m_listFields->header()->setClickEnabled( FALSE ); + m_listFields->header()->setClickEnabled( false ); m_listFields->addColumn( i18n( "Type" ) ); - m_listFields->header()->setClickEnabled( FALSE ); - m_listFields->header()->setClickEnabled( FALSE ); + m_listFields->header()->setClickEnabled( false ); + m_listFields->header()->setClickEnabled( false ); m_listFields->setFullWidth( true ); m_listFields->setMinimumWidth( 128 ); - m_listFields->setAllColumnsShowFocus( TRUE ); + m_listFields->setAllColumnsShowFocus( true ); gridLayout->addMultiCellWidget( m_listFields, 0, 5, 0, 0 ); m_buttonNewField = new KPushButton( i18n( "user-defined input", "New" ), this ); @@ -207,7 +207,7 @@ namespace KBibTeX void SettingsUserDefinedInput::fieldDialog( TQListViewItem * item ) { - fieldDlg = new KDialogBase( this, "fieldDialog", TRUE, item == NULL ? i18n( "New Field" ) : i18n( "Edit Field" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, TRUE ); + fieldDlg = new KDialogBase( this, "fieldDialog", true, item == NULL ? i18n( "New Field" ) : i18n( "Edit Field" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ); TQWidget *container = new TQWidget( fieldDlg, "container" ); TQGridLayout *layout = new TQGridLayout( container, 3, 2, 0, KDialog::spacingHint() ); TQLabel *label = new TQLabel( i18n( "Name:" ), container ); @@ -223,7 +223,7 @@ namespace KBibTeX m_lineEditLabel->setMinimumWidth( 384 ); label = new TQLabel( i18n( "Input Type:" ), container ); layout->addWidget( label, 2, 0 ); - KComboBox *comboBoxInputType = new KComboBox( FALSE, container ); + KComboBox *comboBoxInputType = new KComboBox( false, container ); layout->addWidget( comboBoxInputType, 2, 1 ); label->setBuddy( comboBoxInputType ); comboBoxInputType->insertItem( i18n( "Single line" ) ); diff --git a/src/settingsz3950.cpp b/src/settingsz3950.cpp index 6b140ba..4f693a8 100644 --- a/src/settingsz3950.cpp +++ b/src/settingsz3950.cpp @@ -217,7 +217,7 @@ namespace KBibTeX server.port = 2100; ServerListViewItem * item = new ServerListViewItem( m_listServers, "", server, true ); item->setPixmap( 0, SmallIcon( "server" ) ); - m_listServers->setSelected( item, TRUE ); + m_listServers->setSelected( item, true ); TQTimer::singleShot( 100, this, TQ_SLOT( slotEditServer() ) ); } @@ -320,10 +320,10 @@ namespace KBibTeX gridLayout->setColStretch( 0, 1 ); m_listServers = new TDEListView( this ); - m_listServers->setSorting( -1, FALSE ); + m_listServers->setSorting( -1, false ); m_listServers->addColumn( i18n( "z3950 server", "Name" ) ); m_listServers->addColumn( i18n( "z3950 server", "Database" ) ); - m_listServers->header()->setClickEnabled( FALSE ); + m_listServers->header()->setClickEnabled( false ); m_listServers->setFullWidth( true ); m_listServers->setAllColumnsShowFocus( true ); gridLayout->addMultiCellWidget( m_listServers, 0, 7, 0, 0 ); diff --git a/src/sidebar.cpp b/src/sidebar.cpp index 0f4dcf8..f183596 100644 --- a/src/sidebar.cpp +++ b/src/sidebar.cpp @@ -71,7 +71,7 @@ namespace KBibTeX m_bibtexFile = bibtexFile; TQApplication::setOverrideCursor( TQt::waitCursor ); - setEnabled( FALSE ); + setEnabled( false ); BibTeX::EntryField::FieldType fieldType = m_buttonToggleShowAll->isOn() ? ( BibTeX::EntryField::FieldType )( m_listTypeList->currentItem() + ( int ) BibTeX::EntryField::ftAbstract ) : importantFields[ m_listTypeList->currentItem()]; @@ -87,7 +87,7 @@ namespace KBibTeX } } - setEnabled( TRUE ); + setEnabled( true ); TQApplication::restoreOverrideCursor(); } @@ -109,10 +109,10 @@ namespace KBibTeX layout->addWidget( m_buttonToggleShowAll, 0, 0 ); TQIconSet showAllPixmap = TDEGlobal::iconLoader() ->loadIconSet( "taskbar", TDEIcon::Small ); m_buttonToggleShowAll->setIconSet( showAllPixmap ); - m_buttonToggleShowAll->setToggleButton( TRUE ); + m_buttonToggleShowAll->setToggleButton( true ); TQToolTip::add( m_buttonToggleShowAll, i18n( "Toggle between showing all fields or only important fields" ) ); - m_listTypeList = new TQComboBox( FALSE, this ); + m_listTypeList = new TQComboBox( false, this ); layout->addWidget( m_listTypeList, 0, 1 ); TQToolTip::add( m_listTypeList, i18n( "Filter this sidebar for a given field" ) ); @@ -120,13 +120,13 @@ namespace KBibTeX layout->addWidget( m_buttonToggleMultiSelect, 0, 2 ); showAllPixmap = TDEGlobal::iconLoader() ->loadIconSet( "planner", TDEIcon::Small ); m_buttonToggleMultiSelect->setIconSet( showAllPixmap ); - m_buttonToggleMultiSelect->setToggleButton( TRUE ); + m_buttonToggleMultiSelect->setToggleButton( true ); TQToolTip::add( m_buttonToggleMultiSelect, i18n( "Toggle between selecting only one item or multiple items (AND-connected in search)" ) ); m_listAvailableItems = new TDEListView( this ); m_listAvailableItems->addColumn( i18n( "#" ) ); m_listAvailableItems->addColumn( i18n( "Items" ) ); - m_listAvailableItems->setAllColumnsShowFocus( TRUE ); + m_listAvailableItems->setAllColumnsShowFocus( true ); m_listAvailableItems->setFullWidth( true ); m_listAvailableItems->setSorting( 1 ); layout->addMultiCellWidget( m_listAvailableItems, 1, 1, 0, 2 ); @@ -141,7 +141,7 @@ namespace KBibTeX connect( m_listAvailableItems, TQ_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int ) ), this, TQ_SLOT( showContextMenu( TQListViewItem*, const TQPoint& ) ) ); connect( m_listAvailableItems, TQ_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString& ) ), this, TQ_SLOT( endRenaming( TQListViewItem*, int, const TQString& ) ) ); - toggleShowAll( FALSE ); + toggleShowAll( false ); } void SideBar::setReadOnly( bool isReadOnly ) @@ -210,14 +210,14 @@ namespace KBibTeX if ( item != NULL ) { m_oldText = item->text( 1 ); - item->setRenameEnabled( 1, TRUE ); + item->setRenameEnabled( 1, true ); item->startRename( 1 ); } } void SideBar::endRenaming( TQListViewItem * item, int , const TQString & text ) { - item->setRenameEnabled( 1, FALSE ); + item->setRenameEnabled( 1, false ); BibTeX::EntryField::FieldType fieldType = m_buttonToggleShowAll->isOn() ? ( BibTeX::EntryField::FieldType )( m_listTypeList->currentItem() + ( int ) BibTeX::EntryField::ftAbstract ) : importantFields[ m_listTypeList->currentItem()]; m_bibtexFile->replaceValue( m_oldText, text, fieldType ); @@ -237,7 +237,7 @@ namespace KBibTeX { if ( column == 0 ) { - bool ok = FALSE; + bool ok = false; int ownValue = text( 0 ).toInt( &ok ); if ( ok ) { diff --git a/src/value.cpp b/src/value.cpp index 8499f4a..a69a431 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -117,7 +117,7 @@ namespace BibTeX void KeywordContainer::append( const TQString& text ) { - bool contains = FALSE; + bool contains = false; for ( TQValueList<Keyword*>::ConstIterator it = keywords.begin(); !contains && it != keywords.end(); ++it ) contains = TQString::compare(( *it )->text(), text ) == 0; @@ -128,7 +128,7 @@ namespace BibTeX void KeywordContainer::remove( const TQString& text ) { - bool contains = FALSE; + bool contains = false; for ( TQValueList<Keyword*>::Iterator it = keywords.begin(); !contains && it != keywords.end(); ++it ) if ( TQString::compare(( *it )->text(), text ) == 0 ) { @@ -148,7 +148,7 @@ namespace BibTeX splitRegExp = TQRegExp( "\\s*,\\s*" ); keywords.clear(); - TQStringList keywordList = TQStringList::split( splitRegExp, text, FALSE ); + TQStringList keywordList = TQStringList::split( splitRegExp, text, false ); for ( TQStringList::ConstIterator it = keywordList.begin(); it != keywordList.end(); ++it ) keywords.append( new Keyword( *it ) ); } @@ -252,11 +252,11 @@ namespace BibTeX } else { - bool inLastName = TRUE; + bool inLastName = true; for ( unsigned int i = 0; i < segments.count();++i ) { if ( segments[i] == "," ) - inLastName = FALSE; + inLastName = false; else if ( inLastName ) { if ( !m_lastName.isEmpty() ) m_lastName.append( " " ); @@ -298,7 +298,7 @@ namespace BibTeX bool Person::splitName( const TQString& text, TQStringList& segments ) { int bracketCounter = 0; - bool result = FALSE; + bool result = false; TQString buffer = ""; for ( unsigned int pos = 0; pos < text.length(); ++pos ) @@ -324,7 +324,7 @@ namespace BibTeX buffer = ""; } segments.append( "," ); - result = TRUE; + result = true; } else buffer.append( text[pos] ); @@ -364,14 +364,14 @@ namespace BibTeX TQString PersonContainer::text() const { TQString result; - bool first = TRUE; + bool first = true; for ( TQValueList<Person*>::ConstIterator it = persons.begin(); it != persons.end(); ++it ) { if ( !first ) result.append( " and " ); else - first = FALSE; + first = false; result.append(( *it )->text() ); } diff --git a/src/value.h b/src/value.h index a46ff0d..b47ed82 100644 --- a/src/value.h +++ b/src/value.h @@ -85,8 +85,8 @@ namespace BibTeX class Person: public ValueTextInterface { public: - Person( const TQString& text, bool firstNameFirst = FALSE ); - Person( const TQString& firstName, const TQString& lastName, bool firstNameFirst = FALSE ); + Person( const TQString& text, bool firstNameFirst = false ); + Person( const TQString& firstName, const TQString& lastName, bool firstNameFirst = false ); Person *clone(); void setText( const TQString& text ); @@ -107,8 +107,8 @@ namespace BibTeX class PersonContainer: public ValueItem { public: - PersonContainer( bool firstNameFirst = FALSE ); - PersonContainer( const TQString& text, bool firstNameFirst = FALSE ); + PersonContainer( bool firstNameFirst = false ); + PersonContainer( const TQString& text, bool firstNameFirst = false ); ValueItem *clone(); void setText( const TQString& text ); diff --git a/src/valuewidget.cpp b/src/valuewidget.cpp index 349f460..d27fcb0 100644 --- a/src/valuewidget.cpp +++ b/src/valuewidget.cpp @@ -36,7 +36,7 @@ namespace KBibTeX TQDialog::DialogCode ValueWidget::execute( const TQString& title, BibTeX::EntryField::FieldType fieldType, BibTeX::Value *value, bool isReadOnly, TQWidget *parent, const char *name ) { - KDialogBase * dlg = new KDialogBase( parent, name, TRUE, TQString( i18n( "Edit field '%1'" ) ).arg( title ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, TRUE ); + KDialogBase * dlg = new KDialogBase( parent, name, true, TQString( i18n( "Edit field '%1'" ) ).arg( title ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ); ValueWidget* valueWidget = new ValueWidget( fieldType, value, isReadOnly, dlg, "kbibtexvaluewidget" ); dlg->setMainWidget( valueWidget ); @@ -137,7 +137,7 @@ namespace KBibTeX TQCheckListItem * item = new TQCheckListItem( m_listViewValue, m_listViewValue->lastItem(), TQString( i18n( "May only contain ASCII characters, in case of doubt keep English form", "NewValue%1" ) ).arg( m_newValueCounter++ ), TQCheckListItem::CheckBox ); item->setState( TQCheckListItem::Off ); item->setRenameEnabled( 0, !m_isReadOnly ); - m_listViewValue->setSelected( item, TRUE ); + m_listViewValue->setSelected( item, true ); slotEdit(); } @@ -209,10 +209,10 @@ namespace KBibTeX layout->addMultiCellWidget( m_listViewValue, 1, 7, 0, 0 ); m_listViewValue->setDefaultRenameAction( m_isReadOnly ? TQListView::Reject : TQListView::Accept ); m_listViewValue->addColumn( i18n( "Text" ) ); - m_listViewValue->setSorting( -1, TRUE ); - m_listViewValue->setAllColumnsShowFocus( TRUE ); - m_listViewValue->header() ->setClickEnabled( FALSE ); - m_listViewValue->header() ->setStretchEnabled( TRUE, 0 ); + m_listViewValue->setSorting( -1, true ); + m_listViewValue->setAllColumnsShowFocus( true ); + m_listViewValue->header() ->setClickEnabled( false ); + m_listViewValue->header() ->setStretchEnabled( true, 0 ); m_listViewValue->setEnabled( !m_isReadOnly ); connect( m_listViewValue, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( updateGUI() ) ); connect( m_listViewValue, TQ_SIGNAL( clicked( TQListViewItem * ) ), this, TQ_SLOT( updateGUI() ) ); diff --git a/src/webquery.cpp b/src/webquery.cpp index 9365be2..ca371a2 100644 --- a/src/webquery.cpp +++ b/src/webquery.cpp @@ -232,8 +232,8 @@ namespace KBibTeX if ( data == TQString::null ) return NULL; - BibTeX::FileImporterBibTeX importer( FALSE ); - importer.setIgnoreComments( TRUE ); + BibTeX::FileImporterBibTeX importer( false ); + importer.setIgnoreComments( true ); TQBuffer buffer; buffer.open( IO_WriteOnly ); @@ -345,7 +345,7 @@ namespace KBibTeX if ( rlvi != NULL ) { BibTeX::Entry *entry = rlvi->entry(); - KBibTeX::EntryWidget::execute( entry, NULL, TRUE, FALSE ); + KBibTeX::EntryWidget::execute( entry, NULL, true, false ); } } @@ -379,8 +379,8 @@ namespace KBibTeX int index = m_comboBoxEngines->currentItem(); - setEnabled( FALSE ); - m_dlg->enableButtonCancel( FALSE ); + setEnabled( false ); + m_dlg->enableButtonCancel( false ); TQApplication::setOverrideCursor( TQt::waitCursor ); m_listViewResults->clear(); connect( m_webQueries[index], TQ_SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, TQ_SLOT( addHit( BibTeX::Entry*, bool ) ) ); @@ -394,8 +394,8 @@ namespace KBibTeX int index = m_comboBoxEngines->currentItem(); disconnect( m_webQueries[index], TQ_SIGNAL( foundEntry( BibTeX::Entry*, bool ) ), this, TQ_SLOT( addHit( BibTeX::Entry*, bool ) ) ); disconnect( m_webQueries[index], TQ_SIGNAL( endSearch( WebQuery::Status ) ), this, TQ_SLOT( endSearch( WebQuery::Status ) ) ); - setEnabled( TRUE ); - m_dlg->enableButtonCancel( TRUE ); + setEnabled( true ); + m_dlg->enableButtonCancel( true ); importEnableChanging(); TQApplication::restoreOverrideCursor(); if ( status == WebQuery::statusInsufficientPermissions ) @@ -430,7 +430,7 @@ namespace KBibTeX TQLabel *label = new TQLabel( i18n( "&Engine:" ), this ); layout->addWidget( label, 0, 0 ); - m_comboBoxEngines = new KComboBox( FALSE, this ); + m_comboBoxEngines = new KComboBox( false, this ); label->setBuddy( m_comboBoxEngines ); layout->addWidget( m_comboBoxEngines, 0, 1 ); connect( m_comboBoxEngines, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( otherEngineSelected( int ) ) ); @@ -442,7 +442,7 @@ namespace KBibTeX m_pushButtonSearch = new KPushButton( i18n( "&Search" ), this ); layout->addWidget( m_pushButtonSearch, 0, 3 ); m_pushButtonSearch->setIconSet( TQIconSet( SmallIcon( "edit-find" ) ) ); - m_pushButtonSearch->setEnabled( FALSE ); + m_pushButtonSearch->setEnabled( false ); m_listViewResults = new TDEListView( this ); m_listViewResults->addColumn( i18n( "Year" ), 64 ); @@ -453,7 +453,7 @@ namespace KBibTeX else m_listViewResults->setFont( TDEGlobalSettings::generalFont() ); m_listViewResults->header() ->setFont( TDEGlobalSettings::generalFont() ); - m_listViewResults->setAllColumnsShowFocus( TRUE ); + m_listViewResults->setAllColumnsShowFocus( true ); m_listViewResults->setFullWidth( true ); m_listViewResults->setSelectionMode( TQListView::Extended ); layout->addMultiCellWidget( m_listViewResults, 3, 3, 0, 3 ); diff --git a/src/webqueryarxiv.cpp b/src/webqueryarxiv.cpp index 5611007..48b526e 100644 --- a/src/webqueryarxiv.cpp +++ b/src/webqueryarxiv.cpp @@ -106,8 +106,8 @@ namespace KBibTeX m_reJour( "^([a-zA-Z. ]+)" ), m_reYear( "\\b((18|19|20)\\d{2})\\b" ), m_rePages( "\\b([1-9]\\d{0,2})\\s*[-]+\\s*([1-9]\\d{0,2})\\b" ) { - m_importer = new BibTeX::FileImporterBibTeX( FALSE ); - m_importer->setIgnoreComments( TRUE ); + m_importer = new BibTeX::FileImporterBibTeX( false ); + m_importer->setIgnoreComments( true ); m_widget = new WebQueryArXivWidget( parent ); } @@ -141,7 +141,7 @@ namespace KBibTeX { m_urls.clear(); // FIXME: The following code crashes KBibTeX: - // if ( m_currentJob != NULL ) m_currentJob->kill( FALSE ); + // if ( m_currentJob != NULL ) m_currentJob->kill( false ); } void WebQueryArXiv::query() @@ -169,7 +169,7 @@ namespace KBibTeX KURL url = KURL( TQString( "http://www.arxiv.org/find/all/1/all:+%2/0/1/0/all/0/1?per_page=%1" ).arg( m_numberOfResults ).arg( query.replace( "%", "%25" ).replace( "+", "%2B" ).replace( " ", "%20" ).replace( "#", "%23" ).replace( "&", "%26" ).replace( "?", "%3F" ) ) ); m_currentJobMutex.lock(); - TDEIO::Job *job = TDEIO::storedGet( url, FALSE, FALSE ); + TDEIO::Job *job = TDEIO::storedGet( url, false, false ); connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( unlockJob( TDEIO::Job * ) ) ); connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( arXivResult( TDEIO::Job * ) ) ); } @@ -226,7 +226,7 @@ namespace KBibTeX { m_aborted = false; m_currentJobMutex.lock(); - TDEIO::Job *job = TDEIO::storedGet( abstractURL, FALSE, FALSE ); + TDEIO::Job *job = TDEIO::storedGet( abstractURL, false, false ); connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( unlockJob( TDEIO::Job * ) ) ); connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( arXivAbstractResult( TDEIO::Job * ) ) ); } @@ -311,7 +311,7 @@ namespace KBibTeX while (( p2 = result.find( "last revised", p + 1 ) ) >= 0 ) p = p2; p2 = result.find( TQRegExp( "\\d\\d\\d\\d" ), p ); - bool ok = FALSE; + bool ok = false; int year = result.mid( p2, 4 ).toInt( &ok ); if ( !ok ) year = 0; if ( year > 1000 ) @@ -533,7 +533,7 @@ namespace KBibTeX } } - if ( result.find( TQRegExp( "Ph\\.?D\\.? Thesis", FALSE ), 0 ) >= 0 ) + if ( result.find( TQRegExp( "Ph\\.?D\\.? Thesis", false ), 0 ) >= 0 ) entry->setEntryType( BibTeX::Entry::etPhDThesis ); field = new BibTeX::EntryField( BibTeX::EntryField::ftURL ); @@ -553,7 +553,7 @@ namespace KBibTeX KURL url = m_urls.first(); m_urls.remove( url ); m_currentJobMutex.lock(); - TDEIO::Job *job = TDEIO::storedGet( url, FALSE, FALSE ); + TDEIO::Job *job = TDEIO::storedGet( url, false, false ); connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( unlockJob( TDEIO::Job * ) ) ); connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( arXivAbstractResult( TDEIO::Job * ) ) ); } diff --git a/src/webqueryciteseerx.cpp b/src/webqueryciteseerx.cpp index f84551e..f023c5d 100644 --- a/src/webqueryciteseerx.cpp +++ b/src/webqueryciteseerx.cpp @@ -307,7 +307,7 @@ namespace KBibTeX else if ( !m_aborted ) { m_currentParser = m_queryQueue.front().parser; - TDEIO::Job *job = TDEIO::storedGet( m_queryQueue.front().url, FALSE, FALSE ); + TDEIO::Job *job = TDEIO::storedGet( m_queryQueue.front().url, false, false ); m_queryQueue.pop_front(); connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), this, TQ_SLOT( getData( TDEIO::Job * ) ) ); } diff --git a/src/webquerycsb.cpp b/src/webquerycsb.cpp index d2306e2..a37b159 100644 --- a/src/webquerycsb.cpp +++ b/src/webquerycsb.cpp @@ -155,8 +155,8 @@ namespace KBibTeX WebQueryCSB::WebQueryCSB( TQWidget* parent ): WebQuery( parent ) { - m_importer = new BibTeX::FileImporterBibTeX( FALSE ); - m_importer->setIgnoreComments( TRUE ); + m_importer = new BibTeX::FileImporterBibTeX( false ); + m_importer->setIgnoreComments( true ); m_widget = new WebQueryCSBWidget( parent ); } @@ -241,8 +241,8 @@ namespace KBibTeX TQRegExp removeXML( "<[^>]+>" ); rawText.replace( removeXML, "" ); - BibTeX::FileImporterBibTeX importer( FALSE ); - importer.setIgnoreComments( TRUE ); + BibTeX::FileImporterBibTeX importer( false ); + importer.setIgnoreComments( true ); TQBuffer buffer; buffer.open( IO_WriteOnly ); diff --git a/src/webquerygooglescholar.cpp b/src/webquerygooglescholar.cpp index 6747da1..be47b64 100644 --- a/src/webquerygooglescholar.cpp +++ b/src/webquerygooglescholar.cpp @@ -53,8 +53,8 @@ namespace KBibTeX WebQueryGoogleScholar::WebQueryGoogleScholar( TQWidget* parent ) : WebQuery( parent ), m_transferJob( NULL ), m_transferJobBuffer( NULL ) { - m_importer = new BibTeX::FileImporterBibTeX( FALSE ); - m_importer->setIgnoreComments( TRUE ); + m_importer = new BibTeX::FileImporterBibTeX( false ); + m_importer->setIgnoreComments( true ); m_widget = new WebQueryGoogleScholarWidget( parent ); } diff --git a/src/webquerypubmed.cpp b/src/webquerypubmed.cpp index 1aa5a50..fb6954b 100644 --- a/src/webquerypubmed.cpp +++ b/src/webquerypubmed.cpp @@ -189,7 +189,7 @@ namespace KBibTeX bool WebQueryPubMedStructureParserQuery::startElement( const TQString & /*namespaceURI*/, const TQString & /*localName*/, const TQString & /*qName*/, const TQXmlAttributes & /*atts*/ ) { concatString = TQString(); - return TRUE; + return true; } bool WebQueryPubMedStructureParserQuery::endElement( const TQString & /*namespaceURI*/, const TQString & /*localName*/, const TQString & qName ) @@ -202,13 +202,13 @@ namespace KBibTeX m_intList->append( id ); } - return TRUE; + return true; } bool WebQueryPubMedStructureParserQuery::characters( const TQString & ch ) { concatString.append( ch ); - return TRUE; + return true; } WebQueryPubMedResultParser::WebQueryPubMedResultParser( ) : TQObject() diff --git a/src/webquerysciencedirect.cpp b/src/webquerysciencedirect.cpp index 8060650..79d23d2 100644 --- a/src/webquerysciencedirect.cpp +++ b/src/webquerysciencedirect.cpp @@ -180,8 +180,8 @@ namespace KBibTeX WebQueryScienceDirect::WebQueryScienceDirect( TQWidget* parent ): WebQuery( parent ) { - m_importer = new BibTeX::FileImporterBibTeX( FALSE ); - m_importer->setIgnoreComments( TRUE ); + m_importer = new BibTeX::FileImporterBibTeX( false ); + m_importer->setIgnoreComments( true ); m_widget = new WebQueryScienceDirectWidget( parent ); } |