diff options
Diffstat (limited to 'kio/kfile')
61 files changed, 539 insertions, 527 deletions
diff --git a/kio/kfile/config-kfile.h b/kio/kfile/config-kfile.h index 8715ed273..3c5b7c09b 100644 --- a/kio/kfile/config-kfile.h +++ b/kio/kfile/config-kfile.h @@ -3,7 +3,7 @@ const int kfile_area = 250; -#define DefaultViewStyle TQString::fromLatin1("SimpleView") +#define DefaultViewStyle TQString::tqfromLatin1("SimpleView") #define DefaultPannerPosition 40 #define DefaultMixDirsAndFiles false #define DefaultShowStatusLine false @@ -14,19 +14,19 @@ const int kfile_area = 250; #define DefaultRecentURLsNumber 15 #define DefaultDirectoryFollowing true #define DefaultAutoSelectExtChecked true -#define ConfigGroup TQString::fromLatin1("KFileDialog Settings") -#define RecentURLs TQString::fromLatin1("Recent URLs") -#define RecentFiles TQString::fromLatin1("Recent Files") -#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs") -#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files") -#define DialogWidth TQString::fromLatin1("Width (%1)") -#define DialogHeight TQString::fromLatin1("Height (%1)") -#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine") -#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following") -#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode") -#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode") -#define ShowSpeedbar TQString::fromLatin1("Show Speedbar") -#define ShowBookmarks TQString::fromLatin1("Show Bookmarks") -#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension") +#define ConfigGroup TQString::tqfromLatin1("KFileDialog Settings") +#define RecentURLs TQString::tqfromLatin1("Recent URLs") +#define RecentFiles TQString::tqfromLatin1("Recent Files") +#define RecentURLsNumber TQString::tqfromLatin1("Maximum of recent URLs") +#define RecentFilesNumber TQString::tqfromLatin1("Maximum of recent files") +#define DialogWidth TQString::tqfromLatin1("Width (%1)") +#define DialogHeight TQString::tqfromLatin1("Height (%1)") +#define ConfigShowStatusLine TQString::tqfromLatin1("ShowStatusLine") +#define AutoDirectoryFollowing TQString::tqfromLatin1("Automatic directory following") +#define PathComboCompletionMode TQString::tqfromLatin1("PathCombo Completionmode") +#define LocationComboCompletionMode TQString::tqfromLatin1("LocationCombo Completionmode") +#define ShowSpeedbar TQString::tqfromLatin1("Show Speedbar") +#define ShowBookmarks TQString::tqfromLatin1("Show Bookmarks") +#define AutoSelectExtChecked TQString::tqfromLatin1("Automatically select filename extension") #endif diff --git a/kio/kfile/images.h b/kio/kfile/images.h index f544e2f0a..62e42afeb 100644 --- a/kio/kfile/images.h +++ b/kio/kfile/images.h @@ -248,7 +248,7 @@ static struct EmbedImage { static const TQImage& qembed_findImage( const TQString& name ) { static TQDict<TQImage> dict; - TQImage* img = dict.find( name ); + TQImage* img = dict.tqfind( name ); if ( !img ) { for ( int i = 0; embed_image_vec[i].data; i++ ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp index 7f253f8c5..0e58aee6e 100644 --- a/kio/kfile/kacleditwidget.cpp +++ b/kio/kfile/kacleditwidget.cpp @@ -85,7 +85,7 @@ KACLEditWidget::KACLEditWidget( TQWidget *parent, const char *name ) m_DelBtn = new TQPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" ); connect( m_DelBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotRemoveEntry() ) ); TQWidget *spacer = new TQWidget( vbox ); - spacer->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ); + spacer->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ); slotUpdateButtons(); } @@ -148,7 +148,7 @@ KACLListViewItem::KACLListViewItem( TQListView* parent, qualifier( _qualifier ), isPartial( false ) { m_pACLListView = dynamic_cast<KACLListView*>( parent ); - repaint(); + tqrepaint(); } @@ -192,7 +192,7 @@ TQString KACLListViewItem::key( int, bool ) const } void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg, - int column, int width, int alignment ) + int column, int width, int tqalignment ) { TQColorGroup mycg = cg; if ( isDefault ) { @@ -204,7 +204,7 @@ void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg, mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) ); p->setFont( font ); } - KListViewItem::paintCell( p, mycg, column, width, alignment ); + KListViewItem::paintCell( p, mycg, column, width, tqalignment ); KACLListViewItem *below =0; if ( itemBelow() ) @@ -247,7 +247,7 @@ void KACLListViewItem::updatePermPixmaps() setPixmap( 4, TQPixmap() ); } -void KACLListViewItem::repaint() +void KACLListViewItem::tqrepaint() { int idx = 0; switch ( type ) @@ -495,17 +495,17 @@ void EditACLEntryDialog::slotUpdateAllowedUsersAndGroups() m_groupsCombo->clear(); if ( m_defaultCB && m_defaultCB->isChecked() ) { m_usersCombo->insertStringList( m_defaultUsers ); - if ( m_defaultUsers.find( oldUser ) != m_defaultUsers.end() ) + if ( m_defaultUsers.tqfind( oldUser ) != m_defaultUsers.end() ) m_usersCombo->setCurrentText( oldUser ); m_groupsCombo->insertStringList( m_defaultGroups ); - if ( m_defaultGroups.find( oldGroup ) != m_defaultGroups.end() ) + if ( m_defaultGroups.tqfind( oldGroup ) != m_defaultGroups.end() ) m_groupsCombo->setCurrentText( oldGroup ); } else { m_usersCombo->insertStringList( m_users ); - if ( m_users.find( oldUser ) != m_users.end() ) + if ( m_users.tqfind( oldUser ) != m_users.end() ) m_usersCombo->setCurrentText( oldUser ); m_groupsCombo->insertStringList( m_groups ); - if ( m_groups.find( oldGroup ) != m_groups.end() ) + if ( m_groups.tqfind( oldGroup ) != m_groups.end() ) m_groupsCombo->setCurrentText( oldGroup ); } } @@ -527,7 +527,7 @@ void EditACLEntryDialog::slotOk() } if ( m_defaultCB ) m_item->isDefault = m_defaultCB->isChecked(); - m_item->repaint(); + m_item->tqrepaint(); KDialogBase::slotOk(); } @@ -582,14 +582,14 @@ KACLListView::KACLListView( TQWidget* parent, const char* name ) struct passwd *user = 0; setpwent(); while ( ( user = getpwent() ) != 0 ) { - m_allUsers << TQString::fromLatin1( user->pw_name ); + m_allUsers << TQString::tqfromLatin1( user->pw_name ); } endpwent(); struct group *gr = 0; setgrent(); while ( ( gr = getgrent() ) != 0 ) { - m_allGroups << TQString::fromLatin1( gr->gr_name ); + m_allGroups << TQString::tqfromLatin1( gr->gr_name ); } endgrent(); m_allUsers.sort(); @@ -1019,7 +1019,7 @@ void KACLListView::slotRemoveEntry() delete item; } else { item->value = 0; - item->repaint(); + item->tqrepaint(); } if ( !itemWasDefault ) calculateEffectiveRights(); @@ -1030,7 +1030,7 @@ void KACLListView::slotRemoveEntry() || item->type == Group || item->type == Others ) ) { item->value = 0; - item->repaint(); + item->tqrepaint(); } else { delete item; } diff --git a/kio/kfile/kacleditwidget.h b/kio/kfile/kacleditwidget.h index 70e7ab54f..e436f16e6 100644 --- a/kio/kfile/kacleditwidget.h +++ b/kio/kfile/kacleditwidget.h @@ -24,6 +24,10 @@ #include <config.h> #endif +#ifdef Q_MOC_RUN +#define USE_POSIX_ACL +#endif // Q_MOC_RUN + #ifdef USE_POSIX_ACL #include <klistview.h> @@ -34,9 +38,10 @@ class KACLListViewItem; class KACLListView; class TQPushButton; -class KACLEditWidget : QWidget +class KACLEditWidget : TQWidget { Q_OBJECT + TQ_OBJECT public: KACLEditWidget( TQWidget *parent = 0, const char *name = 0 ); KACL getACL() const; diff --git a/kio/kfile/kacleditwidget_p.h b/kio/kfile/kacleditwidget_p.h index 8bd0292d3..9b4d9d48e 100644 --- a/kio/kfile/kacleditwidget_p.h +++ b/kio/kfile/kacleditwidget_p.h @@ -24,6 +24,10 @@ #include <config.h> #endif +#ifdef Q_MOC_RUN +#define USE_POSIX_ACL +#endif // Q_MOC_RUN + #ifdef USE_POSIX_ACL #include <klistview.h> #include <sys/acl.h> @@ -45,7 +49,8 @@ class TQCheckBox; */ class KACLListView : public KListView { -Q_OBJECT + Q_OBJECT + TQ_OBJECT friend class KACLListViewItem; public: enum Types @@ -129,6 +134,7 @@ private: class EditACLEntryDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item, const TQStringList &users, @@ -180,10 +186,10 @@ public: void togglePerm( acl_perm_t perm ); virtual void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ); + int column, int width, int tqalignment ); void updatePermPixmaps(); - void repaint(); + void tqrepaint(); KACLListView::EntryType type; unsigned short value; diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp index 6baf6d36f..41b4176fa 100644 --- a/kio/kfile/kcombiview.cpp +++ b/kio/kfile/kcombiview.cpp @@ -300,7 +300,7 @@ void KCombiView::slotSortingChanged( TQDir::SortSpec sorting ) KFileView *KCombiView::focusView( KFileView *preferred ) const { - TQWidget *w = focusWidget(); + TQWidget *w = tqfocusWidget(); KFileView *other = (right == preferred) ? left : right; return (preferred && w == preferred->widget()) ? preferred : other; } @@ -358,9 +358,9 @@ bool KCombiView::eventFilter( TQObject *o, TQEvent *e ) // only the focused view may have a selection if ( type == TQEvent::FocusIn ) { - if ( o == left ) + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(left) ) right->clearSelection(); - else if ( o == right->widget() ) + else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(right->widget()) ) left->clearSelection(); } diff --git a/kio/kfile/kcustommenueditor.cpp b/kio/kfile/kcustommenueditor.cpp index aec3c10f1..30513bbf3 100644 --- a/kio/kfile/kcustommenueditor.cpp +++ b/kio/kfile/kcustommenueditor.cpp @@ -35,7 +35,7 @@ #include "kcustommenueditor.h" -class KCustomMenuEditor::Item : public QListViewItem +class KCustomMenuEditor::Item : public TQListViewItem { public: Item(TQListView *parent, KService::Ptr service) @@ -94,11 +94,11 @@ KCustomMenuEditor::KCustomMenuEditor(TQWidget *parent) m_listView->addColumn(i18n("Menu")); m_listView->setFullWidth(true); m_listView->setSorting(-1); - KButtonBox *buttonBox = new KButtonBox(page, Vertical); - buttonBox->addButton(i18n("New..."), this, TQT_SLOT(slotNewItem())); - d->pbRemove=buttonBox->addButton(i18n("Remove"), this, TQT_SLOT(slotRemoveItem())); - d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), this, TQT_SLOT(slotMoveUp())); - d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), this, TQT_SLOT(slotMoveDown())); + KButtonBox *buttonBox = new KButtonBox(page, Qt::Vertical); + buttonBox->addButton(i18n("New..."), TQT_TQOBJECT(this), TQT_SLOT(slotNewItem())); + d->pbRemove=buttonBox->addButton(i18n("Remove"), TQT_TQOBJECT(this), TQT_SLOT(slotRemoveItem())); + d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), TQT_TQOBJECT(this), TQT_SLOT(slotMoveUp())); + d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), TQT_TQOBJECT(this), TQT_SLOT(slotMoveDown())); buttonBox->layout(); connect( m_listView, TQT_SIGNAL( selectionChanged () ), this, TQT_SLOT( refreshButton() ) ); refreshButton(); diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp index 6013b7c57..af3e25eec 100644 --- a/kio/kfile/kdiroperator.cpp +++ b/kio/kfile/kdiroperator.cpp @@ -111,13 +111,13 @@ KDirOperator::KDirOperator(const KURL& _url, TQString strPath = TQDir::currentDirPath(); strPath.append('/'); currUrl = KURL(); - currUrl.setProtocol(TQString::fromLatin1("file")); + currUrl.setProtocol(TQString::tqfromLatin1("file")); currUrl.setPath(strPath); } else { currUrl = _url; if ( currUrl.protocol().isEmpty() ) - currUrl.setProtocol(TQString::fromLatin1("file")); + currUrl.setProtocol(TQString::tqfromLatin1("file")); currUrl.addPath("/"); // make sure we have a trailing slash! } @@ -144,7 +144,7 @@ KDirOperator::KDirOperator(const KURL& _url, setupActions(); setupMenu(); - setFocusPolicy(TQWidget::WheelFocus); + setFocusPolicy(TQ_WheelFocus); } KDirOperator::~KDirOperator() @@ -414,7 +414,7 @@ bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory ) { url.addPath( *it ); exists = KIO::NetAccess::exists( url, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( url, topLevelWidget() ); + writeOk = !exists && KIO::NetAccess::mkdir( url, tqtopLevelWidget() ); } if ( exists ) // url was already existant @@ -484,7 +484,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items, if ( doIt ) { KIO::DeleteJob *job = KIO::del( urls, false, showProgress ); - job->setWindow (topLevelWidget()); + job->setWindow (tqtopLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; } @@ -547,7 +547,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items, if ( doIt ) { KIO::CopyJob *job = KIO::trash( urls, showProgress ); - job->setWindow (topLevelWidget()); + job->setWindow (tqtopLevelWidget()); job->setAutoErrorHandlingEnabled( true, parent ); return job; } @@ -555,12 +555,12 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items, return 0L; } -void KDirOperator::trashSelected(KAction::ActivationReason reason, Qt::ButtonState state) +void KDirOperator::trashSelected(KAction::ActivationReason reason, TQt::ButtonState state) { if ( !m_fileView ) return; - if ( reason == KAction::PopupMenuActivation && ( state & Qt::ShiftButton ) ) { + if ( reason == KAction::PopupMenuActivation && ( state & ShiftButton ) ) { deleteSelected(); return; } @@ -590,7 +590,7 @@ void KDirOperator::checkPath(const TQString &, bool /*takeFiles*/) // SLOT text = text.stripWhiteSpace(); // if the argument is no URL (the check is quite fragil) and it's // no absolute path, we add the current directory to get a correct url - if (text.find(':') < 0 && text[0] != '/') + if (text.tqfind(':') < 0 && text[0] != '/') text.insert(0, currUrl); // in case we have a selection defined and someone patched the file- @@ -651,7 +651,7 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward) if ( !isReadable( newurl ) ) { // maybe newurl is a file? check its parent directory - newurl.cd(TQString::fromLatin1("..")); + newurl.cd(TQString::tqfromLatin1("..")); if ( !isReadable( newurl ) ) { resetCursor(); KMessageBox::error(viewWidget(), @@ -719,7 +719,7 @@ void KDirOperator::pathChanged() TQApplication::restoreOverrideCursor(); // when KIO::Job emits finished, the slot will restore the cursor - TQApplication::setOverrideCursor( waitCursor ); + TQApplication::setOverrideCursor( tqwaitCursor ); if ( !isReadable( currUrl )) { KMessageBox::error(viewWidget(), @@ -777,7 +777,7 @@ KURL KDirOperator::url() const void KDirOperator::cdUp() { KURL tmp(currUrl); - tmp.cd(TQString::fromLatin1("..")); + tmp.cd(TQString::tqfromLatin1("..")); setURL(tmp, true); } @@ -825,7 +825,7 @@ bool KDirOperator::checkPreviewInternal() const { TQStringList supported = KIO::PreviewJob::supportedMimeTypes(); // no preview support for directories? - if ( dirOnlyMode() && supported.findIndex( "inode/directory" ) == -1 ) + if ( dirOnlyMode() && supported.tqfindIndex( "inode/directory" ) == -1 ) return false; TQStringList mimeTypes = dir->mimeFilters(); @@ -1071,7 +1071,7 @@ void KDirOperator::connectView(KFileView *view) m_fileView->widget()->show(); if ( listDir ) { - TQApplication::setOverrideCursor( waitCursor ); + TQApplication::setOverrideCursor( tqwaitCursor ); openURL( currUrl ); } else @@ -1120,7 +1120,7 @@ void KDirOperator::setDirLister( KDirLister *lister ) dir->setAutoUpdate( true ); - TQWidget* mainWidget = topLevelWidget(); + TQWidget* mainWidget = tqtopLevelWidget(); dir->setMainWindow (mainWidget); kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl; @@ -1253,27 +1253,27 @@ void KDirOperator::slotCompletionMatch(const TQString& match) void KDirOperator::setupActions() { - myActionCollection = new KActionCollection( topLevelWidget(), this, "KDirOperator::myActionCollection" ); + myActionCollection = new KActionCollection( tqtopLevelWidget(), TQT_TQOBJECT(this), "KDirOperator::myActionCollection" ); actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" ); - upAction = KStdAction::up( this, TQT_SLOT( cdUp() ), myActionCollection, "up" ); + upAction = KStdAction::up( TQT_TQOBJECT(this), TQT_SLOT( cdUp() ), myActionCollection, "up" ); upAction->setText( i18n("Parent Folder") ); - backAction = KStdAction::back( this, TQT_SLOT( back() ), myActionCollection, "back" ); - forwardAction = KStdAction::forward( this, TQT_SLOT(forward()), myActionCollection, "forward" ); - homeAction = KStdAction::home( this, TQT_SLOT( home() ), myActionCollection, "home" ); + backAction = KStdAction::back( TQT_TQOBJECT(this), TQT_SLOT( back() ), myActionCollection, "back" ); + forwardAction = KStdAction::forward( TQT_TQOBJECT(this), TQT_SLOT(forward()), myActionCollection, "forward" ); + homeAction = KStdAction::home( TQT_TQOBJECT(this), TQT_SLOT( home() ), myActionCollection, "home" ); homeAction->setText(i18n("Home Folder")); - reloadAction = KStdAction::redisplay( this, TQT_SLOT(rereadDir()), myActionCollection, "reload" ); + reloadAction = KStdAction::redisplay( TQT_TQOBJECT(this), TQT_SLOT(rereadDir()), myActionCollection, "reload" ); actionSeparator = new KActionSeparator( myActionCollection, "separator" ); d->viewActionSeparator = new KActionSeparator( myActionCollection, "viewActionSeparator" ); mkdirAction = new KAction( i18n("New Folder..."), 0, - this, TQT_SLOT( mkdir() ), myActionCollection, "mkdir" ); + TQT_TQOBJECT(this), TQT_SLOT( mkdir() ), myActionCollection, "mkdir" ); KAction* trash = new KAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" ); connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ), this, TQT_SLOT( trashSelected( KAction::ActivationReason, Qt::ButtonState ) ) ); - new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, this, + new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT( deleteSelected() ), myActionCollection, "delete" ); - mkdirAction->setIcon( TQString::fromLatin1("folder_new") ); + mkdirAction->setIcon( TQString::tqfromLatin1("folder_new") ); reloadAction->setText( i18n("Reload") ); reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload )); @@ -1281,19 +1281,19 @@ void KDirOperator::setupActions() // the sort menu actions sortActionMenu = new KActionMenu( i18n("Sorting"), myActionCollection, "sorting menu"); byNameAction = new KRadioAction( i18n("By Name"), 0, - this, TQT_SLOT( slotSortByName() ), + TQT_TQOBJECT(this), TQT_SLOT( slotSortByName() ), myActionCollection, "by name" ); byDateAction = new KRadioAction( i18n("By Date"), 0, - this, TQT_SLOT( slotSortByDate() ), + TQT_TQOBJECT(this), TQT_SLOT( slotSortByDate() ), myActionCollection, "by date" ); bySizeAction = new KRadioAction( i18n("By Size"), 0, - this, TQT_SLOT( slotSortBySize() ), + TQT_TQOBJECT(this), TQT_SLOT( slotSortBySize() ), myActionCollection, "by size" ); reverseAction = new KToggleAction( i18n("Reverse"), 0, - this, TQT_SLOT( slotSortReversed() ), + TQT_TQOBJECT(this), TQT_SLOT( slotSortReversed() ), myActionCollection, "reversed" ); - TQString sortGroup = TQString::fromLatin1("sort"); + TQString sortGroup = TQString::tqfromLatin1("sort"); byNameAction->setExclusiveGroup( sortGroup ); byDateAction->setExclusiveGroup( sortGroup ); bySizeAction->setExclusiveGroup( sortGroup ); @@ -1325,7 +1325,7 @@ void KDirOperator::setupActions() myActionCollection, "show hidden" ); // showHiddenAction->setCheckedState( i18n("Hide Hidden Files") ); separateDirsAction = new KToggleAction( i18n("Separate Folders"), KShortcut(), - this, + TQT_TQOBJECT(this), TQT_SLOT(slotSeparateDirs()), myActionCollection, "separate dirs" ); KToggleAction *previewAction = new KToggleAction(i18n("Show Preview"), @@ -1337,7 +1337,7 @@ void KDirOperator::setupActions() TQT_SLOT( togglePreview( bool ))); - TQString viewGroup = TQString::fromLatin1("view"); + TQString viewGroup = TQString::tqfromLatin1("view"); shortAction->setExclusiveGroup( viewGroup ); detailedAction->setExclusiveGroup( viewGroup ); @@ -1348,7 +1348,7 @@ void KDirOperator::setupActions() connect( showHiddenAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleHidden( bool ) )); - new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), this, + new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), TQT_TQOBJECT(this), TQT_SLOT(slotProperties()), myActionCollection, "properties" ); } @@ -1383,11 +1383,11 @@ void KDirOperator::setupMenu(int whichActions) if (whichActions & FileActions) { actionMenu->insert( mkdirAction ); - if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & Qt::ShiftButton)) + if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & TQt::ShiftButton)) actionMenu->insert( myActionCollection->action( "trash" ) ); KConfig *globalconfig = KGlobal::config(); - KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") ); - if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & Qt::ShiftButton) || + KConfigGroupSaver cs( globalconfig, TQString::tqfromLatin1("KDE") ); + if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & TQt::ShiftButton) || globalconfig->readBoolEntry("ShowDeleteCommand", false)) actionMenu->insert( myActionCollection->action( "delete" ) ); actionMenu->insert( actionSeparator ); @@ -1450,45 +1450,45 @@ void KDirOperator::readConfig( KConfig *kc, const TQString& group ) defaultView = 0; int sorting = 0; - TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"), - TQString::fromLatin1("Simple") ); - if ( viewStyle == TQString::fromLatin1("Detail") ) + TQString viewStyle = kc->readEntry( TQString::tqfromLatin1("View Style"), + TQString::tqfromLatin1("Simple") ); + if ( viewStyle == TQString::tqfromLatin1("Detail") ) defaultView |= KFile::Detail; else defaultView |= KFile::Simple; - if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"), + if ( kc->readBoolEntry( TQString::tqfromLatin1("Separate Directories"), DefaultMixDirsAndFiles ) ) defaultView |= KFile::SeparateDirs; - if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false)) + if ( kc->readBoolEntry(TQString::tqfromLatin1("Show Preview"), false)) defaultView |= KFile::PreviewContents; - if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"), + if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort case insensitively"), DefaultCaseInsensitive ) ) sorting |= TQDir::IgnoreCase; - if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"), + if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort directories first"), DefaultDirsFirst ) ) sorting |= TQDir::DirsFirst; - TQString name = TQString::fromLatin1("Name"); - TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name ); + TQString name = TQString::tqfromLatin1("Name"); + TQString sortBy = kc->readEntry( TQString::tqfromLatin1("Sort by"), name ); if ( sortBy == name ) sorting |= TQDir::Name; - else if ( sortBy == TQString::fromLatin1("Size") ) + else if ( sortBy == TQString::tqfromLatin1("Size") ) sorting |= TQDir::Size; - else if ( sortBy == TQString::fromLatin1("Date") ) + else if ( sortBy == TQString::tqfromLatin1("Date") ) sorting |= TQDir::Time; mySorting = static_cast<TQDir::SortSpec>( sorting ); setSorting( mySorting ); - if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"), + if ( kc->readBoolEntry( TQString::tqfromLatin1("Show hidden files"), DefaultShowHidden ) ) { showHiddenAction->setChecked( true ); dir->setShowingDotFiles( true ); } - if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"), + if ( kc->readBoolEntry( TQString::tqfromLatin1("Sort reversed"), DefaultSortReversed ) ) reverseAction->setChecked( true ); @@ -1505,18 +1505,18 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group ) if ( !group.isEmpty() ) kc->setGroup( group ); - TQString sortBy = TQString::fromLatin1("Name"); + TQString sortBy = TQString::tqfromLatin1("Name"); if ( KFile::isSortBySize( mySorting ) ) - sortBy = TQString::fromLatin1("Size"); + sortBy = TQString::tqfromLatin1("Size"); else if ( KFile::isSortByDate( mySorting ) ) - sortBy = TQString::fromLatin1("Date"); - kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy ); + sortBy = TQString::tqfromLatin1("Date"); + kc->writeEntry( TQString::tqfromLatin1("Sort by"), sortBy ); - kc->writeEntry( TQString::fromLatin1("Sort reversed"), + kc->writeEntry( TQString::tqfromLatin1("Sort reversed"), reverseAction->isChecked() ); - kc->writeEntry( TQString::fromLatin1("Sort case insensitively"), + kc->writeEntry( TQString::tqfromLatin1("Sort case insensitively"), caseInsensitiveAction->isChecked() ); - kc->writeEntry( TQString::fromLatin1("Sort directories first"), + kc->writeEntry( TQString::tqfromLatin1("Sort directories first"), dirsFirstAction->isChecked() ); // don't save the separate dirs or preview when an application specific @@ -1530,26 +1530,26 @@ void KDirOperator::writeConfig( KConfig *kc, const TQString& group ) if ( !appSpecificPreview ) { if ( separateDirsAction->isEnabled() ) - kc->writeEntry( TQString::fromLatin1("Separate Directories"), + kc->writeEntry( TQString::tqfromLatin1("Separate Directories"), separateDirsAction->isChecked() ); KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview")); if ( previewAction->isEnabled() ) { bool hasPreview = previewAction->isChecked(); - kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview ); + kc->writeEntry( TQString::tqfromLatin1("Show Preview"), hasPreview ); } } - kc->writeEntry( TQString::fromLatin1("Show hidden files"), + kc->writeEntry( TQString::tqfromLatin1("Show hidden files"), showHiddenAction->isChecked() ); KFile::FileView fv = static_cast<KFile::FileView>( m_viewKind ); TQString style; if ( KFile::isDetailView( fv ) ) - style = TQString::fromLatin1("Detail"); + style = TQString::tqfromLatin1("Detail"); else if ( KFile::isSimpleView( fv ) ) - style = TQString::fromLatin1("Simple"); - kc->writeEntry( TQString::fromLatin1("View Style"), style ); + style = TQString::tqfromLatin1("Simple"); + kc->writeEntry( TQString::tqfromLatin1("View Style"), style ); kc->setGroup( oldGroup ); } diff --git a/kio/kfile/kdiroperator.h b/kio/kfile/kdiroperator.h index a2d318b96..85bcf9187 100644 --- a/kio/kfile/kdiroperator.h +++ b/kio/kfile/kdiroperator.h @@ -94,7 +94,7 @@ namespace KIO { * @short A widget for displaying files and browsing directories. * @author Stephan Kulow <coolo@kde.org>, Carsten Pfeiffer <pfeiffer@kde.org> */ -class KIO_EXPORT KDirOperator : public QWidget +class KIO_EXPORT KDirOperator : public TQWidget { Q_OBJECT @@ -710,7 +710,7 @@ public slots: * @since 3.4 */ // ### KDE4: make virtual - void trashSelected(KAction::ActivationReason, Qt::ButtonState); + void trashSelected(KAction::ActivationReason, TQt::ButtonState); protected slots: /** diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp index a361a8bde..1b546148e 100644 --- a/kio/kfile/kdirselectdialog.cpp +++ b/kio/kfile/kdirselectdialog.cpp @@ -122,11 +122,11 @@ KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly, TQT_SLOT( slotComboTextChanged( const TQString& ) )); m_contextMenu = new TQPopupMenu( this ); - KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, this, TQT_SLOT( slotMkdir() ), this); + KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotMkdir() ), TQT_TQOBJECT(this)); newFolder->plug(m_contextMenu); m_contextMenu->insertSeparator(); - m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, this, - TQT_SLOT( slotShowHiddenFoldersToggled() ), this); + m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, TQT_TQOBJECT(this), + TQT_SLOT( slotShowHiddenFoldersToggled() ), TQT_TQOBJECT(this)); m_showHiddenFolders->plug(m_contextMenu); d->startURL = KFileDialog::getStartURL( startDir, d->recentDirClass ); @@ -211,7 +211,7 @@ void KDirSelectDialog::setCurrentURL( const KURL& url ) { while ( pos > 0 ) { - pos = path.findRev( '/', pos -1 ); + pos = path.tqfindRev( '/', pos -1 ); if ( pos >= 0 ) { dirToList.setPath( path.left( pos +1 ) ); @@ -248,7 +248,7 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item ) { // scroll to make item the topmost item view()->ensureItemVisible( item ); - TQRect r = view()->itemRect( item ); + TQRect r = view()->tqitemRect( item ); if ( r.isValid() ) { int x, y; @@ -390,8 +390,8 @@ void KDirSelectDialog::slotComboTextChanged( const TQString& text ) if ( item ) { item->setSelected( false ); - // 2002/12/27, deselected item is not repainted, so force it - item->repaint(); + // 2002/12/27, deselected item is not tqrepainted, so force it + item->tqrepaint(); } } @@ -426,7 +426,7 @@ void KDirSelectDialog::slotMkdir() { folderurl.addPath( *it ); exists = KIO::NetAccess::exists( folderurl, false, 0 ); - writeOk = !exists && KIO::NetAccess::mkdir( folderurl, topLevelWidget() ); + writeOk = !exists && KIO::NetAccess::mkdir( folderurl, tqtopLevelWidget() ); } if ( exists ) // url was already existant diff --git a/kio/kfile/kdirsize.cpp b/kio/kfile/kdirsize.cpp index 3c9bfbb8c..86dfc756d 100644 --- a/kio/kfile/kdirsize.cpp +++ b/kio/kfile/kdirsize.cpp @@ -63,7 +63,7 @@ void KDirSize::processList() } kdDebug(kfile_area) << "KDirSize::processList finished" << endl; if ( !m_bAsync ) - qApp->exit_loop(); + tqApp->exit_loop(); emitResult(); } @@ -139,7 +139,7 @@ KIO::filesize_t KDirSize::dirSize( const KURL & directory ) { KDirSize * dirSize = dirSizeJob( directory ); dirSize->setSync(); - qApp->enter_loop(); + tqApp->enter_loop(); return dirSize->totalSize(); } @@ -155,7 +155,7 @@ void KDirSize::slotResult( KIO::Job * job ) else { if ( !m_bAsync ) - qApp->exit_loop(); + tqApp->exit_loop(); KIO::Job::slotResult( job ); } } diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp index 179b69f72..5fe26f696 100644 --- a/kio/kfile/kdiskfreesp.cpp +++ b/kio/kfile/kdiskfreesp.cpp @@ -100,7 +100,7 @@ void KDiskFreeSp::dfDone() TQTextStream t (dfStringErrOut, IO_ReadOnly); TQString s=t.readLine(); - if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) ) + if ( (s.isEmpty()) || ( s.left(10) != TQString::tqfromLatin1("Filesystem") ) ) kdError() << "Error running df command... got [" << s << "]" << endl; while ( !t.eof() ) { TQString u,v; @@ -109,7 +109,7 @@ void KDiskFreeSp::dfDone() if ( !s.isEmpty() ) { //kdDebug(kfile_area) << "GOT: [" << s << "]" << endl; - if (s.find(BLANK)<0) // devicename was too long, rest in next line + if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line if ( !t.eof() ) { // just appends the next line v=t.readLine(); s=s.append(v); @@ -119,30 +119,30 @@ void KDiskFreeSp::dfDone() //kdDebug(kfile_area) << "[" << s << "]" << endl; - //TQString deviceName = s.left(s.find(BLANK)); - s=s.remove(0,s.find(BLANK)+1 ); + //TQString deviceName = s.left(s.tqfind(BLANK)); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl; if (!NO_FS_TYPE) - s=s.remove(0,s.find(BLANK)+1 ); // eat fs type + s=s.remove(0,s.tqfind(BLANK)+1 ); // eat fs type - u=s.left(s.find(BLANK)); + u=s.left(s.tqfind(BLANK)); unsigned long kBSize = u.toULong(); - s=s.remove(0,s.find(BLANK)+1 ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug(kfile_area) << " Size: [" << kBSize << "]" << endl; - u=s.left(s.find(BLANK)); + u=s.left(s.tqfind(BLANK)); unsigned long kBUsed = u.toULong(); - s=s.remove(0,s.find(BLANK)+1 ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug(kfile_area) << " Used: [" << kBUsed << "]" << endl; - u=s.left(s.find(BLANK)); + u=s.left(s.tqfind(BLANK)); unsigned long kBAvail = u.toULong(); - s=s.remove(0,s.find(BLANK)+1 ); + s=s.remove(0,s.tqfind(BLANK)+1 ); //kdDebug(kfile_area) << " Avail: [" << kBAvail << "]" << endl; - s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94% + s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94% TQString mountPoint = s.stripWhiteSpace(); //kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl; diff --git a/kio/kfile/kdiskfreesp.h b/kio/kfile/kdiskfreesp.h index 6a0591d6f..5fccfe3b0 100644 --- a/kio/kfile/kdiskfreesp.h +++ b/kio/kfile/kdiskfreesp.h @@ -37,7 +37,7 @@ class KProcess; * This class parses the output of "df" to find the disk usage * information for a given partition (mount point). */ -class KIO_EXPORT KDiskFreeSp : public QObject +class KIO_EXPORT KDiskFreeSp : public TQObject { Q_OBJECT public: KDiskFreeSp( TQObject *parent=0, const char *name=0 ); diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp index 396006504..be5ca033b 100644 --- a/kio/kfile/kencodingfiledialog.cpp +++ b/kio/kfile/kencodingfiledialog.cpp @@ -54,7 +54,7 @@ KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQStrin d->encoding->clear (); TQString sEncoding = encoding; if (sEncoding.isEmpty()) - sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); + sEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); TQStringList encodings (KGlobal::charsets()->availableEncodingNames()); int insert = 0; diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp index 823714396..6643d5a4c 100644 --- a/kio/kfile/kfiledetailview.cpp +++ b/kio/kfile/kfiledetailview.cpp @@ -317,7 +317,7 @@ void KFileDetailView::updateView( const KFileItem *i ) item->init(); setSortingKey( item, i ); - //item->repaint(); // only repaints if visible + //item->tqrepaint(); // only tqrepaints if visible } void KFileDetailView::setSortingKey( KFileListViewItem *item, diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h index 937c8f56c..7e0baff83 100644 --- a/kio/kfile/kfiledetailview.h +++ b/kio/kfile/kfiledetailview.h @@ -78,7 +78,7 @@ public: TQRect rect() const { - TQRect r = listView()->itemRect(this); + TQRect r = listView()->tqitemRect(this); return TQRect( listView()->viewportToContents( r.topLeft() ), TQSize( r.width(), r.height() ) ); } diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index 0c9364943..586b34d62 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -100,7 +100,7 @@ enum Buttons { HOTLIST_BUTTON, template class TQPtrList<KIO::StatJob>; namespace { - static void silenceQToolBar(QtMsgType, const char *) + static void silenceQToolBar(TQtMsgType, const char *) { } } @@ -204,7 +204,7 @@ void KFileDialog::setLocationLabel(const TQString& text) void KFileDialog::setFilter(const TQString& filter) { - int pos = filter.find('/'); + int pos = filter.tqfind('/'); // Check for an un-escaped '/', if found // interpret as a MIME filter. @@ -219,7 +219,7 @@ void KFileDialog::setFilter(const TQString& filter) // escaped '/' characters. TQString copy (filter); - for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos) + for (pos = 0; (pos = copy.tqfind("\\/", pos)) != -1; ++pos) copy.remove(pos, 1); ops->clearFilter(); @@ -258,7 +258,7 @@ void KFileDialog::setMimeFilter( const TQStringList& mimeTypes, filterWidget->setMimeFilter( mimeTypes, defaultType ); TQStringList types = TQStringList::split(" ", filterWidget->currentFilter()); - types.append( TQString::fromLatin1( "inode/directory" )); + types.append( TQString::tqfromLatin1( "inode/directory" )); ops->clearFilter(); ops->setMimeFilter( types ); d->hasDefaultFilter = !defaultType.isEmpty(); @@ -357,7 +357,7 @@ void KFileDialog::slotOk() bool multi = (mode() & KFile::Files) != 0; KFileItemListIterator it( *items ); - TQString endQuote = TQString::fromLatin1("\" "); + TQString endQuote = TQString::tqfromLatin1("\" "); TQString name, files; while ( it.current() ) { name = (*it)->name(); @@ -402,7 +402,7 @@ void KFileDialog::slotOk() } } - KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { // ### after message freeze, add message for directories! @@ -446,7 +446,7 @@ void KFileDialog::slotOk() return; } - KURL url = KIO::NetAccess::mostLocalURL(selectedURL,topLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(selectedURL,tqtopLevelWidget()); if ( (mode() & KFile::LocalOnly) == KFile::LocalOnly && !url.isLocalFile() ) { KMessageBox::sorry( d->mainWidget, @@ -555,7 +555,7 @@ void KFileDialog::slotOk() it != list.end(); ++it ) { job = KIO::stat( *it, !(*it).isLocalFile() ); - job->setWindow (topLevelWidget()); + job->setWindow (tqtopLevelWidget()); KIO::Scheduler::scheduleJob( job ); d->statJobs.append( job ); connect( job, TQT_SIGNAL( result(KIO::Job *) ), @@ -565,7 +565,7 @@ void KFileDialog::slotOk() } job = KIO::stat(d->url,!d->url.isLocalFile()); - job->setWindow (topLevelWidget()); + job->setWindow (tqtopLevelWidget()); d->statJobs.append( job ); connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*))); } @@ -831,10 +831,10 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge d->autoSelectExtChecked = false; d->urlBar = 0; // delayed loading - QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar ); + TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceQToolBar ); toolbar = new KToolBar( d->mainWidget, "KFileDialog::toolbar", true); toolbar->setFlat(true); - qInstallMsgHandler( oldHandler ); + tqInstallMsgHandler( oldHandler ); d->pathCombo = new KURLComboBox( KURLComboBox::Directories, true, toolbar, "path combo" ); @@ -934,7 +934,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge connect( showBookmarksAction, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleBookmarks( bool )) ); - KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", this, "extra menu" ); + KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", TQT_TQOBJECT(this), "extra menu" ); menu->setWhatsThis(i18n("<qt>This is the configuration menu for the file dialog. " "Various options can be accessed from this menu including: <ul>" "<li>how files are sorted in the list</li>" @@ -965,7 +965,7 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge menu->plug( toolbar ); //Insert a separator. - KToolBarSeparator* spacerWidget = new KToolBarSeparator(Horizontal, false /*no line*/, + KToolBarSeparator* spacerWidget = new KToolBarSeparator(Qt::Horizontal, false /*no line*/, toolbar); d->m_pathComboIndex = toolbar->insertWidget(-1, -1, spacerWidget); toolbar->insertWidget(PATH_COMBO, 0, d->pathCombo); @@ -1076,17 +1076,17 @@ void KFileDialog::initGUI() TQGridLayout* lafBox= new TQGridLayout(2, 3, KDialog::spacingHint()); - lafBox->addWidget(d->locationLabel, 0, 0, AlignVCenter); - lafBox->addWidget(locationEdit, 0, 1, AlignVCenter); - lafBox->addWidget(d->okButton, 0, 2, AlignVCenter); + lafBox->addWidget(d->locationLabel, 0, 0, Qt::AlignVCenter); + lafBox->addWidget(locationEdit, 0, 1, Qt::AlignVCenter); + lafBox->addWidget(d->okButton, 0, 2, Qt::AlignVCenter); - lafBox->addWidget(d->filterLabel, 1, 0, AlignVCenter); - lafBox->addWidget(filterWidget, 1, 1, AlignVCenter); - lafBox->addWidget(d->cancelButton, 1, 2, AlignVCenter); + lafBox->addWidget(d->filterLabel, 1, 0, Qt::AlignVCenter); + lafBox->addWidget(filterWidget, 1, 1, Qt::AlignVCenter); + lafBox->addWidget(d->cancelButton, 1, 2, Qt::AlignVCenter); lafBox->setColStretch(1, 4); - vbox->addLayout(lafBox, 0); + vbox->addLayout(TQT_TQLAYOUT(lafBox), 0); vbox->addSpacing(3); // add the Automatically Select Extension checkbox @@ -1133,7 +1133,7 @@ void KFileDialog::slotFilterChanged() TQString filter = filterWidget->currentFilter(); ops->clearFilter(); - if ( filter.find( '/' ) > -1 ) { + if ( filter.tqfind( '/' ) > -1 ) { TQStringList types = TQStringList::split( " ", filter ); types.prepend( "inode/directory" ); ops->setMimeFilter( types ); @@ -1250,7 +1250,7 @@ void KFileDialog::setSelection(const TQString& url) } else { TQString filename = u.url(); - int sep = filename.findRev('/'); + int sep = filename.tqfindRev('/'); if (sep >= 0) { // there is a / in it if ( KProtocolInfo::supportsListing( u )) { KURL dir(u); @@ -1335,7 +1335,7 @@ TQString KFileDialog::getOpenFileNameWId(const TQString& startDir, const TQString& filter, WId parent_id, const TQString& caption) { - TQWidget* parent = TQWidget::find( parent_id ); + TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); KFileDialog dlg(startDir, filter, parent, "filedialog", true); #ifdef Q_WS_X11 if( parent == NULL && parent_id != 0 ) @@ -1474,7 +1474,7 @@ KURL::List& KFileDialog::parseSelectedURLs() const if ( d->filenames.contains( '/' )) { // assume _one_ absolute filename static const TQString &prot = KGlobal::staticQString(":/"); KURL u; - if ( d->filenames.find( prot ) != -1 ) + if ( d->filenames.tqfind( prot ) != -1 ) u = d->filenames; else u.setPath( d->filenames ); @@ -1504,7 +1504,7 @@ KURL::List KFileDialog::tokenize( const TQString& line ) const KURL u( ops->url() ); TQString name; - int count = line.contains( '"' ); + int count = line.tqcontains( '"' ); if ( count == 0 ) { // no " " -> assume one single file u.setFileName( line ); if ( u.isValid() ) @@ -1526,8 +1526,8 @@ KURL::List KFileDialog::tokenize( const TQString& line ) const int start = 0; int index1 = -1, index2 = -1; while ( true ) { - index1 = line.find( '"', start ); - index2 = line.find( '"', index1 + 1 ); + index1 = line.tqfind( '"', start ); + index2 = line.tqfind( '"', index1 + 1 ); if ( index1 < 0 ) break; @@ -1548,7 +1548,7 @@ TQString KFileDialog::selectedFile() const { if ( result() == TQDialog::Accepted ) { - KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget()); + KURL url = KIO::NetAccess::mostLocalURL(d->url,tqtopLevelWidget()); if (url.isLocalFile()) return url.path(); else { @@ -1570,7 +1570,7 @@ TQStringList KFileDialog::selectedFiles() const KURL::List urls = parseSelectedURLs(); TQValueListConstIterator<KURL> it = urls.begin(); while ( it != urls.end() ) { - url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget()); + url = KIO::NetAccess::mostLocalURL(*it,tqtopLevelWidget()); if ( url.isLocalFile() ) list.append( url.path() ); ++it; @@ -1617,7 +1617,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi const TQString& caption) { bool specialDir = dir.at(0) == ':'; - TQWidget* parent = TQWidget::find( parent_id ); + TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); #ifdef Q_WS_X11 if( parent == NULL && parent_id != 0 ) @@ -1737,8 +1737,8 @@ void KFileDialog::readConfig( KConfig *kc, const TQString& group ) d->autoSelectExtChecked = kc->readBoolEntry (AutoSelectExtChecked, DefaultAutoSelectExtChecked); updateAutoSelectExtension (); - int w1 = minimumSize().width(); - int w2 = toolbar->sizeHint().width() + 10; + int w1 = tqminimumSize().width(); + int w2 = toolbar->tqsizeHint().width() + 10; if (w1 < w2) setMinimumWidth(w2); @@ -1885,7 +1885,7 @@ static TQString getExtensionFromPatternList (const TQStringList &patternList) // *.JP? if ((*it).startsWith ("*.") && (*it).length () > 2 && - (*it).find ('*', 2) < 0 && (*it).find ('?', 2) < 0) + (*it).tqfind ('*', 2) < 0 && (*it).tqfind ('?', 2) < 0) { ret = (*it).mid (1); break; @@ -1937,7 +1937,7 @@ void KFileDialog::updateAutoSelectExtension (void) if (!filter.isEmpty ()) { // e.g. "*.cpp" - if (filter.find ('/') < 0) + if (filter.tqfind ('/') < 0) { d->extension = getExtensionFromPatternList (TQStringList::split (" ", filter)).lower (); kdDebug (kfile_area) << "\tsetFilter-style: pattern ext=\'" @@ -2056,10 +2056,10 @@ void KFileDialog::updateLocationEditExtension (const TQString &lastExtension) KURL url = getCompleteURL (urlStr); kdDebug (kfile_area) << "updateLocationEditExtension (" << url << ")" << endl; - const int fileNameOffset = urlStr.findRev ('/') + 1; + const int fileNameOffset = urlStr.tqfindRev ('/') + 1; TQString fileName = urlStr.mid (fileNameOffset); - const int dot = fileName.findRev ('.'); + const int dot = fileName.tqfindRev ('.'); const int len = fileName.length (); if (dot > 0 && // has an extension already and it's not a hidden file // like ".hidden" (but we do accept ".hidden.ext") @@ -2068,7 +2068,7 @@ void KFileDialog::updateLocationEditExtension (const TQString &lastExtension) { // exists? KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, topLevelWidget())) + if (KIO::NetAccess::stat (url, t, tqtopLevelWidget())) { kdDebug (kfile_area) << "\tfile exists" << endl; @@ -2115,7 +2115,7 @@ void KFileDialog::updateFilter () KMimeType::Ptr mime = KMimeType::findByPath(urlStr, 0, true); if (mime && mime->name() != KMimeType::defaultMimeType()) { if (filterWidget->currentFilter() != mime->name() && - filterWidget->filters.findIndex(mime->name()) != -1) { + filterWidget->filters.tqfindIndex(mime->name()) != -1) { filterWidget->setCurrentFilter(mime->name()); } } @@ -2135,7 +2135,7 @@ void KFileDialog::appendExtension (KURL &url) kdDebug (kfile_area) << "appendExtension(" << url << ")" << endl; const int len = fileName.length (); - const int dot = fileName.findRev ('.'); + const int dot = fileName.tqfindRev ('.'); const bool suppressExtension = (dot == len - 1); const bool unspecifiedExtension = (dot <= 0); @@ -2146,7 +2146,7 @@ void KFileDialog::appendExtension (KURL &url) // exists? KIO::UDSEntry t; - if (KIO::NetAccess::stat (url, t, topLevelWidget())) + if (KIO::NetAccess::stat (url, t, tqtopLevelWidget())) { kdDebug (kfile_area) << "\tfile exists - won't append extension" << endl; return; @@ -2265,7 +2265,7 @@ void KFileDialog::toggleBookmarks(bool show) connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )), TQT_SLOT( enterURL( const TQString& ))); - toolbar->insertButton(TQString::fromLatin1("bookmark"), + toolbar->insertButton(TQString::tqfromLatin1("bookmark"), (int)HOTLIST_BUTTON, true, i18n("Bookmarks"), 5); toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(), @@ -2361,11 +2361,11 @@ void KFileDialog::setNonExtSelection() TQString pattern, filename = locationEdit->currentText().stripWhiteSpace(); KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 ) + if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.tqfind( '*' , 1 ) == -1 ) locationEdit->lineEdit()->setSelection( 0, filename.length() - pattern.stripWhiteSpace().length()+1 ); else { - int lastDot = filename.findRev( '.' ); + int lastDot = filename.tqfindRev( '.' ); if ( lastDot > 0 ) locationEdit->lineEdit()->setSelection( 0, lastDot ); } diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp index c865cc0e1..771cc76b0 100644 --- a/kio/kfile/kfilefiltercombo.cpp +++ b/kio/kfile/kfilefiltercombo.cpp @@ -68,11 +68,11 @@ void KFileFilterCombo::setFilter(const TQString& filter) if (!filter.isEmpty()) { TQString tmp = filter; - int index = tmp.find('\n'); + int index = tmp.tqfind('\n'); while (index > 0) { filters.append(tmp.left(index)); tmp = tmp.mid(index + 1); - index = tmp.find('\n'); + index = tmp.tqfind('\n'); } filters.append(tmp); } @@ -82,7 +82,7 @@ void KFileFilterCombo::setFilter(const TQString& filter) TQStringList::ConstIterator it; TQStringList::ConstIterator end(filters.end()); for (it = filters.begin(); it != end; ++it) { - int tab = (*it).find('|'); + int tab = (*it).tqfind('|'); insertItem((tab < 0) ? *it : (*it).mid(tab + 1)); } @@ -101,7 +101,7 @@ TQString KFileFilterCombo::currentFilter() const } } - int tab = f.find('|'); + int tab = f.tqfind('|'); if (tab < 0) return f; else @@ -129,7 +129,7 @@ void KFileFilterCombo::setMimeFilter( const TQStringList& types, { clear(); filters.clear(); - TQString delim = TQString::fromLatin1(", "); + TQString delim = TQString::tqfromLatin1(", "); d->hasAllSupportedFiles = false; m_allTypes = defaultType.isEmpty() && (types.count() > 1); @@ -179,7 +179,7 @@ void KFileFilterCombo::slotFilterChanged() bool KFileFilterCombo::eventFilter( TQObject *o, TQEvent *e ) { - if ( o == lineEdit() && e->type() == TQEvent::FocusOut ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit()) && e->type() == TQEvent::FocusOut ) { if ( currentText() != d->lastFilter ) emit filterChanged(); } diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp index a4c65924d..38bdec9b3 100644 --- a/kio/kfile/kfileiconview.cpp +++ b/kio/kfile/kfileiconview.cpp @@ -60,25 +60,25 @@ public: noArrangement = false; ignoreMaximumSize = false; - smallColumns = new KRadioAction( i18n("Small Icons"), 0, parent, + smallColumns = new KRadioAction( i18n("Small Icons"), 0, TQT_TQOBJECT(parent), TQT_SLOT( slotSmallColumns() ), parent->actionCollection(), "small columns" ); - largeRows = new KRadioAction( i18n("Large Icons"), 0, parent, + largeRows = new KRadioAction( i18n("Large Icons"), 0, TQT_TQOBJECT(parent), TQT_SLOT( slotLargeRows() ), parent->actionCollection(), "large rows" ); - smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode")); - largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode")); + smallColumns->setExclusiveGroup(TQString::tqfromLatin1("IconView mode")); + largeRows->setExclusiveGroup(TQString::tqfromLatin1("IconView mode")); previews = new KToggleAction( i18n("Thumbnail Previews"), 0, parent->actionCollection(), "show previews" ); - zoomIn = KStdAction::zoomIn( parent, TQT_SLOT( zoomIn() ), + zoomIn = KStdAction::zoomIn( TQT_TQOBJECT(parent), TQT_SLOT( zoomIn() ), parent->actionCollection(), "zoomIn" ); - zoomOut = KStdAction::zoomOut( parent, TQT_SLOT( zoomOut() ), + zoomOut = KStdAction::zoomOut( TQT_TQOBJECT(parent), TQT_SLOT( zoomOut() ), parent->actionCollection(), "zoomOut" ); previews->setGroup("previews"); @@ -191,7 +191,7 @@ void KFileIconView::readConfig( KConfig *kc, const TQString& group ) { TQString gr = group.isEmpty() ? TQString("KFileIconView") : group; KConfigGroupSaver cs( kc, gr ); - TQString small = TQString::fromLatin1("SmallColumns"); + TQString small = TQString::tqfromLatin1("SmallColumns"); d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE ); d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) ); @@ -214,8 +214,8 @@ void KFileIconView::writeConfig( KConfig *kc, const TQString& group ) KConfigGroupSaver cs( kc, gr ); TQString viewMode = d->smallColumns->isChecked() ? - TQString::fromLatin1("SmallColumns") : - TQString::fromLatin1("LargeRows"); + TQString::tqfromLatin1("SmallColumns") : + TQString::tqfromLatin1("LargeRows"); if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE ) kc->revertToDefault( "ViewMode" ); else @@ -251,12 +251,12 @@ void KFileIconView::showToolTip( TQIconViewItem *item ) int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 : item->pixmapRect().width() ) - 4; if ( fontMetrics().width( item->text() ) >= w ) { - toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0, + toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").arg(item->text()), 0, "myToolTip", - WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); + (WFlags)(WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) ); toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); toolTip->setLineWidth( 1 ); - toolTip->setAlignment( AlignLeft | AlignTop ); + toolTip->tqsetAlignment( AlignLeft | AlignTop ); toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) ); toolTip->adjustSize(); TQRect screen = TQApplication::desktop()->screenGeometry( @@ -268,7 +268,7 @@ void KFileIconView::showToolTip( TQIconViewItem *item ) toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); } toolTip->setFont( TQToolTip::font() ); - toolTip->setPalette( TQToolTip::palette(), true ); + toolTip->tqsetPalette( TQToolTip::palette(), true ); toolTip->show(); } } @@ -338,7 +338,7 @@ void KFileIconView::insertItem( KFileItem *i ) KFileView::insertItem( i ); TQIconView* qview = static_cast<TQIconView*>( this ); - // Since creating and initializing an item leads to a repaint, + // Since creating and initializing an item leads to a tqrepaint, // we disable updates on the IconView for a while. qview->setUpdatesEnabled( false ); KFileIconViewItem *item = new KFileIconViewItem( qview, i ); @@ -450,7 +450,7 @@ void KFileIconView::updateView( bool b ) if ( !item->pixmapSize().isNull() ) item->setPixmapSize( TQSize( 0, 0 ) ); } - // recalculate item parameters but avoid an in-place repaint + // recalculate item parameters but avoid an in-place tqrepaint item->setPixmap( (item->fileInfo())->pixmap( myIconSize ), true, false ); item = static_cast<KFileIconViewItem *>(item->nextItem()); } while ( item != 0L ); @@ -736,7 +736,7 @@ void KFileIconView::listingCompleted() // need to remove our tooltip, eventually bool KFileIconView::eventFilter( TQObject *o, TQEvent *e ) { - if ( o == viewport() || o == this ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) { int type = e->type(); if ( type == TQEvent::Leave || type == TQEvent::FocusOut ) @@ -763,7 +763,7 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i, if ( updateTextAndPixmap ) { - // this causes a repaint of the item, which we want to avoid during + // this causes a tqrepaint of the item, which we want to avoid during // directory listing, when all items are created. We want to paint all // items at once, not every single item in that case. item->setText( i->text() , false, false ); @@ -866,7 +866,7 @@ void KFileIconView::contentsDragEnterEvent( TQDragEnterEvent *e ) if ((dropOptions() & AutoOpenDirs) == 0) return; - KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(findItem( contentsToViewport( e->pos() ) )); + KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(tqfindItem( contentsToViewport( e->pos() ) )); if ( item ) { // are we over an item ? d->dropItem = item; d->autoOpenTimer.start( autoOpenDelay() ); // restart timer @@ -889,7 +889,7 @@ void KFileIconView::contentsDragMoveEvent( TQDragMoveEvent *e ) if ((dropOptions() & AutoOpenDirs) == 0) return; - KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(findItem( contentsToViewport( e->pos() ) )); + KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(tqfindItem( contentsToViewport( e->pos() ) )); if ( item ) { // are we over an item ? if (d->dropItem != item) { @@ -921,7 +921,7 @@ void KFileIconView::contentsDropEvent( TQDropEvent *e ) } e->acceptAction(); // Yes - KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(findItem( contentsToViewport( e->pos() ) )); + KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(tqfindItem( contentsToViewport( e->pos() ) )); KFileItem * fileItem = 0; if (item) fileItem = item->fileInfo(); diff --git a/kio/kfile/kfilemetainfowidget.cpp b/kio/kfile/kfilemetainfowidget.cpp index c9328f026..4b8adefc3 100644 --- a/kio/kfile/kfilemetainfowidget.cpp +++ b/kio/kfile/kfilemetainfowidget.cpp @@ -272,7 +272,7 @@ TQWidget* KFileMetaInfoWidget::makeStringWidget() TQWidget* KFileMetaInfoWidget::makeDateWidget() { - TQWidget *e = new QDateEdit(m_item.value().toDate(), this); + TQWidget *e = new TQDateEdit(m_item.value().toDate(), this); connect(e, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotDateChanged(const TQDate&))); return e; @@ -280,12 +280,12 @@ TQWidget* KFileMetaInfoWidget::makeDateWidget() TQWidget* KFileMetaInfoWidget::makeTimeWidget() { - return new QTimeEdit(m_item.value().toTime(), this); + return new TQTimeEdit(m_item.value().toTime(), this); } TQWidget* KFileMetaInfoWidget::makeDateTimeWidget() { - return new QDateTimeEdit(m_item.value().toDateTime(), this); + return new TQDateTimeEdit(m_item.value().toDateTime(), this); } void KFileMetaInfoWidget::reparentValidator( TQWidget *widget, diff --git a/kio/kfile/kfilemetainfowidget.h b/kio/kfile/kfilemetainfowidget.h index c22936b5e..96614950b 100644 --- a/kio/kfile/kfilemetainfowidget.h +++ b/kio/kfile/kfilemetainfowidget.h @@ -27,7 +27,7 @@ /*! * A widget to display file meta infos (like id3 for mp3) */ -class KIO_EXPORT KFileMetaInfoWidget: public QWidget +class KIO_EXPORT KFileMetaInfoWidget: public TQWidget { Q_OBJECT public: diff --git a/kio/kfile/kfilemetapreview.cpp b/kio/kfile/kfilemetapreview.cpp index 1be7743a1..676549a29 100644 --- a/kio/kfile/kfilemetapreview.cpp +++ b/kio/kfile/kfilemetapreview.cpp @@ -43,7 +43,7 @@ void KFileMetaPreview::initPreviewProviders() KImageFilePreview *imagePreview = new KImageFilePreview( m_stack ); (void) m_stack->addWidget( imagePreview ); m_stack->raiseWidget( imagePreview ); - resize( imagePreview->sizeHint() ); + resize( imagePreview->tqsizeHint() ); TQStringList mimeTypes = imagePreview->supportedMimeTypes(); TQStringList::ConstIterator it = mimeTypes.begin(); @@ -62,7 +62,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT if ( mimeType == "inode/directory" ) return 0L; - KPreviewWidgetBase *provider = m_previewProviders.find( mimeType ); + KPreviewWidgetBase *provider = m_previewProviders.tqfind( mimeType ); if ( provider ) return provider; @@ -87,15 +87,15 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT } // with the new mimetypes from the audio-preview, try again - provider = m_previewProviders.find( mimeType ); + provider = m_previewProviders.tqfind( mimeType ); if ( provider ) return provider; // ### mimetype may be image/* for example, try that - int index = mimeType.find( '/' ); + int index = mimeType.tqfind( '/' ); if ( index > 0 ) { - provider = m_previewProviders.find( mimeType.left( index + 1 ) + "*" ); + provider = m_previewProviders.tqfind( mimeType.left( index + 1 ) + "*" ); if ( provider ) return provider; } @@ -107,7 +107,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT TQString parentMimeType = mimeInfo->parentMimeType(); while ( !parentMimeType.isEmpty() ) { - provider = m_previewProviders.find( parentMimeType ); + provider = m_previewProviders.tqfind( parentMimeType ); if ( provider ) return provider; @@ -123,11 +123,11 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT { if ( textProperty.toBool() ) { - provider = m_previewProviders.find( "text/plain" ); + provider = m_previewProviders.tqfind( "text/plain" ); if ( provider ) return provider; - provider = m_previewProviders.find( "text/*" ); + provider = m_previewProviders.tqfind( "text/*" ); if ( provider ) return provider; } @@ -188,7 +188,7 @@ KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( TQWidget *parent ) return 0L; } - return dynamic_cast<KPreviewWidgetBase*>( factory->create( parent, "kfileaudiopreview" )); + return dynamic_cast<KPreviewWidgetBase*>( factory->create( TQT_TQOBJECT(parent), "kfileaudiopreview" )); } void KFileMetaPreview::virtual_hook( int, void* ) {} diff --git a/kio/kfile/kfilepreview.cpp b/kio/kfile/kfilepreview.cpp index b221a1ebb..c0f73949e 100644 --- a/kio/kfile/kfilepreview.cpp +++ b/kio/kfile/kfilepreview.cpp @@ -53,7 +53,7 @@ KFilePreview::~KFilePreview() // don't delete the preview, we can reuse it // (it will get deleted by ~KDirOperator) - if ( preview && preview->parentWidget() == this ) { + if ( preview && preview->tqparentWidget() == this ) { preview->reparent(0L, 0, TQPoint(0, 0), false); } } @@ -68,9 +68,9 @@ void KFilePreview::init( KFileView *view ) preview = new TQWidget((TQSplitter*)this, "preview"); TQString tmp = i18n("No preview available."); TQLabel *l = new TQLabel(tmp, preview); - l->setMinimumSize(l->sizeHint()); + l->setMinimumSize(l->tqsizeHint()); l->move(10, 5); - preview->setMinimumWidth(l->sizeHint().width()+20); + preview->setMinimumWidth(l->tqsizeHint().width()+20); setResizeMode(preview, TQSplitter::KeepSize); // Why copy the actions? --ellis, 13 Jan 02. @@ -123,7 +123,7 @@ void KFilePreview::setPreviewWidget(const TQWidget *w, const KURL &) delete preview; preview = const_cast<TQWidget*>(w); preview->reparent((TQSplitter*)this, 0, TQPoint(0, 0), true); - preview->resize(preview->sizeHint()); + preview->resize(preview->tqsizeHint()); preview->show(); } @@ -149,7 +149,7 @@ void KFilePreview::updateView(bool b) { left->updateView(b); if(preview) - preview->repaint(b); + preview->tqrepaint(b); } void KFilePreview::updateView(const KFileItem *i) diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp index 329bd19dc..c396a1b58 100644 --- a/kio/kfile/kfilesharedlg.cpp +++ b/kio/kfile/kfilesharedlg.cpp @@ -184,13 +184,13 @@ void KFileSharePropsPlugin::init() // Some help text TQLabel *label = new TQLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget ); - label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak ); + label->tqsetAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak ); vbox->addWidget( label, 0 ); KSeparator* sep=new KSeparator(m_widget); vbox->addWidget( sep, 0 ); label = new TQLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget ); - label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak ); + label->tqsetAlignment( TQt::AlignAuto | TQt::AlignVCenter | TQt::WordBreak ); vbox->addWidget( label, 0 ); m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget ); connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) ); diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp index 154009625..c3449ca9b 100644 --- a/kio/kfile/kfilespeedbar.cpp +++ b/kio/kfile/kfilespeedbar.cpp @@ -133,15 +133,15 @@ void KFileSpeedBar::save( KConfig *config ) writeConfig( config, "KFileDialog Speedbar" ); } -TQSize KFileSpeedBar::sizeHint() const +TQSize KFileSpeedBar::tqsizeHint() const { - TQSize sizeHint = KURLBar::sizeHint(); + TQSize tqsizeHint = KURLBar::tqsizeHint(); int ems = fontMetrics().width("mmmmmmmmmmmm"); - if (sizeHint.width() < ems) + if (tqsizeHint.width() < ems) { - sizeHint.setWidth(ems); + tqsizeHint.setWidth(ems); } - return sizeHint; + return tqsizeHint; } #include "kfilespeedbar.moc" diff --git a/kio/kfile/kfilespeedbar.h b/kio/kfile/kfilespeedbar.h index 28c621651..171081101 100644 --- a/kio/kfile/kfilespeedbar.h +++ b/kio/kfile/kfilespeedbar.h @@ -31,7 +31,7 @@ public: ~KFileSpeedBar(); virtual void save( KConfig *config ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; private: bool m_initializeSpeedbar : 1; diff --git a/kio/kfile/kfiletreebranch.cpp b/kio/kfile/kfiletreebranch.cpp index 352bd875e..4f7539490 100644 --- a/kio/kfile/kfiletreebranch.cpp +++ b/kio/kfile/kfiletreebranch.cpp @@ -182,7 +182,7 @@ void KFileTreeBranch::addItems( const KFileItemList& list ) if( !m_showExtensions && !currItem->isDir() ) /* Need to cut the extension */ { TQString name = currItem->text(); - int mPoint = name.findRev( '.' ); + int mPoint = name.tqfindRev( '.' ); if( mPoint > 0 ) name = name.left( mPoint ); newKFTVI->setText( 0, name ); diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp index e8451077d..14a365392 100644 --- a/kio/kfile/kfiletreeview.cpp +++ b/kio/kfile/kfiletreeview.cpp @@ -342,7 +342,7 @@ void KFileTreeView::slotAutoOpenFolder() return; m_dropItem->setOpen( true ); - m_dropItem->repaint(); + m_dropItem->tqrepaint(); } @@ -413,7 +413,7 @@ KFileTreeBranchList& KFileTreeView::branches() bool KFileTreeView::removeBranch( KFileTreeBranch *branch ) { - if(m_branches.contains(branch)) + if(m_branches.tqcontains(branch)) { delete (branch->root()); m_branches.remove( branch ); @@ -522,7 +522,7 @@ void KFileTreeView::slotAnimation() } uint & iconNumber = it.data().iconNumber; - TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); + TQString icon = TQString::tqfromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); // kdDebug(250) << "Loading icon " << icon << endl; item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) ); @@ -558,7 +558,7 @@ void KFileTreeView::stopAnimation( KFileTreeViewItem * item ) kdDebug(250) << "Stoping Animation !" << endl; - MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.find(item); + MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.tqfind(item); if ( it != m_mapCurrentOpeningFolders.end() ) { if( item->isDir() && isOpen( item) ) @@ -666,7 +666,7 @@ void KFileTreeViewToolTip::maybeTip( const TQPoint & ) if ( item ) { TQString text = static_cast<KFileViewItem*>( item )->toolTipText(); if ( !text.isEmpty() ) - tip ( m_view->itemRect( item ), text ); + tip ( m_view->tqitemRect( item ), text ); } #endif } diff --git a/kio/kfile/kfiletreeview.h b/kio/kfile/kfiletreeview.h index 92565269d..fb242b2c6 100644 --- a/kio/kfile/kfiletreeview.h +++ b/kio/kfile/kfiletreeview.h @@ -37,7 +37,7 @@ class TQTimer; -class KIO_EXPORT KFileTreeViewToolTip : public QToolTip +class KIO_EXPORT KFileTreeViewToolTip : public TQToolTip { public: KFileTreeViewToolTip( TQListView *view ) : TQToolTip( view ), m_view( view ) {} diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp index 165801652..eb12a9498 100644 --- a/kio/kfile/kfileview.cpp +++ b/kio/kfile/kfileview.cpp @@ -258,7 +258,7 @@ sort_by_name: void KFileView::updateView(bool f) { - widget()->repaint(f); + widget()->tqrepaint(f); } void KFileView::updateView(const KFileItem *) diff --git a/kio/kfile/kfileview.h b/kio/kfile/kfileview.h index 05b32e863..1a13e264e 100644 --- a/kio/kfile/kfileview.h +++ b/kio/kfile/kfileview.h @@ -34,7 +34,7 @@ class KActionCollection; * internal class to make easier to use signals possible * @internal **/ -class KIO_EXPORT KFileViewSignaler : public QObject +class KIO_EXPORT KFileViewSignaler : public TQObject { Q_OBJECT @@ -146,11 +146,11 @@ public: virtual void clear(); /** - * does a repaint of the view. + * does a tqrepaint of the view. * * The default implementation calls * \code - * widget()->repaint(f) + * widget()->tqrepaint(f) * \endcode **/ virtual void updateView(bool f = true); diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp index 164abd35a..2b1b68d68 100644 --- a/kio/kfile/kicondialog.cpp +++ b/kio/kfile/kicondialog.cpp @@ -60,7 +60,7 @@ class KIconCanvas::KIconCanvasPrivate /** * Helper class for sorting icon paths by icon name */ -class IconPath : public QString +class IconPath : public TQString { protected: TQString m_iconName; @@ -68,7 +68,7 @@ protected: public: IconPath(const TQString &ip) : TQString (ip) { - int n = findRev('/'); + int n = tqfindRev('/'); m_iconName = (n==-1) ? static_cast<TQString>(*this) : mid(n+1); } @@ -119,7 +119,7 @@ void KIconCanvas::loadFiles(const TQStringList& files) void KIconCanvas::slotLoadFiles() { setResizeMode(Fixed); - TQApplication::setOverrideCursor(waitCursor); + TQApplication::setOverrideCursor(tqwaitCursor); // disable updates to not trigger paint events when adding child items setUpdatesEnabled( false ); @@ -136,8 +136,8 @@ void KIconCanvas::slotLoadFiles() for (it=mFiles.begin(), i=0; it!=end; ++it, i++) { // Calling kapp->processEvents() makes the iconview flicker like hell - // (it's being repainted once for every new item), so we don't do this. - // Instead, we directly repaint the progress bar without going through + // (it's being tqrepainted once for every new item), so we don't do this. + // Instead, we directly tqrepaint the progress bar without going through // the event-loop. We do that just once for every 10th item so that // the progress bar doesn't flicker in turn. (pfeiffer) if ( emitProgress >= 10 ) { @@ -259,7 +259,7 @@ void KIconDialog::init() mGroupOrSize = KIcon::Desktop; mContext = KIcon::Any; mType = 0; - mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); + mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::tqfromLatin1("*.png")); TQWidget *main = new TQWidget( this ); setMainWidget(main); @@ -367,7 +367,7 @@ void KIconDialog::init() mContextMap[ mNumContext++ ] = context_id[ i ]; } } - mpCombo->setFixedSize(mpCombo->sizeHint()); + mpCombo->setFixedSize(mpCombo->tqsizeHint()); mpBrowseBut->setFixedWidth(mpCombo->width()); @@ -631,8 +631,8 @@ void KIconDialog::slotProgress(int p) { mpProgress->setProgress(p); // commented out the following since setProgress already paints ther - // progress bar. ->repaint() only makes it flicker - //mpProgress->repaint(); + // progress bar. ->tqrepaint() only makes it flicker + //mpProgress->tqrepaint(); } void KIconDialog::slotFinished() diff --git a/kio/kfile/kicondialog.h b/kio/kfile/kicondialog.h index 54b9ea921..e15b76884 100644 --- a/kio/kfile/kicondialog.h +++ b/kio/kfile/kicondialog.h @@ -254,7 +254,7 @@ private: * @see KIconDialog * @short A push button that allows selection of an icon. */ -class KIO_EXPORT KIconButton: public QPushButton +class KIO_EXPORT KIconButton: public TQPushButton { Q_OBJECT Q_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon ) diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp index 2d9f7881a..f2869314c 100644 --- a/kio/kfile/kimagefilepreview.cpp +++ b/kio/kfile/kimagefilepreview.cpp @@ -43,8 +43,8 @@ KImageFilePreview::KImageFilePreview( TQWidget *parent ) imageLabel = new TQLabel( this ); imageLabel->setFrameStyle( TQFrame::NoFrame ); - imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - imageLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding) ); + imageLabel->tqsetAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); + imageLabel->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding) ); vb->addWidget( imageLabel ); TQHBoxLayout *hb = new TQHBoxLayout( 0 ); @@ -137,7 +137,7 @@ void KImageFilePreview::resizeEvent( TQResizeEvent * ) timer->start( 100, true ); // forces a new preview } -TQSize KImageFilePreview::sizeHint() const +TQSize KImageFilePreview::tqsizeHint() const { return TQSize( 20, 200 ); // otherwise it ends up huge??? } diff --git a/kio/kfile/kimagefilepreview.h b/kio/kfile/kimagefilepreview.h index 864fc5d31..3e64f2a7b 100644 --- a/kio/kfile/kimagefilepreview.h +++ b/kio/kfile/kimagefilepreview.h @@ -36,7 +36,7 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase KImageFilePreview(TQWidget *parent); ~KImageFilePreview(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: virtual void showPreview(const KURL &url); diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp index 281fbc622..d3d3f7c41 100644 --- a/kio/kfile/kmetaprops.cpp +++ b/kio/kfile/kmetaprops.cpp @@ -38,7 +38,7 @@ #undef Bool -class MetaPropsScrollView : public QScrollView +class MetaPropsScrollView : public TQScrollView { public: MetaPropsScrollView(TQWidget* parent = 0, const char* name = 0) @@ -56,8 +56,8 @@ protected: virtual void viewportResizeEvent(TQResizeEvent* ev) { TQScrollView::viewportResizeEvent(ev); - m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()), - kMax(m_frame->sizeHint().height(), ev->size().height())); + m_frame->resize( kMax(m_frame->tqsizeHint().width(), ev->size().width()), + kMax(m_frame->tqsizeHint().height(), ev->size().height())); }; private: @@ -179,7 +179,7 @@ void KFileMetaPropsPlugin::createLayout() iit!=editItems.end(); ++iit) { TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox); - l->setAlignment( AlignAuto | AlignTop | ExpandTabs ); + l->tqsetAlignment( AlignAuto | AlignTop | ExpandTabs ); TQValidator* val = mtinfo->createValidator(*git, (*iit).key()); if (!val) kdDebug(7033) << "didn't get a validator for " << *git << "/" << (*iit).key() << endl; w = new KFileMetaInfoWidget(*iit, val, groupBox); @@ -192,7 +192,7 @@ void KFileMetaPropsPlugin::createLayout() iit!=readItems.end(); ++iit) { TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox); - l->setAlignment( AlignAuto | AlignTop | ExpandTabs ); + l->tqsetAlignment( AlignAuto | AlignTop | ExpandTabs ); (new KFileMetaInfoWidget(*iit, KFileMetaInfoWidget::ReadOnly, 0L, groupBox)); } } @@ -201,7 +201,7 @@ void KFileMetaPropsPlugin::createLayout() // the add key (disabled until fully implemented) /* d->m_add = new TQPushButton(i18n("&Add"), topframe); - d->m_add->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + d->m_add->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); connect(d->m_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd())); tmp->addWidget(d->m_add); @@ -216,7 +216,7 @@ void KFileMetaPropsPlugin::createLayout() d->m_add->setEnabled(false); for (TQStringList::Iterator it = sk.begin(); it!=sk.end(); ++it) { - if ( l.find(*it)==l.end() ) + if ( l.tqfind(*it)==l.end() ) { d->m_add->setEnabled(true); kdDebug(250) << "**first addable key is " << (*it).latin1() << "**" <<endl; diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp index 9e370643f..47461dbce 100644 --- a/kio/kfile/knotifydialog.cpp +++ b/kio/kfile/knotifydialog.cpp @@ -112,7 +112,7 @@ namespace KNotify }; // Needed for displaying tooltips in the listview's QHeader - class KNotifyToolTip : public QToolTip + class KNotifyToolTip : public TQToolTip { public: KNotifyToolTip( TQHeader *header ) @@ -130,10 +130,10 @@ namespace KNotify protected: virtual void maybeTip ( const TQPoint& p ) { - TQHeader *header = static_cast<TQHeader*>( parentWidget() ); + TQHeader *header = static_cast<TQHeader*>( tqparentWidget() ); int section = 0; - if ( header->orientation() == Horizontal ) + if ( header->orientation() == Qt::Horizontal ) section= header->sectionAt( p.x() ); else section= header->sectionAt( p.y() ); @@ -181,7 +181,7 @@ KNotifyDialog::~KNotifyDialog() void KNotifyDialog::addApplicationEvents( const char *appName ) { addApplicationEvents( TQString::fromUtf8( appName ) + - TQString::fromLatin1( "/eventsrc" ) ); + TQString::tqfromLatin1( "/eventsrc" ) ); } void KNotifyDialog::addApplicationEvents( const TQString& path ) @@ -514,7 +514,7 @@ void KNotifyWidget::updatePixmaps( ListViewItem *item ) void KNotifyWidget::addVisibleApp( Application *app ) { - if ( !app || (m_visibleApps.findRef( app ) != -1) ) + if ( !app || (m_visibleApps.tqfindRef( app ) != -1) ) return; m_visibleApps.append( app ); @@ -820,7 +820,7 @@ void KNotifyWidget::save() { if ( !kapp->dcopClient()->isAttached() ) kapp->dcopClient()->attach(); - kapp->dcopClient()->send("knotify", "", "reconfigure()", ""); + kapp->dcopClient()->send("knotify", "", "reconfigure()", TQString("")); } emit changed( false ); @@ -830,8 +830,8 @@ void KNotifyWidget::save() // "/opt/kde3/share/apps/kwin/eventsrc" TQString KNotifyWidget::makeRelative( const TQString& fullPath ) { - int slash = fullPath.findRev( '/' ) - 1; - slash = fullPath.findRev( '/', slash ); + int slash = fullPath.tqfindRev( '/' ) - 1; + slash = fullPath.tqfindRev( '/', slash ); if ( slash < 0 ) return TQString::null; @@ -1001,17 +1001,17 @@ void KNotifyWidget::enableAll( int what, bool enable ) Application::Application( const TQString &path ) { TQString config_file = path; - config_file[config_file.find('/')] = '.'; + config_file[config_file.tqfind('/')] = '.'; m_events = 0L; config = new KConfig(config_file, false, false); kc = new KConfig(path, true, false, "data"); - kc->setGroup( TQString::fromLatin1("!Global!") ); - m_icon = kc->readEntry(TQString::fromLatin1("IconName"), - TQString::fromLatin1("misc")); - m_description = kc->readEntry( TQString::fromLatin1("Comment"), + kc->setGroup( TQString::tqfromLatin1("!Global!") ); + m_icon = kc->readEntry(TQString::tqfromLatin1("IconName"), + TQString::tqfromLatin1("misc")); + m_description = kc->readEntry( TQString::tqfromLatin1("Comment"), i18n("No description available") ); - int index = path.find( '/' ); + int index = path.tqfind( '/' ); if ( index >= 0 ) m_appname = path.left( index ); else @@ -1070,10 +1070,10 @@ void Application::reloadEvents( bool revertToDefaults ) Event *e = 0L; - TQString global = TQString::fromLatin1("!Global!"); - TQString default_group = TQString::fromLatin1("<default>"); - TQString name = TQString::fromLatin1("Name"); - TQString comment = TQString::fromLatin1("Comment"); + TQString global = TQString::tqfromLatin1("!Global!"); + TQString default_group = TQString::tqfromLatin1("<default>"); + TQString name = TQString::tqfromLatin1("Name"); + TQString comment = TQString::tqfromLatin1("Comment"); TQStringList conflist = kc->groupList(); TQStringList::ConstIterator it = conflist.begin(); diff --git a/kio/kfile/knotifydialog.h b/kio/kfile/knotifydialog.h index 70e195aba..337f4d1be 100644 --- a/kio/kfile/knotifydialog.h +++ b/kio/kfile/knotifydialog.h @@ -323,7 +323,7 @@ namespace KNotify /** * @internal */ - class ListViewItem : public QListViewItem + class ListViewItem : public TQListViewItem { public: ListViewItem( TQListView *view, Event *event ); diff --git a/kio/kfile/knotifywidgetbase.ui b/kio/kfile/knotifywidgetbase.ui index 99fd07582..c2ce7ab68 100644 --- a/kio/kfile/knotifywidgetbase.ui +++ b/kio/kfile/knotifywidgetbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KNotifyWidgetBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KNotifyWidgetBase</cstring> </property> @@ -109,7 +109,7 @@ </sizepolicy> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_controlsBox</cstring> </property> @@ -120,7 +120,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>m_affectAllApps</cstring> </property> @@ -138,7 +138,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -155,14 +155,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>318</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton" row="2" column="1"> + <widget class="TQPushButton" row="2" column="1"> <property name="name"> <cstring>m_buttonDisable</cstring> </property> @@ -173,7 +173,7 @@ <string>Allows you to change the behavior for all events at once</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>m_buttonEnable</cstring> </property> @@ -196,7 +196,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_actionsBox</cstring> </property> @@ -207,7 +207,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_stderr</cstring> </property> @@ -215,7 +215,7 @@ <string>Print a message to standard &error output</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_messageBox</cstring> </property> @@ -223,7 +223,7 @@ <string>Show a &message in a pop-up window</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_execute</cstring> </property> @@ -231,7 +231,7 @@ <string>E&xecute a program:</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>Layout25</cstring> </property> @@ -239,7 +239,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_playSound</cstring> </property> @@ -247,7 +247,7 @@ <string>Play a &sound:</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_playButton</cstring> </property> @@ -260,7 +260,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="6" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_taskbar</cstring> </property> @@ -268,7 +268,7 @@ <string>Mark &taskbar entry</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_logToFile</cstring> </property> @@ -286,7 +286,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -341,7 +341,7 @@ </sizepolicy> </property> </widget> - <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_passivePopup</cstring> </property> @@ -354,7 +354,7 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout8</cstring> </property> @@ -362,7 +362,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_extension</cstring> </property> @@ -391,14 +391,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_playerButton</cstring> </property> diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp index 2a3e7e690..8d79dadae 100644 --- a/kio/kfile/kopenwith.cpp +++ b/kio/kfile/kopenwith.cpp @@ -131,7 +131,7 @@ void KAppTreeListItem::activate() void KAppTreeListItem::setOpen( bool o ) { if( o && !parsed ) { // fill the children before opening - ((KApplicationTree *) parent())->addDesktopGroup( path, this ); + ((KApplicationTree *) tqparent())->addDesktopGroup( path, this ); parsed = true; } TQListViewItem::setOpen( o ); @@ -279,8 +279,8 @@ void KApplicationTree::slotSelectionChanged(TQListViewItem* i) void KApplicationTree::resizeEvent( TQResizeEvent * e) { - setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent) - -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth)); + setColumnWidth(0, width()-TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent) + -2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_DefaultFrameWidth)); KListView::resizeEvent(e); } @@ -340,7 +340,7 @@ KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text, { TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() ); if (_urls.count() > 1) - caption += TQString::fromLatin1("..."); + caption += TQString::tqfromLatin1("..."); setCaption(caption); setServiceType( _urls ); init( _text, _value ); @@ -376,7 +376,7 @@ void KOpenWithDlg::setServiceType( const KURL::List& _urls ) if ( _urls.count() == 1 ) { qServiceType = KMimeType::findByURL( _urls.first())->name(); - if (qServiceType == TQString::fromLatin1("application/octet-stream")) + if (qServiceType == TQString::tqfromLatin1("application/octet-stream")) qServiceType = TQString::null; } else @@ -401,7 +401,7 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) TQToolButton *clearButton = new TQToolButton( this ); clearButton->setIconSet( BarIcon( "locationbar_erase" ) ); - clearButton->setFixedSize( clearButton->sizeHint() ); + clearButton->setFixedSize( clearButton->tqsizeHint() ); connect( clearButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClear() ) ); TQToolTip::add( clearButton, i18n( "Clear input field" ) ); @@ -413,13 +413,13 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) KHistoryCombo *combo = new KHistoryCombo(); combo->setDuplicatesEnabled( false ); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); - int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 ); + KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") ); + int max = kc->readNumEntry( TQString::tqfromLatin1("Maximum history"), 15 ); combo->setMaxCount( max ); - int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"), + int mode = kc->readNumEntry(TQString::tqfromLatin1("CompletionMode"), KGlobalSettings::completionMode()); combo->setCompletionMode((KGlobalSettings::Completion)mode); - TQStringList list = kc->readListEntry( TQString::fromLatin1("History") ); + TQStringList list = kc->readListEntry( TQString::tqfromLatin1("History") ); combo->setHistoryItems( list, true ); edit = new KURLRequester( combo, this ); } @@ -483,8 +483,8 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) // check to see if we use konsole if not disable the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); - TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); + KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); + TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole")); if (bReadOnly || preferredTerminal != "konsole") nocloseonexit->hide(); @@ -518,7 +518,7 @@ void KOpenWithDlg::init( const TQString& _text, const TQString& _value ) //edit->setText( _value ); // This is what caused "can't click on items before clicking on Name header". // Probably due to the resizeEvent handler using width(). - //resize( minimumWidth(), sizeHint().height() ); + //resize( minimumWidth(), tqsizeHint().height() ); edit->setFocus(); slotTextChanged(); } @@ -634,12 +634,12 @@ void KOpenWithDlg::slotOK() { TQString exec = serv->exec(); fullExec = exec; - exec.replace("%u", "", false); - exec.replace("%f", "", false); - exec.replace("-caption %c", ""); - exec.replace("-caption \"%c\"", ""); - exec.replace("%i", ""); - exec.replace("%m", ""); + exec.tqreplace("%u", "", false); + exec.tqreplace("%f", "", false); + exec.tqreplace("-caption %c", ""); + exec.tqreplace("-caption \"%c\"", ""); + exec.tqreplace("%i", ""); + exec.tqreplace("%m", ""); exec = exec.simplifyWhiteSpace(); if (exec == typedExec) { @@ -666,13 +666,13 @@ void KOpenWithDlg::slotOK() if (terminal->isChecked()) { - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); - preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole")); + KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); + preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::tqfromLatin1("konsole")); m_command = preferredTerminal; // only add --noclose when we are sure it is konsole we're using if (preferredTerminal == "konsole" && nocloseonexit->isChecked()) - m_command += TQString::fromLatin1(" --noclose"); - m_command += TQString::fromLatin1(" -e "); + m_command += TQString::tqfromLatin1(" --noclose"); + m_command += TQString::tqfromLatin1(" -e "); m_command += edit->url(); kdDebug(250) << "Setting m_command to " << m_command << endl; } @@ -740,7 +740,7 @@ void KOpenWithDlg::slotOK() { desktop = new KDesktopFile(newPath); } - desktop->writeEntry("Type", TQString::fromLatin1("Application")); + desktop->writeEntry("Type", TQString::tqfromLatin1("Application")); desktop->writeEntry("Name", initialServiceName); desktop->writePathEntry("Exec", fullExec); if (terminal->isChecked()) @@ -760,7 +760,7 @@ void KOpenWithDlg::slotOK() if (bRemember || d->saveNewApps) { TQStringList mimeList = desktop->readListEntry("MimeType", ';'); - if (!qServiceType.isEmpty() && !mimeList.contains(qServiceType)) + if (!qServiceType.isEmpty() && !mimeList.tqcontains(qServiceType)) mimeList.append(qServiceType); desktop->writeEntry("MimeType", mimeList, ';'); @@ -814,9 +814,9 @@ void KOpenWithDlg::accept() combo->addToHistory( edit->url() ); KConfig *kc = KGlobal::config(); - KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") ); - kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() ); - kc->writeEntry(TQString::fromLatin1("CompletionMode"), + KConfigGroupSaver ks( kc, TQString::tqfromLatin1("Open-with settings") ); + kc->writeEntry( TQString::tqfromLatin1("History"), combo->historyItems() ); + kc->writeEntry(TQString::tqfromLatin1("CompletionMode"), combo->completionMode()); // don't store the completion-list, as it contains all of KURLCompletion's // executables diff --git a/kio/kfile/kopenwith_p.h b/kio/kfile/kopenwith_p.h index 5583b03d9..f395d94bd 100644 --- a/kio/kfile/kopenwith_p.h +++ b/kio/kfile/kopenwith_p.h @@ -37,7 +37,7 @@ class TQStringList; /** * @internal */ -class KAppTreeListItem : public QListViewItem +class KAppTreeListItem : public TQListViewItem { bool parsed; bool directory; diff --git a/kio/kfile/kpreviewwidgetbase.h b/kio/kfile/kpreviewwidgetbase.h index 3a2a49b31..e8f2ca48c 100644 --- a/kio/kfile/kpreviewwidgetbase.h +++ b/kio/kfile/kpreviewwidgetbase.h @@ -41,7 +41,7 @@ class KURL; * @short Abstract baseclass for all preview widgets. * @author Frerich Raabe <raabe@kde.org> */ -class KIO_EXPORT KPreviewWidgetBase : public QWidget +class KIO_EXPORT KPreviewWidgetBase : public TQWidget { Q_OBJECT @@ -84,7 +84,7 @@ protected: private: class KPreviewWidgetBasePrivate; KPreviewWidgetBasePrivate * d() const { - return s_private->find( const_cast<KPreviewWidgetBase*>( this ) ); + return s_private->tqfind( const_cast<KPreviewWidgetBase*>( this ) ); } static TQPtrDict<KPreviewWidgetBasePrivate> * s_private; }; diff --git a/kio/kfile/kpropertiesdesktopadvbase.ui b/kio/kfile/kpropertiesdesktopadvbase.ui index fe1122136..a4ac75d4f 100644 --- a/kio/kfile/kpropertiesdesktopadvbase.ui +++ b/kio/kfile/kpropertiesdesktopadvbase.ui @@ -1,6 +1,7 @@ + <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KPropertiesDesktopAdvBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>widget11</cstring> </property> @@ -19,7 +20,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -40,14 +41,14 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>terminalCheck</cstring> </property> @@ -58,7 +59,7 @@ <string>Check this option if the application you want to run is a text mode application or if you want the information that is provided by the terminal emulator window.</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>terminalEditLabel</cstring> </property> @@ -69,7 +70,7 @@ <cstring>terminalEdit</cstring> </property> </widget> - <widget class="QCheckBox" row="1" column="1" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>terminalCloseCheck</cstring> </property> @@ -87,7 +88,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2_2</cstring> </property> @@ -98,7 +99,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>suidCheck</cstring> </property> @@ -119,14 +120,14 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>suidEditLabel</cstring> </property> @@ -150,7 +151,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup4</cstring> </property> @@ -161,7 +162,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>startupInfoCheck</cstring> </property> @@ -172,7 +173,7 @@ <string>Check this option if you want to make clear that your application has started. This visual feedback may appear as a busy cursor or in the taskbar.</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>systrayCheck</cstring> </property> @@ -183,7 +184,7 @@ <string>Check this option if you want to have a system tray handle for your application.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel12</cstring> </property> @@ -194,7 +195,7 @@ <cstring>dcopCombo</cstring> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <item> <property name="text"> <string>None</string> @@ -229,7 +230,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> diff --git a/kio/kfile/kpropertiesdesktopbase.ui b/kio/kfile/kpropertiesdesktopbase.ui index 7809d5135..73e6d953c 100644 --- a/kio/kfile/kpropertiesdesktopbase.ui +++ b/kio/kfile/kpropertiesdesktopbase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KPropertiesDesktopBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KPropertiesDesktopBase</cstring> </property> @@ -29,14 +29,14 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="6" column="0" rowspan="1" colspan="7"> + <widget class="TQLabel" row="6" column="0" rowspan="1" colspan="7"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -95,7 +95,7 @@ <p>If you want to associate this application with one or more mimetypes that are not in this list, click on the button <b>Add</b> below. If there are one or more filetypes that this application cannot handle, you may want to remove them from the list clicking on the button <b>Remove</b> below.</p></qt></string> </property> </widget> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>nameLabel</cstring> </property> @@ -117,7 +117,7 @@ <string>Type the name you want to give to this application here. This application will appear under this name in the applications menu and in the panel.</string> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -139,7 +139,7 @@ <string>Type the description of this application, based on its use, here. Examples: a dial up application (KPPP) would be "Dial up tool".</string> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -161,7 +161,7 @@ <string>Type any comment you think is useful here.</string> </property> </widget> - <widget class="QLabel" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -205,7 +205,7 @@ Following the command, you can have several place holders which will be replaced %c - the caption</string> </property> </widget> - <widget class="QPushButton" row="3" column="6"> + <widget class="TQPushButton" row="3" column="6"> <property name="name"> <cstring>browseButton</cstring> </property> @@ -216,7 +216,7 @@ Following the command, you can have several place holders which will be replaced <string>Click here to browse your file system in order to find the desired executable.</string> </property> </widget> - <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -238,7 +238,7 @@ Following the command, you can have several place holders which will be replaced <string>Sets the working directory for your application.</string> </property> </widget> - <widget class="QPushButton" row="8" column="0"> + <widget class="TQPushButton" row="8" column="0"> <property name="name"> <cstring>addFiletypeButton</cstring> </property> @@ -259,14 +259,14 @@ Following the command, you can have several place holders which will be replaced <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>53</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="8" column="3"> + <widget class="TQPushButton" row="8" column="3"> <property name="name"> <cstring>delFiletypeButton</cstring> </property> @@ -287,14 +287,14 @@ Following the command, you can have several place holders which will be replaced <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>53</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="8" column="5" rowspan="1" colspan="2"> + <widget class="TQPushButton" row="8" column="5" rowspan="1" colspan="2"> <property name="name"> <cstring>advancedButton</cstring> </property> diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index 0116123f1..a7be5de64 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -516,7 +516,7 @@ void KPropertiesDialog::insertPages() if ( mimetype.isEmpty() ) return; - TQString query = TQString::fromLatin1( + TQString query = TQString::tqfromLatin1( "('KPropsDlg/Plugin' in ServiceTypes) and " "((not exist [X-KDE-Protocol]) or " " ([X-KDE-Protocol] == '%1' ) )" ).arg(item->url().protocol()); @@ -529,7 +529,7 @@ void KPropertiesDialog::insertPages() { KPropsDlgPlugin *plugin = KParts::ComponentFactory ::createInstanceFromLibrary<KPropsDlgPlugin>( (*it)->library().local8Bit().data(), - this, + TQT_TQOBJECT(this), (*it)->name().latin1() ); if ( !plugin ) continue; @@ -704,7 +704,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) d = new KFilePropsPluginPrivate; d->bMultiple = (properties->items().count() > 1); d->bIconChanged = false; - d->bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh? + d->bKDesktopMode = (TQCString(tqApp->name()) == "kdesktop"); // nasty heh? d->bDesktopFile = KDesktopPropsPlugin::supports(properties->items()); kdDebug(250) << "KFilePropsPlugin::KFilePropsPlugin bMultiple=" << d->bMultiple << endl; @@ -718,7 +718,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl; mode_t mode = item->mode(); bool hasDirs = item->isDir() && !item->isLink(); - bool hasRoot = url.path() == TQString::fromLatin1("/"); + bool hasRoot = url.path() == TQString::tqfromLatin1("/"); TQString iconStr = KMimeType::iconForURL(url, mode); TQString directory = properties->kurl().directory(); TQString protocol = properties->kurl().protocol(); @@ -752,15 +752,15 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) grid->setColStretch(1, 0); grid->setColStretch(2, 1); grid->addColSpacing(1, KDialog::spacingHint()); - vbl->addLayout(grid); + vbl->addLayout(TQT_TQLAYOUT(grid)); int curRow = 0; if ( !d->bMultiple ) { TQString path; if ( !m_bFromTemplate ) { - isTrash = ( properties->kurl().protocol().find( "trash", 0, false)==0 ); - if ( properties->kurl().protocol().find("device", 0, false)==0) + isTrash = ( properties->kurl().protocol().tqfind( "trash", 0, false)==0 ); + if ( properties->kurl().protocol().tqfind("device", 0, false)==0) isDevice = true; // Extract the full name, but without file: for local files if ( isReallyLocal ) @@ -831,7 +831,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) magicMimeComment = TQString::null; } - if ( url.path() == TQString::fromLatin1("/") ) + if ( url.path() == TQString::tqfromLatin1("/") ) hasRoot = true; if ( (*it)->isDir() && !(*it)->isLink() ) { @@ -859,7 +859,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ ) { KIconButton *iconButton = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * iconButton->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); iconButton->setFixedSize(bsize, bsize); iconButton->setIconSize(48); iconButton->setStrictIconSize(false); @@ -883,12 +883,12 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) this, TQT_SLOT( slotIconChanged() ) ); } else { TQLabel *iconLabel = new TQLabel( d->m_frame ); - int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * iconLabel->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); iconLabel->setFixedSize(bsize, bsize); iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); iconArea = iconLabel; } - grid->addWidget(iconArea, curRow, 0, AlignLeft); + grid->addWidget(iconArea, curRow, 0, Qt::AlignLeft); if (d->bMultiple || isTrash || isDevice || hasRoot) { @@ -908,11 +908,11 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) // Enhanced rename: Don't highlight the file extension. TQString pattern; KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if (!pattern.isEmpty() && pattern.at(0)=='*' && pattern.find('*',1)==-1) + if (!pattern.isEmpty() && pattern.at(0)=='*' && pattern.tqfind('*',1)==-1) d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1); else { - int lastDot = filename.findRev('.'); + int lastDot = filename.tqfindRev('.'); if (lastDot > 0) d->m_lined->setSelection(0, lastDot); } @@ -942,7 +942,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) //TODO: wrap for win32 or mac? TQPushButton *button = new TQPushButton(box); - TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure")); + TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("configure")); TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); button->setIconSet( iconSet ); button->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); @@ -1127,7 +1127,7 @@ void KFilePropsPlugin::slotEditFileType() #ifdef Q_WS_X11 TQString mime; if ( d->mimeType == KMimeType::defaultMimeType() ) { - int pos = d->oldFileName.findRev( '.' ); + int pos = d->oldFileName.tqfindRev( '.' ); if ( pos != -1 ) mime = "*" + d->oldFileName.mid(pos); else @@ -1136,9 +1136,9 @@ void KFilePropsPlugin::slotEditFileType() else mime = d->mimeType; //TODO: wrap for win32 or mac? - TQString keditfiletype = TQString::fromLatin1("keditfiletype"); + TQString keditfiletype = TQString::tqfromLatin1("keditfiletype"); KRun::runCommand( keditfiletype - + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId()) + + " --parent " + TQString::number( (ulong)properties->tqtopLevelWidget()->winId()) + " " + KProcess::quote(mime), keditfiletype, keditfiletype /*unused*/); #endif @@ -1234,7 +1234,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job ) KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize(); KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles(); KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs(); - m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4") + m_sizeLabel->setText( TQString::tqfromLatin1("%1 (%2)\n%3, %4") .arg(KIO::convertSize(totalSize)) .arg(KGlobal::locale()->formatNumber(totalSize, 0)) .arg(i18n("1 file","%n files",totalFiles)) @@ -1362,9 +1362,9 @@ void KFilePropsPlugin::applyChanges() connect( job, TQT_SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ), TQT_SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) ); // wait for job - TQWidget dummy(0,0,WType_Dialog|WShowModal); + TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); qt_enter_modal(&dummy); - qApp->enter_loop(); + tqApp->enter_loop(); qt_leave_modal(&dummy); return; } @@ -1384,7 +1384,7 @@ void KFilePropsPlugin::slotCopyFinished( KIO::Job * job ) if (job) { // allow apply() to return - qApp->exit_loop(); + tqApp->exit_loop(); if ( job->error() ) { job->showErrorDialog( d->m_frame ); @@ -1427,7 +1427,7 @@ void KFilePropsPlugin::slotCopyFinished( KIO::Job * job ) void KFilePropsPlugin::applyIconChanges() { - KIconButton *iconButton = ::qt_cast<KIconButton *>( iconArea ); + KIconButton *iconButton = ::tqqt_cast<KIconButton *>( iconArea ); if ( !iconButton || !d->bIconChanged ) return; // handle icon changes - only local files (or pseudo-local) for now @@ -1439,7 +1439,7 @@ void KFilePropsPlugin::applyIconChanges() if (S_ISDIR(properties->item()->mode())) { - path = url.path(1) + TQString::fromLatin1(".directory"); + path = url.path(1) + TQString::tqfromLatin1(".directory"); // don't call updateUrl because the other tabs (i.e. permissions) // apply to the directory, not the .directory file. } @@ -1563,7 +1563,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr TQString path = properties->kurl().path(-1); TQString fname = properties->kurl().fileName(); bool isLocal = properties->kurl().isLocalFile(); - bool isTrash = ( properties->kurl().protocol().find("trash", 0, false)==0 ); + bool isTrash = ( properties->kurl().protocol().tqfind("trash", 0, false)==0 ); bool IamRoot = (geteuid() == 0); KFileItem * item = properties->item(); @@ -1710,11 +1710,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr "sense for programs and scripts. It is required when you want to " "execute them.")); - TQLayoutItem *spacer = new TQSpacerItem(0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding); + TQLayoutItem *spacer = TQT_TQLAYOUTITEM(new TQSpacerItem(0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); gl->addMultiCell(spacer, 5, 5, 0, 1); pbAdvancedPerm = new TQPushButton(i18n("A&dvanced Permissions"), gb); - gl->addMultiCellWidget(pbAdvancedPerm, 6, 6, 0, 1, AlignRight); + gl->addMultiCellWidget(pbAdvancedPerm, 6, 6, 0, 1, Qt::AlignRight); connect(pbAdvancedPerm, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowAdvancedPermissions() )); } else @@ -1753,7 +1753,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr kcom->setOrder(KCompletion::Sorted); setpwent(); for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::fromLatin1(user->pw_name)); + kcom->addItem(TQString::tqfromLatin1(user->pw_name)); endpwent(); usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto : KGlobalSettings::CompletionNone); @@ -1781,7 +1781,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++) { if (IamRoot) - groupList += TQString::fromLatin1(ge->gr_name); + groupList += TQString::tqfromLatin1(ge->gr_name); else { /* pick the groups to which the user belongs */ @@ -1802,14 +1802,14 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr /* add the effective Group to the list .. */ ge = getgrgid (getegid()); if (ge) { - TQString name = TQString::fromLatin1(ge->gr_name); + TQString name = TQString::tqfromLatin1(ge->gr_name); if (name.isEmpty()) name.setNum(ge->gr_gid); - if (groupList.find(name) == groupList.end()) + if (groupList.tqfind(name) == groupList.end()) groupList += name; } - bool isMyGroup = groupList.contains(strGroup); + bool isMyGroup = groupList.tqcontains(strGroup); /* add the group the file currently belongs to .. * .. if its not there already @@ -1843,7 +1843,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr { grpCombo = new TQComboBox(gb, "combogrouplist"); grpCombo->insertStringList(groupList); - grpCombo->setCurrentItem(groupList.findIndex(strGroup)); + grpCombo->setCurrentItem(groupList.tqfindIndex(strGroup)); gl->addWidget(grpCombo, 2, 1); connect( grpCombo, TQT_SIGNAL( activated( int ) ), this, TQT_SIGNAL( changed() ) ); @@ -1966,7 +1966,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() { TQWhatsThis::add(l, execWhatsThis); theNotSpecials.append( l ); // GJ: Add space between normal and special modes - TQSize size = l->sizeHint(); + TQSize size = l->tqsizeHint(); size.setWidth(size.width() + 15); l->setFixedSize(size); gl->addWidget (l, 1, 3); @@ -2518,9 +2518,9 @@ void KFilePermissionsPropsPlugin::applyChanges() connect( job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotChmodResult( KIO::Job * ) ) ); // Wait for job - TQWidget dummy(0,0,WType_Dialog|WShowModal); + TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); qt_enter_modal(&dummy); - qApp->enter_loop(); + tqApp->enter_loop(); qt_leave_modal(&dummy); } if (dirs.count() > 0) { @@ -2534,9 +2534,9 @@ void KFilePermissionsPropsPlugin::applyChanges() connect( job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotChmodResult( KIO::Job * ) ) ); // Wait for job - TQWidget dummy(0,0,WType_Dialog|WShowModal); + TQWidget dummy(0,0,(WFlags)(WType_Dialog|WShowModal)); qt_enter_modal(&dummy); - qApp->enter_loop(); + tqApp->enter_loop(); qt_leave_modal(&dummy); } } @@ -2547,7 +2547,7 @@ void KFilePermissionsPropsPlugin::slotChmodResult( KIO::Job * job ) if (job->error()) job->showErrorDialog( d->m_frame ); // allow apply() to return - qApp->exit_loop(); + tqApp->exit_loop(); } @@ -2639,7 +2639,7 @@ void KURLPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Link")); + config.writeEntry( "Type", TQString::tqfromLatin1("Link")); config.writePathEntry( "URL", URLEdit->url() ); // Users can't create a Link .desktop file with a Name field, // but distributions can. Update the Name field in that case. @@ -2685,35 +2685,35 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl tmpQLabel = new TQLabel( d->m_frame, "Label_1" ); tmpQLabel->setText( i18n("Pattern ( example: *.html;*.htm )") ); - tmpQLabel->setMinimumSize(tmpQLabel->sizeHint()); + tmpQLabel->setMinimumSize(tmpQLabel->tqsizeHint()); mainlayout->addWidget(tmpQLabel, 1); //patternEdit->setGeometry( 10, 40, 210, 30 ); //patternEdit->setText( "" ); patternEdit->setMaxLength( 512 ); - patternEdit->setMinimumSize( patternEdit->sizeHint() ); + patternEdit->setMinimumSize( patternEdit->tqsizeHint() ); patternEdit->setFixedHeight( fontHeight ); mainlayout->addWidget(patternEdit, 1); tmpQLabel = new TQLabel( d->m_frame, "Label_2" ); tmpQLabel->setText( i18n("Mime Type") ); - tmpQLabel->setMinimumSize(tmpQLabel->sizeHint()); + tmpQLabel->setMinimumSize(tmpQLabel->tqsizeHint()); mainlayout->addWidget(tmpQLabel, 1); //mimeEdit->setGeometry( 10, 160, 210, 30 ); mimeEdit->setMaxLength( 256 ); - mimeEdit->setMinimumSize( mimeEdit->sizeHint() ); + mimeEdit->setMinimumSize( mimeEdit->tqsizeHint() ); mimeEdit->setFixedHeight( fontHeight ); mainlayout->addWidget(mimeEdit, 1); tmpQLabel = new TQLabel( d->m_frame, "Label_3" ); tmpQLabel->setText( i18n("Comment") ); - tmpQLabel->setMinimumSize(tmpQLabel->sizeHint()); + tmpQLabel->setMinimumSize(tmpQLabel->tqsizeHint()); mainlayout->addWidget(tmpQLabel, 1); //commentEdit->setGeometry( 10, 100, 210, 30 ); commentEdit->setMaxLength( 256 ); - commentEdit->setMinimumSize( commentEdit->sizeHint() ); + commentEdit->setMinimumSize( commentEdit->tqsizeHint() ); commentEdit->setFixedHeight( fontHeight ); mainlayout->addWidget(commentEdit, 1); @@ -2796,7 +2796,7 @@ void KBindingPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("MimeType") ); + config.writeEntry( "Type", TQString::tqfromLatin1("MimeType") ); config.writeEntry( "Patterns", patternEdit->text() ); config.writeEntry( "Comment", commentEdit->text() ); @@ -2852,8 +2852,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP if ((mountPoint != "-") && (mountPoint != "none") && !mountPoint.isEmpty() && device != "none") { - devices.append( device + TQString::fromLatin1(" (") - + mountPoint + TQString::fromLatin1(")") ); + devices.append( device + TQString::tqfromLatin1(" (") + + mountPoint + TQString::tqfromLatin1(")") ); m_devicelist.append(device); d->mountpointlist.append(mountPoint); } @@ -2916,7 +2916,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP layout->addMultiCellWidget(sep, 6, 6, 0, 1); unmounted = new KIconButton( d->m_frame ); - int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin); + int bsize = 66 + 2 * unmounted->tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin); unmounted->setFixedSize(bsize, bsize); unmounted->setIconType(KIcon::Desktop, KIcon::Device); layout->addWidget(unmounted, 7, 0); @@ -2945,7 +2945,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP device->setEditText( deviceStr ); if ( !deviceStr.isEmpty() ) { // Set default options for this device (first matching entry) - int index = m_devicelist.findIndex(deviceStr); + int index = m_devicelist.tqfindIndex(deviceStr); if (index != -1) { //kdDebug(250) << "found it " << index << endl; @@ -3020,7 +3020,7 @@ void KDevicePropsPlugin::slotActivated( int index ) void KDevicePropsPlugin::slotDeviceChanged() { // Update mountpoint so that it matches the typed device - int index = m_devicelist.findIndex( device->currentText() ); + int index = m_devicelist.tqfindIndex( device->currentText() ); if ( index != -1 ) mountpoint->setText( d->mountpointlist[index] ); else @@ -3077,7 +3077,7 @@ void KDevicePropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("FSDevice") ); + config.writeEntry( "Type", TQString::tqfromLatin1("FSDevice") ); config.writeEntry( "Dev", device->currentText() ); config.writeEntry( "MountPoint", mountpoint->text() ); @@ -3107,7 +3107,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props ) w = new KPropertiesDesktopBase(frame); mainlayout->addWidget(w); - bool bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh? + bool bKDesktopMode = (TQCString(tqApp->name()) == "kdesktop"); // nasty heh? if (bKDesktopMode) { @@ -3255,11 +3255,11 @@ void KDesktopPropsPlugin::slotAddFiletype() TQString mimetype = (*it)->name(); if (mimetype == KMimeType::defaultMimeType()) continue; - int index = mimetype.find("/"); + int index = mimetype.tqfind("/"); TQString maj = mimetype.left(index); TQString min = mimetype.mid(index+1); - TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( maj ); + TQMapIterator<TQString,TQListViewItem*> mit = majorMap.tqfind( maj ); if ( mit == majorMap.end() ) { majorGroup = new TQListViewItem( mw->listView, maj ); majorGroup->setExpandable(true); @@ -3274,7 +3274,7 @@ void KDesktopPropsPlugin::slotAddFiletype() TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment()); item->setPixmap(0, (*it)->pixmap(KIcon::Small, IconSize(KIcon::Small))); } - TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( "all" ); + TQMapIterator<TQString,TQListViewItem*> mit = majorMap.tqfind( "all" ); if ( mit != majorMap.end()) { mw->listView->setCurrentItem(mit.data()); @@ -3362,7 +3362,7 @@ void KDesktopPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Application")); + config.writeEntry( "Type", TQString::tqfromLatin1("Application")); config.writeEntry( "Comment", w->commentEdit->text() ); config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat config.writeEntry( "GenericName", w->genNameEdit->text() ); @@ -3446,9 +3446,9 @@ void KDesktopPropsPlugin::slotAdvanced() // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::fromLatin1("konsole")); + TQString::tqfromLatin1("konsole")); bool terminalCloseBool = false; @@ -3493,7 +3493,7 @@ void KDesktopPropsPlugin::slotAdvanced() int i, maxEntries = 1000; setpwent(); for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::fromLatin1(pw->pw_name)); + kcom->addItem(TQString::tqfromLatin1(pw->pw_name)); endpwent(); if (i < maxEntries) { @@ -3672,9 +3672,9 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) // check to see if we use konsole if not do not add the nocloseonexit // because we don't know how to do this on other terminal applications - KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") ); + KConfigGroup confGroup( KGlobal::config(), TQString::tqfromLatin1("General") ); TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", - TQString::fromLatin1("konsole")); + TQString::tqfromLatin1("konsole")); int posOptions = 1; d->nocloseonexitCheck = 0L; @@ -3767,7 +3767,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) int i, maxEntries = 1000; setpwent(); for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++) - kcom->addItem(TQString::fromLatin1(pw->pw_name)); + kcom->addItem(TQString::tqfromLatin1(pw->pw_name)); endpwent(); if (i < maxEntries) { @@ -3854,7 +3854,7 @@ void KExecPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Application")); + config.writeEntry( "Type", TQString::tqfromLatin1("Application")); config.writePathEntry( "Exec", execEdit->text() ); config.writePathEntry( "SwallowExec", swallowExecEdit->text() ); config.writeEntry( "SwallowTitle", swallowTitleEdit->text() ); @@ -3862,7 +3862,7 @@ void KExecPropsPlugin::applyChanges() TQString temp = terminalEdit->text(); if (d->nocloseonexitCheck ) if ( d->nocloseonexitCheck->isChecked() ) - temp += TQString::fromLatin1("--noclose "); + temp += TQString::tqfromLatin1("--noclose "); temp = temp.stripWhiteSpace(); config.writeEntry( "TerminalOptions", temp ); config.writeEntry( "X-KDE-SubstituteUID", suidCheck->isChecked() ); @@ -3892,7 +3892,7 @@ class KApplicationPropsPlugin::KApplicationPropsPluginPrivate public: KApplicationPropsPluginPrivate() { - m_kdesktopMode = TQCString(qApp->name()) == "kdesktop"; // nasty heh? + m_kdesktopMode = TQCString(tqApp->name()) == "kdesktop"; // nasty heh? } ~KApplicationPropsPluginPrivate() { @@ -3931,7 +3931,7 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props ) TQGridLayout *grid = new TQGridLayout(2, 2); grid->setColStretch(1, 1); - toplayout->addLayout(grid); + toplayout->addLayout(TQT_TQLAYOUT(grid)); if ( d->m_kdesktopMode ) { @@ -3967,7 +3967,7 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props ) grid->setColStretch(2, 1); grid->setRowStretch( 0, 1 ); grid->setRowStretch( 3, 1 ); - toplayout->addLayout(grid, 2); + toplayout->addLayout(TQT_TQLAYOUT(grid), 2); extensionsList = new TQListBox( d->m_frame ); extensionsList->setSelectionMode( TQListBox::Extended ); @@ -4097,7 +4097,7 @@ void KApplicationPropsPlugin::applyChanges() KSimpleConfig config( path ); config.setDesktopGroup(); - config.writeEntry( "Type", TQString::fromLatin1("Application")); + config.writeEntry( "Type", TQString::tqfromLatin1("Application")); config.writeEntry( "Comment", commentEdit->text() ); config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat config.writeEntry( "GenericName", genNameEdit->text() ); diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h index dc6a621f9..4243bf602 100644 --- a/kio/kfile/kpropertiesdialog.h +++ b/kio/kfile/kpropertiesdialog.h @@ -434,7 +434,7 @@ private: * You can also include X-KDE-Protocol=file if you want that plugin * to be loaded only for local files, for instance. */ -class KIO_EXPORT KPropsDlgPlugin : public QObject +class KIO_EXPORT KPropsDlgPlugin : public TQObject { Q_OBJECT public: diff --git a/kio/kfile/kpropertiesmimetypebase.ui b/kio/kfile/kpropertiesmimetypebase.ui index 0223f22a6..df7c796da 100644 --- a/kio/kfile/kpropertiesmimetypebase.ui +++ b/kio/kfile/kpropertiesmimetypebase.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KPropertiesMimetypeBase</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>widget2</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp index 22b4cd477..85cdebb02 100644 --- a/kio/kfile/krecentdirs.cpp +++ b/kio/kfile/krecentdirs.cpp @@ -52,13 +52,13 @@ static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool re if (key[1] == ':') { key = key.mid(2); - config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly); + config = new KSimpleConfig(TQString::tqfromLatin1("krecentdirsrc"), readOnly); } else { key = key.mid(1); config = KGlobal::config(); - config->setGroup(TQString::fromLatin1("Recent Dirs")); + config->setGroup(TQString::tqfromLatin1("Recent Dirs")); } result=config->readPathListEntry(key); diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp index 69fd63df5..7b5c6908a 100644 --- a/kio/kfile/krecentdocument.cpp +++ b/kio/kfile/krecentdocument.cpp @@ -45,7 +45,7 @@ TQString KRecentDocument::recentDocumentDirectory() { // need to change this path, not sure where - return locateLocal("data", TQString::fromLatin1("RecentDocuments/")); + return locateLocal("data", TQString::tqfromLatin1("RecentDocuments/")); } TQStringList KRecentDocument::recentDocuments() @@ -74,7 +74,7 @@ TQStringList KRecentDocument::recentDocuments() void KRecentDocument::add(const KURL& url) { - KRecentDocument::add(url, qApp->argv()[0]); // ### argv[0] might not match the service filename! + KRecentDocument::add(url, tqApp->argv()[0]); // ### argv[0] might not match the service filename! } void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) @@ -88,9 +88,9 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) kdDebug(250) << "KRecentDocument::add for " << openStr << endl; KConfig *config = KGlobal::config(); TQString oldGrp = config->group(); - config->setGroup(TQString::fromLatin1("RecentDocuments")); - bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true); - int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); + config->setGroup(TQString::tqfromLatin1("RecentDocuments")); + bool useRecent = config->readBoolEntry(TQString::tqfromLatin1("UseRecent"), true); + int maxEntries = config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); config->setGroup(oldGrp); if(!useRecent) @@ -100,7 +100,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQString dStr = path + url.fileName(); - TQString ddesktop = dStr + TQString::fromLatin1(".desktop"); + TQString ddesktop = dStr + TQString::tqfromLatin1(".desktop"); int i=1; // check for duplicates @@ -108,7 +108,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // see if it points to the same file and application KSimpleConfig tmp(ddesktop); tmp.setDesktopGroup(); - if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith")) + if(tmp.readEntry(TQString::tqfromLatin1("X-KDE-LastOpenedWith")) == desktopEntryName) { utime(TQFile::encodeName(ddesktop), NULL); @@ -118,7 +118,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) ++i; if ( i > maxEntries ) break; - ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i); + ddesktop = dStr + TQString::tqfromLatin1("[%1].desktop").arg(i); } TQDir dir(path); @@ -129,7 +129,7 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) TQStringList::Iterator it; it = list.begin(); while(i > maxEntries-1){ - TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it)); + TQFile::remove(dir.absPath() + TQString::tqfromLatin1("/") + (*it)); --i, ++it; } } @@ -137,15 +137,15 @@ void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName) // create the applnk KSimpleConfig conf(ddesktop); conf.setDesktopGroup(); - conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") ); - conf.writePathEntry( TQString::fromLatin1("URL"), openStr ); + conf.writeEntry( TQString::tqfromLatin1("Type"), TQString::tqfromLatin1("Link") ); + conf.writePathEntry( TQString::tqfromLatin1("URL"), openStr ); // If you change the line below, change the test in the above loop - conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); + conf.writeEntry( TQString::tqfromLatin1("X-KDE-LastOpenedWith"), desktopEntryName ); TQString name = url.fileName(); if (name.isEmpty()) name = openStr; - conf.writeEntry( TQString::fromLatin1("Name"), name ); - conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) ); + conf.writeEntry( TQString::tqfromLatin1("Name"), name ); + conf.writeEntry( TQString::tqfromLatin1("Icon"), KMimeType::iconForURL( url ) ); } void KRecentDocument::add(const TQString &openStr, bool isUrl) @@ -170,8 +170,8 @@ void KRecentDocument::clear() int KRecentDocument::maximumItems() { KConfig *config = KGlobal::config(); - KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments")); - return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10); + KConfigGroupSaver sa(config, TQString::tqfromLatin1("RecentDocuments")); + return config->readNumEntry(TQString::tqfromLatin1("MaxEntries"), 10); } diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp index d1a9de4ea..692fbd8de 100644 --- a/kio/kfile/kurlbar.cpp +++ b/kio/kfile/kurlbar.cpp @@ -53,7 +53,7 @@ * Handles tooltips in the KURLBar * @internal */ -class KURLBarToolTip : public QToolTip +class KURLBarToolTip : public TQToolTip { public: KURLBarToolTip( TQListBox *view ) : TQToolTip( view ), m_view( view ) {} @@ -64,7 +64,7 @@ protected: if ( item ) { TQString text = static_cast<KURLBarItem*>( item )->toolTip(); if ( !text.isEmpty() ) - tip( m_view->itemRect( item ), text ); + tip( m_view->tqitemRect( item ), text ); } } @@ -188,11 +188,11 @@ void KURLBarItem::paint( TQPainter *p ) if ( isCurrent() || isSelected() ) { int h = height( box ); - TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight ); + TQBrush brush = box->tqcolorGroup().brush( TQColorGroup::Highlight ); p->fillRect( 0, 0, w, h, brush ); TQPen pen = p->pen(); TQPen oldPen = pen; - pen.setColor( box->colorGroup().mid() ); + pen.setColor( box->tqcolorGroup().mid() ); p->setPen( pen ); p->drawPoint( 0, 0 ); @@ -225,10 +225,10 @@ void KURLBarItem::paint( TQPainter *p ) int xPos = pm->width() + margin + 2; if ( isCurrent() || isSelected() ) { - p->setPen( box->colorGroup().highlight().dark(115) ); + p->setPen( box->tqcolorGroup().highlight().dark(115) ); p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1), yPos + 1, visibleText ); - p->setPen( box->colorGroup().highlightedText() ); + p->setPen( box->tqcolorGroup().highlightedText() ); } p->drawText( xPos, yPos, visibleText ); @@ -257,10 +257,10 @@ void KURLBarItem::paint( TQPainter *p ) x = QMAX( x, margin ); if ( isCurrent() || isSelected() ) { - p->setPen( box->colorGroup().highlight().dark(115) ); + p->setPen( box->tqcolorGroup().highlight().dark(115) ); p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1), y + 1, visibleText ); - p->setPen( box->colorGroup().highlightedText() ); + p->setPen( box->tqcolorGroup().highlightedText() ); } p->drawText( x, y, visibleText ); @@ -268,7 +268,7 @@ void KURLBarItem::paint( TQPainter *p ) } } -TQSize KURLBarItem::sizeHint() const +TQSize KURLBarItem::tqsizeHint() const { int wmin = 0; int hmin = 0; @@ -284,9 +284,9 @@ TQSize KURLBarItem::sizeHint() const } if ( lb->isVertical() ) - wmin = QMIN( wmin, lb->viewport()->sizeHint().width() ); + wmin = QMIN( wmin, lb->viewport()->tqsizeHint().width() ); else - hmin = QMIN( hmin, lb->viewport()->sizeHint().height() ); + hmin = QMIN( hmin, lb->viewport()->tqsizeHint().height() ); return TQSize( wmin, hmin ); } @@ -294,17 +294,17 @@ TQSize KURLBarItem::sizeHint() const int KURLBarItem::width( const TQListBox *lb ) const { if ( static_cast<const KURLBarListBox *>( lb )->isVertical() ) - return QMAX( sizeHint().width(), lb->viewport()->width() ); + return QMAX( tqsizeHint().width(), lb->viewport()->width() ); else - return sizeHint().width(); + return tqsizeHint().width(); } int KURLBarItem::height( const TQListBox *lb ) const { if ( static_cast<const KURLBarListBox *>( lb )->isVertical() ) - return sizeHint().height(); + return tqsizeHint().height(); else - return QMAX( sizeHint().height(), lb->viewport()->height() ); + return QMAX( tqsizeHint().height(), lb->viewport()->height() ); } bool KURLBarItem::isPersistent() const @@ -341,7 +341,7 @@ KURLBar::KURLBar( bool useGlobalItems, TQWidget *parent, const char *name, WFlag d = new KURLBarPrivate(); setListBox( 0L ); - setSizePolicy( TQSizePolicy( isVertical() ? + tqsetSizePolicy( TQSizePolicy( isVertical() ? TQSizePolicy::Maximum : TQSizePolicy::Preferred, isVertical() ? @@ -378,7 +378,7 @@ KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const TQString& descri void KURLBar::setOrientation( Qt::Orientation orient ) { m_listBox->setOrientation( orient ); - setSizePolicy( TQSizePolicy( isVertical() ? + tqsetSizePolicy( TQSizePolicy( isVertical() ? TQSizePolicy::Maximum : TQSizePolicy::Preferred, isVertical() ? @@ -397,18 +397,18 @@ void KURLBar::setListBox( KURLBarListBox *view ) if ( !view ) { m_listBox = new KURLBarListBox( this, "urlbar listbox" ); - setOrientation( Vertical ); + setOrientation( Qt::Vertical ); } else { m_listBox = view; - if ( m_listBox->parentWidget() != this ) + if ( m_listBox->tqparentWidget() != this ) m_listBox->reparent( this, TQPoint(0,0) ); m_listBox->resize( width(), height() ); } m_listBox->setSelectionMode( KListBox::Single ); paletteChange( palette() ); - m_listBox->setFocusPolicy( TabFocus ); + m_listBox->setFocusPolicy( TQ_TabFocus ); connect( m_listBox, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ), TQT_SLOT( slotSelected( int, TQListBoxItem * ))); @@ -435,7 +435,7 @@ void KURLBar::setIconSize( int size ) item = static_cast<KURLBarItem*>( item->next() ); } - resize( sizeHint() ); + resize( tqsizeHint() ); updateGeometry(); } @@ -466,14 +466,14 @@ void KURLBar::paletteChange( const TQPalette & ) setPalette( pal ); } -TQSize KURLBar::sizeHint() const +TQSize KURLBar::tqsizeHint() const { - return m_listBox->sizeHint(); + return m_listBox->tqsizeHint(); #if 0 // this code causes vertical and or horizontal scrollbars appearing // depending on the text, font, moonphase and earth rotation. Just using - // m_listBox->sizeHint() fixes this (although the widget can then be + // m_listBox->tqsizeHint() fixes this (although the widget can then be // resized to a smaller size so that scrollbars appear). int w = 0; int h = 0; @@ -484,7 +484,7 @@ TQSize KURLBar::sizeHint() const item; item = static_cast<KURLBarItem*>( item->next() ) ) { - TQSize sh = item->sizeHint(); + TQSize sh = item->tqsizeHint(); if ( vertical ) { w = QMAX( w, sh.width() ); @@ -508,9 +508,9 @@ TQSize KURLBar::sizeHint() const #endif } -TQSize KURLBar::minimumSizeHint() const +TQSize KURLBar::tqminimumSizeHint() const { - TQSize s = sizeHint(); // ### + TQSize s = tqsizeHint(); // ### int w = s.width() + m_listBox->verticalScrollBar()->width(); int h = s.height() + m_listBox->horizontalScrollBar()->height(); return TQSize( w, h ); @@ -844,7 +844,7 @@ KURLBarListBox::~KURLBarListBox() void KURLBarListBox::paintEvent( TQPaintEvent* ) { TQPainter p(this); - p.setPen( colorGroup().mid() ); + p.setPen( tqcolorGroup().mid() ); p.drawRect( 0, 0, width(), height() ); } @@ -886,7 +886,7 @@ void KURLBarListBox::contextMenuEvent( TQContextMenuEvent *e ) void KURLBarListBox::setOrientation( Qt::Orientation orient ) { - if ( orient == Vertical ) { + if ( orient == Qt::Vertical ) { setColumnMode( 1 ); setRowMode( Variable ); } @@ -980,7 +980,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url, if ( KGlobal::instance()->aboutData() ) appName = KGlobal::instance()->aboutData()->programName(); if ( appName.isEmpty() ) - appName = TQString::fromLatin1( KGlobal::instance()->instanceName() ); + appName = TQString::tqfromLatin1( KGlobal::instance()->instanceName() ); m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box ); m_appLocal->setChecked( appLocal ); TQWhatsThis::add( m_appLocal, diff --git a/kio/kfile/kurlbar.h b/kio/kfile/kurlbar.h index 8da43ff15..32969cff7 100644 --- a/kio/kfile/kurlbar.h +++ b/kio/kfile/kurlbar.h @@ -39,7 +39,7 @@ class KURLBar; * @see KURLBar * @see KURLBarListBox */ -class KIO_EXPORT KURLBarItem : public QListBoxPixmap +class KIO_EXPORT KURLBarItem : public TQListBoxPixmap { public: /** @@ -109,7 +109,7 @@ public: * returns the preferred size of this item * @since 3.1 */ - TQSize sizeHint() const; + TQSize tqsizeHint() const; /** * returns the width of this item. @@ -227,7 +227,7 @@ class KURLBarListBox; * @author Carsten Pfeiffer <pfeiffer@kde.org> * @short A URL-bar widget, as used in the KFileDialog */ -class KIO_EXPORT KURLBar : public QFrame +class KIO_EXPORT KURLBar : public TQFrame { Q_OBJECT @@ -319,12 +319,12 @@ public: * @returns a proper sizehint, depending on the orientation and the number * of items available. */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; /** * @returns a proper minimum size (reimplemented) */ - virtual TQSize minimumSizeHint() const; + virtual TQSize tqminimumSizeHint() const; /** * Call this method to read a saved configuration from @p config, @@ -382,7 +382,7 @@ public: /** * @returns true if the bar is in vertical mode. */ - bool isVertical() const { return orientation() == Vertical; } + bool isVertical() const { return orientation() == Qt::Vertical; } public slots: /** diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp index 72c7cbd07..f7bf58bc0 100644 --- a/kio/kfile/kurlcombobox.cpp +++ b/kio/kfile/kurlcombobox.cpp @@ -31,7 +31,7 @@ class KURLComboBox::KURLComboBoxPrivate { public: KURLComboBoxPrivate() { - dirpix = SmallIcon(TQString::fromLatin1("folder")); + dirpix = SmallIcon(TQString::tqfromLatin1("folder")); } TQPixmap dirpix; @@ -70,9 +70,9 @@ void KURLComboBox::init( Mode mode ) defaultList.setAutoDelete( true ); setInsertionPolicy( NoInsertion ); setTrapReturnKey( true ); - setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); - opendirPix = SmallIcon(TQString::fromLatin1("folder_open")); + opendirPix = SmallIcon(TQString::tqfromLatin1("folder_open")); connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int ))); } @@ -152,7 +152,7 @@ void KURLComboBox::setURLs( TQStringList urls, OverLoadResolving remove ) // kill duplicates TQString text; while ( it != urls.end() ) { - while ( urls.contains( *it ) > 1 ) { + while ( urls.tqcontains( *it ) > 1 ) { it = urls.remove( it ); continue; } diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp index ae8f5b623..66b79925e 100644 --- a/kio/kfile/kurlrequester.cpp +++ b/kio/kfile/kurlrequester.cpp @@ -112,9 +112,9 @@ public: void connectSignals( TQObject *receiver ) { TQObject *sender; if ( combo ) - sender = combo; + sender = TQT_TQOBJECT(combo); else - sender = edit; + sender = TQT_TQOBJECT(edit); connect( sender, TQT_SIGNAL( textChanged( const TQString& )), receiver, TQT_SIGNAL( textChanged( const TQString& ))); @@ -206,7 +206,7 @@ void KURLRequester::init() d->edit = new KLineEdit( this, "line edit" ); myButton = new KURLDragPushButton( this, "kfile button"); - TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen")); + TQIconSet iconSet = SmallIconSet(TQString::tqfromLatin1("fileopen")); TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); myButton->setIconSet( iconSet ); myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); @@ -220,14 +220,14 @@ void KURLRequester::init() widget->installEventFilter( this ); setFocusProxy( widget ); - d->connectSignals( this ); + d->connectSignals( TQT_TQOBJECT(this) ); connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenDialog() )); myCompletion = new KURLCompletion(); d->setCompletionObject( myCompletion ); KAccel *accel = new KAccel( this ); - accel->insert( KStdAccel::Open, this, TQT_SLOT( slotOpenDialog() )); + accel->insert( KStdAccel::Open, TQT_TQOBJECT(this), TQT_SLOT( slotOpenDialog() )); accel->readSettings(); } @@ -340,7 +340,7 @@ TQString KURLRequester::filter( ) const KFileDialog * KURLRequester::fileDialog() const { if ( !myFileDialog ) { - TQWidget *p = parentWidget(); + TQWidget *p = tqparentWidget(); myFileDialog = new KFileDialog( TQString::null, d->fileDialogFilter, p, "file dialog", true ); @@ -386,7 +386,7 @@ void KURLRequester::slotUpdateURL() bool KURLRequester::eventFilter( TQObject *obj, TQEvent *ev ) { - if ( ( d->edit == obj ) || ( d->combo == obj ) ) + if ( ( TQT_BASE_OBJECT(d->edit) == TQT_BASE_OBJECT(obj) ) || ( TQT_BASE_OBJECT(d->combo) == TQT_BASE_OBJECT(obj) ) ) { if (( ev->type() == TQEvent::FocusIn ) || ( ev->type() == TQEvent::FocusOut )) // Forward focusin/focusout events to the urlrequester; needed by file form element in khtml @@ -402,7 +402,7 @@ KPushButton * KURLRequester::button() const KEditListBox::CustomEditor KURLRequester::customEditor() { - setSizePolicy(TQSizePolicy( TQSizePolicy::Preferred, + tqsetSizePolicy(TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed)); KLineEdit *edit = d->edit; diff --git a/kio/kfile/kurlrequester.h b/kio/kfile/kurlrequester.h index 1bdbeee3e..fa40d0656 100644 --- a/kio/kfile/kurlrequester.h +++ b/kio/kfile/kurlrequester.h @@ -53,7 +53,7 @@ class TQTimer; * @short A widget to request a filename/url from the user * @author Carsten Pfeiffer <pfeiffer@kde.org> */ -class KIO_EXPORT KURLRequester : public QHBox +class KIO_EXPORT KURLRequester : public TQHBox { Q_OBJECT Q_PROPERTY( TQString url READ url WRITE setURL ) diff --git a/kio/kfile/kurlrequesterdlg.cpp b/kio/kfile/kurlrequesterdlg.cpp index 19409afdc..defa09264 100644 --- a/kio/kfile/kurlrequesterdlg.cpp +++ b/kio/kfile/kurlrequesterdlg.cpp @@ -67,7 +67,7 @@ void KURLRequesterDlg::initDialog(const TQString &text,const TQString &urlName) topLayout->addWidget( label ); urlRequester_ = new KURLRequester( urlName, plainPage(), "urlRequester" ); - urlRequester_->setMinimumWidth( urlRequester_->sizeHint().width() * 3 ); + urlRequester_->setMinimumWidth( urlRequester_->tqsizeHint().width() * 3 ); topLayout->addWidget( urlRequester_ ); urlRequester_->setFocus(); connect( urlRequester_->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp index 47fcd02ca..c66ed3ff2 100644 --- a/kio/kfile/tests/kdirselectdialogtest.cpp +++ b/kio/kfile/tests/kdirselectdialogtest.cpp @@ -10,7 +10,7 @@ int main( int argc, char **argv ) KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null ); if ( u.isValid() ) KMessageBox::information( 0L, - TQString::fromLatin1("You selected the url: %1") + TQString::tqfromLatin1("You selected the url: %1") .arg( u.prettyURL() ), "Selected URL" ); return 0; diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp index 25e2da949..43dbb4fd0 100644 --- a/kio/kfile/tests/kfdtest.cpp +++ b/kio/kfile/tests/kfdtest.cpp @@ -25,10 +25,10 @@ void KFDTest::doit() if ( dlg->exec() == KDialog::Accepted ) { - KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() )); + KMessageBox::information(0, TQString::tqfromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() )); } -// qApp->quit(); +// tqApp->quit(); } #include "kfdtest.moc" diff --git a/kio/kfile/tests/kfdtest.h b/kio/kfile/tests/kfdtest.h index 3f980bc94..6c59550b8 100644 --- a/kio/kfile/tests/kfdtest.h +++ b/kio/kfile/tests/kfdtest.h @@ -10,7 +10,7 @@ #include <tqobject.h> -class KFDTest : public QObject +class KFDTest : public TQObject { Q_OBJECT diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp index 5c520dd5d..bad100809 100644 --- a/kio/kfile/tests/kfiletreeviewtest.cpp +++ b/kio/kfile/tests/kfiletreeviewtest.cpp @@ -148,7 +148,7 @@ int main(int argc, char **argv) { for( int i = 1; i < argc; i++ ) { - argv1 = TQString::fromLatin1(argv[i]); + argv1 = TQString::tqfromLatin1(argv[i]); kdDebug() << "Opening " << argv1 << endl; if( argv1 == "-d" ) tf->setDirOnly(); diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp index b84cbc967..48c8a1a2b 100644 --- a/kio/kfile/tests/kfstest.cpp +++ b/kio/kfile/tests/kfstest.cpp @@ -51,11 +51,11 @@ int main(int argc, char **argv) TQString argv1; TQString startDir; if (argc > 1) - argv1 = TQString::fromLatin1(argv[1]); + argv1 = TQString::tqfromLatin1(argv[1]); if ( argc > 2 ) - startDir = TQString::fromLatin1( argv[2]); + startDir = TQString::tqfromLatin1( argv[2]); - if (argv1 == TQString::fromLatin1("diroperator")) { + if (argv1 == TQString::tqfromLatin1("diroperator")) { KDirOperator *op = new KDirOperator(startDir, 0, "operator"); op->setViewConfig( KGlobal::config(), "TestGroup" ); op->setView(KFile::Simple); @@ -64,24 +64,24 @@ int main(int argc, char **argv) a.exec(); } - else if (argv1 == TQString::fromLatin1("justone")) { + else if (argv1 == TQString::tqfromLatin1("justone")) { TQString name = KFileDialog::getOpenFileName(startDir); qDebug("filename=%s",name.latin1()); } - else if (argv1 == TQString::fromLatin1("existingURL")) { + else if (argv1 == TQString::tqfromLatin1("existingURL")) { KURL url = KFileDialog::getExistingURL(); qDebug("URL=%s",url.url().latin1()); name1 = url.url(); } - else if (argv1 == TQString::fromLatin1("preview")) { + else if (argv1 == TQString::tqfromLatin1("preview")) { KURL u = KFileDialog::getImageOpenURL(); qDebug("filename=%s", u.url().latin1()); } - else if (argv1 == TQString::fromLatin1("preselect")) { - names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd")); + else if (argv1 == TQString::tqfromLatin1("preselect")) { + names = KFileDialog::getOpenFileNames(TQString::tqfromLatin1("/etc/passwd")); TQStringList::Iterator it = names.begin(); while ( it != names.end() ) { qDebug("selected file: %s", (*it).latin1()); @@ -89,10 +89,10 @@ int main(int argc, char **argv) } } - else if (argv1 == TQString::fromLatin1("dirs")) + else if (argv1 == TQString::tqfromLatin1("dirs")) name1 = KFileDialog::getExistingDirectory(); - else if (argv1 == TQString::fromLatin1("heap")) { + else if (argv1 == TQString::tqfromLatin1("heap")) { KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L, "file dialog", true ); dlg->setMode( KFile::File); @@ -104,33 +104,33 @@ int main(int argc, char **argv) if ( urlBar ) { urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"), - TQString::fromLatin1("KDE FTP Server") ); + TQString::tqfromLatin1("KDE FTP Server") ); } if ( dlg->exec() == KDialog::Accepted ) name1 = dlg->selectedURL().url(); } - else if ( argv1 == TQString::fromLatin1("eventloop") ) + else if ( argv1 == TQString::tqfromLatin1("eventloop") ) { KFDTest *test = new KFDTest( startDir ); return a.exec(); } - else if (argv1 == TQString::fromLatin1("save")) { + else if (argv1 == TQString::tqfromLatin1("save")) { KURL u = KFileDialog::getSaveURL(); -// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")), +// TQString(TQDir::homeDirPath() + TQString::tqfromLatin1("/testfile")), // TQString::null, 0L); name1 = u.url(); } - else if (argv1 == TQString::fromLatin1("icon")) { + else if (argv1 == TQString::tqfromLatin1("icon")) { KIconDialog dlg; TQString icon = dlg.selectIcon(); kdDebug() << icon << endl; } -// else if ( argv1 == TQString::fromLatin1("dirselect") ) { +// else if ( argv1 == TQString::tqfromLatin1("dirselect") ) { // KURL url; // url.setPath( "/" ); // KURL selected = KDirSelectDialog::selectDirectory( url ); @@ -140,7 +140,7 @@ int main(int argc, char **argv) else { KFileDialog dlg(startDir, - TQString::fromLatin1("*|All Files\n" + TQString::tqfromLatin1("*|All Files\n" "*.lo *.o *.la|All libtool Files"), 0, 0, true); // dlg.setFilter( "*.kdevelop" ); @@ -177,7 +177,7 @@ int main(int argc, char **argv) } if (!(name1.isNull())) - KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1, - TQString::fromLatin1("Your Choice")); + KMessageBox::information(0, TQString::tqfromLatin1("You selected the file " ) + name1, + TQString::tqfromLatin1("Your Choice")); return 0; } diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp index 9248eec5d..4a1d4bec0 100644 --- a/kio/kfile/tests/kurlrequestertest.cpp +++ b/kio/kfile/tests/kurlrequestertest.cpp @@ -10,7 +10,7 @@ int main( int argc, char **argv ) qDebug( "Selected url: %s", url.url().latin1()); KURLRequester *req = new KURLRequester(); - KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() ); + KEditListBox *el = new KEditListBox( TQString::tqfromLatin1("Test"), req->customEditor() ); el->show(); return app.exec(); } |