summaryrefslogtreecommitdiffstats
path: root/parts/astyle/astyle_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/astyle/astyle_part.cpp')
-rw-r--r--parts/astyle/astyle_part.cpp34
1 files changed, 17 insertions, 17 deletions
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<AStylePart> 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;i<wsCount;i++)
- replace+=' ';
+ tqreplace+=' ';
- indentWith=indentWith.replace(replace, TQChar('\t'));
+ indentWith=indentWith.tqreplace(tqreplace, TQChar('\t'));
indentWith=indentWith.remove(' ');
} else
{
if ( m_project["FillForce"].toBool()){
//convert tabs to spaces
- TQString replace;
+ TQString tqreplace;
for (int i =0;i<wsCount;i++)
- replace+=' ';
+ tqreplace+=' ';
- indentWith=indentWith.replace(TQChar('\t'),replace);
+ indentWith=indentWith.tqreplace(TQChar('\t'),tqreplace);
}
}
}
@@ -323,14 +323,14 @@ void AStylePart::activePartChanged ( KParts::Part *part )
if ( iface )
{
// check for the everything case..
- if ( m_searchExtensions.find ( "*" ) == m_searchExtensions.end() )
+ if ( m_searchExtensions.tqfind ( "*" ) == m_searchExtensions.end() )
{
TQString extension = rw_part->url().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("<b>Format</b><p>Formats the current selection, if possible"));
+ popup->TQMenuData::setWhatsThis(id, i18n("<b>Format</b><p>Formats the current selection, if possible"));
}
else if ( context->hasType( Context::FileContext )){
const FileContext *ctx = static_cast<const FileContext*>(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("<b>Format files</b><p>Formats selected files if possible"));
+ popup->TQMenuData::setWhatsThis(id, i18n("<b>Format files</b><p>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();