From 495d08bc2db58ee7fc4ea55a7158f2f61b82fc56 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 20:16:47 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1211357 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kfind/ChangeLog | 6 +++--- kfind/README | 2 +- kfind/TODO | 2 +- kfind/kdatecombo.cpp | 12 ++++++------ kfind/kdatecombo.h | 2 +- kfind/kfind.cpp | 4 ++-- kfind/kfindpart.cpp | 6 +++--- kfind/kfindpart.h | 2 +- kfind/kftabdlg.cpp | 24 ++++++++++++------------ kfind/kftabdlg.h | 2 +- kfind/kfwin.cpp | 20 ++++++++++---------- kfind/kquery.cpp | 8 ++++---- 12 files changed, 45 insertions(+), 45 deletions(-) (limited to 'kfind') diff --git a/kfind/ChangeLog b/kfind/ChangeLog index c13408a52..fedc124f2 100644 --- a/kfind/ChangeLog +++ b/kfind/ChangeLog @@ -10,7 +10,7 @@ Fri Jul 30 22:33:25 1999 Carsten Pfeiffer 1999-06-13 Harri Porten - * kftabdlg.cpp: introduced flexible geometry managment. Patch provided + * kftabdlg.cpp: introduced flexible tqgeometry managment. Patch provided by Dima Rogozin . 1999-04-30 Harri Porten @@ -21,7 +21,7 @@ Fri Jul 30 22:33:25 1999 Carsten Pfeiffer 1999-04-06 Harri Porten - * kfind.cpp: replaced simple delete and free() with delete [] iBuffer + * kfind.cpp: tqreplaced simple delete and free() with delete [] iBuffer 1998-12-07 Mario Weilguni @@ -55,7 +55,7 @@ ver. 0.4.1: Mario Weilguni * kfind compiles now without warnings with -Wall * result list is now scrollable without having the focus (only page up and page down) - * moc files are now #included in moc.cpp instead of compiling + * tqmoc files are now #included in tqmoc.cpp instead of compiling separate files. Speeds up compilation and makes binary smaller * file patterns are remembered between sessions * introduced new filetypes for searching: files, folders, diff --git a/kfind/README b/kfind/README index 7b6c24890..cf31826fd 100644 --- a/kfind/README +++ b/kfind/README @@ -1,7 +1,7 @@ kfind ===== -Kfind is a graphical replacement for the utility `find' inspired by +Kfind is a graphical tqreplacement for the utility `find' inspired by the find utility from NT. At this time it is fully functional. All options available in kfind diff --git a/kfind/TODO b/kfind/TODO index 0bf6ac832..a4552bf2c 100644 --- a/kfind/TODO +++ b/kfind/TODO @@ -6,7 +6,7 @@ TODO DONE: o drag found files to somewhere - o some layout managment + o some tqlayout managment o context menus o get preference dialog to work o find pattern history diff --git a/kfind/kdatecombo.cpp b/kfind/kdatecombo.cpp index 95e4045ac..9f62b0eb5 100644 --- a/kfind/kdatecombo.cpp +++ b/kfind/kdatecombo.cpp @@ -18,7 +18,7 @@ KDateCombo::KDateCombo(TQWidget *parent, const char *name ) : TQComboBox(FALSE, parent,name) { - TQDate date = TQDate::currentDate(); + TQDate date = TQDate::tqcurrentDate(); initObject(date, parent, name); } @@ -33,7 +33,7 @@ void KDateCombo::initObject(const TQDate & date, TQWidget *, const char *) popupFrame = new KPopupFrame(this, "popupFrame"); popupFrame->installEventFilter(this); datePicker = new KDatePicker(popupFrame, date, "datePicker"); - datePicker->setMinimumSize(datePicker->sizeHint()); + datePicker->setMinimumSize(datePicker->tqsizeHint()); datePicker->installEventFilter(this); popupFrame->setMainWidget(datePicker); setDate(date); @@ -57,9 +57,9 @@ TQDate & KDateCombo::string2Date(const TQString & str, TQDate *qd) return *qd = KGlobal::locale()->readDate(str); } -TQDate & KDateCombo::getDate(TQDate *currentDate) +TQDate & KDateCombo::getDate(TQDate *tqcurrentDate) { - return string2Date(currentText(), currentDate); + return string2Date(currentText(), tqcurrentDate); } bool KDateCombo::setDate(const TQDate & newDate) @@ -86,7 +86,7 @@ void KDateCombo::mousePressEvent (TQMouseEvent * e) { if (e->button() & TQMouseEvent::LeftButton) { - if (rect().contains( e->pos())) + if (rect().tqcontains( e->pos())) { TQDate tempDate; getDate(& tempDate); @@ -103,7 +103,7 @@ bool KDateCombo::eventFilter (TQObject*, TQEvent* e) { TQMouseEvent *me = (TQMouseEvent *)e; TQPoint p = mapFromGlobal( me->globalPos() ); - if (rect().contains( p ) ) + if (rect().tqcontains( p ) ) { TQTimer::singleShot(10, this, TQT_SLOT(dateEnteredEvent())); return true; diff --git a/kfind/kdatecombo.h b/kfind/kdatecombo.h index ab714a3ba..d8da787b8 100644 --- a/kfind/kdatecombo.h +++ b/kfind/kdatecombo.h @@ -26,7 +26,7 @@ public: KDateCombo(const TQDate & date, TQWidget *parent=0, const char *name=0); ~KDateCombo(); - TQDate & getDate(TQDate *currentDate); + TQDate & getDate(TQDate *tqcurrentDate); bool setDate(const TQDate & newDate); private: diff --git a/kfind/kfind.cpp b/kfind/kfind.cpp index 8908b26c8..ee978d446 100644 --- a/kfind/kfind.cpp +++ b/kfind/kfind.cpp @@ -65,12 +65,12 @@ Kfind::Kfind(TQWidget *parent, const char *name) // create button box TQVBox * mButtonBox = new TQVBox( this ); - TQVBoxLayout *lay = (TQVBoxLayout*)mButtonBox->layout(); + TQVBoxLayout *lay = (TQVBoxLayout*)mButtonBox->tqlayout(); lay->addStretch(1); mTopLayout->addWidget(mButtonBox); mSearch = new KPushButton( KGuiItem(i18n("&Find"), "find"), mButtonBox ); - mButtonBox->setSpacing( (tabWidget->sizeHint().height()-4*mSearch->sizeHint().height()) / 4); + mButtonBox->setSpacing( (tabWidget->tqsizeHint().height()-4*mSearch->tqsizeHint().height()) / 4); connect( mSearch, TQT_SIGNAL(clicked()), this, TQT_SLOT( startSearch() ) ); mStop = new KPushButton( KGuiItem(i18n("Stop"), "stop"), mButtonBox ); connect( mStop, TQT_SIGNAL(clicked()), this, TQT_SLOT( stopSearch() ) ); diff --git a/kfind/kfindpart.cpp b/kfind/kfindpart.cpp index 92082019f..252aca295 100644 --- a/kfind/kfindpart.cpp +++ b/kfind/kfindpart.cpp @@ -33,7 +33,7 @@ class KonqDirPart; typedef KParts::GenericFactory KFindFactory; K_EXPORT_COMPONENT_FACTORY( libkfindpart, KFindFactory ) -KFindPart::KFindPart( TQWidget * parentWidget, const char *widgetName, +KFindPart::KFindPart( TQWidget * tqparentWidget, const char *widgetName, TQObject *parent, const char *name , const TQStringList & /*args*/ ) : KonqDirPart (parent, name )/*KParts::ReadOnlyPart*/ @@ -43,8 +43,8 @@ KFindPart::KFindPart( TQWidget * parentWidget, const char *widgetName, setBrowserExtension( new KonqDirPartBrowserExtension( this ) ); kdDebug() << "KFindPart::KFindPart " << this << endl; - m_kfindWidget = new Kfind( parentWidget, widgetName ); - m_kfindWidget->setMaximumHeight(m_kfindWidget->minimumSizeHint().height()); + m_kfindWidget = new Kfind( tqparentWidget, widgetName ); + m_kfindWidget->setMaximumHeight(m_kfindWidget->tqminimumSizeHint().height()); const KFileItem *item = ((KonqDirPart*)parent)->currentItem(); kdDebug() << "Kfind: currentItem: " << ( item ? item->url().path().local8Bit() : TQString("null") ) << endl; TQDir d; diff --git a/kfind/kfindpart.h b/kfind/kfindpart.h index 47d75a53c..f9a0d6cde 100644 --- a/kfind/kfindpart.h +++ b/kfind/kfindpart.h @@ -44,7 +44,7 @@ class KFindPart : public KonqDirPart//KParts::ReadOnlyPart Q_OBJECT Q_PROPERTY( bool showsResult READ showsResult ) public: - KFindPart( TQWidget * parentWidget, const char *widgetName, + KFindPart( TQWidget * tqparentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList & /*args*/ ); virtual ~KFindPart(); diff --git a/kfind/kftabdlg.cpp b/kfind/kftabdlg.cpp index 3d7615afd..9068fd895 100644 --- a/kfind/kftabdlg.cpp +++ b/kfind/kftabdlg.cpp @@ -60,11 +60,11 @@ KfindTabWidget::KfindTabWidget(TQWidget *parent, const char *name) pages[0] = new TQWidget( this, "page1" ); nameBox = new KComboBox(TRUE, pages[0], "combo1"); - nameBox->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry + nameBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry TQLabel * namedL = new TQLabel(nameBox, i18n("&Named:"), pages[0], "named"); TQToolTip::add( namedL, i18n("You can use wildcard matching and \";\" for separating multiple names") ); dirBox = new KComboBox(TRUE, pages[0], "combo2"); - dirBox->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry + dirBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry TQLabel * lookinL = new TQLabel(dirBox, i18n("Look &in:"), pages[0], "named"); subdirsCb = new TQCheckBox(i18n("Include &subfolders"), pages[0]); caseSensCb = new TQCheckBox(i18n("Case s&ensitive search"), pages[0]); @@ -158,7 +158,7 @@ KfindTabWidget::KfindTabWidget(TQWidget *parent, const char *name) betweenType->setCurrentItem(1); - TQDate dt = KGlobal::locale()->calendar()->addYears(TQDate::currentDate(), -1); + TQDate dt = KGlobal::locale()->calendar()->addYears(TQDate::tqcurrentDate(), -1); fromDate = new KDateCombo(dt, pages[1], "fromDate"); toDate = new KDateCombo(pages[1], "toDate"); @@ -187,7 +187,7 @@ KfindTabWidget::KfindTabWidget(TQWidget *parent, const char *name) sizeUnitBox ->setCurrentItem(1); int tmp = sizeEdit->fontMetrics().width(" 000000000 "); - sizeEdit->setMinimumSize(tmp, sizeEdit->sizeHint().height()); + sizeEdit->setMinimumSize(tmp, sizeEdit->tqsizeHint().height()); m_usernameBox->setDuplicatesEnabled(FALSE); m_groupBox->setDuplicatesEnabled(FALSE); @@ -245,7 +245,7 @@ KfindTabWidget::KfindTabWidget(TQWidget *parent, const char *name) pages[2] = new TQWidget( this, "page3" ); typeBox =new KComboBox(FALSE, pages[2], "typeBox"); - typeBox->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry + typeBox->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry TQLabel * typeL =new TQLabel(typeBox, i18n("File &type:"), pages[2], "type"); textEdit=new KLineEdit(pages[2], "textEdit" ); TQLabel * textL =new TQLabel(textEdit, i18n("C&ontaining text:"), pages[2], "text"); @@ -315,7 +315,7 @@ KfindTabWidget::KfindTabWidget(TQWidget *parent, const char *name) // Layout tmp = sizeEdit->fontMetrics().width(" 00000 "); - sizeEdit->setMinimumSize(tmp, sizeEdit->sizeHint().height()); + sizeEdit->setMinimumSize(tmp, sizeEdit->tqsizeHint().height()); TQGridLayout *grid2 = new TQGridLayout( pages[2], 5, 4, KDialog::marginHint(), @@ -522,10 +522,10 @@ void KfindTabWidget::slotSizeBoxChanged(int index) void KfindTabWidget::setDefaults() { - TQDate dt = KGlobal::locale()->calendar()->addYears(TQDate::currentDate(), -1); + TQDate dt = KGlobal::locale()->calendar()->addYears(TQDate::tqcurrentDate(), -1); fromDate ->setDate(dt); - toDate ->setDate(TQDate::currentDate()); + toDate ->setDate(TQDate::tqcurrentDate()); timeBox->setValue(1); betweenType->setCurrentItem(1); @@ -563,7 +563,7 @@ bool KfindTabWidget::isDateValid() str = i18n("The date is not valid."); else if ( hi1 > hi2 ) str = i18n("Invalid date range."); - else if ( TQDate::currentDate() < hi1 ) + else if ( TQDate::tqcurrentDate() < hi1 ) str = i18n("Unable to search dates in the future."); if (!str.isNull()) { @@ -854,15 +854,15 @@ static void save_pattern(TQComboBox *obj, conf->writePathEntry(entry, sl); } -TQSize KfindTabWidget::sizeHint() const +TQSize KfindTabWidget::tqsizeHint() const { // #44662: avoid a huge default size when the comboboxes have very large items // Like in minicli, we changed the combobox size policy so that they can resize down, // and then we simply provide a reasonable size hint for the whole window, depending // on the screen width. - TQSize sz = TQTabWidget::sizeHint(); + TQSize sz = TQTabWidget::tqsizeHint(); KfindTabWidget* me = const_cast( this ); - const int screenWidth = qApp->desktop()->screenGeometry(me).width(); + const int screenWidth = tqApp->desktop()->screenGeometry(me).width(); if ( sz.width() > screenWidth / 2 ) sz.setWidth( screenWidth / 2 ); return sz; diff --git a/kfind/kftabdlg.h b/kfind/kftabdlg.h index 157a1fa44..0c913e6f0 100644 --- a/kfind/kftabdlg.h +++ b/kfind/kftabdlg.h @@ -49,7 +49,7 @@ public: void setURL( const KURL & url ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; public slots: void setFocus(); diff --git a/kfind/kfwin.cpp b/kfind/kfwin.cpp index 2ee69aa14..4d4b12856 100644 --- a/kfind/kfwin.cpp +++ b/kfind/kfwin.cpp @@ -215,14 +215,14 @@ void KfindWindow::saveResults() TQFile file(filename); if ( !file.open(IO_WriteOnly) ) - KMessageBox::error(parentWidget(), + KMessageBox::error(tqparentWidget(), i18n("Unable to save results.")); else { TQTextStream stream( &file ); stream.setEncoding( TQTextStream::Locale ); if ( mimeType->name() == "text/html") { - stream << TQString::fromLatin1("\n" + stream << TQString::tqfromLatin1("\n" "\n" "%2\n" "

