From 48d4a26399959121f33d2bc3bfe51c7827b654fc Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 14 Jun 2011 16:45:05 +0000 Subject: TQt4 port kdevelop This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/astyle/astyle_part.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'parts/astyle/astyle_part.cpp') diff --git a/parts/astyle/astyle_part.cpp b/parts/astyle/astyle_part.cpp index f89c2b95..de7153c1 100644 --- a/parts/astyle/astyle_part.cpp +++ b/parts/astyle/astyle_part.cpp @@ -36,15 +36,15 @@ static const KDevPluginInfo data("kdevastyle"); namespace { - const char* defaultFormatExtensions = "*.cpp *.h *.hpp,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff ,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm"; + const char* defaultFormatExtensions = "*.cpp *.h *.hpp,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff ,*.inl,*.java,*.tqmoc,*.patch,*.tlh,*.xpm"; } typedef KDevGenericFactory AStyleFactory; K_EXPORT_COMPONENT_FACTORY( libkdevastyle, AStyleFactory( data ) ) -AStylePart::AStylePart(TQObject *parent, const char *name, const TQStringList &) - : KDevSourceFormatter(&data, parent, name ? name : "AStylePart") +AStylePart::AStylePart(TQObject *tqparent, const char *name, const TQStringList &) + : KDevSourceFormatter(&data, tqparent, name ? name : "AStylePart") { setInstance(AStyleFactory::instance()); @@ -193,21 +193,21 @@ void AStylePart::beautifySource() if (m_project["Fill"].toString() == "Tabs") { // tabs and wsCount spaces to be a tab - TQString replace; + TQString tqreplace; for (int i =0;iurl().path(); - int pos = extension.findRev ( '.' ); + int pos = extension.tqfindRev ( '.' ); if ( pos >= 0 ) { extension = extension.mid ( pos ); - enabled = ( m_searchExtensions.find ( extension ) != m_searchExtensions.end() ); + enabled = ( m_searchExtensions.tqfind ( extension ) != m_searchExtensions.end() ); } } else @@ -400,7 +400,7 @@ void AStylePart::contextMenu(TQPopupMenu *popup, const Context *context) { popup->insertSeparator(); int id = popup->insertItem( i18n("Format selection"), this, TQT_SLOT(beautifySource()) ); - popup->setWhatsThis(id, i18n("Format

Formats the current selection, if possible")); + popup->TQMenuData::setWhatsThis(id, i18n("Format

Formats the current selection, if possible")); } else if ( context->hasType( Context::FileContext )){ const FileContext *ctx = static_cast(context); @@ -408,7 +408,7 @@ void AStylePart::contextMenu(TQPopupMenu *popup, const Context *context) popup->insertSeparator(); int id = popup->insertItem( i18n("Format files"), this, TQT_SLOT(formatFiles()) ); - popup->setWhatsThis(id, i18n("Format files

Formats selected files if possible")); + popup->TQMenuData::setWhatsThis(id, i18n("Format files

Formats selected files if possible")); } } @@ -436,7 +436,7 @@ void AStylePart::restorePartialProjectSession(const TQDomElement * el) if ( ext.isEmpty()){ ext=defaultFormatExtensions; } - setExtensions(ext.replace(TQChar(','), TQChar('\n')),false); + setExtensions(ext.tqreplace(TQChar(','), TQChar('\n')),false); } } @@ -464,7 +464,7 @@ void AStylePart::savePartialProjectSession(TQDomElement * el) void AStylePart::formatFilesSelect(){ m_urls.clear(); - TQStringList filenames = KFileDialog::getOpenFileNames ( TQString::null, getProjectExtensions(),0,"Select files to format" ); + TQStringList filenames = KFileDialog::getOpenFileNames ( TQString(), getProjectExtensions(),0,"Select files to format" ); for(TQStringList::Iterator it = filenames.begin(); it != filenames.end();it++){ m_urls << *it; @@ -531,7 +531,7 @@ void AStylePart::formatFiles() } if ( processed != 0 ) { - KMessageBox::information ( 0, i18n ( "Processed %1 files ending with extensions %2" ).arg ( processed ).arg(getProjectExtensions().stripWhiteSpace()) ); + KMessageBox::information ( 0, i18n ( "Processed %1 files ending with extensions %2" ).tqarg ( processed ).tqarg(getProjectExtensions().stripWhiteSpace()) ); } m_urls.clear(); -- cgit v1.2.1