From 628043be55ddd2f534411d028e4f68c8fe4eaabb Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:29:23 -0600 Subject: Rename old tq methods that no longer need a unique name --- khelpcenter/docmetainfo.cpp | 2 +- khelpcenter/glossary.cpp | 38 ++++++++++++++++---------------- khelpcenter/history.cpp | 4 ++-- khelpcenter/htmlsearch/kcmhtmlsearch.cpp | 14 ++++++------ khelpcenter/htmlsearch/klangcombo.cpp | 6 ++--- khelpcenter/htmlsearch/ktagcombobox.cpp | 2 +- khelpcenter/htmlsearchconfig.cpp | 6 ++--- khelpcenter/kcmhelpcenter.cpp | 2 +- khelpcenter/mainwindow.cpp | 2 +- khelpcenter/navigator.cpp | 4 ++-- khelpcenter/toc.cpp | 8 +++---- 11 files changed, 44 insertions(+), 44 deletions(-) (limited to 'khelpcenter') diff --git a/khelpcenter/docmetainfo.cpp b/khelpcenter/docmetainfo.cpp index 3880ce2bc..2ff496074 100644 --- a/khelpcenter/docmetainfo.cpp +++ b/khelpcenter/docmetainfo.cpp @@ -108,7 +108,7 @@ TQString DocMetaInfo::languageName( const TQString &langcode ) if ( langcode == "en" ) return i18n("English"); TQString cfgfile = locate( "locale", - TQString::tqfromLatin1( "%1/entry.desktop" ).arg( langcode ) ); + TQString::fromLatin1( "%1/entry.desktop" ).arg( langcode ) ); kdDebug() << "-- langcode: " << langcode << " cfgfile: " << cfgfile << endl; diff --git a/khelpcenter/glossary.cpp b/khelpcenter/glossary.cpp index 46a9ce65b..dc596372e 100644 --- a/khelpcenter/glossary.cpp +++ b/khelpcenter/glossary.cpp @@ -49,7 +49,7 @@ class SectionItem : public KListViewItem { KListViewItem::setOpen(open); - setPixmap( 0, SmallIcon( TQString::tqfromLatin1( open ? "contents" : "contents2" ) ) ); + setPixmap( 0, SmallIcon( TQString::fromLatin1( open ? "contents" : "contents2" ) ) ); } }; @@ -92,7 +92,7 @@ Glossary::Glossary( TQWidget *parent ) : KListView( parent ) m_cacheFile = locateLocal( "cache", "help/glossary.xml" ); - m_sourceFile = View::View::langLookup( TQString::tqfromLatin1( "khelpcenter/glossary/index.docbook" ) ); + m_sourceFile = View::View::langLookup( TQString::fromLatin1( "khelpcenter/glossary/index.docbook" ) ); m_config = kapp->config(); m_config->setGroup( "Glossary" ); @@ -150,10 +150,10 @@ void Glossary::rebuildGlossaryCache() connect( meinproc, TQT_SIGNAL( processExited( KProcess * ) ), this, TQT_SLOT( meinprocExited( KProcess * ) ) ); - *meinproc << locate( "exe", TQString::tqfromLatin1( "meinproc" ) ); - *meinproc << TQString::tqfromLatin1( "--output" ) << m_cacheFile; - *meinproc << TQString::tqfromLatin1( "--stylesheet" ) - << locate( "data", TQString::tqfromLatin1( "khelpcenter/glossary.xslt" ) ); + *meinproc << locate( "exe", TQString::fromLatin1( "meinproc" ) ); + *meinproc << TQString::fromLatin1( "--output" ) << m_cacheFile; + *meinproc << TQString::fromLatin1( "--stylesheet" ) + << locate( "data", TQString::fromLatin1( "khelpcenter/glossary.xslt" ) ); *meinproc << m_sourceFile; meinproc->start( KProcess::NotifyOnExit ); @@ -189,21 +189,21 @@ void Glossary::buildGlossaryTree() if ( !doc.setContent( &cacheFile ) ) return; - TQDomNodeList sectionNodes = doc.documentElement().elementsByTagName( TQString::tqfromLatin1( "section" ) ); + TQDomNodeList sectionNodes = doc.documentElement().elementsByTagName( TQString::fromLatin1( "section" ) ); for ( unsigned int i = 0; i < sectionNodes.count(); i++ ) { TQDomElement sectionElement = sectionNodes.item( i ).toElement(); - TQString title = sectionElement.attribute( TQString::tqfromLatin1( "title" ) ); + TQString title = sectionElement.attribute( TQString::fromLatin1( "title" ) ); SectionItem *topicSection = new SectionItem( m_byTopicItem, title ); - TQDomNodeList entryNodes = sectionElement.elementsByTagName( TQString::tqfromLatin1( "entry" ) ); + TQDomNodeList entryNodes = sectionElement.elementsByTagName( TQString::fromLatin1( "entry" ) ); for ( unsigned int j = 0; j < entryNodes.count(); j++ ) { TQDomElement entryElement = entryNodes.item( j ).toElement(); - TQString entryId = entryElement.attribute( TQString::tqfromLatin1( "id" ) ); + TQString entryId = entryElement.attribute( TQString::fromLatin1( "id" ) ); if ( entryId.isNull() ) continue; - TQDomElement termElement = childElement( entryElement, TQString::tqfromLatin1( "term" ) ); + TQDomElement termElement = childElement( entryElement, TQString::fromLatin1( "term" ) ); TQString term = termElement.text().simplifyWhiteSpace(); EntryItem *entry = new EntryItem(topicSection, term, entryId ); @@ -221,19 +221,19 @@ void Glossary::buildGlossaryTree() new EntryItem( alphabSection, term, entryId ); - TQDomElement definitionElement = childElement( entryElement, TQString::tqfromLatin1( "definition" ) ); + TQDomElement definitionElement = childElement( entryElement, TQString::fromLatin1( "definition" ) ); TQString definition = definitionElement.text().simplifyWhiteSpace(); GlossaryEntryXRef::List seeAlso; - TQDomElement referencesElement = childElement( entryElement, TQString::tqfromLatin1( "references" ) ); - TQDomNodeList referenceNodes = referencesElement.elementsByTagName( TQString::tqfromLatin1( "reference" ) ); + TQDomElement referencesElement = childElement( entryElement, TQString::fromLatin1( "references" ) ); + TQDomNodeList referenceNodes = referencesElement.elementsByTagName( TQString::fromLatin1( "reference" ) ); if ( referenceNodes.count() > 0 ) for ( unsigned int k = 0; k < referenceNodes.count(); k++ ) { TQDomElement referenceElement = referenceNodes.item( k ).toElement(); - TQString term = referenceElement.attribute( TQString::tqfromLatin1( "term" ) ); - TQString id = referenceElement.attribute( TQString::tqfromLatin1( "id" ) ); + TQString term = referenceElement.attribute( TQString::fromLatin1( "term" ) ); + TQString id = referenceElement.attribute( TQString::fromLatin1( "id" ) ); seeAlso += GlossaryEntryXRef( term, id ); } @@ -279,10 +279,10 @@ TQString Glossary::entryToHtml( const GlossaryEntry &entry ) GlossaryEntryXRef::List::ConstIterator it = seeAlsos.begin(); GlossaryEntryXRef::List::ConstIterator end = seeAlsos.end(); for (; it != end; ++it) { - seeAlso += TQString::tqfromLatin1("") + (*it).term(); - seeAlso += TQString::tqfromLatin1(", "); + seeAlso += TQString::fromLatin1("\">") + (*it).term(); + seeAlso += TQString::fromLatin1(", "); } seeAlso = seeAlso.left(seeAlso.length() - 2); } diff --git a/khelpcenter/history.cpp b/khelpcenter/history.cpp index 62a434dd2..e8065cd8e 100644 --- a/khelpcenter/history.cpp +++ b/khelpcenter/history.cpp @@ -257,7 +257,7 @@ void History::fillForwardMenu() void History::fillGoMenu() { KMainWindow *mainWindow = static_cast( kapp->mainWidget() ); - TQPopupMenu *goMenu = dynamic_cast( mainWindow->guiFactory()->container( TQString::tqfromLatin1( "go" ), mainWindow ) ); + TQPopupMenu *goMenu = dynamic_cast( mainWindow->guiFactory()->container( TQString::fromLatin1( "go" ), mainWindow ) ); if ( !goMenu || m_goMenuIndex == -1 ) return; @@ -290,7 +290,7 @@ void History::fillGoMenu() void History::goMenuActivated( int id ) { KMainWindow *mainWindow = static_cast( kapp->mainWidget() ); - TQPopupMenu *goMenu = dynamic_cast( mainWindow->guiFactory()->container( TQString::tqfromLatin1( "go" ), mainWindow ) ); + TQPopupMenu *goMenu = dynamic_cast( mainWindow->guiFactory()->container( TQString::fromLatin1( "go" ), mainWindow ) ); if ( !goMenu ) return; diff --git a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp index 64a301be7..9dfc5e350 100644 --- a/khelpcenter/htmlsearch/kcmhtmlsearch.cpp +++ b/khelpcenter/htmlsearch/kcmhtmlsearch.cpp @@ -50,15 +50,15 @@ KHTMLSearchConfig::KHTMLSearchConfig(TQWidget *parent, const char *name) TQLabel *l = new TQLabel(i18n("The fulltext search feature makes use of the " "ht://dig HTML search engine. " "You can get ht://dig at the"), gb); - l->tqsetAlignment(TQLabel::WordBreak); - l->setMinimumSize(l->tqsizeHint()); + l->setAlignment(TQLabel::WordBreak); + l->setMinimumSize(l->sizeHint()); grid->addMultiCellWidget(l, 1, 1, 0, 1); TQWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) ); KURLLabel *url = new KURLLabel(gb); url->setURL("http://www.htdig.org"); url->setText(i18n("ht://dig home page")); - url->tqsetAlignment(TQLabel::AlignHCenter); + url->setAlignment(TQLabel::AlignHCenter); grid->addMultiCellWidget(url, 2,2, 0, 1); connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)), this, TQT_SLOT(urlClicked(const TQString&))); @@ -157,7 +157,7 @@ KHTMLSearchConfig::KHTMLSearchConfig(TQWidget *parent, const char *name) runButton = new TQPushButton(i18n("Generate Index..."), this); TQWhatsThis::add( runButton, i18n( "Click this button to generate the index for the fulltext search." ) ); - runButton->setFixedSize(runButton->tqsizeHint()); + runButton->setFixedSize(runButton->sizeHint()); vbox->addWidget(runButton, AlignRight); connect(runButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(generateIndex())); @@ -179,14 +179,14 @@ void KHTMLSearchConfig::loadLanguages() // add all languages to the list TQStringList langs = KGlobal::dirs()->findAllResources("locale", - TQString::tqfromLatin1("*/entry.desktop")); + TQString::fromLatin1("*/entry.desktop")); langs.sort(); for (TQStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it) { KSimpleConfig entry(*it); - entry.setGroup(TQString::tqfromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), KGlobal::locale()->translate("without name")); + entry.setGroup(TQString::fromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::fromLatin1("Name"), KGlobal::locale()->translate("without name")); TQString path = *it; int index = path.findRev('/'); diff --git a/khelpcenter/htmlsearch/klangcombo.cpp b/khelpcenter/htmlsearch/klangcombo.cpp index 6f4b01c42..308109d12 100644 --- a/khelpcenter/htmlsearch/klangcombo.cpp +++ b/khelpcenter/htmlsearch/klangcombo.cpp @@ -39,14 +39,14 @@ KLanguageCombo::KLanguageCombo (TQWidget * parent, const char *name) void KLanguageCombo::insertLanguage(const TQString& path, const TQString& name, const TQString& sub, const TQString &submenu, int index) { - TQString output = name + TQString::tqfromLatin1(" (") + path + TQString::tqfromLatin1(")"); - TQPixmap flag(locate("locale", sub + path + TQString::tqfromLatin1("/flag.png"))); + TQString output = name + TQString::fromLatin1(" (") + path + TQString::fromLatin1(")"); + TQPixmap flag(locate("locale", sub + path + TQString::fromLatin1("/flag.png"))); insertItem(TQIconSet(flag), output, path, submenu, index); } void KLanguageCombo::changeLanguage(const TQString& name, int i) { if (i < 0 || i >= count()) return; - TQString output = name + TQString::tqfromLatin1(" (") + tag(i) + TQString::tqfromLatin1(")"); + TQString output = name + TQString::fromLatin1(" (") + tag(i) + TQString::fromLatin1(")"); changeItem(output, i); } diff --git a/khelpcenter/htmlsearch/ktagcombobox.cpp b/khelpcenter/htmlsearch/ktagcombobox.cpp index cf259fa46..7d367f1be 100644 --- a/khelpcenter/htmlsearch/ktagcombobox.cpp +++ b/khelpcenter/htmlsearch/ktagcombobox.cpp @@ -192,7 +192,7 @@ void KTagComboBox::paintEvent( TQPaintEvent * ev) TQRect clip(2, 2, width() - 4, height() - 4); #if 0 if ( hasFocus() && style().guiStyle() != MotifStyle ) - p.setPen( tqcolorGroup().highlightedText() ); + p.setPen( colorGroup().highlightedText() ); #endif p.drawText(clip, AlignCenter | SingleLine, popup->text( current )); diff --git a/khelpcenter/htmlsearchconfig.cpp b/khelpcenter/htmlsearchconfig.cpp index 8581b25c8..ea6dff669 100644 --- a/khelpcenter/htmlsearchconfig.cpp +++ b/khelpcenter/htmlsearchconfig.cpp @@ -51,15 +51,15 @@ HtmlSearchConfig::HtmlSearchConfig(TQWidget *parent, const char *name) TQLabel *l = new TQLabel(i18n("The fulltext search feature makes use of the " "ht://dig HTML search engine. " "You can get ht://dig at the"), gb); - l->tqsetAlignment(TQLabel::WordBreak); - l->setMinimumSize(l->tqsizeHint()); + l->setAlignment(TQLabel::WordBreak); + l->setMinimumSize(l->sizeHint()); grid->addMultiCellWidget(l, 1, 1, 0, 1); TQWhatsThis::add( gb, i18n( "Information about where to get the ht://dig package." ) ); KURLLabel *url = new KURLLabel(gb); url->setURL("http://www.htdig.org"); url->setText(i18n("ht://dig home page")); - url->tqsetAlignment(TQLabel::AlignHCenter); + url->setAlignment(TQLabel::AlignHCenter); grid->addMultiCellWidget(url, 2,2, 0, 1); connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)), this, TQT_SLOT(urlClicked(const TQString&))); diff --git a/khelpcenter/kcmhelpcenter.cpp b/khelpcenter/kcmhelpcenter.cpp index 28e9e5523..1c7e54391 100644 --- a/khelpcenter/kcmhelpcenter.cpp +++ b/khelpcenter/kcmhelpcenter.cpp @@ -101,7 +101,7 @@ IndexProgressDialog::IndexProgressDialog( TQWidget *parent ) topLayout->setSpacing( spacingHint() ); mLabel = new TQLabel( this ); - mLabel->tqsetAlignment( AlignHCenter ); + mLabel->setAlignment( AlignHCenter ); topLayout->addWidget( mLabel ); mProgressBar = new TQProgressBar( this ); diff --git a/khelpcenter/mainwindow.cpp b/khelpcenter/mainwindow.cpp index e70065bfc..30f81015f 100644 --- a/khelpcenter/mainwindow.cpp +++ b/khelpcenter/mainwindow.cpp @@ -325,7 +325,7 @@ void MainWindow::viewUrl( const KURL &url, const KParts::URLArgs &args ) mDoc->browserExtension()->setURLArgs( args ); - if ( proto == TQString::tqfromLatin1("glossentry") ) { + if ( proto == TQString::fromLatin1("glossentry") ) { TQString decodedEntryId = KURL::decode_string( url.encodedPathAndQuery() ); slotGlossSelected( mNavigator->glossEntry( decodedEntryId ) ); mNavigator->slotSelectGlossEntry( decodedEntryId ); diff --git a/khelpcenter/navigator.cpp b/khelpcenter/navigator.cpp index 07def94b2..9ec2a31c4 100644 --- a/khelpcenter/navigator.cpp +++ b/khelpcenter/navigator.cpp @@ -262,8 +262,8 @@ void Navigator::insertIOSlaveDocs( const TQString &name, NavigatorItem *topItem void Navigator::insertAppletDocs( NavigatorItem *topItem ) { - TQDir appletDir( locate( "data", TQString::tqfromLatin1( "kicker/applets/" ) ) ); - appletDir.setNameFilter( TQString::tqfromLatin1( "*.desktop" ) ); + TQDir appletDir( locate( "data", TQString::fromLatin1( "kicker/applets/" ) ) ); + appletDir.setNameFilter( TQString::fromLatin1( "*.desktop" ) ); TQStringList files = appletDir.entryList( TQDir::Files | TQDir::Readable ); TQStringList::ConstIterator it = files.begin(); diff --git a/khelpcenter/toc.cpp b/khelpcenter/toc.cpp index cdc7d92d9..e357abe2a 100644 --- a/khelpcenter/toc.cpp +++ b/khelpcenter/toc.cpp @@ -188,9 +188,9 @@ void TOC::fillTree() TQDomNodeList chapters = doc.documentElement().elementsByTagName( "chapter" ); for ( unsigned int chapterCount = 0; chapterCount < chapters.count(); chapterCount++ ) { TQDomElement chapElem = chapters.item( chapterCount ).toElement(); - TQDomElement chapTitleElem = childElement( chapElem, TQString::tqfromLatin1( "title" ) ); + TQDomElement chapTitleElem = childElement( chapElem, TQString::fromLatin1( "title" ) ); TQString chapTitle = chapTitleElem.text().simplifyWhiteSpace(); - TQDomElement chapRefElem = childElement( chapElem, TQString::tqfromLatin1( "anchor" ) ); + TQDomElement chapRefElem = childElement( chapElem, TQString::fromLatin1( "anchor" ) ); TQString chapRef = chapRefElem.text().stripWhiteSpace(); chapItem = new TOCChapterItem( this, m_parentItem, chapItem, chapTitle, chapRef ); @@ -199,9 +199,9 @@ void TOC::fillTree() TQDomNodeList sections = chapElem.elementsByTagName( "section" ); for ( unsigned int sectCount = 0; sectCount < sections.count(); sectCount++ ) { TQDomElement sectElem = sections.item( sectCount ).toElement(); - TQDomElement sectTitleElem = childElement( sectElem, TQString::tqfromLatin1( "title" ) ); + TQDomElement sectTitleElem = childElement( sectElem, TQString::fromLatin1( "title" ) ); TQString sectTitle = sectTitleElem.text().simplifyWhiteSpace(); - TQDomElement sectRefElem = childElement( sectElem, TQString::tqfromLatin1( "anchor" ) ); + TQDomElement sectRefElem = childElement( sectElem, TQString::fromLatin1( "anchor" ) ); TQString sectRef = sectRefElem.text().stripWhiteSpace(); sectItem = new TOCSectionItem( this, chapItem, sectItem, sectTitle, sectRef ); -- cgit v1.2.1