%3

" @@ -236,13 +236,13 @@ void KfindWindow::saveResults() { TQString path=((KfFileLVI*)item)->fileitem.url().url(); TQString pretty=((KfFileLVI*)item)->fileitem.url().htmlURL(); - stream << TQString::fromLatin1("
") << pretty - << TQString::fromLatin1("\n"); + stream << TQString::tqfromLatin1("
") << pretty + << TQString::tqfromLatin1("\n"); item = item->nextSibling(); } - stream << TQString::fromLatin1("

\n"); + stream << TQString::tqfromLatin1("

\n"); } else { item = firstChild(); @@ -255,7 +255,7 @@ void KfindWindow::saveResults() } file.close(); - KMessageBox::information(parentWidget(), + KMessageBox::information(tqparentWidget(), i18n("Results were saved to file\n")+ filename); } @@ -287,7 +287,7 @@ void KfindWindow::deleteFiles() { TQString tmp = i18n("Do you really want to delete the selected file?", "Do you really want to delete the %n selected files?",selectedItems().count()); - if (KMessageBox::warningContinueCancel(parentWidget(), tmp, "", KGuiItem( i18n("&Delete"), "editdelete")) == KMessageBox::Cancel) + if (KMessageBox::warningContinueCancel(tqparentWidget(), tmp, "", KGuiItem( i18n("&Delete"), "editdelete")) == KMessageBox::Cancel) return; // Iterate on all selected elements @@ -335,7 +335,7 @@ void KfindWindow::resizeEvent(TQResizeEvent *e) { KListView::resizeEvent(e); resetColumns(false); - clipper()->repaint(); + clipper()->tqrepaint(); } TQDragObject * KfindWindow::dragObject() @@ -372,7 +372,7 @@ void KfindWindow::resetColumns(bool init) { setColumnWidth(2, QMAX(fm.width(columnText(2)), fm.width("0000000")) + 15); TQString sampleDate = - KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); + KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()); setColumnWidth(3, QMAX(fm.width(columnText(3)), fm.width(sampleDate)) + 15); setColumnWidth(4, QMAX(fm.width(columnText(4)), fm.width(i18n(perm[RO]))) + 15); setColumnWidth(5, QMAX(fm.width(columnText(5)), fm.width("some text")) + 15); diff --git a/kfind/kquery.cpp b/kfind/kquery.cpp index 4231f1aab..a51d2dc2f 100644 --- a/kfind/kquery.cpp +++ b/kfind/kquery.cpp @@ -242,7 +242,7 @@ void KQuery::processQuery( KFileItem* file) return; break; default: - if (!m_mimetype.isEmpty() && !m_mimetype.contains(file->mimetype())) + if (!m_mimetype.isEmpty() && !m_mimetype.tqcontains(file->mimetype())) return; } @@ -334,7 +334,7 @@ void KQuery::processQuery( KFileItem* file) } } else if( !m_search_binary && !file->mimetype().startsWith("text/") && file->url().isLocalFile() ) { - KMimeType::Format f = KMimeType::findFormatByFileContent(file->url().path()); + KMimeType::Format f = KMimeType::tqfindFormatByFileContent(file->url().path()); if ( !f.text ) { kdDebug() << "ignoring, not a text file: " << file->url() << endl; return; @@ -359,7 +359,7 @@ void KQuery::processQuery( KFileItem* file) if (str.isNull()) break; if(isZippedOfficeDocument) - str.replace(xmlTags, ""); + str.tqreplace(xmlTags, ""); if (m_regexpForContent) { @@ -458,7 +458,7 @@ void KQuery::setRegExp(const TQString ®exp, bool caseSensitive) // m_regexpsContainsGlobs.clear(); for ( TQStringList::ConstIterator it = strList.begin(); it != strList.end(); ++it ) { regExp = new TQRegExp((*it),caseSensitive,true); -// m_regexpsContainsGlobs.append(regExp->pattern().contains(globChars)); +// m_regexpsContainsGlobs.append(regExp->pattern().tqcontains(globChars)); m_regexps.append(regExp); } } -- cgit v1.2.1