From 374d939d8af431477ce2601815f0ba121b66871c Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 15 Feb 2011 19:11:41 +0000 Subject: Allow kdelibs to function correctly with TQt for Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1220926 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kio/kfile/kdiroperator.cpp | 4 ++-- kio/kfile/kencodingfiledialog.cpp | 4 ++-- kio/kfile/kfiledialog.cpp | 10 +++++----- kio/kfile/kfilefiltercombo.cpp | 2 +- kio/kfile/kfileiconview.cpp | 6 +++--- kio/kfile/kicondialog.cpp | 10 +++++----- kio/kfile/knotifydialog.cpp | 2 +- kio/kfile/kpropertiesdialog.cpp | 28 ++++++++++++++-------------- kio/kfile/kurlbar.cpp | 2 +- kio/kfile/kurlcombobox.cpp | 4 ++-- 10 files changed, 36 insertions(+), 36 deletions(-) (limited to 'kio/kfile') diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp index af3e25eec..6c38e5ef7 100644 --- a/kio/kfile/kdiroperator.cpp +++ b/kio/kfile/kdiroperator.cpp @@ -1269,8 +1269,8 @@ void KDirOperator::setupActions() mkdirAction = new KAction( i18n("New Folder..."), 0, 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 ) ) ); + connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, TQt::ButtonState ) ), + this, TQT_SLOT( trashSelected( KAction::ActivationReason, TQt::ButtonState ) ) ); new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT( deleteSelected() ), myActionCollection, "delete" ); mkdirAction->setIcon( TQString::tqfromLatin1("folder_new") ); diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp index be5ca033b..bded7fb79 100644 --- a/kio/kfile/kencodingfiledialog.cpp +++ b/kio/kfile/kencodingfiledialog.cpp @@ -170,7 +170,7 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(cons TQWidget *parent, const TQString& caption) { - bool specialDir = dir.at(0) == ':'; + bool specialDir = dir.tqat(0) == ':'; KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption, Saving,parent, "filedialog", true); @@ -193,7 +193,7 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const TQ const TQString& dir, const TQString& filter, TQWidget *parent, const TQString& caption) { - bool specialDir = dir.at(0) == ':'; + bool specialDir = dir.tqat(0) == ':'; KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption, Saving,parent, "filedialog", true); diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index 586b34d62..227bcffea 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -1595,7 +1595,7 @@ TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filte TQWidget *parent, const TQString& caption) { - bool specialDir = dir.at(0) == ':'; + bool specialDir = dir.tqat(0) == ':'; KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); if ( !specialDir ) dlg.setSelection( dir ); // may also be a filename @@ -1616,7 +1616,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi WId parent_id, const TQString& caption) { - bool specialDir = dir.at(0) == ':'; + bool specialDir = dir.tqat(0) == ':'; TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true); #ifdef Q_WS_X11 @@ -1644,7 +1644,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter, TQWidget *parent, const TQString& caption) { - bool specialDir = dir.at(0) == ':'; + bool specialDir = dir.tqat(0) == ':'; KFileDialog dlg(specialDir ? dir : TQString::null, filter, parent, "filedialog", true); if ( !specialDir ) dlg.setSelection( dir ); // may also be a filename @@ -1950,7 +1950,7 @@ void KFileDialog::updateAutoSelectExtension (void) // first try X-KDE-NativeExtension TQString nativeExtension = mime->property ("X-KDE-NativeExtension").toString (); - if (nativeExtension.at (0) == '.') + if (nativeExtension.tqat (0) == '.') { d->extension = nativeExtension.lower (); kdDebug (kfile_area) << "\tsetMimeFilter-style: native ext=\'" @@ -2361,7 +2361,7 @@ void KFileDialog::setNonExtSelection() TQString pattern, filename = locationEdit->currentText().stripWhiteSpace(); KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.tqfind( '*' , 1 ) == -1 ) + if ( !pattern.isEmpty() && pattern.tqat( 0 ) == '*' && pattern.tqfind( '*' , 1 ) == -1 ) locationEdit->lineEdit()->setSelection( 0, filename.length() - pattern.stripWhiteSpace().length()+1 ); else { diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp index 771cc76b0..117097c98 100644 --- a/kio/kfile/kfilefiltercombo.cpp +++ b/kio/kfile/kfilefiltercombo.cpp @@ -95,7 +95,7 @@ TQString KFileFilterCombo::currentFilter() const { TQString f = currentText(); if (f == text(currentItem())) { // user didn't edit the text - f = *filters.at(currentItem()); + f = *filters.tqat(currentItem()); if ( d->isMimeFilter || (currentItem() == 0 && d->hasAllSupportedFiles) ) { return f; // we have a mimetype as filter } diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp index 38bdec9b3..c5c2ac697 100644 --- a/kio/kfile/kfileiconview.cpp +++ b/kio/kfile/kfileiconview.cpp @@ -340,10 +340,10 @@ void KFileIconView::insertItem( KFileItem *i ) TQIconView* qview = static_cast( this ); // Since creating and initializing an item leads to a tqrepaint, // we disable updates on the IconView for a while. - qview->setUpdatesEnabled( false ); + qview->tqsetUpdatesEnabled( false ); KFileIconViewItem *item = new KFileIconViewItem( qview, i ); initItem( item, i, true ); - qview->setUpdatesEnabled( true ); + qview->tqsetUpdatesEnabled( true ); if ( !i->isMimeTypeKnown() ) m_resolver->m_lstPendingMimeIconItems.append( item ); @@ -632,7 +632,7 @@ bool KFileIconView::canPreview( const KFileItem *item ) const for ( ; it != d->previewMimeTypes.end(); ++it ) { TQString type = *it; // the "mimetype" can be "image/*" - if ( type.at( type.length() - 1 ) == '*' ) { + if ( type.tqat( type.length() - 1 ) == '*' ) { r.setPattern( type ); if ( r.search( item->mimetype() ) != -1 ) return true; diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp index 2b1b68d68..fe2fff202 100644 --- a/kio/kfile/kicondialog.cpp +++ b/kio/kfile/kicondialog.cpp @@ -122,7 +122,7 @@ void KIconCanvas::slotLoadFiles() TQApplication::setOverrideCursor(tqwaitCursor); // disable updates to not trigger paint events when adding child items - setUpdatesEnabled( false ); + tqsetUpdatesEnabled( false ); #ifdef HAVE_LIBART KSVGIconEngine *svgEngine = new KSVGIconEngine(); @@ -191,7 +191,7 @@ void KIconCanvas::slotLoadFiles() #endif // enable updates since we have to draw the whole view now - setUpdatesEnabled( true ); + tqsetUpdatesEnabled( true ); TQApplication::restoreOverrideCursor(); d->m_bLoading = false; @@ -268,11 +268,11 @@ void KIconDialog::init() top->setSpacing( spacingHint() ); TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main); - bgroup->layout()->setSpacing(KDialog::spacingHint()); - bgroup->layout()->setMargin(KDialog::marginHint()); + bgroup->tqlayout()->setSpacing(KDialog::spacingHint()); + bgroup->tqlayout()->setMargin(KDialog::marginHint()); top->addWidget(bgroup); connect(bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotButtonClicked(int))); - TQGridLayout *grid = new TQGridLayout(bgroup->layout(), 3, 2); + TQGridLayout *grid = new TQGridLayout(bgroup->tqlayout(), 3, 2); mpRb1 = new TQRadioButton(i18n("S&ystem icons:"), bgroup); grid->addWidget(mpRb1, 1, 0); mpCombo = new TQComboBox(bgroup); diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp index 47461dbce..a04f89773 100644 --- a/kio/kfile/knotifydialog.cpp +++ b/kio/kfile/knotifydialog.cpp @@ -374,7 +374,7 @@ Application * KNotifyWidget::addApplicationEvents( const TQString& path ) kdDebug() << "**** knotify: adding path: " << path << endl; TQString relativePath = path; - if ( path.at(0) == '/' && KStandardDirs::exists( path ) ) + if ( path.tqat(0) == '/' && KStandardDirs::exists( path ) ) relativePath = makeRelative( path ); if ( !relativePath.isEmpty() ) diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index a7be5de64..dde96f017 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -576,7 +576,7 @@ void KPropertiesDialog::rename( const TQString& _name ) else { TQString tmpurl = m_singleUrl.url(); - if ( tmpurl.at(tmpurl.length() - 1) == '/') + if ( tmpurl.tqat(tmpurl.length() - 1) == '/') // It's a directory, so strip the trailing slash first tmpurl.truncate( tmpurl.length() - 1); newUrl = tmpurl; @@ -908,7 +908,7 @@ 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.tqfind('*',1)==-1) + if (!pattern.isEmpty() && pattern.tqat(0)=='*' && pattern.tqfind('*',1)==-1) d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1); else { @@ -1654,11 +1654,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr /* Group: Access Permissions */ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame ); - gb->layout()->setSpacing(KDialog::spacingHint()); - gb->layout()->setMargin(KDialog::marginHint()); + gb->tqlayout()->setSpacing(KDialog::spacingHint()); + gb->tqlayout()->setMargin(KDialog::marginHint()); box->addWidget (gb); - gl = new TQGridLayout (gb->layout(), 7, 2); + gl = new TQGridLayout (gb->tqlayout(), 7, 2); gl->setColStretch(1, 1); l = d->explanationLabel = new TQLabel( "", gb ); @@ -1723,11 +1723,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr /**** Group: Ownership ****/ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame ); - gb->layout()->setSpacing(KDialog::spacingHint()); - gb->layout()->setMargin(KDialog::marginHint()); + gb->tqlayout()->setSpacing(KDialog::spacingHint()); + gb->tqlayout()->setMargin(KDialog::marginHint()); box->addWidget (gb); - gl = new TQGridLayout (gb->layout(), 4, 3); + gl = new TQGridLayout (gb->tqlayout(), 4, 3); gl->addRowSpacing(0, 10); /*** Set Owner ***/ @@ -1915,10 +1915,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() { // Group: Access Permissions gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox ); - gb->layout()->setSpacing(KDialog::spacingHint()); - gb->layout()->setMargin(KDialog::marginHint()); + gb->tqlayout()->setSpacing(KDialog::spacingHint()); + gb->tqlayout()->setMargin(KDialog::marginHint()); - gl = new TQGridLayout (gb->layout(), 6, 6); + gl = new TQGridLayout (gb->tqlayout(), 6, 6); gl->addRowSpacing(0, 10); TQValueVector theNotSpecials; @@ -3635,7 +3635,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) mainlayout->addWidget(tmpQGroupBox); - TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2); + TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 2, 2); grid->setSpacing( KDialog::spacingHint() ); grid->setColStretch(1, 1); @@ -3662,7 +3662,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) mainlayout->addWidget(tmpQGroupBox); - grid = new TQGridLayout(tmpQGroupBox->layout(), 3, 2); + grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 3, 2); grid->setSpacing( KDialog::spacingHint() ); grid->setColStretch(1, 1); @@ -3701,7 +3701,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props ) mainlayout->addWidget(tmpQGroupBox); - grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2); + grid = new TQGridLayout(tmpQGroupBox->tqlayout(), 2, 2); grid->setSpacing(KDialog::spacingHint()); grid->setColStretch(1, 1); diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp index 692fbd8de..5cb7afe58 100644 --- a/kio/kfile/kurlbar.cpp +++ b/kio/kfile/kurlbar.cpp @@ -1010,7 +1010,7 @@ KURL KURLBarItemDialog::url() const { TQString text = m_urlEdit->url(); KURL u; - if ( text.at(0) == '/' ) + if ( text.tqat(0) == '/' ) u.setPath( text ); else u = text; diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp index f7bf58bc0..0449795f5 100644 --- a/kio/kfile/kurlcombobox.cpp +++ b/kio/kfile/kurlcombobox.cpp @@ -87,7 +87,7 @@ TQStringList KURLComboBox::urls() const for ( int i = defaultList.count(); i < count(); i++ ) { url = text( i ); if ( !url.isEmpty() ) { - //if ( url.at(0) == '/' ) + //if ( url.tqat(0) == '/' ) // list.append( url.prepend( fileProt ) ); //else list.append( url ); @@ -129,7 +129,7 @@ void KURLComboBox::setDefaults() KURLComboItem *item; for ( unsigned int id = 0; id < defaultList.count(); id++ ) { - item = defaultList.at( id ); + item = defaultList.tqat( id ); insertURLItem( item ); } } -- cgit v1.2.1