From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konqueror/keditbookmarks/actionsimpl.cpp | 160 ++++++++--------- konqueror/keditbookmarks/actionsimpl.h | 2 +- konqueror/keditbookmarks/bookmarkinfo.cpp | 94 +++++----- konqueror/keditbookmarks/bookmarkinfo.h | 16 +- konqueror/keditbookmarks/bookmarkiterator.cpp | 12 +- konqueror/keditbookmarks/bookmarkiterator.h | 10 +- konqueror/keditbookmarks/commands.cpp | 180 +++++++++---------- konqueror/keditbookmarks/commands.h | 148 +++++++-------- konqueror/keditbookmarks/dcop.cpp | 16 +- konqueror/keditbookmarks/dcop.h | 4 +- konqueror/keditbookmarks/exporters.cpp | 12 +- konqueror/keditbookmarks/exporters.h | 8 +- konqueror/keditbookmarks/favicons.cpp | 10 +- konqueror/keditbookmarks/favicons.h | 6 +- konqueror/keditbookmarks/importers.cpp | 58 +++--- konqueror/keditbookmarks/importers.h | 70 ++++---- konqueror/keditbookmarks/kbookmarkmerger.cpp | 18 +- konqueror/keditbookmarks/kebsearchline.cpp | 14 +- konqueror/keditbookmarks/kebsearchline.h | 14 +- konqueror/keditbookmarks/listview.cpp | 250 +++++++++++++------------- konqueror/keditbookmarks/listview.h | 96 +++++----- konqueror/keditbookmarks/main.cpp | 34 ++-- konqueror/keditbookmarks/testlink.cpp | 116 ++++++------ konqueror/keditbookmarks/testlink.h | 28 +-- konqueror/keditbookmarks/toplevel.cpp | 64 +++---- konqueror/keditbookmarks/toplevel.h | 34 ++-- konqueror/keditbookmarks/updater.cpp | 48 ++--- konqueror/keditbookmarks/updater.h | 10 +- 28 files changed, 766 insertions(+), 766 deletions(-) (limited to 'konqueror/keditbookmarks') diff --git a/konqueror/keditbookmarks/actionsimpl.cpp b/konqueror/keditbookmarks/actionsimpl.cpp index f0e8426d9..2aafe885c 100644 --- a/konqueror/keditbookmarks/actionsimpl.cpp +++ b/konqueror/keditbookmarks/actionsimpl.cpp @@ -32,9 +32,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -80,160 +80,160 @@ void KEBApp::createActions() { // save and quit should probably not be in the toplevel??? (void) KStdAction::quit( - this, SLOT( close() ), actionCollection()); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection()); + this, TQT_SLOT( close() ), actionCollection()); + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); (void) KStdAction::configureToolbars( - this, SLOT( slotConfigureToolbars() ), actionCollection()); + this, TQT_SLOT( slotConfigureToolbars() ), actionCollection()); if (m_browser) { (void) KStdAction::open( - actn, SLOT( slotLoad() ), actionCollection()); + actn, TQT_SLOT( slotLoad() ), actionCollection()); (void) KStdAction::saveAs( - actn, SLOT( slotSaveAs() ), actionCollection()); + actn, TQT_SLOT( slotSaveAs() ), actionCollection()); } - (void) KStdAction::cut(actn, SLOT( slotCut() ), actionCollection()); - (void) KStdAction::copy(actn, SLOT( slotCopy() ), actionCollection()); - (void) KStdAction::paste(actn, SLOT( slotPaste() ), actionCollection()); - (void) KStdAction::print(actn, SLOT( slotPrint() ), actionCollection()); + (void) KStdAction::cut(actn, TQT_SLOT( slotCut() ), actionCollection()); + (void) KStdAction::copy(actn, TQT_SLOT( slotCopy() ), actionCollection()); + (void) KStdAction::paste(actn, TQT_SLOT( slotPaste() ), actionCollection()); + (void) KStdAction::print(actn, TQT_SLOT( slotPrint() ), actionCollection()); // settings menu (void) new KToggleAction( i18n("&Show Netscape Bookmarks in Konqueror"), 0, - actn, SLOT( slotShowNS() ), actionCollection(), + actn, TQT_SLOT( slotShowNS() ), actionCollection(), "settings_showNS"); // actions (void) new KAction( i18n("&Delete"), "editdelete", Key_Delete, - actn, SLOT( slotDelete() ), actionCollection(), "delete"); + actn, TQT_SLOT( slotDelete() ), actionCollection(), "delete"); (void) new KAction( i18n("Rename"), "text", Key_F2, - actn, SLOT( slotRename() ), actionCollection(), "rename"); + actn, TQT_SLOT( slotRename() ), actionCollection(), "rename"); (void) new KAction( i18n("C&hange URL"), "text", Key_F3, - actn, SLOT( slotChangeURL() ), actionCollection(), "changeurl"); + actn, TQT_SLOT( slotChangeURL() ), actionCollection(), "changeurl"); (void) new KAction( i18n("C&hange Comment"), "text", Key_F4, - actn, SLOT( slotChangeComment() ), actionCollection(), "changecomment"); + actn, TQT_SLOT( slotChangeComment() ), actionCollection(), "changecomment"); (void) new KAction( i18n("Chan&ge Icon..."), "icons", 0, - actn, SLOT( slotChangeIcon() ), actionCollection(), "changeicon"); + actn, TQT_SLOT( slotChangeIcon() ), actionCollection(), "changeicon"); (void) new KAction( i18n("Update Favicon"), 0, - actn, SLOT( slotUpdateFavIcon() ), actionCollection(), "updatefavicon"); + actn, TQT_SLOT( slotUpdateFavIcon() ), actionCollection(), "updatefavicon"); (void) new KAction( i18n("Recursive Sort"), 0, - actn, SLOT( slotRecursiveSort() ), actionCollection(), "recursivesort"); + actn, TQT_SLOT( slotRecursiveSort() ), actionCollection(), "recursivesort"); (void) new KAction( i18n("&New Folder..."), "folder_new", CTRL+Key_N, - actn, SLOT( slotNewFolder() ), actionCollection(), "newfolder"); + actn, TQT_SLOT( slotNewFolder() ), actionCollection(), "newfolder"); (void) new KAction( i18n("&New Bookmark"), "www", 0, - actn, SLOT( slotNewBookmark() ), actionCollection(), "newbookmark"); + actn, TQT_SLOT( slotNewBookmark() ), actionCollection(), "newbookmark"); (void) new KAction( i18n("&Insert Separator"), CTRL+Key_I, - actn, SLOT( slotInsertSeparator() ), actionCollection(), + actn, TQT_SLOT( slotInsertSeparator() ), actionCollection(), "insertseparator"); (void) new KAction( i18n("&Sort Alphabetically"), 0, - actn, SLOT( slotSort() ), actionCollection(), "sort"); + actn, TQT_SLOT( slotSort() ), actionCollection(), "sort"); (void) new KAction( i18n("Set as T&oolbar Folder"), "bookmark_toolbar", 0, - actn, SLOT( slotSetAsToolbar() ), actionCollection(), "setastoolbar"); + actn, TQT_SLOT( slotSetAsToolbar() ), actionCollection(), "setastoolbar"); (void) new KAction( i18n("Show in T&oolbar"), "bookmark_toolbar", 0, - actn, SLOT( slotShowInToolbar() ), actionCollection(), "showintoolbar"); + actn, TQT_SLOT( slotShowInToolbar() ), actionCollection(), "showintoolbar"); (void) new KAction( i18n("Hide in T&oolbar"), "bookmark_toolbar", 0, - actn, SLOT( slotHideInToolbar() ), actionCollection(), "hideintoolbar"); + actn, TQT_SLOT( slotHideInToolbar() ), actionCollection(), "hideintoolbar"); (void) new KAction( i18n("&Expand All Folders"), 0, - actn, SLOT( slotExpandAll() ), actionCollection(), "expandall"); + actn, TQT_SLOT( slotExpandAll() ), actionCollection(), "expandall"); (void) new KAction( i18n("Collapse &All Folders"), 0, - actn, SLOT( slotCollapseAll() ), actionCollection(), "collapseall" ); + actn, TQT_SLOT( slotCollapseAll() ), actionCollection(), "collapseall" ); (void) new KAction( i18n("&Open in Konqueror"), "fileopen", 0, - actn, SLOT( slotOpenLink() ), actionCollection(), "openlink" ); + actn, TQT_SLOT( slotOpenLink() ), actionCollection(), "openlink" ); (void) new KAction( i18n("Check &Status"), "bookmark", 0, - actn, SLOT( slotTestSelection() ), actionCollection(), "testlink" ); + actn, TQT_SLOT( slotTestSelection() ), actionCollection(), "testlink" ); (void) new KAction( i18n("Check Status: &All"), 0, - actn, SLOT( slotTestAll() ), actionCollection(), "testall" ); + actn, TQT_SLOT( slotTestAll() ), actionCollection(), "testall" ); (void) new KAction( i18n("Update All &Favicons"), 0, - actn, SLOT( slotUpdateAllFavIcons() ), actionCollection(), + actn, TQT_SLOT( slotUpdateAllFavIcons() ), actionCollection(), "updateallfavicons" ); (void) new KAction( i18n("Cancel &Checks"), 0, - actn, SLOT( slotCancelAllTests() ), actionCollection(), "canceltests" ); + actn, TQT_SLOT( slotCancelAllTests() ), actionCollection(), "canceltests" ); (void) new KAction( i18n("Cancel &Favicon Updates"), 0, - actn, SLOT( slotCancelFavIconUpdates() ), actionCollection(), + actn, TQT_SLOT( slotCancelFavIconUpdates() ), actionCollection(), "cancelfaviconupdates" ); (void) new KAction( i18n("Import &Netscape Bookmarks..."), "netscape", 0, - actn, SLOT( slotImport() ), actionCollection(), "importNS"); + actn, TQT_SLOT( slotImport() ), actionCollection(), "importNS"); (void) new KAction( i18n("Import &Opera Bookmarks..."), "opera", 0, - actn, SLOT( slotImport() ), actionCollection(), "importOpera"); + actn, TQT_SLOT( slotImport() ), actionCollection(), "importOpera"); (void) new KAction( i18n("Import All &Crash Sessions as Bookmarks..."), 0, - actn, SLOT( slotImport() ), actionCollection(), "importCrashes"); + actn, TQT_SLOT( slotImport() ), actionCollection(), "importCrashes"); (void) new KAction( i18n("Import &Galeon Bookmarks..."), 0, - actn, SLOT( slotImport() ), actionCollection(), "importGaleon"); + actn, TQT_SLOT( slotImport() ), actionCollection(), "importGaleon"); (void) new KAction( i18n("Import &KDE2/KDE3 Bookmarks..."), 0, - actn, SLOT( slotImport() ), actionCollection(), "importKDE2"); + actn, TQT_SLOT( slotImport() ), actionCollection(), "importKDE2"); (void) new KAction( i18n("Import &IE Bookmarks..."), 0, - actn, SLOT( slotImport() ), actionCollection(), "importIE"); + actn, TQT_SLOT( slotImport() ), actionCollection(), "importIE"); (void) new KAction( i18n("Import &Mozilla Bookmarks..."), "mozilla", 0, - actn, SLOT( slotImport() ), actionCollection(), "importMoz"); + actn, TQT_SLOT( slotImport() ), actionCollection(), "importMoz"); (void) new KAction( i18n("Export to &Netscape Bookmarks"), "netscape", 0, - actn, SLOT( slotExportNS() ), actionCollection(), "exportNS"); + actn, TQT_SLOT( slotExportNS() ), actionCollection(), "exportNS"); (void) new KAction( i18n("Export to &Opera Bookmarks..."), "opera", 0, - actn, SLOT( slotExportOpera() ), actionCollection(), "exportOpera"); + actn, TQT_SLOT( slotExportOpera() ), actionCollection(), "exportOpera"); (void) new KAction( i18n("Export to &HTML Bookmarks..."), "html", 0, - actn, SLOT( slotExportHTML() ), actionCollection(), "exportHTML"); + actn, TQT_SLOT( slotExportHTML() ), actionCollection(), "exportHTML"); (void) new KAction( i18n("Export to &IE Bookmarks..."), 0, - actn, SLOT( slotExportIE() ), actionCollection(), "exportIE"); + actn, TQT_SLOT( slotExportIE() ), actionCollection(), "exportIE"); (void) new KAction( i18n("Export to &Mozilla Bookmarks..."), "mozilla", 0, - actn, SLOT( slotExportMoz() ), actionCollection(), "exportMoz"); + actn, TQT_SLOT( slotExportMoz() ), actionCollection(), "exportMoz"); } void ActionsImpl::slotLoad() { - QString bookmarksFile - = KFileDialog::getOpenFileName(QString::null, "*.xml", KEBApp::self()); + TQString bookmarksFile + = KFileDialog::getOpenFileName(TQString::null, "*.xml", KEBApp::self()); if (bookmarksFile.isNull()) return; - KEBApp::self()->m_caption = QString::null; + KEBApp::self()->m_caption = TQString::null; KEBApp::self()->m_bookmarksFilename = bookmarksFile; KEBApp::self()->construct(); } void ActionsImpl::slotSaveAs() { KEBApp::self()->bkInfo()->commitChanges(); - QString saveFilename - = KFileDialog::getSaveFileName(QString::null, "*.xml", KEBApp::self()); + TQString saveFilename + = KFileDialog::getSaveFileName(TQString::null, "*.xml", KEBApp::self()); if (!saveFilename.isEmpty()) CurrentMgr::self()->saveAs(saveFilename); } -void CurrentMgr::doExport(ExportType type, const QString & _path) { +void CurrentMgr::doExport(ExportType type, const TQString & _path) { if(KEBApp::self()) KEBApp::self()->bkInfo()->commitChanges(); - QString path(_path); + TQString path(_path); // TODO - add a factory and make all this use the base class if (type == OperaExport) { if (path.isNull()) @@ -245,7 +245,7 @@ void CurrentMgr::doExport(ExportType type, const QString & _path) { } else if (type == HTMLExport) { if (path.isNull()) path = KFileDialog::getSaveFileName( - QDir::homeDirPath(), + TQDir::homeDirPath(), i18n("*.html|HTML Bookmark Listing") ); HTMLExporter exporter; exporter.write(mgr()->root(), path); @@ -274,7 +274,7 @@ void CurrentMgr::doExport(ExportType type, const QString & _path) { void KEBApp::setActionsEnabled(SelcAbilities sa) { KActionCollection * coll = actionCollection(); - QStringList toEnable; + TQStringList toEnable; if (sa.multiSelect || (sa.singleSelect && !sa.root)) toEnable << "edit_copy"; @@ -314,7 +314,7 @@ void KEBApp::setActionsEnabled(SelcAbilities sa) { } } - for ( QStringList::Iterator it = toEnable.begin(); + for ( TQStringList::Iterator it = toEnable.begin(); it != toEnable.end(); ++it ) { coll->action((*it).ascii())->setEnabled(true); @@ -342,7 +342,7 @@ void ActionsImpl::slotCopy() { KEBApp::self()->bkInfo()->commitChanges(); // this is not a command, because it can't be undone Q_ASSERT(ListView::self()->selectedItemsMap().count() != 0); - QValueList bookmarks + TQValueList bookmarks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); KBookmarkDrag* data = KBookmarkDrag::newDrag(bookmarks, 0 /* not this ! */); kapp->clipboard()->setData(data, QClipboard::Clipboard); @@ -363,8 +363,8 @@ void ActionsImpl::slotPaste() { void ActionsImpl::slotNewFolder() { KEBApp::self()->bkInfo()->commitChanges(); bool ok; - QString str = KInputDialog::getText( i18n( "Create New Bookmark Folder" ), - i18n( "New folder:" ), QString::null, &ok ); + TQString str = KInputDialog::getText( i18n( "Create New Bookmark Folder" ), + i18n( "New folder:" ), TQString::null, &ok ); if (!ok) return; @@ -379,7 +379,7 @@ void ActionsImpl::slotNewBookmark() { // TODO - make a setCurrentItem(Command *) which uses finaladdress interface CreateCommand * cmd = new CreateCommand( ListView::self()->userAddress(), - QString::null, "www", KURL("http://")); + TQString::null, "www", KURL("http://")); CmdHistory::self()->addCommand(cmd); } @@ -421,32 +421,32 @@ void ActionsImpl::slotExportMoz() { /* -------------------------------------- */ -static QCString s_appId, s_objId; +static TQCString s_appId, s_objId; static KParts::ReadOnlyPart *s_part; void ActionsImpl::slotPrint() { KEBApp::self()->bkInfo()->commitChanges(); s_part = KParts::ComponentFactory ::createPartInstanceFromQuery( - "text/html", QString::null); - s_part->setProperty("pluginsEnabled", QVariant(false, 1)); - s_part->setProperty("javaScriptEnabled", QVariant(false, 1)); - s_part->setProperty("javaEnabled", QVariant(false, 1)); + "text/html", TQString::null); + s_part->setProperty("pluginsEnabled", TQVariant(false, 1)); + s_part->setProperty("javaScriptEnabled", TQVariant(false, 1)); + s_part->setProperty("javaEnabled", TQVariant(false, 1)); // doc->openStream( "text/html", KURL() ); - // doc->writeStream( QCString( "FOO" ) ); + // doc->writeStream( TQCString( "FOO" ) ); // doc->closeStream(); HTMLExporter exporter; KTempFile tmpf(locateLocal("tmp", "print_bookmarks"), ".html"); - QTextStream *tstream = tmpf.textStream(); - tstream->setEncoding(QTextStream::Unicode); + TQTextStream *tstream = tmpf.textStream(); + tstream->setEncoding(TQTextStream::Unicode); (*tstream) << exporter.toString(CurrentMgr::self()->mgr()->root(), true); tmpf.close(); s_appId = kapp->dcopClient()->appId(); s_objId = s_part->property("dcopObjectId").toString().latin1(); - connect(s_part, SIGNAL(completed()), this, SLOT(slotDelayedPrint())); + connect(s_part, TQT_SIGNAL(completed()), this, TQT_SLOT(slotDelayedPrint())); s_part->openURL(KURL( tmpf.name() )); } @@ -508,21 +508,21 @@ void ActionsImpl::slotUpdateFavIcon() { class KBookmarkGroupList : private KBookmarkGroupTraverser { public: KBookmarkGroupList(KBookmarkManager *); - QValueList getList(const KBookmarkGroup &); + TQValueList getList(const KBookmarkGroup &); private: virtual void visit(const KBookmark &) { ; } virtual void visitEnter(const KBookmarkGroup &); virtual void visitLeave(const KBookmarkGroup &) { ; } private: KBookmarkManager *m_manager; - QValueList m_list; + TQValueList m_list; }; KBookmarkGroupList::KBookmarkGroupList( KBookmarkManager *manager ) { m_manager = manager; } -QValueList KBookmarkGroupList::getList( const KBookmarkGroup &grp ) { +TQValueList KBookmarkGroupList::getList( const KBookmarkGroup &grp ) { traverse(grp); return m_list; } @@ -537,9 +537,9 @@ void ActionsImpl::slotRecursiveSort() { Q_ASSERT(bk.isGroup()); KEBMacroCommand *mcmd = new KEBMacroCommand(i18n("Recursive Sort")); KBookmarkGroupList lister(CurrentMgr::self()->mgr()); - QValueList bookmarks = lister.getList(bk.toGroup()); + TQValueList bookmarks = lister.getList(bk.toGroup()); bookmarks << bk.toGroup(); - for (QValueListConstIterator it = bookmarks.begin(); it != bookmarks.end(); ++it) { + for (TQValueListConstIterator it = bookmarks.begin(); it != bookmarks.end(); ++it) { SortCommand *cmd = new SortCommand("", (*it).address()); cmd->execute(); mcmd->addCommand(cmd); @@ -565,8 +565,8 @@ void ActionsImpl::slotDelete() { void ActionsImpl::slotOpenLink() { KEBApp::self()->bkInfo()->commitChanges(); - QValueList bks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); - QValueListIterator it; + TQValueList bks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); + TQValueListIterator it; for (it = bks.begin(); it != bks.end(); ++it) { if ((*it).isGroup() || (*it).isSeparator()) continue; @@ -601,14 +601,14 @@ void ActionsImpl::slotSetAsToolbar() { void ActionsImpl::slotShowInToolbar() { KEBApp::self()->bkInfo()->commitChanges(); - QValueList bks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); + TQValueList bks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); KEBMacroCommand *mcmd = CmdGen::setShownInToolbar(bks, true); CmdHistory::self()->addCommand(mcmd); } void ActionsImpl::slotHideInToolbar() { KEBApp::self()->bkInfo()->commitChanges(); - QValueList bks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); + TQValueList bks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); KEBMacroCommand *mcmd = CmdGen::setShownInToolbar(bks, false); CmdHistory::self()->addCommand(mcmd); } @@ -617,7 +617,7 @@ void ActionsImpl::slotChangeIcon() { KEBApp::self()->bkInfo()->commitChanges(); KBookmark bk = ListView::self()->firstSelected()->bookmark(); KIconDialog dlg(KEBApp::self()); - QString newIcon = dlg.selectIcon(KIcon::Small, KIcon::FileSystem); + TQString newIcon = dlg.selectIcon(KIcon::Small, KIcon::FileSystem); if (newIcon.isEmpty()) return; EditCommand *cmd = new EditCommand( diff --git a/konqueror/keditbookmarks/actionsimpl.h b/konqueror/keditbookmarks/actionsimpl.h index c10b8e12c..11cd70d57 100644 --- a/konqueror/keditbookmarks/actionsimpl.h +++ b/konqueror/keditbookmarks/actionsimpl.h @@ -21,7 +21,7 @@ #ifndef __actionsimpl_h #define __actionsimpl_h -#include +#include class ActionsImpl : public QObject { diff --git a/konqueror/keditbookmarks/bookmarkinfo.cpp b/konqueror/keditbookmarks/bookmarkinfo.cpp index 9d2d23f28..edc4a66bb 100644 --- a/konqueror/keditbookmarks/bookmarkinfo.cpp +++ b/konqueror/keditbookmarks/bookmarkinfo.cpp @@ -23,11 +23,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -49,16 +49,16 @@ // SHUFFLE all these functions around, the order is just plain stupid -BookmarkLineEdit::BookmarkLineEdit( QWidget *parent ) +BookmarkLineEdit::BookmarkLineEdit( TQWidget *parent ) : KLineEdit( parent ) { } void BookmarkLineEdit::cut() { - QString select( selectedText() ); + TQString select( selectedText() ); int pos( selectionStart() ); - QString newText( text().remove( pos, select.length() ) ); + TQString newText( text().remove( pos, select.length() ) ); KLineEdit::cut(); setEdited( true ); //KDE 4 setModified( true ); emit textChanged( newText ); @@ -74,22 +74,22 @@ void BookmarkInfoWidget::showBookmark(const KBookmark &bk) { // all read only and blank m_title_le->setReadOnly(true); - m_title_le->setText(QString::null); + m_title_le->setText(TQString::null); m_url_le->setReadOnly(true); - m_url_le->setText(QString::null); + m_url_le->setText(TQString::null); m_comment_le->setReadOnly(true); - m_comment_le->setText(QString::null); + m_comment_le->setText(TQString::null); m_visitdate_le->setReadOnly(true); - m_visitdate_le->setText(QString::null); + m_visitdate_le->setText(TQString::null); m_credate_le->setReadOnly(true); - m_credate_le->setText(QString::null); + m_credate_le->setText(TQString::null); m_visitcount_le->setReadOnly(true); - m_visitcount_le->setText(QString::null); + m_visitcount_le->setText(TQString::null); return; } @@ -99,11 +99,11 @@ void BookmarkInfoWidget::showBookmark(const KBookmark &bk) { m_title_le->setText(bk.fullText()); m_url_le->setReadOnly(bk.isGroup() || bk.isSeparator()); - m_url_le->setText(bk.isGroup() ? QString::null : bk.url().pathOrURL()); + m_url_le->setText(bk.isGroup() ? TQString::null : bk.url().pathOrURL()); m_comment_le->setReadOnly((bk.isSeparator()|| !bk.hasParent()) ? true : false ); m_comment_le->setText( - NodeEditCommand::getNodeText(bk, QStringList() << "desc")); + NodeEditCommand::getNodeText(bk, TQStringList() << "desc")); // readonly fields updateStatus(); @@ -112,14 +112,14 @@ void BookmarkInfoWidget::showBookmark(const KBookmark &bk) { void BookmarkInfoWidget::updateStatus() { - QString visitDate = - CurrentMgr::makeTimeStr( NodeEditCommand::getNodeText(m_bk, QStringList() << "info" << "metadata" + TQString visitDate = + CurrentMgr::makeTimeStr( NodeEditCommand::getNodeText(m_bk, TQStringList() << "info" << "metadata" << "time_visited" )); m_visitdate_le->setReadOnly(true); m_visitdate_le->setText(visitDate); - QString creationDate = - CurrentMgr::makeTimeStr( NodeEditCommand::getNodeText(m_bk, QStringList() << "info" << "metadata" + TQString creationDate = + CurrentMgr::makeTimeStr( NodeEditCommand::getNodeText(m_bk, TQStringList() << "info" << "metadata" << "time_added" )); m_credate_le->setReadOnly(true); m_credate_le->setText(creationDate); @@ -127,7 +127,7 @@ void BookmarkInfoWidget::updateStatus() // TODO - get the actual field name from the spec if it exists, else copy galeon m_visitcount_le->setReadOnly(true); m_visitcount_le->setText( - NodeEditCommand::getNodeText(m_bk, QStringList() << "info" << "metadata" + NodeEditCommand::getNodeText(m_bk, TQStringList() << "info" << "metadata" << "visit_count" )); } @@ -148,7 +148,7 @@ void BookmarkInfoWidget::commitTitle() } } -void BookmarkInfoWidget::slotTextChangedTitle(const QString &str) +void BookmarkInfoWidget::slotTextChangedTitle(const TQString &str) { if (m_bk.isNull() || !m_title_le->isModified()) return; @@ -157,7 +157,7 @@ void BookmarkInfoWidget::slotTextChangedTitle(const QString &str) if(titlecmd) { - NodeEditCommand::setNodeText(m_bk, QStringList() << "title", str); + NodeEditCommand::setNodeText(m_bk, TQStringList() << "title", str); titlecmd->modify(str); } else @@ -178,7 +178,7 @@ void BookmarkInfoWidget::commitURL() } } -void BookmarkInfoWidget::slotTextChangedURL(const QString &str) { +void BookmarkInfoWidget::slotTextChangedURL(const TQString &str) { if (m_bk.isNull() || !m_url_le->isModified()) return; @@ -209,7 +209,7 @@ void BookmarkInfoWidget::commitComment() } } -void BookmarkInfoWidget::slotTextChangedComment(const QString &str) { +void BookmarkInfoWidget::slotTextChangedComment(const TQString &str) { if (m_bk.isNull() || !m_comment_le->isModified()) return; @@ -217,7 +217,7 @@ void BookmarkInfoWidget::slotTextChangedComment(const QString &str) { if(commentcmd) { - NodeEditCommand::setNodeText(m_bk, QStringList() << "desc", str); + NodeEditCommand::setNodeText(m_bk, TQStringList() << "desc", str); commentcmd->modify(str); } else @@ -228,64 +228,64 @@ void BookmarkInfoWidget::slotTextChangedComment(const QString &str) { } } -BookmarkInfoWidget::BookmarkInfoWidget(QWidget *parent, const char *name) - : QWidget(parent, name), m_connected(false) { +BookmarkInfoWidget::BookmarkInfoWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name), m_connected(false) { - timer = new QTimer(this); - connect(timer, SIGNAL( timeout() ), SLOT( commitChanges())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL( timeout() ), TQT_SLOT( commitChanges())); titlecmd = 0; urlcmd = 0; commentcmd = 0; - QBoxLayout *vbox = new QVBoxLayout(this); - QGridLayout *grid = new QGridLayout(vbox, 3, 4, 4); + TQBoxLayout *vbox = new TQVBoxLayout(this); + TQGridLayout *grid = new TQGridLayout(vbox, 3, 4, 4); m_title_le = new BookmarkLineEdit(this); grid->addWidget(m_title_le, 0, 1); grid->addWidget( - new QLabel(m_title_le, i18n("Name:"), this), + new TQLabel(m_title_le, i18n("Name:"), this), 0, 0); - connect(m_title_le, SIGNAL( textChanged(const QString &) ), - SLOT( slotTextChangedTitle(const QString &) )); - connect(m_title_le, SIGNAL( lostFocus() ), SLOT( commitTitle() )); + connect(m_title_le, TQT_SIGNAL( textChanged(const TQString &) ), + TQT_SLOT( slotTextChangedTitle(const TQString &) )); + connect(m_title_le, TQT_SIGNAL( lostFocus() ), TQT_SLOT( commitTitle() )); m_url_le = new BookmarkLineEdit(this); grid->addWidget(m_url_le, 1, 1); grid->addWidget( - new QLabel(m_url_le, i18n("Location:"), this), + new TQLabel(m_url_le, i18n("Location:"), this), 1, 0); - connect(m_url_le, SIGNAL( textChanged(const QString &) ), - SLOT( slotTextChangedURL(const QString &) )); - connect(m_url_le, SIGNAL( lostFocus() ), SLOT( commitURL() )); + connect(m_url_le, TQT_SIGNAL( textChanged(const TQString &) ), + TQT_SLOT( slotTextChangedURL(const TQString &) )); + connect(m_url_le, TQT_SIGNAL( lostFocus() ), TQT_SLOT( commitURL() )); m_comment_le = new BookmarkLineEdit(this); grid->addWidget(m_comment_le, 2, 1); grid->addWidget( - new QLabel(m_comment_le, i18n("Comment:"), this), + new TQLabel(m_comment_le, i18n("Comment:"), this), 2, 0); - connect(m_comment_le, SIGNAL( textChanged(const QString &) ), - SLOT( slotTextChangedComment(const QString &) )); - connect(m_comment_le, SIGNAL( lostFocus() ), SLOT( commitComment() )); + connect(m_comment_le, TQT_SIGNAL( textChanged(const TQString &) ), + TQT_SLOT( slotTextChangedComment(const TQString &) )); + connect(m_comment_le, TQT_SIGNAL( lostFocus() ), TQT_SLOT( commitComment() )); m_credate_le = new KLineEdit(this); grid->addWidget(m_credate_le, 0, 3); grid->addWidget( - new QLabel(m_credate_le, i18n("First viewed:"), this), + new TQLabel(m_credate_le, i18n("First viewed:"), this), 0, 2); m_visitdate_le = new KLineEdit(this); grid->addWidget(m_visitdate_le, 1, 3); grid->addWidget( - new QLabel(m_visitdate_le, i18n("Viewed last:"), this), + new TQLabel(m_visitdate_le, i18n("Viewed last:"), this), 1, 2 ); m_visitcount_le = new KLineEdit(this); grid->addWidget(m_visitcount_le, 2, 3); grid->addWidget( - new QLabel(m_visitcount_le, i18n("Times visited:"), this), + new TQLabel(m_visitcount_le, i18n("Times visited:"), this), 2, 2); } diff --git a/konqueror/keditbookmarks/bookmarkinfo.h b/konqueror/keditbookmarks/bookmarkinfo.h index 51661959a..9894fec1d 100644 --- a/konqueror/keditbookmarks/bookmarkinfo.h +++ b/konqueror/keditbookmarks/bookmarkinfo.h @@ -24,7 +24,7 @@ #include "commands.h" #include -#include +#include #include class QTimer; @@ -32,16 +32,16 @@ class QTimer; class BookmarkLineEdit : public KLineEdit { Q_OBJECT public: - BookmarkLineEdit( QWidget * ); + BookmarkLineEdit( TQWidget * ); public slots: virtual void cut (); }; -class BookmarkInfoWidget : public QWidget { +class BookmarkInfoWidget : public TQWidget { Q_OBJECT public: - BookmarkInfoWidget(QWidget * = 0, const char * = 0); + BookmarkInfoWidget(TQWidget * = 0, const char * = 0); void showBookmark(const KBookmark &bk); void saveBookmark(const KBookmark &bk); KBookmark bookmark() { return m_bk; } @@ -50,9 +50,9 @@ public: void updateStatus(); public slots: - void slotTextChangedURL(const QString &); - void slotTextChangedTitle(const QString &); - void slotTextChangedComment(const QString &); + void slotTextChangedURL(const TQString &); + void slotTextChangedTitle(const TQString &); + void slotTextChangedComment(const TQString &); // _The deal with all those commitChanges() calls_ // First a short example how all the components @@ -99,7 +99,7 @@ private: NodeEditCommand *titlecmd; EditCommand *urlcmd; NodeEditCommand *commentcmd; - QTimer * timer; + TQTimer * timer; BookmarkLineEdit *m_title_le, *m_url_le, *m_comment_le; KLineEdit *m_visitdate_le, *m_credate_le, diff --git a/konqueror/keditbookmarks/bookmarkiterator.cpp b/konqueror/keditbookmarks/bookmarkiterator.cpp index 588adb86c..c30d890e3 100644 --- a/konqueror/keditbookmarks/bookmarkiterator.cpp +++ b/konqueror/keditbookmarks/bookmarkiterator.cpp @@ -26,11 +26,11 @@ #include -#include +#include -BookmarkIterator::BookmarkIterator(QValueList bks) : m_bklist(bks) { - connect(this, SIGNAL( deleteSelf(BookmarkIterator *) ), - SLOT( slotCancelTest(BookmarkIterator *) )); +BookmarkIterator::BookmarkIterator(TQValueList bks) : m_bklist(bks) { + connect(this, TQT_SIGNAL( deleteSelf(BookmarkIterator *) ), + TQT_SLOT( slotCancelTest(BookmarkIterator *) )); delayedEmitNextOne(); } @@ -39,7 +39,7 @@ BookmarkIterator::~BookmarkIterator() { } void BookmarkIterator::delayedEmitNextOne() { - QTimer::singleShot(1, this, SLOT( nextOne() )); + TQTimer::singleShot(1, this, TQT_SLOT( nextOne() )); } void BookmarkIterator::slotCancelTest(BookmarkIterator *test) { @@ -65,7 +65,7 @@ void BookmarkIterator::nextOne() { return; } - QValueListIterator head = m_bklist.begin(); + TQValueListIterator head = m_bklist.begin(); KBookmark bk = (*head); bool viable = bk.hasParent() && isApplicable(bk); diff --git a/konqueror/keditbookmarks/bookmarkiterator.h b/konqueror/keditbookmarks/bookmarkiterator.h index baafb3486..0931ccaf7 100644 --- a/konqueror/keditbookmarks/bookmarkiterator.h +++ b/konqueror/keditbookmarks/bookmarkiterator.h @@ -21,8 +21,8 @@ #ifndef __bookmarkiterator_h #define __bookmarkiterator_h -#include -#include +#include +#include #include class KEBListViewItem; @@ -33,7 +33,7 @@ class BookmarkIterator : public QObject Q_OBJECT public: - BookmarkIterator(QValueList bks); + BookmarkIterator(TQValueList bks); virtual ~BookmarkIterator(); virtual BookmarkIteratorHolder* holder() const = 0; @@ -53,7 +53,7 @@ protected: private: KBookmark m_bk; - QValueList m_bklist; + TQValueList m_bklist; }; class BookmarkIteratorHolder @@ -68,7 +68,7 @@ protected: virtual void doItrListChanged() = 0; int count() const { return m_itrs.count(); } private: - QPtrList m_itrs; + TQPtrList m_itrs; }; #endif diff --git a/konqueror/keditbookmarks/commands.cpp b/konqueror/keditbookmarks/commands.cpp index e545df54e..2ad58a682 100644 --- a/konqueror/keditbookmarks/commands.cpp +++ b/konqueror/keditbookmarks/commands.cpp @@ -27,7 +27,7 @@ #include "listview.h" #include -#include +#include #include #include @@ -38,10 +38,10 @@ #include #include -QString KEBMacroCommand::affectedBookmarks() const +TQString KEBMacroCommand::affectedBookmarks() const { - QPtrListIterator it(m_commands); - QString affectBook; + TQPtrListIterator it(m_commands); + TQString affectBook; if(it.current()) affectBook = dynamic_cast(it.current())->affectedBookmarks(); ++it; @@ -50,34 +50,34 @@ QString KEBMacroCommand::affectedBookmarks() const return affectBook; } -QString DeleteManyCommand::prevOrParentAddress(QString addr) +TQString DeleteManyCommand::prevOrParentAddress(TQString addr) { - QString prev = KBookmark::previousAddress( addr ); + TQString prev = KBookmark::previousAddress( addr ); if( CurrentMgr::bookmarkAt(prev).hasParent()) return prev; else return KBookmark::parentAddress( addr ); } -QString DeleteManyCommand::preOrderNextAddress(QString addr) +TQString DeleteManyCommand::preOrderNextAddress(TQString addr) { - QString rootAdr = CurrentMgr::self()->mgr()->root().address(); + TQString rootAdr = CurrentMgr::self()->mgr()->root().address(); while(addr != rootAdr) { - QString next = KBookmark::nextAddress(addr); + TQString next = KBookmark::nextAddress(addr); if(CurrentMgr::bookmarkAt( next ).hasParent() ) return next; addr = KBookmark::parentAddress( addr ); } - return QString::null; + return TQString::null; } -bool DeleteManyCommand::isConsecutive(const QValueList & addresses) +bool DeleteManyCommand::isConsecutive(const TQValueList & addresses) { - QValueList::const_iterator it, end; + TQValueList::const_iterator it, end; it = addresses.begin(); end = addresses.end(); - QString addr = *(addresses.begin()); + TQString addr = *(addresses.begin()); for( ; it != end; ++it) { if( *it != addr ) @@ -88,10 +88,10 @@ bool DeleteManyCommand::isConsecutive(const QValueList & addresses) } -DeleteManyCommand::DeleteManyCommand(const QString &name, const QValueList & addresses) +DeleteManyCommand::DeleteManyCommand(const TQString &name, const TQValueList & addresses) : KEBMacroCommand(name) { - QValueList::const_iterator it, begin; + TQValueList::const_iterator it, begin; begin = addresses.begin(); it = addresses.end(); while(begin != it) @@ -110,7 +110,7 @@ DeleteManyCommand::DeleteManyCommand(const QString &name, const QValueList::const_iterator last = addresses.end(); + TQValueList::const_iterator last = addresses.end(); --last; if( CurrentMgr::bookmarkAt( KBookmark::nextAddress(*last) ).hasParent() ) m_currentAddress = *begin; else { m_currentAddress = preOrderNextAddress( KBookmark::parentAddress( *begin ) ); - if( m_currentAddress == QString::null) + if( m_currentAddress == TQString::null) m_currentAddress = prevOrParentAddress( *begin ); } } else // not consecutive, select the common parent (This could be more clever) { - QValueList::const_iterator jt, end; + TQValueList::const_iterator jt, end; end = addresses.end(); m_currentAddress = *begin; for( jt = addresses.begin(); jt != end; ++jt) @@ -141,13 +141,13 @@ DeleteManyCommand::DeleteManyCommand(const QString &name, const QValueList::Iterator it = m_editions.begin(); + TQValueList::Iterator it = m_editions.begin(); for ( ; it != m_editions.end() ; ++it) { // backup current value @@ -270,15 +270,15 @@ void EditCommand::unexecute() { m_editions = cmd.m_reverseEditions; } -QString EditCommand::affectedBookmarks() const +TQString EditCommand::affectedBookmarks() const { return KBookmark::parentAddress(m_address); } -void EditCommand::modify(const QString & a, const QString & v) +void EditCommand::modify(const TQString & a, const TQString & v) { - QValueList::Iterator it = m_editions.begin(); - QValueList::Iterator end = m_editions.end(); + TQValueList::Iterator it = m_editions.begin(); + TQValueList::Iterator end = m_editions.end(); for ( ; it != end; ++it) { if( (*it).attr == a) @@ -288,29 +288,29 @@ void EditCommand::modify(const QString & a, const QString & v) /* -------------------------------------- */ -QString NodeEditCommand::name() const { +TQString NodeEditCommand::name() const { // TODO - make dynamic return i18n("Renaming"); } -QString NodeEditCommand::getNodeText(KBookmark bk, const QStringList &nodehier) { - QDomNode subnode = bk.internalElement(); - for (QStringList::ConstIterator it = nodehier.begin(); +TQString NodeEditCommand::getNodeText(KBookmark bk, const TQStringList &nodehier) { + TQDomNode subnode = bk.internalElement(); + for (TQStringList::ConstIterator it = nodehier.begin(); it != nodehier.end(); ++it) { subnode = subnode.namedItem((*it)); if (subnode.isNull()) - return QString::null; + return TQString::null; } return (subnode.firstChild().isNull()) - ? QString::null + ? TQString::null : subnode.firstChild().toText().data(); } -QString NodeEditCommand::setNodeText(KBookmark bk, const QStringList &nodehier, - const QString newValue) { - QDomNode subnode = bk.internalElement(); - for (QStringList::ConstIterator it = nodehier.begin(); +TQString NodeEditCommand::setNodeText(KBookmark bk, const TQStringList &nodehier, + const TQString newValue) { + TQDomNode subnode = bk.internalElement(); + for (TQStringList::ConstIterator it = nodehier.begin(); it != nodehier.end(); ++it) { subnode = subnode.namedItem((*it)); @@ -321,13 +321,13 @@ QString NodeEditCommand::setNodeText(KBookmark bk, const QStringList &nodehier, } if (subnode.firstChild().isNull()) { - QDomText domtext = subnode.ownerDocument().createTextNode(""); + TQDomText domtext = subnode.ownerDocument().createTextNode(""); subnode.appendChild(domtext); } - QDomText domtext = subnode.firstChild().toText(); + TQDomText domtext = subnode.firstChild().toText(); - QString oldText = domtext.data(); + TQString oldText = domtext.data(); domtext.setData(newValue); return oldText; } @@ -336,7 +336,7 @@ void NodeEditCommand::execute() { // DUPLICATED HEAVILY FROM KIO/BOOKMARKS KBookmark bk = CurrentMgr::bookmarkAt(m_address); Q_ASSERT(!bk.isNull()); - m_oldText = setNodeText(bk, QStringList() << m_nodename, m_newText); + m_oldText = setNodeText(bk, TQStringList() << m_nodename, m_newText); } void NodeEditCommand::unexecute() { @@ -349,12 +349,12 @@ void NodeEditCommand::unexecute() { m_newText = cmd.m_oldText; } -void NodeEditCommand::modify(const QString & newText) +void NodeEditCommand::modify(const TQString & newText) { m_newText = newText; } -QString NodeEditCommand::affectedBookmarks() const +TQString NodeEditCommand::affectedBookmarks() const { return KBookmark::parentAddress(m_address); } @@ -368,15 +368,15 @@ void DeleteCommand::execute() { Q_ASSERT(!bk.isNull()); if (m_contentOnly) { - QDomElement groupRoot = bk.internalElement(); + TQDomElement groupRoot = bk.internalElement(); - QDomNode n = groupRoot.firstChild(); + TQDomNode n = groupRoot.firstChild(); while (!n.isNull()) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if (!e.isNull()) { // kdDebug() << e.tagName() << endl; } - QDomNode next = n.nextSibling(); + TQDomNode next = n.nextSibling(); groupRoot.removeChild(n); n = next; } @@ -419,19 +419,19 @@ void DeleteCommand::unexecute() { } } -QString DeleteCommand::affectedBookmarks() const +TQString DeleteCommand::affectedBookmarks() const { return KBookmark::parentAddress(m_from); } KEBMacroCommand* DeleteCommand::deleteAll(const KBookmarkGroup & parentGroup) { - KEBMacroCommand *cmd = new KEBMacroCommand(QString::null); - QStringList lstToDelete; + KEBMacroCommand *cmd = new KEBMacroCommand(TQString::null); + TQStringList lstToDelete; // we need to delete from the end, to avoid index shifting for (KBookmark bk = parentGroup.first(); !bk.isNull(); bk = parentGroup.next(bk)) lstToDelete.prepend(bk.address()); - for (QStringList::Iterator it = lstToDelete.begin(); + for (TQStringList::Iterator it = lstToDelete.begin(); it != lstToDelete.end(); ++it) cmd->addCommand(new DeleteCommand((*it))); return cmd; @@ -439,7 +439,7 @@ KEBMacroCommand* DeleteCommand::deleteAll(const KBookmarkGroup & parentGroup) { /* -------------------------------------- */ -QString MoveCommand::name() const { +TQString MoveCommand::name() const { return i18n("Move %1").arg(m_mytext); } @@ -456,12 +456,12 @@ void MoveCommand::execute() { bool wasFirstChild = (KBookmark::positionInParent(m_from) == 0); KBookmark oldPreviousSibling = wasFirstChild - ? KBookmark(QDomElement()) + ? KBookmark(TQDomElement()) : CurrentMgr::bookmarkAt( KBookmark::previousAddress(m_from)); // look for m_to in the QDom tree - QString parentAddress = KBookmark::parentAddress(m_to); + TQString parentAddress = KBookmark::parentAddress(m_to); KBookmark newParent = CurrentMgr::bookmarkAt(parentAddress); Q_ASSERT(!newParent.isNull()); @@ -470,10 +470,10 @@ void MoveCommand::execute() { bool isFirstChild = (KBookmark::positionInParent(m_to) == 0); if (isFirstChild) { - newParent.toGroup().moveItem(bk, QDomElement()); + newParent.toGroup().moveItem(bk, TQDomElement()); } else { - QString afterAddress = KBookmark::previousAddress(m_to); + TQString afterAddress = KBookmark::previousAddress(m_to); // kdDebug() << "MoveCommand::execute afterAddress=" // << afterAddress << endl; @@ -497,7 +497,7 @@ void MoveCommand::execute() { // << m_from << " to=" << m_to << endl; } -QString MoveCommand::finalAddress() const { +TQString MoveCommand::finalAddress() const { Q_ASSERT( !m_to.isEmpty() ); return m_to; } @@ -511,7 +511,7 @@ void MoveCommand::unexecute() { m_to = undoCmd.m_from; } -QString MoveCommand::affectedBookmarks() const +TQString MoveCommand::affectedBookmarks() const { return KBookmark::commonParent(KBookmark::parentAddress(m_from), KBookmark::parentAddress(m_to)); } @@ -543,7 +543,7 @@ class SortItem { class SortByName { public: - static QString key(const SortItem &item) { + static TQString key(const SortItem &item) { return (item.bookmark().isGroup() ? "a" : "b") + (item.bookmark().fullText().lower()); } @@ -558,7 +558,7 @@ void SortCommand::execute() { SortItem firstChild(grp.first()); // this will call moveAfter, which will add // the subcommands for moving the items - kInsertionSort + kInsertionSort (firstChild, (*this)); } else { @@ -569,7 +569,7 @@ void SortCommand::execute() { void SortCommand::moveAfter(const SortItem &moveMe, const SortItem &afterMe) { - QString destAddress = + TQString destAddress = afterMe.isNull() // move as first child ? KBookmark::parentAddress(moveMe.bookmark().address()) + "/0" @@ -586,7 +586,7 @@ void SortCommand::unexecute() { KEBMacroCommand::unexecute(); } -QString SortCommand::affectedBookmarks() const +TQString SortCommand::affectedBookmarks() const { return m_groupAddress; } @@ -598,14 +598,14 @@ KEBMacroCommand* CmdGen::setAsToolbar(const KBookmark &bk) { KBookmarkGroup oldToolbar = CurrentMgr::self()->mgr()->toolbar(); if (!oldToolbar.isNull()) { - QValueList lst; + TQValueList lst; lst.append(EditCommand::Edition("toolbar", "no")); lst.append(EditCommand::Edition("icon", "")); EditCommand *cmd1 = new EditCommand(oldToolbar.address(), lst); mcmd->addCommand(cmd1); } - QValueList lst; + TQValueList lst; lst.append(EditCommand::Edition("toolbar", "yes")); lst.append(EditCommand::Edition("icon", "bookmark_toolbar")); // TODO - see below @@ -619,16 +619,16 @@ bool CmdGen::shownInToolbar(const KBookmark &bk) { return (bk.internalElement().attribute("showintoolbar") == "yes"); } -KEBMacroCommand* CmdGen::setShownInToolbar(const QValueList &bks, bool show) { - QString i18n_name = i18n("%1 in Bookmark Toolbar").arg(show ? i18n("Show") +KEBMacroCommand* CmdGen::setShownInToolbar(const TQValueList &bks, bool show) { + TQString i18n_name = i18n("%1 in Bookmark Toolbar").arg(show ? i18n("Show") : i18n("Hide")); KEBMacroCommand *mcmd = new KEBMacroCommand(i18n_name); - QValueList::ConstIterator it, end; + TQValueList::ConstIterator it, end; end = bks.end(); for(it = bks.begin(); it != end; ++it) { - QValueList lst; + TQValueList lst; lst.append(EditCommand::Edition("showintoolbar", show ? "yes" : "no")); EditCommand *cmd = new EditCommand((*it).address(), lst); mcmd->addCommand(cmd); @@ -637,9 +637,9 @@ KEBMacroCommand* CmdGen::setShownInToolbar(const QValueList &bks, boo } KEBMacroCommand* CmdGen::insertMimeSource( - const QString &cmdName, QMimeSource *_data, const QString &addr + const TQString &cmdName, TQMimeSource *_data, const TQString &addr ) { - QMimeSource *data = _data; + TQMimeSource *data = _data; bool modified = false; const char *format = 0; for (int i = 0; format = data->format(i), format; i++) { @@ -648,7 +648,7 @@ KEBMacroCommand* CmdGen::insertMimeSource( // or not. so, we search. sucky... if (strcmp(format, "GALEON_BOOKMARK") == 0) { modified = true; - QStoredDrag *mydrag = new QStoredDrag("application/x-xbel"); + TQStoredDrag *mydrag = new TQStoredDrag("application/x-xbel"); mydrag->setEncodedData(data->encodedData("GALEON_BOOKMARK")); data = mydrag; break; @@ -661,14 +661,14 @@ KEBMacroCommand* CmdGen::insertMimeSource( continue; // break out of format loop KURL::List::ConstIterator uit = uris.begin(); KURL::List::ConstIterator uEnd = uris.end(); - QValueList urlBks; + TQValueList urlBks; for ( ; uit != uEnd ; ++uit ) { if (!(*uit).url().endsWith(".desktop")) { urlBks << KBookmark::standaloneBookmark((*uit).prettyURL(), (*uit)); continue; } KDesktopFile df((*uit).path(), true); - QString title = df.readName(); + TQString title = df.readName(); KURL url(df.readURL()); if (title.isNull()) title = url.prettyURL(); @@ -686,9 +686,9 @@ KEBMacroCommand* CmdGen::insertMimeSource( return 0; } KEBMacroCommand *mcmd = new KEBMacroCommand(cmdName); - QString currentAddress = addr; - QValueList bookmarks = KBookmarkDrag::decode(data); - for (QValueListConstIterator it = bookmarks.begin(); + TQString currentAddress = addr; + TQValueList bookmarks = KBookmarkDrag::decode(data); + for (TQValueListConstIterator it = bookmarks.begin(); it != bookmarks.end(); ++it) { CreateCommand *cmd = new CreateCommand(currentAddress, (*it)); cmd->execute(); @@ -700,17 +700,17 @@ KEBMacroCommand* CmdGen::insertMimeSource( return mcmd; } -KEBMacroCommand* CmdGen::itemsMoved(const QValueVector & items, - const QString &newAddress, bool copy) { +KEBMacroCommand* CmdGen::itemsMoved(const TQValueVector & items, + const TQString &newAddress, bool copy) { KEBMacroCommand *mcmd = new KEBMacroCommand(copy ? i18n("Copy Items") : i18n("Move Items")); - QValueList list = ListView::self()->itemsToBookmarks( items ); - QValueList::const_iterator it, end; + TQValueList list = ListView::self()->itemsToBookmarks( items ); + TQValueList::const_iterator it, end; it = list.begin(); end = list.end(); - QString bkInsertAddr = newAddress; + TQString bkInsertAddr = newAddress; for (; it != end; ++it) { if (copy) { CreateCommand *cmd; @@ -726,7 +726,7 @@ KEBMacroCommand* CmdGen::itemsMoved(const QValueVector & item bkInsertAddr = cmd->finalAddress(); } else /* if (move) */ { - QString oldAddress = (*it).address(); + TQString oldAddress = (*it).address(); if (bkInsertAddr.startsWith(oldAddress)) //FIXME uses internal representation of address continue; diff --git a/konqueror/keditbookmarks/commands.h b/konqueror/keditbookmarks/commands.h index 61363f9dd..3df5d3acf 100644 --- a/konqueror/keditbookmarks/commands.h +++ b/konqueror/keditbookmarks/commands.h @@ -23,7 +23,7 @@ #include #include -#include +#include // Interface adds the affectedBookmarks method // Any class should on call add those bookmarks which are @@ -35,82 +35,82 @@ class IKEBCommand public: IKEBCommand() {}; virtual ~IKEBCommand() {}; - virtual QString affectedBookmarks() const = 0; - virtual QString currentAddress() const { return QString::null; } + virtual TQString affectedBookmarks() const = 0; + virtual TQString currentAddress() const { return TQString::null; } }; class KEBMacroCommand : public KMacroCommand, public IKEBCommand { public: - KEBMacroCommand(const QString &name) + KEBMacroCommand(const TQString &name) : KMacroCommand(name) {}; virtual ~KEBMacroCommand() {}; - virtual QString affectedBookmarks() const; + virtual TQString affectedBookmarks() const; }; class DeleteManyCommand : public KEBMacroCommand { public: - DeleteManyCommand(const QString &name, const QValueList & addresses); + DeleteManyCommand(const TQString &name, const TQValueList & addresses); virtual ~DeleteManyCommand() {}; - virtual QString currentAddress() const; + virtual TQString currentAddress() const; private: - QString prevOrParentAddress(QString addr); - QString preOrderNextAddress(QString addr); - bool isConsecutive(const QValueList & addresses); - QString m_currentAddress; + TQString prevOrParentAddress(TQString addr); + TQString preOrderNextAddress(TQString addr); + bool isConsecutive(const TQValueList & addresses); + TQString m_currentAddress; }; class CreateCommand : public KCommand, public IKEBCommand { public: // separator - CreateCommand(const QString &address) + CreateCommand(const TQString &address) : KCommand(), m_to(address), - m_group(false), m_separator(true), m_originalBookmark(QDomElement()) + m_group(false), m_separator(true), m_originalBookmark(TQDomElement()) { ; } // bookmark - CreateCommand(const QString &address, - const QString &text, const QString &iconPath, + CreateCommand(const TQString &address, + const TQString &text, const TQString &iconPath, const KURL &url) : KCommand(), m_to(address), m_text(text), m_iconPath(iconPath), m_url(url), - m_group(false), m_separator(false), m_originalBookmark(QDomElement()) + m_group(false), m_separator(false), m_originalBookmark(TQDomElement()) { ; } // folder - CreateCommand(const QString &address, - const QString &text, const QString &iconPath, + CreateCommand(const TQString &address, + const TQString &text, const TQString &iconPath, bool open) : KCommand(), m_to(address), m_text(text), m_iconPath(iconPath), - m_group(true), m_separator(false), m_open(open), m_originalBookmark(QDomElement()) + m_group(true), m_separator(false), m_open(open), m_originalBookmark(TQDomElement()) { ; } // clone existing bookmark - CreateCommand(const QString &address, - const KBookmark &original, const QString &name = QString::null) + CreateCommand(const TQString &address, + const KBookmark &original, const TQString &name = TQString::null) : KCommand(), m_to(address), m_group(false), m_separator(false), m_open(false), m_originalBookmark(original), m_mytext(name) { ; } - QString finalAddress() const; + TQString finalAddress() const; virtual ~CreateCommand() { ; } virtual void execute(); virtual void unexecute(); - virtual QString name() const; - virtual QString affectedBookmarks() const; - virtual QString currentAddress() const; + virtual TQString name() const; + virtual TQString affectedBookmarks() const; + virtual TQString currentAddress() const; private: - QString m_to; - QString m_text; - QString m_iconPath; + TQString m_to; + TQString m_text; + TQString m_iconPath; KURL m_url; bool m_group:1; bool m_separator:1; bool m_open:1; KBookmark m_originalBookmark; - QString m_mytext; + TQString m_mytext; }; class EditCommand : public KCommand, public IKEBCommand @@ -119,82 +119,82 @@ public: struct Edition { Edition() { ; } // needed for QValueList - Edition(const QString &a, const QString &v) : attr(a), value(v) {} - QString attr; - QString value; + Edition(const TQString &a, const TQString &v) : attr(a), value(v) {} + TQString attr; + TQString value; }; // change one attribute - EditCommand(const QString &address, Edition edition, const QString &name = QString::null) + EditCommand(const TQString &address, Edition edition, const TQString &name = TQString::null) : KCommand(), m_address(address), m_mytext(name) { m_editions.append(edition); } // change multiple attributes - EditCommand(const QString &address, - const QValueList &editions, - const QString &name = QString::null) + EditCommand(const TQString &address, + const TQValueList &editions, + const TQString &name = TQString::null) : KCommand(), m_address(address), m_editions(editions), m_mytext(name) { ; } - void modify(const QString & a, const QString & v); + void modify(const TQString & a, const TQString & v); virtual ~EditCommand() { ; } virtual void execute(); virtual void unexecute(); - virtual QString name() const; - virtual QString affectedBookmarks() const; + virtual TQString name() const; + virtual TQString affectedBookmarks() const; private: - QString m_address; - QValueList m_editions; - QValueList m_reverseEditions; - QString m_mytext; + TQString m_address; + TQValueList m_editions; + TQValueList m_reverseEditions; + TQString m_mytext; }; class NodeEditCommand : public KCommand, public IKEBCommand { public: - NodeEditCommand(const QString &address, - const QString &newText, - const QString &nodeName) + NodeEditCommand(const TQString &address, + const TQString &newText, + const TQString &nodeName) : KCommand(), m_address(address), m_newText(newText), m_nodename(nodeName) { ; } - void modify(const QString & newText); + void modify(const TQString & newText); virtual ~NodeEditCommand() { ; } virtual void execute(); virtual void unexecute(); - virtual QString affectedBookmarks() const; - virtual QString name() const; - static QString getNodeText(KBookmark bk, const QStringList &nodehier); - static QString setNodeText(KBookmark bk, const QStringList &nodehier, - QString newValue); + virtual TQString affectedBookmarks() const; + virtual TQString name() const; + static TQString getNodeText(KBookmark bk, const TQStringList &nodehier); + static TQString setNodeText(KBookmark bk, const TQStringList &nodehier, + TQString newValue); private: - QString m_address; - QString m_newText; - QString m_oldText; - QString m_nodename; + TQString m_address; + TQString m_newText; + TQString m_oldText; + TQString m_nodename; }; class DeleteCommand : public KCommand, public IKEBCommand { public: - DeleteCommand(const QString &from, bool contentOnly = false) + DeleteCommand(const TQString &from, bool contentOnly = false) : KCommand(), m_from(from), m_cmd(0L), m_subCmd(0L), m_contentOnly(contentOnly) { ; } virtual ~DeleteCommand() { delete m_cmd; delete m_subCmd;} virtual void execute(); virtual void unexecute(); - virtual QString name() const { + virtual TQString name() const { // NOTE - DeleteCommand needs no name, its always embedded in a macrocommand return ""; }; - virtual QString affectedBookmarks() const; + virtual TQString affectedBookmarks() const; static KEBMacroCommand* deleteAll(const KBookmarkGroup &parentGroup); private: - QString m_from; + TQString m_from; KCommand *m_cmd; KEBMacroCommand *m_subCmd; bool m_contentOnly; @@ -205,19 +205,19 @@ class MoveCommand : public KCommand, public IKEBCommand public: // "Create it with itemsAlreadyMoved=true since // "KListView moves the item before telling us about it." - MoveCommand(const QString &from, const QString &to, const QString &name = QString::null) + MoveCommand(const TQString &from, const TQString &to, const TQString &name = TQString::null) : KCommand(), m_from(from), m_to(to), m_mytext(name) { ; } - QString finalAddress() const; + TQString finalAddress() const; virtual ~MoveCommand() { ; } virtual void execute(); virtual void unexecute(); - virtual QString name() const; - virtual QString affectedBookmarks() const; + virtual TQString name() const; + virtual TQString affectedBookmarks() const; private: - QString m_from; - QString m_to; - QString m_mytext; + TQString m_from; + TQString m_to; + TQString m_mytext; }; class SortItem; @@ -225,18 +225,18 @@ class SortItem; class SortCommand : public KEBMacroCommand { public: - SortCommand(const QString &name, const QString &groupAddress) + SortCommand(const TQString &name, const TQString &groupAddress) : KEBMacroCommand(name), m_groupAddress(groupAddress) { ; } virtual ~SortCommand() { ; } virtual void execute(); virtual void unexecute(); - virtual QString affectedBookmarks() const; + virtual TQString affectedBookmarks() const; // internal void moveAfter(const SortItem &moveMe, const SortItem &afterMe); private: - QString m_groupAddress; + TQString m_groupAddress; }; class KEBListViewItem; @@ -244,11 +244,11 @@ class KEBListViewItem; class CmdGen { public: static KEBMacroCommand* setAsToolbar(const KBookmark &bk); - static KEBMacroCommand* setShownInToolbar(const QValueList &bk, bool show); + static KEBMacroCommand* setShownInToolbar(const TQValueList &bk, bool show); static bool shownInToolbar(const KBookmark &bk); - static KEBMacroCommand* deleteItems(const QString &commandName, const QValueVector & items); - static KEBMacroCommand* insertMimeSource(const QString &cmdName, QMimeSource *data, const QString &addr); - static KEBMacroCommand* itemsMoved(const QValueVector & items, const QString &newAddress, bool copy); + static KEBMacroCommand* deleteItems(const TQString &commandName, const TQValueVector & items); + static KEBMacroCommand* insertMimeSource(const TQString &cmdName, TQMimeSource *data, const TQString &addr); + static KEBMacroCommand* itemsMoved(const TQValueVector & items, const TQString &newAddress, bool copy); private: CmdGen() { ; } }; diff --git a/konqueror/keditbookmarks/dcop.cpp b/konqueror/keditbookmarks/dcop.cpp index 76b27b9b6..a31af0c80 100644 --- a/konqueror/keditbookmarks/dcop.cpp +++ b/konqueror/keditbookmarks/dcop.cpp @@ -26,9 +26,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -38,13 +38,13 @@ KBookmarkEditorIface::KBookmarkEditorIface() - : QObject(), DCOPObject("KBookmarkEditor") { - // connect(KBookmarkNotifier_stub, SIGNAL( updatedAccessMetadata(QString,QString) ), - // this, SLOT( slotDcopUpdatedAccessMetadata(QString,QString) )); - connectDCOPSignal(0, "KBookmarkNotifier", "updatedAccessMetadata(QString,QString)", "slotDcopUpdatedAccessMetadata(QString,QString)", false); + : TQObject(), DCOPObject("KBookmarkEditor") { + // connect(KBookmarkNotifier_stub, TQT_SIGNAL( updatedAccessMetadata(TQString,TQString) ), + // this, TQT_SLOT( slotDcopUpdatedAccessMetadata(TQString,TQString) )); + connectDCOPSignal(0, "KBookmarkNotifier", "updatedAccessMetadata(TQString,TQString)", "slotDcopUpdatedAccessMetadata(TQString,TQString)", false); } -void KBookmarkEditorIface::slotDcopUpdatedAccessMetadata(QString filename, QString url) { +void KBookmarkEditorIface::slotDcopUpdatedAccessMetadata(TQString filename, TQString url) { // evil hack, konqi gets updates by way of historymgr, // therefore konqi does'nt want "save" notification, // unfortunately to stop konqi getting it is difficult diff --git a/konqueror/keditbookmarks/dcop.h b/konqueror/keditbookmarks/dcop.h index 3e8e545d8..6914f2db4 100644 --- a/konqueror/keditbookmarks/dcop.h +++ b/konqueror/keditbookmarks/dcop.h @@ -23,14 +23,14 @@ #include -class KBookmarkEditorIface : public QObject, public DCOPObject +class KBookmarkEditorIface : public TQObject, public DCOPObject { Q_OBJECT K_DCOP public: KBookmarkEditorIface(); k_dcop_hidden: - void slotDcopUpdatedAccessMetadata(QString filename, QString url); + void slotDcopUpdatedAccessMetadata(TQString filename, TQString url); }; #endif diff --git a/konqueror/keditbookmarks/exporters.cpp b/konqueror/keditbookmarks/exporters.cpp index 4b1bbb5e7..912edcb9a 100644 --- a/konqueror/keditbookmarks/exporters.cpp +++ b/konqueror/keditbookmarks/exporters.cpp @@ -24,24 +24,24 @@ #include #include -#include +#include HTMLExporter::HTMLExporter() : m_out(&m_string, IO_WriteOnly) { } -void HTMLExporter::write(const KBookmarkGroup &grp, const QString &filename, bool showAddress) { - QFile file(filename); +void HTMLExporter::write(const KBookmarkGroup &grp, const TQString &filename, bool showAddress) { + TQFile file(filename); if (!file.open(IO_WriteOnly)) { kdError(7043) << "Can't write to file " << filename << endl; return; } - QTextStream tstream(&file); - tstream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream tstream(&file); + tstream.setEncoding(TQTextStream::UnicodeUTF8); tstream << toString(grp, showAddress); } -QString HTMLExporter::toString(const KBookmarkGroup &grp, bool showAddress) +TQString HTMLExporter::toString(const KBookmarkGroup &grp, bool showAddress) { m_showAddress = showAddress; traverse(grp); diff --git a/konqueror/keditbookmarks/exporters.h b/konqueror/keditbookmarks/exporters.h index cdc3844ba..e40964371 100644 --- a/konqueror/keditbookmarks/exporters.h +++ b/konqueror/keditbookmarks/exporters.h @@ -24,15 +24,15 @@ class HTMLExporter : private KBookmarkGroupTraverser { public: HTMLExporter(); - QString toString(const KBookmarkGroup &, bool showAddress = false); - void write(const KBookmarkGroup &, const QString &, bool showAddress = false); + TQString toString(const KBookmarkGroup &, bool showAddress = false); + void write(const KBookmarkGroup &, const TQString &, bool showAddress = false); private: virtual void visit(const KBookmark &); virtual void visitEnter(const KBookmarkGroup &); virtual void visitLeave(const KBookmarkGroup &); private: - QString m_string; - QTextStream m_out; + TQString m_string; + TQTextStream m_out; bool m_showAddress; }; diff --git a/konqueror/keditbookmarks/favicons.cpp b/konqueror/keditbookmarks/favicons.cpp index b99371324..b9b9b4ea9 100644 --- a/konqueror/keditbookmarks/favicons.cpp +++ b/konqueror/keditbookmarks/favicons.cpp @@ -43,11 +43,11 @@ void FavIconsItrHolder::doItrListChanged() { { kdDebug()<<"Notifing managers "<notifyManagers(CurrentMgr::bookmarkAt(m_affectedBookmark).toGroup()); - m_affectedBookmark = QString::null; + m_affectedBookmark = TQString::null; } } -void FavIconsItrHolder::addAffectedBookmark( const QString & address ) +void FavIconsItrHolder::addAffectedBookmark( const TQString & address ) { kdDebug()<<"addAffectedBookmark "< bks) +FavIconsItr::FavIconsItr(TQValueList bks) : BookmarkIterator(bks) { m_updater = 0; } @@ -86,8 +86,8 @@ void FavIconsItr::doAction() { curItem()->setTmpStatus(i18n("Updating favicon...")); if (!m_updater) { m_updater = new FavIconUpdater(kapp, "FavIconUpdater"); - connect(m_updater, SIGNAL( done(bool) ), - this, SLOT( slotDone(bool) ) ); + connect(m_updater, TQT_SIGNAL( done(bool) ), + this, TQT_SLOT( slotDone(bool) ) ); } if (curBk().url().protocol().startsWith("http")) { m_updater->downloadIcon(curBk()); diff --git a/konqueror/keditbookmarks/favicons.h b/konqueror/keditbookmarks/favicons.h index 81f7ed923..97894d741 100644 --- a/konqueror/keditbookmarks/favicons.h +++ b/konqueror/keditbookmarks/favicons.h @@ -34,13 +34,13 @@ public: static FavIconsItrHolder* self() { if (!s_self) { s_self = new FavIconsItrHolder(); }; return s_self; } - void addAffectedBookmark( const QString & address ); + void addAffectedBookmark( const TQString & address ); protected: virtual void doItrListChanged(); private: FavIconsItrHolder(); static FavIconsItrHolder *s_self; - QString m_affectedBookmark; + TQString m_affectedBookmark; }; class FavIconUpdater; @@ -50,7 +50,7 @@ class FavIconsItr : public BookmarkIterator Q_OBJECT public: - FavIconsItr(QValueList bks); + FavIconsItr(TQValueList bks); ~FavIconsItr(); virtual FavIconsItrHolder* holder() const { return FavIconsItrHolder::self(); } diff --git a/konqueror/keditbookmarks/importers.cpp b/konqueror/keditbookmarks/importers.cpp index 6b59f04cd..4df0d237d 100644 --- a/konqueror/keditbookmarks/importers.cpp +++ b/konqueror/keditbookmarks/importers.cpp @@ -25,7 +25,7 @@ #include "toplevel.h" #include "listview.h" -#include +#include #include #include @@ -40,15 +40,15 @@ #include #include -QString ImportCommand::name() const { +TQString ImportCommand::name() const { return i18n("Import %1 Bookmarks").arg(visibleName()); } -QString ImportCommand::folder() const { - return m_folder ? i18n("%1 Bookmarks").arg(visibleName()) : QString::null; +TQString ImportCommand::folder() const { + return m_folder ? i18n("%1 Bookmarks").arg(visibleName()) : TQString::null; } -ImportCommand* ImportCommand::importerFactory(const QCString &type) { +ImportCommand* ImportCommand::importerFactory(const TQCString &type) { if (type == "Galeon") return new GaleonImportCommand(); else if (type == "IE") return new IEImportCommand(); else if (type == "KDE2") return new KDE2ImportCommand(); @@ -62,10 +62,10 @@ ImportCommand* ImportCommand::importerFactory(const QCString &type) { } } -ImportCommand* ImportCommand::performImport(const QCString &type, QWidget *top) { +ImportCommand* ImportCommand::performImport(const TQCString &type, TQWidget *top) { ImportCommand *importer = ImportCommand::importerFactory(type); - QString mydirname = importer->requestFilename(); + TQString mydirname = importer->requestFilename(); if (mydirname.isEmpty()) { delete importer; return 0; @@ -136,9 +136,9 @@ void ImportCommand::unexecute() { } } -QString ImportCommand::affectedBookmarks() const +TQString ImportCommand::affectedBookmarks() const { - QString rootAdr = CurrentMgr::self()->mgr()->root().address(); + TQString rootAdr = CurrentMgr::self()->mgr()->root().address(); if(m_group == rootAdr) return m_group; else @@ -147,42 +147,42 @@ QString ImportCommand::affectedBookmarks() const /* -------------------------------------- */ -QString MozImportCommand::requestFilename() const { +TQString MozImportCommand::requestFilename() const { static KMozillaBookmarkImporterImpl importer; return importer.findDefaultLocation(); } -QString NSImportCommand::requestFilename() const { +TQString NSImportCommand::requestFilename() const { static KNSBookmarkImporterImpl importer; return importer.findDefaultLocation(); } -QString OperaImportCommand::requestFilename() const { +TQString OperaImportCommand::requestFilename() const { static KOperaBookmarkImporterImpl importer; return importer.findDefaultLocation(); } -QString CrashesImportCommand::requestFilename() const { +TQString CrashesImportCommand::requestFilename() const { static KCrashBookmarkImporterImpl importer; return importer.findDefaultLocation(); } -QString IEImportCommand::requestFilename() const { +TQString IEImportCommand::requestFilename() const { static KIEBookmarkImporterImpl importer; return importer.findDefaultLocation(); } // following two are really just xbel -QString GaleonImportCommand::requestFilename() const { +TQString GaleonImportCommand::requestFilename() const { return KFileDialog::getOpenFileName( - QDir::homeDirPath() + "/.galeon", + TQDir::homeDirPath() + "/.galeon", i18n("*.xbel|Galeon Bookmark Files (*.xbel)")); } #include "kstandarddirs.h" -QString KDE2ImportCommand::requestFilename() const { +TQString KDE2ImportCommand::requestFilename() const { return KFileDialog::getOpenFileName( locateLocal("data", "konqueror"), i18n("*.xml|KDE Bookmark Files (*.xml)")); @@ -233,10 +233,10 @@ void XBELImportCommand::doExecute(const KBookmarkGroup &/*bkGroup*/) { // check if already open first??? KBookmarkManager *pManager = KBookmarkManager::managerForFile(m_fileName, false); - QDomDocument doc = CurrentMgr::self()->mgr()->internalDocument(); + TQDomDocument doc = CurrentMgr::self()->mgr()->internalDocument(); // get the xbel - QDomNode subDoc = pManager->internalDocument().namedItem("xbel").cloneNode(); + TQDomNode subDoc = pManager->internalDocument().namedItem("xbel").cloneNode(); if (subDoc.isProcessingInstruction()) subDoc = subDoc.nextSibling(); if (subDoc.isDocumentType()) @@ -249,42 +249,42 @@ void XBELImportCommand::doExecute(const KBookmarkGroup &/*bkGroup*/) { subDoc.toElement().setTagName("folder"); // clear attributes - QStringList tags; + TQStringList tags; for (uint i = 0; i < subDoc.attributes().count(); i++) tags << subDoc.attributes().item(i).toAttr().name(); - for (QStringList::Iterator it = tags.begin(); it != tags.end(); ++it) + for (TQStringList::Iterator it = tags.begin(); it != tags.end(); ++it) subDoc.attributes().removeNamedItem((*it)); subDoc.toElement().setAttribute("icon", m_icon); // give the folder a name - QDomElement textElem = doc.createElement("title"); + TQDomElement textElem = doc.createElement("title"); subDoc.insertBefore(textElem, subDoc.firstChild()); textElem.appendChild(doc.createTextNode(folder())); } // import and add it - QDomNode node = doc.importNode(subDoc, true); + TQDomNode node = doc.importNode(subDoc, true); if (!folder().isEmpty()) { CurrentMgr::self()->mgr()->root().internalElement().appendChild(node); m_group = KBookmarkGroup(node.toElement()).address(); } else { - QDomElement root = CurrentMgr::self()->mgr()->root().internalElement(); + TQDomElement root = CurrentMgr::self()->mgr()->root().internalElement(); - QValueList childList; + TQValueList childList; - QDomNode n = subDoc.firstChild().toElement(); + TQDomNode n = subDoc.firstChild().toElement(); while (!n.isNull()) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if (!e.isNull()) childList.append(e); n = n.nextSibling(); } - QValueList::Iterator it = childList.begin(); - QValueList::Iterator end = childList.end(); + TQValueList::Iterator it = childList.begin(); + TQValueList::Iterator end = childList.end(); for (; it!= end ; ++it) root.appendChild((*it)); } diff --git a/konqueror/keditbookmarks/importers.h b/konqueror/keditbookmarks/importers.h index 929bf249a..ef23f5527 100644 --- a/konqueror/keditbookmarks/importers.h +++ b/konqueror/keditbookmarks/importers.h @@ -29,11 +29,11 @@ #include #include -#include -#include +#include +#include // part pure -class ImportCommand : public QObject, public KCommand, public IKEBCommand +class ImportCommand : public TQObject, public KCommand, public IKEBCommand { Q_OBJECT public: @@ -41,24 +41,24 @@ public: : KCommand(), m_utf8(false), m_folder(false), m_cleanUpCmd(0L) { ; } - virtual void import(const QString &fileName, bool folder) = 0; + virtual void import(const TQString &fileName, bool folder) = 0; - virtual QString name() const; - virtual QString visibleName() const { return m_visibleName; } - virtual QString requestFilename() const = 0; + virtual TQString name() const; + virtual TQString visibleName() const { return m_visibleName; } + virtual TQString requestFilename() const = 0; - static ImportCommand* performImport(const QCString &, QWidget *); - static ImportCommand* importerFactory(const QCString &); + static ImportCommand* performImport(const TQCString &, TQWidget *); + static ImportCommand* importerFactory(const TQCString &); virtual ~ImportCommand() { ; } virtual void execute(); virtual void unexecute(); - virtual QString affectedBookmarks() const; + virtual TQString affectedBookmarks() const; - QString groupAddress() const { return m_group; } - QString folder() const; + TQString groupAddress() const { return m_group; } + TQString folder() const; protected: /** @@ -67,7 +67,7 @@ protected: * @param icon icon for the new folder, if @p folder isn't empty * @param utf8 true if the HTML is in utf-8 encoding */ - void init(const QString &fileName, bool folder, const QString &icon, bool utf8) + void init(const TQString &fileName, bool folder, const TQString &icon, bool utf8) { m_fileName = fileName; m_folder = folder; @@ -79,10 +79,10 @@ protected: virtual void doExecute(const KBookmarkGroup &) = 0; protected: - QString m_visibleName; - QString m_fileName; - QString m_icon; - QString m_group; + TQString m_visibleName; + TQString m_fileName; + TQString m_icon; + TQString m_group; bool m_utf8; private: @@ -95,8 +95,8 @@ class XBELImportCommand : public ImportCommand { public: XBELImportCommand() : ImportCommand() { ; } - virtual void import(const QString &fileName, bool folder) = 0; - virtual QString requestFilename() const = 0; + virtual void import(const TQString &fileName, bool folder) = 0; + virtual TQString requestFilename() const = 0; private: virtual void doCreateHoldingFolder(KBookmarkGroup &bkGroup); virtual void doExecute(const KBookmarkGroup &); @@ -106,20 +106,20 @@ class GaleonImportCommand : public XBELImportCommand { public: GaleonImportCommand() : XBELImportCommand() { m_visibleName = i18n("Galeon"); } - virtual void import(const QString &fileName, bool folder) { + virtual void import(const TQString &fileName, bool folder) { init(fileName, folder, "", false); } - virtual QString requestFilename() const; + virtual TQString requestFilename() const; }; class KDE2ImportCommand : public XBELImportCommand { public: KDE2ImportCommand() : XBELImportCommand() { m_visibleName = i18n("KDE"); } - virtual void import(const QString &fileName, bool folder) { + virtual void import(const TQString &fileName, bool folder) { init(fileName, folder, "", false); } - virtual QString requestFilename() const; + virtual TQString requestFilename() const; }; // part pure @@ -127,8 +127,8 @@ class HTMLImportCommand : public ImportCommand { public: HTMLImportCommand() : ImportCommand() { ; } - virtual void import(const QString &fileName, bool folder) = 0; - virtual QString requestFilename() const = 0; + virtual void import(const TQString &fileName, bool folder) = 0; + virtual TQString requestFilename() const = 0; private: virtual void doExecute(const KBookmarkGroup &); }; @@ -137,30 +137,30 @@ class NSImportCommand : public HTMLImportCommand { public: NSImportCommand() : HTMLImportCommand() { m_visibleName = i18n("Netscape"); } - virtual void import(const QString &fileName, bool folder) { + virtual void import(const TQString &fileName, bool folder) { init(fileName, folder, "netscape", false); } - virtual QString requestFilename() const; + virtual TQString requestFilename() const; }; class MozImportCommand : public HTMLImportCommand { public: MozImportCommand() : HTMLImportCommand() { m_visibleName = i18n("Mozilla"); } - virtual void import(const QString &fileName, bool folder) { + virtual void import(const TQString &fileName, bool folder) { init(fileName, folder, "mozilla", true); } - virtual QString requestFilename() const; + virtual TQString requestFilename() const; }; class IEImportCommand : public ImportCommand { public: IEImportCommand() : ImportCommand() { m_visibleName = i18n("IE"); } - virtual void import(const QString &fileName, bool folder) { + virtual void import(const TQString &fileName, bool folder) { init(fileName, folder, "", false); } - virtual QString requestFilename() const; + virtual TQString requestFilename() const; private: virtual void doExecute(const KBookmarkGroup &); }; @@ -169,10 +169,10 @@ class OperaImportCommand : public ImportCommand { public: OperaImportCommand() : ImportCommand() { m_visibleName = i18n("Opera"); } - virtual void import(const QString &fileName, bool folder) { + virtual void import(const TQString &fileName, bool folder) { init(fileName, folder, "opera", false); } - virtual QString requestFilename() const; + virtual TQString requestFilename() const; private: virtual void doExecute(const KBookmarkGroup &); }; @@ -181,10 +181,10 @@ class CrashesImportCommand : public ImportCommand { public: CrashesImportCommand() : ImportCommand() { m_visibleName = i18n("Crashes"); } - virtual void import(const QString &fileName, bool folder) { + virtual void import(const TQString &fileName, bool folder) { init(fileName, folder, "core", false); } - virtual QString requestFilename() const; + virtual TQString requestFilename() const; private: virtual void doExecute(const KBookmarkGroup &); }; diff --git a/konqueror/keditbookmarks/kbookmarkmerger.cpp b/konqueror/keditbookmarks/kbookmarkmerger.cpp index f1e4ad741..d34794fdc 100644 --- a/konqueror/keditbookmarks/kbookmarkmerger.cpp +++ b/konqueror/keditbookmarks/kbookmarkmerger.cpp @@ -31,9 +31,9 @@ #include -#include -#include -#include +#include +#include +#include #include @@ -82,7 +82,7 @@ int main( int argc, char**argv ) } KBookmarkManager *konqBookmarks = KBookmarkManager::userBookmarksManager(); - QStringList mergedFiles; + TQStringList mergedFiles; { KBookmarkGroup root = konqBookmarks->root(); for ( KBookmark bm = root.first(); !bm.isNull(); bm = root.next( bm ) ) { @@ -90,7 +90,7 @@ int main( int argc, char**argv ) continue; } - QString mergedFrom = bm.metaDataItem( "merged_from" ); + TQString mergedFrom = bm.metaDataItem( "merged_from" ); if ( !mergedFrom.isNull() ) { mergedFiles << mergedFrom; } @@ -99,20 +99,20 @@ int main( int argc, char**argv ) bool didMergeBookmark = false; - QString extraBookmarksDirName = QFile::decodeName( args->arg( 0 ) ); - QDir extraBookmarksDir( extraBookmarksDirName, "*.xml" ); + TQString extraBookmarksDirName = TQFile::decodeName( args->arg( 0 ) ); + TQDir extraBookmarksDir( extraBookmarksDirName, "*.xml" ); if ( !extraBookmarksDir.isReadable() ) { kdError() << "Failed to read files in directory " << extraBookmarksDirName << endl; return 1; } for ( unsigned int i = 0; i < extraBookmarksDir.count(); ++i ) { - const QString fileName = extraBookmarksDir[ i ]; + const TQString fileName = extraBookmarksDir[ i ]; if ( mergedFiles.find( fileName ) != mergedFiles.end() ) { continue; } - const QString absPath = extraBookmarksDir.filePath( fileName ); + const TQString absPath = extraBookmarksDir.filePath( fileName ); KBookmarkManager *mgr = KBookmarkManager::managerForFile( absPath, false ); KBookmarkGroup root = mgr->root(); for ( KBookmark bm = root.first(); !bm.isNull(); bm = root.next( bm ) ) { diff --git a/konqueror/keditbookmarks/kebsearchline.cpp b/konqueror/keditbookmarks/kebsearchline.cpp index 5d0f07e59..973f737b5 100644 --- a/konqueror/keditbookmarks/kebsearchline.cpp +++ b/konqueror/keditbookmarks/kebsearchline.cpp @@ -19,19 +19,19 @@ #include "kebsearchline.h" #include "kebsearchline.moc" -KEBSearchLine::KEBSearchLine(QWidget *parent, KListView *listView, const char *name) +KEBSearchLine::KEBSearchLine(TQWidget *parent, KListView *listView, const char *name) : KListViewSearchLine(parent, listView, name) { mmode = AND; } -KEBSearchLine::KEBSearchLine(QWidget *parent, const char *name) +KEBSearchLine::KEBSearchLine(TQWidget *parent, const char *name) :KListViewSearchLine(parent, name) { mmode = AND; } -void KEBSearchLine::updateSearch(const QString &s) +void KEBSearchLine::updateSearch(const TQString &s) { KListViewSearchLine::updateSearch(s); emit searchUpdated(); @@ -41,19 +41,19 @@ KEBSearchLine::~KEBSearchLine() { } -bool KEBSearchLine::itemMatches(const QListViewItem *item, const QString &s) const +bool KEBSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const { if(mmode == EXACTLY) return KListViewSearchLine::itemMatches(item, s); if(lastpattern != s) { - splitted = QStringList::split(QChar(' '), s); + splitted = TQStringList::split(TQChar(' '), s); lastpattern = s; } - QStringList::const_iterator it = splitted.begin(); - QStringList::const_iterator end = splitted.end(); + TQStringList::const_iterator it = splitted.begin(); + TQStringList::const_iterator end = splitted.end(); if(mmode == OR) { diff --git a/konqueror/keditbookmarks/kebsearchline.h b/konqueror/keditbookmarks/kebsearchline.h index 43248177e..cfaee61c5 100644 --- a/konqueror/keditbookmarks/kebsearchline.h +++ b/konqueror/keditbookmarks/kebsearchline.h @@ -20,33 +20,33 @@ #define __kebsearchline_h #include -#include +#include class KEBSearchLine : public KListViewSearchLine { Q_OBJECT public: - KEBSearchLine(QWidget *parent = 0, KListView *listView = 0, const char *name = 0); + KEBSearchLine(TQWidget *parent = 0, KListView *listView = 0, const char *name = 0); - KEBSearchLine(QWidget *parent, const char *name); + KEBSearchLine(TQWidget *parent, const char *name); virtual ~KEBSearchLine(); enum modes { EXACTLY, AND, OR } mmode; modes mode(); void setMode(modes m); - virtual void updateSearch(const QString &s = QString::null); + virtual void updateSearch(const TQString &s = TQString::null); signals: void searchUpdated(); protected: - virtual bool itemMatches(const QListViewItem *item, const QString &s) const; + virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const; private: - mutable QString lastpattern; // what was cached - mutable QStringList splitted; // cache of the splitted string + mutable TQString lastpattern; // what was cached + mutable TQStringList splitted; // cache of the splitted string }; #endif diff --git a/konqueror/keditbookmarks/listview.cpp b/konqueror/keditbookmarks/listview.cpp index 25f72afb2..1fa31e967 100644 --- a/konqueror/keditbookmarks/listview.cpp +++ b/konqueror/keditbookmarks/listview.cpp @@ -29,10 +29,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -60,8 +60,8 @@ ListView* ListView::s_self = 0; int ListView::s_myrenamecolumn = -1; KEBListViewItem *ListView::s_myrenameitem = 0; -QStringList ListView::s_selected_addresses; -QString ListView::s_current_address; +TQStringList ListView::s_selected_addresses; +TQString ListView::s_current_address; ListView::ListView() : m_needToFixUp(false) @@ -72,10 +72,10 @@ ListView::~ListView() { self()->m_listView->saveColumnSetting(); } -void ListView::createListViews(QSplitter *splitter) { +void ListView::createListViews(TQSplitter *splitter) { s_self = new ListView(); self()->m_listView = new KEBListView(splitter, false); - splitter->setSizes(QValueList() << 100 << 300); + splitter->setSizes(TQValueList() << 100 << 300); } void ListView::initListViews() { @@ -90,12 +90,12 @@ void ListView::connectSignals() { m_listView->makeConnections(); } -bool lessAddress(QString a, QString b) +bool lessAddress(TQString a, TQString b) { if(a == b) return false; - QString error("ERROR"); + TQString error("ERROR"); if(a == error) return false; if(b == error) @@ -144,11 +144,11 @@ bool operator<(const KBookmark & first, const KBookmark & second) //FIXME Using -QValueList ListView::itemsToBookmarks(const QValueVector & items) const +TQValueList ListView::itemsToBookmarks(const TQValueVector & items) const { - QValueList bookmarks; //TODO optimize by using a QValueVector - QValueVector::const_iterator it = items.constBegin(); - QValueVector::const_iterator end = items.constEnd(); + TQValueList bookmarks; //TODO optimize by using a QValueVector + TQValueVector::const_iterator it = items.constBegin(); + TQValueVector::const_iterator end = items.constEnd(); for( ; it!=end; ++it) { if(*it != m_listView->rootItem() ) @@ -158,12 +158,12 @@ QValueList ListView::itemsToBookmarks(const QValueVectorisSelected()) { @@ -178,7 +178,7 @@ void ListView::invalidate(QListViewItem * item) m_needToFixUp = true; } - QListViewItem * child = item->firstChild(); + TQListViewItem * child = item->firstChild(); while(child) { //invalidate(child); @@ -186,17 +186,17 @@ void ListView::invalidate(QListViewItem * item) } } -void ListView::fixUpCurrent(const QString & address) +void ListView::fixUpCurrent(const TQString & address) { if(!m_needToFixUp) return; m_needToFixUp = false; - QListViewItem * item; + TQListViewItem * item; if(mSelectedItems.count() != 0) { - QString least = mSelectedItems.begin().key()->bookmark().address(); - QMap::iterator it, end; + TQString least = mSelectedItems.begin().key()->bookmark().address(); + TQMap::iterator it, end; end = mSelectedItems.end(); for(it = mSelectedItems.begin(); it != end; ++it) if( lessAddress(it.key()->bookmark().address(), least)) @@ -213,7 +213,7 @@ void ListView::fixUpCurrent(const QString & address) void ListView::selected(KEBListViewItem * item, bool s) { Q_ASSERT(item->bookmark().hasParent() || item == m_listView->rootItem()); - QMap::iterator it; + TQMap::iterator it; if(s) mSelectedItems[item] = item; @@ -223,7 +223,7 @@ void ListView::selected(KEBListViewItem * item, bool s) KEBApp::self()->updateActions(); - const QValueVector & selected = selectedItemsMap(); + const TQValueVector & selected = selectedItemsMap(); if (selected.count() != 1) { KEBApp::self()->bkInfo()->showBookmark(KBookmark()); @@ -231,8 +231,8 @@ void ListView::selected(KEBListViewItem * item, bool s) } //FIXME do it once somewhere if (!KEBApp::self()->bkInfo()->connected()) { - connect(KEBApp::self()->bkInfo(), SIGNAL( updateListViewItem() ), - SLOT( slotBkInfoUpdateListViewItem() )); + connect(KEBApp::self()->bkInfo(), TQT_SIGNAL( updateListViewItem() ), + TQT_SLOT( slotBkInfoUpdateListViewItem() )); KEBApp::self()->bkInfo()->setConnected(true); } @@ -240,10 +240,10 @@ void ListView::selected(KEBListViewItem * item, bool s) firstSelected()->modUpdate(); } -QValueVector ListView::selectedItemsMap() const +TQValueVector ListView::selectedItemsMap() const { - QValueVector selected; - QMap::ConstIterator it, end; + TQValueVector selected; + TQMap::ConstIterator it, end; end = mSelectedItems.constEnd(); for(it = mSelectedItems.constBegin(); it != end; ++it) { @@ -258,7 +258,7 @@ KEBListViewItem * ListView::firstSelected() const if(mSelectedItems.isEmpty()) return 0L; - QValueVector selected = selectedItemsMap(); + TQValueVector selected = selectedItemsMap(); if(selected.isEmpty()) return 0L; else @@ -282,11 +282,11 @@ void ListView::deselectAllChildren(KEBListViewItem *item) } } -QValueList ListView::selectedAddresses() +TQValueList ListView::selectedAddresses() { - QValueList addresses; - QValueList bookmarks = itemsToBookmarks( selectedItemsMap() ); - QValueList::const_iterator it, end; + TQValueList addresses; + TQValueList bookmarks = itemsToBookmarks( selectedItemsMap() ); + TQValueList::const_iterator it, end; end = bookmarks.end(); for( it = bookmarks.begin(); it != end; ++it) addresses.append( (*it).address() ); @@ -294,9 +294,9 @@ QValueList ListView::selectedAddresses() } -QValueList ListView::selectedBookmarksExpanded() const { - QValueList bookmarks; - for (QListViewItemIterator it(m_listView); it.current() != 0; ++it) { +TQValueList ListView::selectedBookmarksExpanded() const { + TQValueList bookmarks; + for (TQListViewItemIterator it(m_listView); it.current() != 0; ++it) { if (!it.current()->isSelected()) continue; if(it.current() == m_listView->firstChild()) // root case @@ -312,7 +312,7 @@ QValueList ListView::selectedBookmarksExpanded() const { } -void ListView::selectedBookmarksExpandedHelper(KEBListViewItem * item, QValueList & bookmarks) const +void ListView::selectedBookmarksExpandedHelper(KEBListViewItem * item, TQValueList & bookmarks) const { KEBListViewItem* child = static_cast(item->firstChild()); while( child ) @@ -328,9 +328,9 @@ void ListView::selectedBookmarksExpandedHelper(KEBListViewItem * item, QValueLis } } -QValueList ListView::allBookmarks() const { - QValueList bookmarks; - for (QListViewItemIterator it(m_listView); it.current() != 0; ++it) +TQValueList ListView::allBookmarks() const { + TQValueList bookmarks; + for (TQListViewItemIterator it(m_listView); it.current() != 0; ++it) { KEBListViewItem * item = static_cast(it.current()); if (!item->isEmptyFolderPadder() && (item->childCount() == 0)) @@ -341,7 +341,7 @@ QValueList ListView::allBookmarks() const { // DESIGN - make + "/0" a kbookmark:: thing? -QString ListView::userAddress() const +TQString ListView::userAddress() const { KBookmark current = firstSelected()->bookmark(); return (current.isGroup()) @@ -358,13 +358,13 @@ void ListView::setCurrent(KEBListViewItem *item, bool select) { } } -KEBListViewItem* ListView::getItemAtAddress(const QString &address) const { +KEBListViewItem* ListView::getItemAtAddress(const TQString &address) const { //FIXME uses internal represantation of bookmark address - QListViewItem *item = m_listView->rootItem(); + TQListViewItem *item = m_listView->rootItem(); - QStringList addresses = QStringList::split('/',address); // e.g /5/10/2 + TQStringList addresses = TQStringList::split('/',address); // e.g /5/10/2 - for (QStringList::Iterator it = addresses.begin(); it != addresses.end(); ++it) { + for (TQStringList::Iterator it = addresses.begin(); it != addresses.end(); ++it) { if (item = item->firstChild(), !item) return 0; for (unsigned int i = 0; i < (*it).toUInt(); ++i) @@ -375,7 +375,7 @@ KEBListViewItem* ListView::getItemAtAddress(const QString &address) const { } void ListView::setOpen(bool open) { - for (QListViewItemIterator it(m_listView); it.current() != 0; ++it) + for (TQListViewItemIterator it(m_listView); it.current() != 0; ++it) if (it.current()->parent()) it.current()->setOpen(open); } @@ -385,7 +385,7 @@ SelcAbilities ListView::getSelectionAbilities() const { if (mSelectedItems.count() > 0) { - QValueVector selected = selectedItemsMap(); + TQValueVector selected = selectedItemsMap(); if(!selected.isEmpty()) { //Optimize @@ -406,7 +406,7 @@ SelcAbilities ListView::getSelectionAbilities() const { return sa; } -void ListView::handleDropped(KEBListView *, QDropEvent *e, QListViewItem *newParent, QListViewItem *itemAfterQLVI) { +void ListView::handleDropped(KEBListView *, TQDropEvent *e, TQListViewItem *newParent, TQListViewItem *itemAfterQLVI) { bool inApp = (e->source() == m_listView->viewport()); // drop before root item @@ -415,7 +415,7 @@ void ListView::handleDropped(KEBListView *, QDropEvent *e, QListViewItem *newPar KEBListViewItem *itemAfter = static_cast(itemAfterQLVI); - QString newAddress + TQString newAddress = (!itemAfter || itemAfter->isEmptyFolderPadder()) ? (static_cast(newParent)->bookmark().address() + "/0") : (KBookmark::nextAddress(itemAfter->bookmark().address())); @@ -426,17 +426,17 @@ void ListView::handleDropped(KEBListView *, QDropEvent *e, QListViewItem *newPar mcmd = CmdGen::insertMimeSource(i18n("Drop Items"), e, newAddress); } else { - const QValueVector & selected = selectedItemsMap(); + const TQValueVector & selected = selectedItemsMap(); if (!(selected.count() > 0) || (*(selected.constBegin()) == itemAfterQLVI)) return; - bool copy = (e->action() == QDropEvent::Copy); + bool copy = (e->action() == TQDropEvent::Copy); mcmd = CmdGen::itemsMoved(selected, newAddress, copy); } CmdHistory::self()->didCommand(mcmd); } -void ListView::updateStatus(QString url) { +void ListView::updateStatus(TQString url) { m_listView->updateByURL(url); } @@ -447,7 +447,7 @@ void ListView::updateListView() //Save selected items (restored in fillWithGroup) s_selected_addresses.clear(); - QMap::const_iterator it, end; + TQMap::const_iterator it, end; it = mSelectedItems.begin(); end = mSelectedItems.end(); for ( ; it != end; ++it) @@ -461,7 +461,7 @@ void ListView::updateListView() s_current_address = item->bookmark().address(); } else - s_current_address = QString::null; + s_current_address = TQString::null; updateTree(); m_searchline->updateSearch(); @@ -482,7 +482,7 @@ void ListView::fillWithGroup(KEBListView *lv, KBookmarkGroup group, KEBListViewI lv->clear(); KEBListViewItem *tree = new KEBListViewItem(lv, group); fillWithGroup(lv, group, tree); - tree->QListViewItem::setOpen(true); + tree->TQListViewItem::setOpen(true); if (s_selected_addresses.contains(tree->bookmark().address())) lv->setSelected(tree, true); if(!s_current_address.isNull() && s_current_address == tree->bookmark().address()) @@ -498,7 +498,7 @@ void ListView::fillWithGroup(KEBListView *lv, KBookmarkGroup group, KEBListViewI : new KEBListViewItem(lv, lastItem, grp); fillWithGroup(lv, grp, item); if (grp.isOpen()) - item->QListViewItem::setOpen(true); + item->TQListViewItem::setOpen(true); if (grp.first().isNull()) new KEBListViewItem(item, item); // empty folder lastItem = item; @@ -542,27 +542,27 @@ void ListView::slotBkInfoUpdateListViewItem() { KBookmark bk = i->bookmark(); i->setText(KEBListView::NameColumn, bk.fullText()); i->setText(KEBListView::UrlColumn, bk.url().pathOrURL()); - QString commentStr = NodeEditCommand::getNodeText(bk, QStringList() << "desc"); + TQString commentStr = NodeEditCommand::getNodeText(bk, TQStringList() << "desc"); i->setText(KEBListView::CommentColumn, commentStr); } -void ListView::handleContextMenu(KEBListView *, KListView *, QListViewItem *qitem, const QPoint &p) { +void ListView::handleContextMenu(KEBListView *, KListView *, TQListViewItem *qitem, const TQPoint &p) { KEBListViewItem *item = static_cast(qitem); const char *type = ( !item || (item == m_listView->rootItem()) || (item->bookmark().isGroup()) || (item->isEmptyFolderPadder())) ? "popup_folder" : "popup_bookmark"; - QWidget* popup = KEBApp::self()->popupMenuFactory(type); + TQWidget* popup = KEBApp::self()->popupMenuFactory(type); if (popup) - static_cast(popup)->popup(p); + static_cast(popup)->popup(p); } -void ListView::handleDoubleClicked(KEBListView *lv, QListViewItem *item, const QPoint &, int column) { +void ListView::handleDoubleClicked(KEBListView *lv, TQListViewItem *item, const TQPoint &, int column) { lv->rename(item, column); } -void ListView::handleItemRenamed(KEBListView *lv, QListViewItem *item, const QString &newText, int column) { +void ListView::handleItemRenamed(KEBListView *lv, TQListViewItem *item, const TQString &newText, int column) { Q_ASSERT(item); KBookmark bk = static_cast(item)->bookmark(); KCommand *cmd = 0; @@ -634,20 +634,20 @@ void ListView::renameNextCell(bool fwd) { /* -------------------------------------- */ -class KeyPressEater : public QObject { +class KeyPressEater : public TQObject { public: - KeyPressEater( QWidget *parent = 0, const char *name = 0 ) - : QObject(parent, name) { + KeyPressEater( TQWidget *parent = 0, const char *name = 0 ) + : TQObject(parent, name) { m_allowedToTab = true; } protected: - bool eventFilter(QObject *, QEvent *); + bool eventFilter(TQObject *, TQEvent *); bool m_allowedToTab; }; -bool KeyPressEater::eventFilter(QObject *, QEvent *pe) { - if (pe->type() == QEvent::KeyPress) { - QKeyEvent *k = (QKeyEvent *) pe; +bool KeyPressEater::eventFilter(TQObject *, TQEvent *pe) { + if (pe->type() == TQEvent::KeyPress) { + TQKeyEvent *k = (TQKeyEvent *) pe; if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) && !(k->state() & ControlButton || k->state() & AltButton) ) { @@ -718,21 +718,21 @@ void KEBListView::init() { setDragEnabled(true); setSelectionModeExt((!m_folderList) ? KListView::Extended: KListView::Single); setAllColumnsShowFocus(true); - connect(header(), SIGNAL(sizeChange(int, int, int)), - this, SLOT(slotColumnSizeChanged(int, int, int))); + connect(header(), TQT_SIGNAL(sizeChange(int, int, int)), + this, TQT_SLOT(slotColumnSizeChanged(int, int, int))); } void KEBListView::makeConnections() { - connect(this, SIGNAL( moved() ), - SLOT( slotMoved() )); - connect(this, SIGNAL( contextMenu(KListView *, QListViewItem*, const QPoint &) ), - SLOT( slotContextMenu(KListView *, QListViewItem *, const QPoint &) )); - connect(this, SIGNAL( itemRenamed(QListViewItem *, const QString &, int) ), - SLOT( slotItemRenamed(QListViewItem *, const QString &, int) )); - connect(this, SIGNAL( doubleClicked(QListViewItem *, const QPoint &, int) ), - SLOT( slotDoubleClicked(QListViewItem *, const QPoint &, int) )); - connect(this, SIGNAL( dropped(QDropEvent*, QListViewItem*, QListViewItem*) ), - SLOT( slotDropped(QDropEvent*, QListViewItem*, QListViewItem*) )); + connect(this, TQT_SIGNAL( moved() ), + TQT_SLOT( slotMoved() )); + connect(this, TQT_SIGNAL( contextMenu(KListView *, TQListViewItem*, const TQPoint &) ), + TQT_SLOT( slotContextMenu(KListView *, TQListViewItem *, const TQPoint &) )); + connect(this, TQT_SIGNAL( itemRenamed(TQListViewItem *, const TQString &, int) ), + TQT_SLOT( slotItemRenamed(TQListViewItem *, const TQString &, int) )); + connect(this, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint &, int) ), + TQT_SLOT( slotDoubleClicked(TQListViewItem *, const TQPoint &, int) )); + connect(this, TQT_SIGNAL( dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*) ), + TQT_SLOT( slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*) )); } void KEBListView::readonlyFlagInit(bool readonly) { @@ -744,16 +744,16 @@ void KEBListView::readonlyFlagInit(bool readonly) { void KEBListView::slotMoved() { ListView::self()->handleMoved(this); } -void KEBListView::slotContextMenu(KListView *a, QListViewItem *b, const QPoint &c) +void KEBListView::slotContextMenu(KListView *a, TQListViewItem *b, const TQPoint &c) { ListView::self()->handleContextMenu(this, a,b,c); } -void KEBListView::slotItemRenamed(QListViewItem *a, const QString &b, int c) +void KEBListView::slotItemRenamed(TQListViewItem *a, const TQString &b, int c) { ListView::self()->handleItemRenamed(this, a,b,c); } -void KEBListView::slotDoubleClicked(QListViewItem *a, const QPoint &b, int c) +void KEBListView::slotDoubleClicked(TQListViewItem *a, const TQPoint &b, int c) { ListView::self()->handleDoubleClicked(this, a,b,c); } -void KEBListView::slotDropped(QDropEvent *a, QListViewItem *b, QListViewItem *c) +void KEBListView::slotDropped(TQDropEvent *a, TQListViewItem *b, TQListViewItem *c) { ListView::self()->handleDropped(this, a,b,c); } -void KEBListView::rename(QListViewItem *qitem, int column) { +void KEBListView::rename(TQListViewItem *qitem, int column) { KEBListViewItem *item = static_cast(qitem); if ( !(column == NameColumn || column == UrlColumn || column == CommentColumn) || KEBApp::self()->readonly() @@ -776,8 +776,8 @@ KEBListViewItem* KEBListView::rootItem() const { } // Update display of bookmarks containing URL -void KEBListView::updateByURL(QString url) { - for (QListViewItemIterator it(this); it.current(); it++) { +void KEBListView::updateByURL(TQString url) { + for (TQListViewItemIterator it(this); it.current(); it++) { KEBListViewItem *p = static_cast(it.current()); if (p->text(1) == url) { p->modUpdate(); @@ -785,26 +785,26 @@ void KEBListView::updateByURL(QString url) { } } -bool KEBListView::acceptDrag(QDropEvent * e) const { +bool KEBListView::acceptDrag(TQDropEvent * e) const { return (e->source() == viewport() || KBookmarkDrag::canDecode(e)); } -QDragObject *KEBListView::dragObject() { - QValueList bookmarks = +TQDragObject *KEBListView::dragObject() { + TQValueList bookmarks = ListView::self()->itemsToBookmarks(ListView::self()->selectedItemsMap()); KBookmarkDrag *drag = KBookmarkDrag::newDrag(bookmarks, viewport()); - const QString iconname = - (bookmarks.size() == 1) ? bookmarks.first().icon() : QString("bookmark"); + const TQString iconname = + (bookmarks.size() == 1) ? bookmarks.first().icon() : TQString("bookmark"); drag->setPixmap(SmallIcon(iconname)) ; return drag; } /* -------------------------------------- */ -bool KEBListViewItem::parentSelected(QListViewItem * item) +bool KEBListViewItem::parentSelected(TQListViewItem * item) { - QListViewItem *root = item->listView()->firstChild(); - for( QListViewItem *parent = item->parent(); parent ; parent = parent->parent()) + TQListViewItem *root = item->listView()->firstChild(); + for( TQListViewItem *parent = item->parent(); parent ; parent = parent->parent()) if (parent->isSelected() && parent != root) return true; return false; @@ -821,14 +821,14 @@ void KEBListViewItem::setSelected(bool s) if(listView()->firstChild() == this) { ListView::self()->selected(this, s); - QListViewItem::setSelected( s ); + TQListViewItem::setSelected( s ); return; } if(s == false) { ListView::self()->selected(this, false); - QListViewItem::setSelected( false ); + TQListViewItem::setSelected( false ); ListView::deselectAllChildren( this ); //repaints } else if(parentSelected(this)) @@ -836,7 +836,7 @@ void KEBListViewItem::setSelected(bool s) else { ListView::self()->selected(this, true); - QListViewItem::setSelected( true ); + TQListViewItem::setSelected( true ); ListView::deselectAllChildren(this); } } @@ -847,7 +847,7 @@ void KEBListViewItem::normalConstruct(const KBookmark &bk) { #endif setText(KEBListView::CommentColumn, NodeEditCommand::getNodeText(bk, "desc")); bool shown = CmdGen::shownInToolbar(bk); - setPixmap(0, SmallIcon(shown ? QString("bookmark_toolbar") : bk.icon())); + setPixmap(0, SmallIcon(shown ? TQString("bookmark_toolbar") : bk.icon())); // DESIGN - modUpdate badly needs a redesign modUpdate(); } @@ -855,8 +855,8 @@ void KEBListViewItem::normalConstruct(const KBookmark &bk) { // DESIGN - following constructors should be names classes or else just explicit // toplevel item (there should be only one!) -KEBListViewItem::KEBListViewItem(QListView *parent, const KBookmarkGroup &gp) - : QListViewItem(parent, KEBApp::self()->caption().isNull() +KEBListViewItem::KEBListViewItem(TQListView *parent, const KBookmarkGroup &gp) + : TQListViewItem(parent, KEBApp::self()->caption().isNull() ? i18n("Bookmarks") : i18n("%1 Bookmarks").arg(KEBApp::self()->caption())), m_bookmark(gp), m_emptyFolderPadder(false) { @@ -866,39 +866,39 @@ KEBListViewItem::KEBListViewItem(QListView *parent, const KBookmarkGroup &gp) } // empty folder item -KEBListViewItem::KEBListViewItem(KEBListViewItem *parent, QListViewItem *after) - : QListViewItem(parent, after, i18n("Empty Folder") ), m_emptyFolderPadder(true) { +KEBListViewItem::KEBListViewItem(KEBListViewItem *parent, TQListViewItem *after) + : TQListViewItem(parent, after, i18n("Empty Folder") ), m_emptyFolderPadder(true) { setPixmap(0, SmallIcon("bookmark")); } // group -KEBListViewItem::KEBListViewItem(KEBListViewItem *parent, QListViewItem *after, const KBookmarkGroup &gp) - : QListViewItem(parent, after, gp.fullText()), m_bookmark(gp), m_emptyFolderPadder(false) { +KEBListViewItem::KEBListViewItem(KEBListViewItem *parent, TQListViewItem *after, const KBookmarkGroup &gp) + : TQListViewItem(parent, after, gp.fullText()), m_bookmark(gp), m_emptyFolderPadder(false) { setExpandable(true); normalConstruct(gp); } // bookmark (first of its group) KEBListViewItem::KEBListViewItem(KEBListViewItem *parent, const KBookmark & bk) - : QListViewItem(parent, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { + : TQListViewItem(parent, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { normalConstruct(bk); } // bookmark (after another) -KEBListViewItem::KEBListViewItem(KEBListViewItem *parent, QListViewItem *after, const KBookmark &bk) - : QListViewItem(parent, after, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { +KEBListViewItem::KEBListViewItem(KEBListViewItem *parent, TQListViewItem *after, const KBookmark &bk) + : TQListViewItem(parent, after, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { normalConstruct(bk); } // root bookmark (first of its group) -KEBListViewItem::KEBListViewItem(QListView *parent, const KBookmark & bk) - : QListViewItem(parent, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { +KEBListViewItem::KEBListViewItem(TQListView *parent, const KBookmark & bk) + : TQListViewItem(parent, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { normalConstruct(bk); } // root bookmark (after another) -KEBListViewItem::KEBListViewItem(QListView *parent, QListViewItem *after, const KBookmark &bk) - : QListViewItem(parent, after, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { +KEBListViewItem::KEBListViewItem(TQListView *parent, TQListViewItem *after, const KBookmark &bk) + : TQListViewItem(parent, after, bk.fullText(), bk.url().pathOrURL()), m_bookmark(bk), m_emptyFolderPadder(false) { normalConstruct(bk); } @@ -907,24 +907,24 @@ void KEBListViewItem::setOpen(bool open) { if (!parent()) return; m_bookmark.internalElement().setAttribute("folded", open ? "no" : "yes"); - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); } -void KEBListViewItem::greyStyle(QColorGroup &cg) { +void KEBListViewItem::greyStyle(TQColorGroup &cg) { int h, s, v; cg.background().hsv(&h, &s, &v); - QColor color = (v > 180 && v < 220) ? (Qt::darkGray) : (Qt::gray); - cg.setColor(QColorGroup::Text, color); + TQColor color = (v > 180 && v < 220) ? (Qt::darkGray) : (Qt::gray); + cg.setColor(TQColorGroup::Text, color); } -void KEBListViewItem::boldStyle(QPainter *p) { - QFont font = p->font(); +void KEBListViewItem::boldStyle(TQPainter *p) { + TQFont font = p->font(); font.setBold(true); p->setFont(font); } -void KEBListViewItem::paintCell(QPainter *p, const QColorGroup &ocg, int col, int w, int a) { - QColorGroup cg(ocg); +void KEBListViewItem::paintCell(TQPainter *p, const TQColorGroup &ocg, int col, int w, int a) { + TQColorGroup cg(ocg); if (parentSelected(this)) { int base_h, base_s, base_v; cg.background().hsv(&base_h, &base_s, &base_v); @@ -932,11 +932,11 @@ void KEBListViewItem::paintCell(QPainter *p, const QColorGroup &ocg, int col, in int hilite_h, hilite_s, hilite_v; cg.highlight().hsv(&hilite_h, &hilite_s, &hilite_v); - QColor col(hilite_h, + TQColor col(hilite_h, (hilite_s + base_s + base_s ) / 3, (hilite_v + base_v + base_v ) / 3, - QColor::Hsv); - cg.setColor(QColorGroup::Base, col); + TQColor::Hsv); + cg.setColor(TQColorGroup::Base, col); } if (col == KEBListView::StatusColumn) { @@ -962,7 +962,7 @@ void KEBListViewItem::paintCell(QPainter *p, const QColorGroup &ocg, int col, in } } - QListViewItem::paintCell(p, cg, col, w,a); + TQListViewItem::paintCell(p, cg, col, w,a); } #include "listview.moc" diff --git a/konqueror/keditbookmarks/listview.h b/konqueror/keditbookmarks/listview.h index 7741f5858..e2938de80 100644 --- a/konqueror/keditbookmarks/listview.h +++ b/konqueror/keditbookmarks/listview.h @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -39,24 +39,24 @@ class KListViewSearchLine; class KEBListViewItem : public QListViewItem { public: - KEBListViewItem(QListView *, const KBookmarkGroup &); - KEBListViewItem(KEBListViewItem *, QListViewItem *); - KEBListViewItem(KEBListViewItem *, QListViewItem *, const KBookmarkGroup &); + KEBListViewItem(TQListView *, const KBookmarkGroup &); + KEBListViewItem(KEBListViewItem *, TQListViewItem *); + KEBListViewItem(KEBListViewItem *, TQListViewItem *, const KBookmarkGroup &); KEBListViewItem(KEBListViewItem *, const KBookmark &); - KEBListViewItem(KEBListViewItem *, QListViewItem *, const KBookmark &); + KEBListViewItem(KEBListViewItem *, TQListViewItem *, const KBookmark &); - KEBListViewItem(QListView *, const KBookmark &); - KEBListViewItem(QListView *, QListViewItem *, const KBookmark &); + KEBListViewItem(TQListView *, const KBookmark &); + KEBListViewItem(TQListView *, TQListViewItem *, const KBookmark &); - void nsPut(const QString &nm); + void nsPut(const TQString &nm); void modUpdate(); - void setOldStatus(const QString &); - void setTmpStatus(const QString &); + void setOldStatus(const TQString &); + void setTmpStatus(const TQString &); void restoreStatus(); - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment); void setSelected ( bool s ); virtual void setOpen(bool); @@ -66,18 +66,18 @@ public: typedef enum { GreyStyle, BoldStyle, GreyBoldStyle, DefaultStyle } PaintStyle; - static bool parentSelected(QListViewItem * item); + static bool parentSelected(TQListViewItem * item); private: - const QString nsGet() const; + const TQString nsGet() const; void normalConstruct(const KBookmark &); KBookmark m_bookmark; PaintStyle m_paintStyle; bool m_emptyFolderPadder; - QString m_oldStatus; - void greyStyle(QColorGroup &); - void boldStyle(QPainter *); + TQString m_oldStatus; + void greyStyle(TQColorGroup &); + void boldStyle(TQPainter *); }; class KEBListView : public KListView @@ -91,7 +91,7 @@ public: StatusColumn = 3, AddressColumn = 4 }; - KEBListView(QWidget *parent, bool folderList) + KEBListView(TQWidget *parent, bool folderList) : KListView(parent), m_folderList(folderList) {} virtual ~KEBListView() {} @@ -102,24 +102,24 @@ public: void loadColumnSetting(); void saveColumnSetting(); - void updateByURL(QString url); + void updateByURL(TQString url); bool isFolderList() const { return m_folderList; } KEBListViewItem* rootItem() const; public slots: - virtual void rename(QListViewItem *item, int c); + virtual void rename(TQListViewItem *item, int c); void slotMoved(); - void slotContextMenu(KListView *, QListViewItem *, const QPoint &); - void slotItemRenamed(QListViewItem *, const QString &, int); - void slotDoubleClicked(QListViewItem *, const QPoint &, int); - void slotDropped(QDropEvent*, QListViewItem*, QListViewItem*); + void slotContextMenu(KListView *, TQListViewItem *, const TQPoint &); + void slotItemRenamed(TQListViewItem *, const TQString &, int); + void slotDoubleClicked(TQListViewItem *, const TQPoint &, int); + void slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*); void slotColumnSizeChanged(int, int, int); protected: - virtual bool acceptDrag(QDropEvent *e) const; - virtual QDragObject* dragObject(); + virtual bool acceptDrag(TQDropEvent *e) const; + virtual TQDragObject* dragObject(); private: bool m_folderList; @@ -140,25 +140,25 @@ public: // selected item stuff void selected(KEBListViewItem * item, bool s); - void invalidate(const QString & address); - void invalidate(QListViewItem * item); - void fixUpCurrent(const QString & address); + void invalidate(const TQString & address); + void invalidate(TQListViewItem * item); + void fixUpCurrent(const TQString & address); KEBListViewItem * firstSelected() const; - QValueVector selectedItemsMap() const; + TQValueVector selectedItemsMap() const; - QValueList selectedAddresses(); + TQValueList selectedAddresses(); // bookmark helpers - QValueList itemsToBookmarks(const QValueVector & items) const; + TQValueList itemsToBookmarks(const TQValueVector & items) const; // bookmark stuff - QValueList allBookmarks() const; - QValueList selectedBookmarksExpanded() const; + TQValueList allBookmarks() const; + TQValueList selectedBookmarksExpanded() const; // address stuff - KEBListViewItem* getItemAtAddress(const QString &address) const; - QString userAddress() const; + KEBListViewItem* getItemAtAddress(const TQString &address) const; + TQString userAddress() const; // gui stuff - DESIGN - all of it??? SelcAbilities getSelectionAbilities() const; @@ -168,20 +168,20 @@ public: void setCurrent(KEBListViewItem *item, bool select); void renameNextCell(bool dir); - QWidget *widget() const { return m_listView; } + TQWidget *widget() const { return m_listView; } void rename(int); void clearSelection(); - void updateStatus(QString url); + void updateStatus(TQString url); static ListView* self() { return s_self; } - static void createListViews(QSplitter *parent); + static void createListViews(TQSplitter *parent); void handleMoved(KEBListView *); - void handleDropped(KEBListView *, QDropEvent *, QListViewItem *, QListViewItem *); - void handleContextMenu(KEBListView *, KListView *, QListViewItem *, const QPoint &); - void handleDoubleClicked(KEBListView *, QListViewItem *, const QPoint &, int); - void handleItemRenamed(KEBListView *, QListViewItem *, const QString &, int); + void handleDropped(KEBListView *, TQDropEvent *, TQListViewItem *, TQListViewItem *); + void handleContextMenu(KEBListView *, KListView *, TQListViewItem *, const TQPoint &); + void handleDoubleClicked(KEBListView *, TQListViewItem *, const TQPoint &, int); + void handleItemRenamed(KEBListView *, TQListViewItem *, const TQString &, int); static void startRename(int column, KEBListViewItem *item); @@ -194,7 +194,7 @@ public slots: private: void updateTree(); - void selectedBookmarksExpandedHelper(KEBListViewItem * item, QValueList & bookmarks) const; + void selectedBookmarksExpandedHelper(KEBListViewItem * item, TQValueList & bookmarks) const; void fillWithGroup(KEBListView *, KBookmarkGroup, KEBListViewItem * = 0); ListView(); @@ -203,15 +203,15 @@ private: KListViewSearchLine * m_searchline; // Actually this is a std:set, the bool is ignored - QMap mSelectedItems; + TQMap mSelectedItems; bool m_needToFixUp; // statics static ListView *s_self; static int s_myrenamecolumn; static KEBListViewItem *s_myrenameitem; - static QStringList s_selected_addresses; - static QString s_current_address; + static TQStringList s_selected_addresses; + static TQString s_current_address; }; #endif diff --git a/konqueror/keditbookmarks/main.cpp b/konqueror/keditbookmarks/main.cpp index 755a6f703..3416e7e0d 100644 --- a/konqueror/keditbookmarks/main.cpp +++ b/konqueror/keditbookmarks/main.cpp @@ -59,13 +59,13 @@ static KCmdLineOptions options[] = { KCmdLineLastOption }; -static void continueInWindow(QString _wname) { - QCString wname = _wname.latin1(); +static void continueInWindow(TQString _wname) { + TQCString wname = _wname.latin1(); int id = -1; QCStringList apps = kapp->dcopClient()->registeredApplications(); for (QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it) { - QCString &clientId = *it; + TQCString &clientId = *it; if (qstrncmp(clientId, wname, wname.length()) != 0) continue; @@ -83,8 +83,8 @@ static void continueInWindow(QString _wname) { } // TODO - make this register() or something like that and move dialog into main -static int askUser(KApplication &app, QString filename, bool &readonly) { - QCString requestedName("keditbookmarks"); +static int askUser(KApplication &app, TQString filename, bool &readonly) { + TQCString requestedName("keditbookmarks"); if (!filename.isEmpty()) requestedName += "-" + filename.utf8(); @@ -138,9 +138,9 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) { bool gotArg = (args->count() == 1); - QString filename = gotArg - ? QString::fromLatin1(args->arg(0)) - : locateLocal("data", QString::fromLatin1("konqueror/bookmarks.xml")); + TQString filename = gotArg + ? TQString::fromLatin1(args->arg(0)) + : locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml")); if (!isGui) { CurrentMgr::self()->createManager(filename); @@ -161,12 +161,12 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) { // TODO - maybe an xbel export??? if (got > 1) // got == 0 isn't possible as !isGui is dependant on "export.*" KCmdLineArgs::usage(I18N_NOOP("You may only specify a single --export option.")); - QString path = QString::fromLocal8Bit(args->getOption(arg2)); + TQString path = TQString::fromLocal8Bit(args->getOption(arg2)); CurrentMgr::self()->doExport(exportType, path); } else if (importType) { if (got > 1) // got == 0 isn't possible as !isGui is dependant on "import.*" KCmdLineArgs::usage(I18N_NOOP("You may only specify a single --import option.")); - QString path = QString::fromLocal8Bit(args->getOption(arg2)); + TQString path = TQString::fromLocal8Bit(args->getOption(arg2)); ImportCommand *importer = ImportCommand::importerFactory(importType); importer->import(path, true); importer->execute(); @@ -176,19 +176,19 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) { return 0; // error flag on exit?, 1? } - QString address = args->isSet("address") - ? QString::fromLocal8Bit(args->getOption("address")) - : QString("/0"); + TQString address = args->isSet("address") + ? TQString::fromLocal8Bit(args->getOption("address")) + : TQString("/0"); - QString caption = args->isSet("customcaption") - ? QString::fromLocal8Bit(args->getOption("customcaption")) - : QString::null; + TQString caption = args->isSet("customcaption") + ? TQString::fromLocal8Bit(args->getOption("customcaption")) + : TQString::null; args->clear(); bool readonly = false; // passed by ref - if (askUser(app, (gotArg ? filename : QString::null), readonly)) { + if (askUser(app, (gotArg ? filename : TQString::null), readonly)) { KEBApp *toplevel = new KEBApp(filename, readonly, address, browser, caption); toplevel->show(); app.setMainWidget(toplevel); diff --git a/konqueror/keditbookmarks/testlink.cpp b/konqueror/keditbookmarks/testlink.cpp index 84919ef27..0d7d0ddf8 100644 --- a/konqueror/keditbookmarks/testlink.cpp +++ b/konqueror/keditbookmarks/testlink.cpp @@ -25,8 +25,8 @@ #include "commands.h" #include "bookmarkiterator.h" -#include -#include +#include +#include #include @@ -49,11 +49,11 @@ void TestLinkItrHolder::doItrListChanged() { { kdDebug()<<"Notifing managers "<notifyManagers(CurrentMgr::bookmarkAt(m_affectedBookmark).toGroup()); - m_affectedBookmark = QString::null; + m_affectedBookmark = TQString::null; } } -void TestLinkItrHolder::addAffectedBookmark( const QString & address ) +void TestLinkItrHolder::addAffectedBookmark( const TQString & address ) { kdDebug()<<"addAffectedBookmark "< bks) +TestLinkItr::TestLinkItr(TQValueList bks) : BookmarkIterator(bks) { m_job = 0; } @@ -88,28 +88,28 @@ void TestLinkItr::doAction() { m_job = KIO::get(curBk().url(), true, false); m_job->addMetaData("errorPage", "true"); - m_job->addMetaData( QString("cookies"), QString("none") ); + m_job->addMetaData( TQString("cookies"), TQString("none") ); - connect(m_job, SIGNAL( result( KIO::Job *)), - this, SLOT( slotJobResult(KIO::Job *))); - connect(m_job, SIGNAL( data( KIO::Job *, const QByteArray &)), - this, SLOT( slotJobData(KIO::Job *, const QByteArray &))); + connect(m_job, TQT_SIGNAL( result( KIO::Job *)), + this, TQT_SLOT( slotJobResult(KIO::Job *))); + connect(m_job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray &)), + this, TQT_SLOT( slotJobData(KIO::Job *, const TQByteArray &))); curItem()->setTmpStatus(i18n("Checking...")); - QString oldModDate = TestLinkItrHolder::self()->getMod(curBk().url().url()); + TQString oldModDate = TestLinkItrHolder::self()->getMod(curBk().url().url()); curItem()->setOldStatus(oldModDate); TestLinkItrHolder::self()->setMod(curBk().url().url(), i18n("Checking...")); } -void TestLinkItr::slotJobData(KIO::Job *job, const QByteArray &data) { +void TestLinkItr::slotJobData(KIO::Job *job, const TQByteArray &data) { KIO::TransferJob *transfer = (KIO::TransferJob *)job; if (transfer->isErrorPage()) { - QStringList lines = QStringList::split('\n', data); - for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) { + TQStringList lines = TQStringList::split('\n', data); + for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) { int open_pos = (*it).find("", 0, false); if (open_pos >= 0) { - QString leftover = (*it).mid(open_pos + 7); + TQString leftover = (*it).mid(open_pos + 7); int close_pos = leftover.findRev("", -1, false); if (close_pos >= 0) { // if no end tag found then just @@ -123,9 +123,9 @@ void TestLinkItr::slotJobData(KIO::Job *job, const QByteArray &data) { } } else { - QString modDate = transfer->queryMetaData("modified"); + TQString modDate = transfer->queryMetaData("modified"); if (!modDate.isEmpty()) { - curItem()->nsPut(QString::number(KRFCDate::parseDate(modDate))); + curItem()->nsPut(TQString::number(KRFCDate::parseDate(modDate))); } } @@ -137,12 +137,12 @@ void TestLinkItr::slotJobResult(KIO::Job *job) { if ( !curItem() ) return; KIO::TransferJob *transfer = (KIO::TransferJob *)job; - QString modDate = transfer->queryMetaData("modified"); + TQString modDate = transfer->queryMetaData("modified"); bool chkErr = true; if (transfer->error()) { // can we assume that errorString will contain no entities? - QString jerr = job->errorString(); + TQString jerr = job->errorString(); if (!jerr.isEmpty()) { jerr.replace("\n", " "); curItem()->nsPut(jerr); @@ -152,9 +152,9 @@ void TestLinkItr::slotJobResult(KIO::Job *job) { if (chkErr) { if (!modDate.isEmpty()) { - curItem()->nsPut(QString::number(KRFCDate::parseDate(modDate))); + curItem()->nsPut(TQString::number(KRFCDate::parseDate(modDate))); } else if (!m_errSet) { - curItem()->nsPut(QString::number(KRFCDate::parseDate("0"))); + curItem()->nsPut(TQString::number(KRFCDate::parseDate("0"))); } } @@ -165,27 +165,27 @@ void TestLinkItr::slotJobResult(KIO::Job *job) { /* -------------------------- */ -const QString TestLinkItrHolder::getMod(const QString &url) const { +const TQString TestLinkItrHolder::getMod(const TQString &url) const { return m_modify.contains(url) ? m_modify[url] - : QString::null; + : TQString::null; } -const QString TestLinkItrHolder::getOldVisit(const QString &url) const { +const TQString TestLinkItrHolder::getOldVisit(const TQString &url) const { return self()->m_oldModify.contains(url) ? self()->m_oldModify[url] - : QString::null; + : TQString::null; } -void TestLinkItrHolder::setMod(const QString &url, const QString &val) { +void TestLinkItrHolder::setMod(const TQString &url, const TQString &val) { m_modify[url] = val; } -void TestLinkItrHolder::setOldVisit(const QString &url, const QString &val) { +void TestLinkItrHolder::setOldVisit(const TQString &url, const TQString &val) { m_oldModify[url] = val; } -void TestLinkItrHolder::resetToValue(const QString &url, const QString &oldValue) { +void TestLinkItrHolder::resetToValue(const TQString &url, const TQString &oldValue) { if (!oldValue.isEmpty()) { m_modify[url] = oldValue; } else { @@ -195,11 +195,11 @@ void TestLinkItrHolder::resetToValue(const QString &url, const QString &oldValue /* -------------------------- */ -QString TestLinkItrHolder::calcPaintStyle(const QString &url, KEBListViewItem::PaintStyle &_style, - const QString &nVisit, const QString &Modify) { +TQString TestLinkItrHolder::calcPaintStyle(const TQString &url, KEBListViewItem::PaintStyle &_style, + const TQString &nVisit, const TQString &Modify) { bool newModValid = false; int newMod = 0; - QString newModStr; + TQString newModStr; bool initial = false; bool oldError = false; @@ -224,7 +224,7 @@ QString TestLinkItrHolder::calcPaintStyle(const QString &url, KEBListViewItem::P // kdDebug() << "TestLink " << url << " " << "booktime=" << nVisit << " urltime=" << newModStr << // " Modify=" << Modify << " init=" << initial << " newMod=" << newMod << "\n"; - QString visitStr; + TQString visitStr; if (self()->getOldVisit(url).isNull()) { // first time @@ -233,7 +233,7 @@ QString TestLinkItrHolder::calcPaintStyle(const QString &url, KEBListViewItem::P self()->setOldVisit(url, visitStr); } else { // may be reading a second bookmark with same url - QString oom = nVisit; + TQString oom = nVisit; visitStr = self()->getOldVisit(url); if (oom.toInt() > visitStr.toInt()) { self()->setOldVisit(url, oom); @@ -245,7 +245,7 @@ QString TestLinkItrHolder::calcPaintStyle(const QString &url, KEBListViewItem::P if (!visitStr.isNull()) visit = visitStr.toInt(); // TODO - check validity? - QString statusStr; + TQString statusStr; KEBListViewItem::PaintStyle style = KEBListViewItem::DefaultStyle; // kdDebug() << "TestLink " << "isNull=" << newModStr.isNull() << "newModValid=" @@ -271,7 +271,7 @@ QString TestLinkItrHolder::calcPaintStyle(const QString &url, KEBListViewItem::P } else if (initial && !newModStr.isNull() && (newMod == 0)) { // previous check has no modify time recorded - statusStr = QString::null; + statusStr = TQString::null; } else if (!newModStr.isNull() && (newMod > visit)) { // if modify time greater than last visit, show bold modify time @@ -292,26 +292,26 @@ QString TestLinkItrHolder::calcPaintStyle(const QString &url, KEBListViewItem::P } } else { - statusStr = QString::null; + statusStr = TQString::null; } _style = style; return statusStr; } -static void parseInfo (KBookmark &bk, QString &nVisited) { +static void parseInfo (KBookmark &bk, TQString &nVisited) { nVisited = - NodeEditCommand::getNodeText(bk, QStringList() << "info" << "metadata" + NodeEditCommand::getNodeText(bk, TQStringList() << "info" << "metadata" << "time_visited" ); // kdDebug() << " Visited=" << nVisited << "\n"; } -static void parseNsInfo(const QString &nsinfo, QString &nCreate, QString &nAccess, QString &nModify) { - QStringList sl = QStringList::split(' ', nsinfo); +static void parseNsInfo(const TQString &nsinfo, TQString &nCreate, TQString &nAccess, TQString &nModify) { + TQStringList sl = TQStringList::split(' ', nsinfo); - for (QStringList::Iterator it = sl.begin(); it != sl.end(); ++it) { - QStringList spl = QStringList::split('"', (*it)); + for (TQStringList::Iterator it = sl.begin(); it != sl.end(); ++it) { + TQStringList spl = TQStringList::split('"', (*it)); if (spl[0] == "LAST_MODIFIED=") { nModify = spl[1]; @@ -324,27 +324,27 @@ static void parseNsInfo(const QString &nsinfo, QString &nCreate, QString &nAcces } // Still use nsinfo for storing old modify time -static const QString updateNsInfoMod(const QString &_nsinfo, const QString &nm) { - QString nCreate, nAccess, nModify; +static const TQString updateNsInfoMod(const TQString &_nsinfo, const TQString &nm) { + TQString nCreate, nAccess, nModify; parseNsInfo(_nsinfo, nCreate, nAccess, nModify); bool numValid = false; nm.toInt(&numValid); - QString tmp; - tmp = "ADD_DATE=\"" + ((nCreate.isEmpty()) ? QString::number(time(0)) : nCreate) + "\""; - tmp += " LAST_VISIT=\"" + ((nAccess.isEmpty()) ? QString("0") : nAccess) + "\""; - tmp += " LAST_MODIFIED=\"" + ((numValid) ? nm : QString("1")) + "\""; + TQString tmp; + tmp = "ADD_DATE=\"" + ((nCreate.isEmpty()) ? TQString::number(time(0)) : nCreate) + "\""; + tmp += " LAST_VISIT=\"" + ((nAccess.isEmpty()) ? TQString("0") : nAccess) + "\""; + tmp += " LAST_MODIFIED=\"" + ((numValid) ? nm : TQString("1")) + "\""; // if (!numValid) kdDebug() << tmp << "\n"; return tmp; } // KEBListViewItem !!!!!!!!!!! -void KEBListViewItem::nsPut(const QString &newModDate) { - static const QString NetscapeInfoAttribute = "netscapeinfo"; - const QString info = m_bookmark.internalElement().attribute(NetscapeInfoAttribute); - QString blah = updateNsInfoMod(info, newModDate); +void KEBListViewItem::nsPut(const TQString &newModDate) { + static const TQString NetscapeInfoAttribute = "netscapeinfo"; + const TQString info = m_bookmark.internalElement().attribute(NetscapeInfoAttribute); + TQString blah = updateNsInfoMod(info, newModDate); m_bookmark.internalElement().setAttribute(NetscapeInfoAttribute, blah); TestLinkItrHolder::self()->setMod(m_bookmark.url().url(), newModDate); setText(KEBListView::StatusColumn, newModDate); @@ -352,17 +352,17 @@ void KEBListViewItem::nsPut(const QString &newModDate) { // KEBListViewItem !!!!!!!!!!! void KEBListViewItem::modUpdate() { - QString nCreate, nAccess, oldModify; - QString iVisit; + TQString nCreate, nAccess, oldModify; + TQString iVisit; - QString nsinfo = m_bookmark.internalElement().attribute("netscapeinfo"); + TQString nsinfo = m_bookmark.internalElement().attribute("netscapeinfo"); if (!nsinfo.isEmpty()) { parseNsInfo(nsinfo, nCreate, nAccess, oldModify); } parseInfo(m_bookmark, iVisit); - QString statusLine; + TQString statusLine; statusLine = TestLinkItrHolder::calcPaintStyle(m_bookmark.url().url(), m_paintStyle, iVisit, oldModify); if (statusLine != "Error") setText(KEBListView::StatusColumn, statusLine); @@ -371,13 +371,13 @@ void KEBListViewItem::modUpdate() { /* -------------------------- */ // KEBListViewItem !!!!!!!!!!! -void KEBListViewItem::setOldStatus(const QString &oldStatus) { +void KEBListViewItem::setOldStatus(const TQString &oldStatus) { // kdDebug() << "KEBListViewItem::setOldStatus" << endl; m_oldStatus = oldStatus; } // KEBListViewItem !!!!!!!!!!! -void KEBListViewItem::setTmpStatus(const QString &status) { +void KEBListViewItem::setTmpStatus(const TQString &status) { // kdDebug() << "KEBListViewItem::setTmpStatus" << endl; m_paintStyle = KEBListViewItem::BoldStyle; setText(KEBListView::StatusColumn, status); diff --git a/konqueror/keditbookmarks/testlink.h b/konqueror/keditbookmarks/testlink.h index 7b027edea..7ee84f90b 100644 --- a/konqueror/keditbookmarks/testlink.h +++ b/konqueror/keditbookmarks/testlink.h @@ -20,7 +20,7 @@ #ifndef __testlink_h #define __testlink_h -#include +#include #include #include @@ -33,22 +33,22 @@ public: static TestLinkItrHolder* self() { if (!s_self) { s_self = new TestLinkItrHolder(); }; return s_self; } - void addAffectedBookmark( const QString & address ); - void resetToValue(const QString &url, const QString &val); - const QString getMod(const QString &url) const; - const QString getOldVisit(const QString &url) const; - void setMod(const QString &url, const QString &val); - void setOldVisit(const QString &url, const QString &val); - static QString calcPaintStyle(const QString &, KEBListViewItem::PaintStyle&, - const QString &, const QString &); + void addAffectedBookmark( const TQString & address ); + void resetToValue(const TQString &url, const TQString &val); + const TQString getMod(const TQString &url) const; + const TQString getOldVisit(const TQString &url) const; + void setMod(const TQString &url, const TQString &val); + void setOldVisit(const TQString &url, const TQString &val); + static TQString calcPaintStyle(const TQString &, KEBListViewItem::PaintStyle&, + const TQString &, const TQString &); protected: virtual void doItrListChanged(); private: TestLinkItrHolder(); static TestLinkItrHolder *s_self; - QMap m_modify; - QMap m_oldModify; - QString m_affectedBookmark; + TQMap m_modify; + TQMap m_oldModify; + TQString m_affectedBookmark; }; class TestLinkItr : public BookmarkIterator @@ -56,13 +56,13 @@ class TestLinkItr : public BookmarkIterator Q_OBJECT public: - TestLinkItr(QValueList bks); + TestLinkItr(TQValueList bks); ~TestLinkItr(); virtual TestLinkItrHolder* holder() const { return TestLinkItrHolder::self(); } public slots: void slotJobResult(KIO::Job *job); - void slotJobData(KIO::Job *job, const QByteArray &data); + void slotJobData(KIO::Job *job, const TQByteArray &data); private: virtual void doAction(); diff --git a/konqueror/keditbookmarks/toplevel.cpp b/konqueror/keditbookmarks/toplevel.cpp index 3f49d893a..4a505d495 100644 --- a/konqueror/keditbookmarks/toplevel.cpp +++ b/konqueror/keditbookmarks/toplevel.cpp @@ -32,10 +32,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -60,8 +60,8 @@ CmdHistory* CmdHistory::s_self = 0; CmdHistory::CmdHistory(KActionCollection *collection) : m_commandHistory(collection) { - connect(&m_commandHistory, SIGNAL( commandExecuted(KCommand *) ), - SLOT( slotCommandExecuted(KCommand *) )); + connect(&m_commandHistory, TQT_SIGNAL( commandExecuted(KCommand *) ), + TQT_SLOT( slotCommandExecuted(KCommand *) )); assert(!s_self); s_self = this; // this is hacky } @@ -121,17 +121,17 @@ void CmdHistory::clearHistory() { CurrentMgr *CurrentMgr::s_mgr = 0; -KBookmark CurrentMgr::bookmarkAt(const QString &a) { +KBookmark CurrentMgr::bookmarkAt(const TQString &a) { return self()->mgr()->findByAddress(a); } bool CurrentMgr::managerSave() { return mgr()->save(); } -void CurrentMgr::saveAs(const QString &fileName) { mgr()->saveAs(fileName); } +void CurrentMgr::saveAs(const TQString &fileName) { mgr()->saveAs(fileName); } void CurrentMgr::setUpdate(bool update) { mgr()->setUpdate(update); } -QString CurrentMgr::path() const { return mgr()->path(); } +TQString CurrentMgr::path() const { return mgr()->path(); } bool CurrentMgr::showNSBookmarks() const { return mgr()->showNSBookmarks(); } -void CurrentMgr::createManager(const QString &filename) { +void CurrentMgr::createManager(const TQString &filename) { if (m_mgr) { kdDebug()<<"ERROR calling createManager twice"< 0) //We ignore the first changed signal after every change we did { --ignorenext; @@ -170,21 +170,21 @@ void CurrentMgr::reloadConfig() { mgr()->emitConfigChanged(); } -QString CurrentMgr::makeTimeStr(const QString & in) +TQString CurrentMgr::makeTimeStr(const TQString & in) { int secs; bool ok; secs = in.toInt(&ok); if (!ok) - return QString::null; + return TQString::null; return makeTimeStr(secs); } -QString CurrentMgr::makeTimeStr(int b) +TQString CurrentMgr::makeTimeStr(int b) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(b); - return (dt.daysTo(QDateTime::currentDateTime()) > 31) + return (dt.daysTo(TQDateTime::currentDateTime()) > 31) ? KGlobal::locale()->formatDate(dt.date(), false) : KGlobal::locale()->formatDateTime(dt, false); } @@ -194,8 +194,8 @@ QString CurrentMgr::makeTimeStr(int b) KEBApp *KEBApp::s_topLevel = 0; KEBApp::KEBApp( - const QString &bookmarksFile, bool readonly, - const QString &address, bool browser, const QString &caption + const TQString &bookmarksFile, bool readonly, + const TQString &address, bool browser, const TQString &caption ) : KMainWindow(), m_dcopIface(0), m_bookmarksFilename(bookmarksFile), m_caption(caption), m_readOnly(readonly), m_browser(browser) { @@ -205,24 +205,24 @@ KEBApp::KEBApp( int h = 20; - QSplitter *vsplitter = new QSplitter(this); + TQSplitter *vsplitter = new TQSplitter(this); KToolBar *quicksearch = new KToolBar(vsplitter, "search toolbar"); KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ), - QApplication::reverseLayout() ? "clear_left" : "locationbar_erase", + TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, actionCollection(), "reset_quicksearch" ); resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search
" "Resets the quick search so that all bookmarks are shown again." ) ); resetQuickSearch->plug( quicksearch ); - QLabel *lbl = new QLabel(i18n("Se&arch:"), quicksearch, "kde toolbar widget"); + TQLabel *lbl = new TQLabel(i18n("Se&arch:"), quicksearch, "kde toolbar widget"); KListViewSearchLine *searchLineEdit = new KEBSearchLine(quicksearch, 0, "KListViewSearchLine"); quicksearch->setStretchableWidget(searchLineEdit); lbl->setBuddy(searchLineEdit); - connect(resetQuickSearch, SIGNAL(activated()), searchLineEdit, SLOT(clear())); - connect(searchLineEdit, SIGNAL(searchUpdated()), SLOT(updateActions())); + connect(resetQuickSearch, TQT_SIGNAL(activated()), searchLineEdit, TQT_SLOT(clear())); + connect(searchLineEdit, TQT_SIGNAL(searchUpdated()), TQT_SLOT(updateActions())); ListView::createListViews(vsplitter); ListView::self()->initListViews(); @@ -231,8 +231,8 @@ KEBApp::KEBApp( m_bkinfo = new BookmarkInfoWidget(vsplitter); - vsplitter->setOrientation(QSplitter::Vertical); - vsplitter->setSizes(QValueList() << h << 380 + vsplitter->setOrientation(TQSplitter::Vertical); + vsplitter->setSizes(TQValueList() << h << 380 << m_bkinfo->sizeHint().height() ); setCentralWidget(vsplitter); @@ -247,8 +247,8 @@ KEBApp::KEBApp( m_dcopIface = new KBookmarkEditorIface(); - connect(kapp->clipboard(), SIGNAL( dataChanged() ), - SLOT( slotClipboardDataChanged() )); + connect(kapp->clipboard(), TQT_SIGNAL( dataChanged() ), + TQT_SLOT( slotClipboardDataChanged() )); ListView::self()->connectSignals(); @@ -276,7 +276,7 @@ void KEBApp::construct() { setAutoSaveSettings(); } -void KEBApp::updateStatus(QString url) +void KEBApp::updateStatus(TQString url) { if(m_bkinfo->bookmark().url() == url) m_bkinfo->updateStatus(); @@ -339,8 +339,8 @@ void KEBApp::notifyCommandExecuted() { void KEBApp::slotConfigureToolbars() { saveMainWindowSettings(KGlobal::config(), "MainWindow"); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL( newToolbarConfig() ), - SLOT( slotNewToolbarConfig() )); + connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), + TQT_SLOT( slotNewToolbarConfig() )); dlg.exec(); } diff --git a/konqueror/keditbookmarks/toplevel.h b/konqueror/keditbookmarks/toplevel.h index 192f56028..7b1ec5f81 100644 --- a/konqueror/keditbookmarks/toplevel.h +++ b/konqueror/keditbookmarks/toplevel.h @@ -45,7 +45,7 @@ struct SelcAbilities { bool tbShowState:1; }; -class CmdHistory : public QObject { +class CmdHistory : public TQObject { Q_OBJECT public: CmdHistory(KActionCollection *collection); @@ -73,33 +73,33 @@ private: class KBookmark; class KBookmarkManager; -class CurrentMgr : public QObject { +class CurrentMgr : public TQObject { Q_OBJECT public: typedef enum {HTMLExport, OperaExport, IEExport, MozillaExport, NetscapeExport} ExportType; static CurrentMgr* self() { if (!s_mgr) { s_mgr = new CurrentMgr(); } return s_mgr; } - static KBookmark bookmarkAt(const QString & a); + static KBookmark bookmarkAt(const TQString & a); KBookmarkManager* mgr() const { return m_mgr; } bool showNSBookmarks() const; - QString path() const; + TQString path() const; - void createManager(const QString &filename); + void createManager(const TQString &filename); void notifyManagers(KBookmarkGroup grp); void notifyManagers(); bool managerSave(); - void saveAs(const QString &fileName); - void doExport(ExportType type, const QString & path = QString::null); + void saveAs(const TQString &fileName); + void doExport(ExportType type, const TQString & path = TQString::null); void setUpdate(bool update); void reloadConfig(); - static QString makeTimeStr(const QString &); - static QString makeTimeStr(int); + static TQString makeTimeStr(const TQString &); + static TQString makeTimeStr(int); protected slots: - void slotBookmarksChanged(const QString &, const QString &); + void slotBookmarksChanged(const TQString &, const TQString &); private: CurrentMgr() : m_mgr(0), ignorenext(0) { ; } @@ -113,25 +113,25 @@ class KEBApp : public KMainWindow { public: static KEBApp* self() { return s_topLevel; } - KEBApp(const QString & bookmarksFile, bool readonly, const QString &address, bool browser, const QString &caption); + KEBApp(const TQString & bookmarksFile, bool readonly, const TQString &address, bool browser, const TQString &caption); virtual ~KEBApp(); - void updateStatus(QString url); + void updateStatus(TQString url); void setActionsEnabled(SelcAbilities); void setCancelFavIconUpdatesEnabled(bool); void setCancelTestsEnabled(bool); void notifyCommandExecuted(); - void findURL(QString url); + void findURL(TQString url); - QWidget* popupMenuFactory(const char *type) { + TQWidget* popupMenuFactory(const char *type) { return factory()->container(type, this); } KToggleAction* getToggleAction(const char *) const; - QString caption() const { return m_caption; } + TQString caption() const { return m_caption; } bool readonly() const { return m_readOnly; } bool browser() const { return m_browser; } bool nsShown() const; @@ -159,8 +159,8 @@ private: public: // only temporary CmdHistory *m_cmdHistory; - QString m_bookmarksFilename; - QString m_caption; + TQString m_bookmarksFilename; + TQString m_caption; void construct(); diff --git a/konqueror/keditbookmarks/updater.cpp b/konqueror/keditbookmarks/updater.cpp index 34c884617..0d9a4cd11 100644 --- a/konqueror/keditbookmarks/updater.cpp +++ b/konqueror/keditbookmarks/updater.cpp @@ -18,7 +18,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include "updater.h" @@ -36,7 +36,7 @@ #include #include -FavIconUpdater::FavIconUpdater(QObject *parent, const char *name) +FavIconUpdater::FavIconUpdater(TQObject *parent, const char *name) : KonqFavIconMgr(parent, name) { m_part = 0; m_webGrabber = 0; @@ -58,7 +58,7 @@ void FavIconUpdater::timerDone() { } void FavIconUpdater::downloadIcon(const KBookmark &bk) { - QString favicon = KonqFavIconMgr::iconForURL(bk.url().url()); + TQString favicon = KonqFavIconMgr::iconForURL(bk.url().url()); if (!favicon.isNull()) { // kdDebug() << "downloadIcon() - favicon" << favicon << endl; bk.internalElement().setAttribute("icon", favicon); @@ -90,17 +90,17 @@ void FavIconUpdater::downloadIconActual(const KBookmark &bk) { if (!m_part) { KParts::ReadOnlyPart *part = KParts::ComponentFactory - ::createPartInstanceFromQuery("text/html", QString::null); + ::createPartInstanceFromQuery("text/html", TQString::null); - part->setProperty("pluginsEnabled", QVariant(false, 1)); - part->setProperty("javaScriptEnabled", QVariant(false, 1)); - part->setProperty("javaEnabled", QVariant(false, 1)); - part->setProperty("autoloadImages", QVariant(false, 1)); + part->setProperty("pluginsEnabled", TQVariant(false, 1)); + part->setProperty("javaScriptEnabled", TQVariant(false, 1)); + part->setProperty("javaEnabled", TQVariant(false, 1)); + part->setProperty("autoloadImages", TQVariant(false, 1)); - connect(part, SIGNAL( canceled(const QString &) ), - this, SLOT( slotCompleted() )); - connect(part, SIGNAL( completed() ), - this, SLOT( slotCompleted() )); + connect(part, TQT_SIGNAL( canceled(const TQString &) ), + this, TQT_SLOT( slotCompleted() )); + connect(part, TQT_SIGNAL( completed() ), + this, TQT_SLOT( slotCompleted() )); KParts::BrowserExtension *ext = KParts::BrowserExtension::childObject(part); assert(ext); @@ -108,16 +108,16 @@ void FavIconUpdater::downloadIconActual(const KBookmark &bk) { m_browserIface = new FavIconBrowserInterface(this, "browseriface"); ext->setBrowserInterface(m_browserIface); - connect(ext, SIGNAL( setIconURL(const KURL &) ), - this, SLOT( setIconURL(const KURL &) )); + connect(ext, TQT_SIGNAL( setIconURL(const KURL &) ), + this, TQT_SLOT( setIconURL(const KURL &) )); m_part = part; } if (!m_timer) { // Timeout to stop the updating hanging - m_timer = new QTimer(this); - connect( m_timer, SIGNAL(timeout()), this, SLOT(timerDone()) ); + m_timer = new TQTimer(this); + connect( m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) ); } m_timer->start(15000,false); m_webGrabber = new FavIconWebGrabber(m_part, bk.url()); @@ -128,7 +128,7 @@ void FavIconUpdater::setIconURL(const KURL &iconURL) { setIconForURL(m_bk.url(), iconURL); } -void FavIconUpdater::notifyChange(bool isHost, QString hostOrURL, QString iconName) { +void FavIconUpdater::notifyChange(bool isHost, TQString hostOrURL, TQString iconName) { // kdDebug() << "FavIconUpdater::notifyChange()" << endl; Q_UNUSED(isHost); @@ -150,21 +150,21 @@ FavIconWebGrabber::FavIconWebGrabber(KParts::ReadOnlyPart *part, const KURL &url // the use of KIO rather than directly using KHTML is to allow silently abort on error KIO::Job *job = KIO::get(m_url, false, false); - job->addMetaData( QString("cookies"), QString("none") ); - connect(job, SIGNAL( result( KIO::Job *)), - this, SLOT( slotFinished(KIO::Job *) )); - connect(job, SIGNAL( mimetype( KIO::Job *, const QString &) ), - this, SLOT( slotMimetype(KIO::Job *, const QString &) )); + job->addMetaData( TQString("cookies"), TQString("none") ); + connect(job, TQT_SIGNAL( result( KIO::Job *)), + this, TQT_SLOT( slotFinished(KIO::Job *) )); + connect(job, TQT_SIGNAL( mimetype( KIO::Job *, const TQString &) ), + this, TQT_SLOT( slotMimetype(KIO::Job *, const TQString &) )); } -void FavIconWebGrabber::slotMimetype(KIO::Job *job, const QString & /*type*/) { +void FavIconWebGrabber::slotMimetype(KIO::Job *job, const TQString & /*type*/) { KIO::SimpleJob *sjob = static_cast(job); m_url = sjob->url(); // allow for redirection sjob->putOnHold(); // kdDebug() << "FavIconWebGrabber::slotMimetype " << m_url << "\n"; - // QString typeLocal = typeUncopied; // local copy + // TQString typeLocal = typeUncopied; // local copy // kdDebug() << "slotMimetype : " << typeLocal << endl; // TODO - what to do if typeLocal is not text/html ?? diff --git a/konqueror/keditbookmarks/updater.h b/konqueror/keditbookmarks/updater.h index ff92ea55c..62e034744 100644 --- a/konqueror/keditbookmarks/updater.h +++ b/konqueror/keditbookmarks/updater.h @@ -35,7 +35,7 @@ public: ~FavIconWebGrabber() {} protected slots: - void slotMimetype(KIO::Job *job, const QString &_type); + void slotMimetype(KIO::Job *job, const TQString &_type); void slotFinished(KIO::Job *job); private: @@ -50,13 +50,13 @@ class FavIconUpdater : public KonqFavIconMgr Q_OBJECT public: - FavIconUpdater(QObject *parent, const char *name); + FavIconUpdater(TQObject *parent, const char *name); ~FavIconUpdater(); void downloadIcon(const KBookmark &bk); void downloadIconActual(const KBookmark &bk); - virtual void notifyChange(bool isHost, QString hostOrURL, - QString iconName); + virtual void notifyChange(bool isHost, TQString hostOrURL, + TQString iconName); protected slots: void setIconURL(const KURL &iconURL); @@ -71,7 +71,7 @@ private: KParts::ReadOnlyPart *m_part; FavIconBrowserInterface *m_browserIface; FavIconWebGrabber *m_webGrabber; - QTimer *m_timer; + TQTimer *m_timer; KBookmark m_bk; }; -- cgit v1.2.1