summaryrefslogtreecommitdiffstats
path: root/languages/pascal/pascalsupport_part.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /languages/pascal/pascalsupport_part.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/pascal/pascalsupport_part.cpp')
-rw-r--r--languages/pascal/pascalsupport_part.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/languages/pascal/pascalsupport_part.cpp b/languages/pascal/pascalsupport_part.cpp
index 0c5f96f2..0d8c049b 100644
--- a/languages/pascal/pascalsupport_part.cpp
+++ b/languages/pascal/pascalsupport_part.cpp
@@ -9,9 +9,9 @@
***************************************************************************/
#include <fstream>
-#include <qdir.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
+#include <tqdir.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -47,7 +47,7 @@ typedef KDevGenericFactory<PascalSupportPart> PascalSupportFactory;
static const KDevPluginInfo data("kdevpascalsupport");
K_EXPORT_COMPONENT_FACTORY( libkdevpascalsupport, PascalSupportFactory( data ) )
-PascalSupportPart::PascalSupportPart(QObject *parent, const char *name, const QStringList &)
+PascalSupportPart::PascalSupportPart(TQObject *parent, const char *name, const TQStringList &)
: KDevLanguageSupport(&data, parent, name ? name : "KDevPascalSupport" ),
d( new PascalSupportPartData() )
{
@@ -55,22 +55,22 @@ PascalSupportPart::PascalSupportPart(QObject *parent, const char *name, const QS
setXMLFile("kdevpascalsupport.rc");
d->problemReporter = new ProblemReporter( this );
- connect( core(), SIGNAL(configWidget(KDialogBase*)),
- d->problemReporter, SLOT(configWidget(KDialogBase*)) );
-
- connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) );
- connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) );
- connect( partController(), SIGNAL(savedFile(const KURL&)),
- this, SLOT(savedFile(const KURL&)) );
- connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)),
- this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
- connect( core(), SIGNAL(configWidget(KDialogBase*)),
- this, SLOT(configWidget(KDialogBase*)) );
- connect( core( ), SIGNAL( projectConfigWidget( KDialogBase* ) ), this,
- SLOT( projectConfigWidget( KDialogBase* ) ) );
+ connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)),
+ d->problemReporter, TQT_SLOT(configWidget(KDialogBase*)) );
+
+ connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) );
+ connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) );
+ connect( partController(), TQT_SIGNAL(savedFile(const KURL&)),
+ this, TQT_SLOT(savedFile(const KURL&)) );
+ connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)),
+ this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) );
+ connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)),
+ this, TQT_SLOT(configWidget(KDialogBase*)) );
+ connect( core( ), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ), this,
+ TQT_SLOT( projectConfigWidget( KDialogBase* ) ) );
mainWindow()->embedOutputView( d->problemReporter, i18n("Problems"), i18n("problem reporter") );
- QWhatsThis::add(d->problemReporter, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. "
+ TQWhatsThis::add(d->problemReporter, i18n("<b>Problem reporter</b><p>This window shows various \"problems\" in your project. "
"It displays errors reported by a language parser."));
}
@@ -89,17 +89,17 @@ PascalSupportPart::Features PascalSupportPart::features()
void PascalSupportPart::projectOpened()
{
- connect(project(), SIGNAL(addedFilesToProject(const QStringList &)),
- this, SLOT(addedFilesToProject(const QStringList &)));
- connect(project(), SIGNAL(removedFilesFromProject(const QStringList &)),
- this, SLOT(removedFilesFromProject(const QStringList &)));
- connect(project(), SIGNAL(projectCompiled()),
- this, SLOT(slotProjectCompiled()) );
+ connect(project(), TQT_SIGNAL(addedFilesToProject(const TQStringList &)),
+ this, TQT_SLOT(addedFilesToProject(const TQStringList &)));
+ connect(project(), TQT_SIGNAL(removedFilesFromProject(const TQStringList &)),
+ this, TQT_SLOT(removedFilesFromProject(const TQStringList &)));
+ connect(project(), TQT_SIGNAL(projectCompiled()),
+ this, TQT_SLOT(slotProjectCompiled()) );
m_projectFileList = project()->allFiles();
m_projectClosed = false;
- QTimer::singleShot(0, this, SLOT(initialParse()));
+ TQTimer::singleShot(0, this, TQT_SLOT(initialParse()));
}
void PascalSupportPart::projectClosed()
@@ -119,7 +119,7 @@ void PascalSupportPart::projectConfigWidget(KDialogBase *dlg)
return;
}
-void PascalSupportPart::contextMenu(QPopupMenu *popup, const Context *context)
+void PascalSupportPart::contextMenu(TQPopupMenu *popup, const Context *context)
{
Q_UNUSED( popup );
Q_UNUSED( context );
@@ -132,22 +132,22 @@ void PascalSupportPart::savedFile(const KURL &fileName)
emit updatedSourceInfo();
}
-void PascalSupportPart::addedFilesToProject(const QStringList &fileList)
+void PascalSupportPart::addedFilesToProject(const TQStringList &fileList)
{
- for (QStringList::ConstIterator it = fileList.begin(); it != fileList.end() ;++it)
+ for (TQStringList::ConstIterator it = fileList.begin(); it != fileList.end() ;++it)
{
- QString fn = project()->projectDirectory() + "/" + *it;
+ TQString fn = project()->projectDirectory() + "/" + *it;
maybeParse( fn );
kapp->processEvents( 500 );
emit addedSourceInfo(fn);
}
}
-void PascalSupportPart::removedFilesFromProject(const QStringList &fileList)
+void PascalSupportPart::removedFilesFromProject(const TQStringList &fileList)
{
- for (QStringList::ConstIterator it = fileList.begin(); it != fileList.end() ;++it)
+ for (TQStringList::ConstIterator it = fileList.begin(); it != fileList.end() ;++it)
{
- QString fn = project()->projectDirectory() + "/" + *it;
+ TQString fn = project()->projectDirectory() + "/" + *it;
emit aboutToRemoveSourceInfo(fn);
codeModel()->removeFile( codeModel()->fileByName(fn) );
@@ -169,9 +169,9 @@ void PascalSupportPart::initialParse( )
/// @todo Progress indicator!
- QStringList files = project()->allFiles();
- for (QStringList::Iterator it = files.begin(); it != files.end() ;++it){
- QString fn = project()->projectDirectory() + "/" + *it;
+ TQStringList files = project()->allFiles();
+ for (TQStringList::Iterator it = files.begin(); it != files.end() ;++it){
+ TQString fn = project()->projectDirectory() + "/" + *it;
maybeParse( fn );
kapp->processEvents( 500 );
}
@@ -183,7 +183,7 @@ void PascalSupportPart::initialParse( )
}
}
-void PascalSupportPart::maybeParse( const QString & fileName )
+void PascalSupportPart::maybeParse( const TQString & fileName )
{
kdDebug(9013) << "Maybe parse: " << fileName << endl;
@@ -195,12 +195,12 @@ void PascalSupportPart::maybeParse( const QString & fileName )
parse( fileName );
}
-void PascalSupportPart::parse( const QString & fileName )
+void PascalSupportPart::parse( const TQString & fileName )
{
kdDebug(9013) << "PascalSupportPart::parse() -- " << fileName << endl;
- std::ifstream stream( QFile::encodeName( fileName ).data() );
- QCString _fn = fileName.utf8();
+ std::ifstream stream( TQFile::encodeName( fileName ).data() );
+ TQCString _fn = fileName.utf8();
std::string fn( _fn.data() );
PascalLexer lexer( stream );
@@ -249,17 +249,17 @@ KMimeType::List PascalSupportPart::mimeTypes( )
return list;
}
-QString PascalSupportPart::formatTag( const Tag & inputTag )
+TQString PascalSupportPart::formatTag( const Tag & inputTag )
{
Tag tag = inputTag;
switch( tag.kind() )
{
case Tag::Kind_Namespace:
- return QString::fromLatin1("unit ") + tag.name();
+ return TQString::fromLatin1("unit ") + tag.name();
case Tag::Kind_Class:
- return QString::fromLatin1("class ") + tag.name();
+ return TQString::fromLatin1("class ") + tag.name();
case Tag::Kind_Function:
case Tag::Kind_FunctionDeclaration:
@@ -271,20 +271,20 @@ QString PascalSupportPart::formatTag( const Tag & inputTag )
case Tag::Kind_Variable:
case Tag::Kind_VariableDeclaration:
{
- return QString::fromLatin1("var ") + tag.name();
+ return TQString::fromLatin1("var ") + tag.name();
}
break;
}
return tag.name();
}
-QString PascalSupportPart::formatModelItem( const CodeModelItem * item, bool shortDescription )
+TQString PascalSupportPart::formatModelItem( const CodeModelItem * item, bool shortDescription )
{
if (item->isFunction() || item->isFunctionDefinition() )
{
const FunctionModel *model = static_cast<const FunctionModel*>(item);
- QString function;
- QString args;
+ TQString function;
+ TQString args;
ArgumentList argumentList = model->argumentList();
for (ArgumentList::const_iterator it = argumentList.begin(); it != argumentList.end(); ++it)
{
@@ -295,7 +295,7 @@ QString PascalSupportPart::formatModelItem( const CodeModelItem * item, bool sho
function += model->name() + "(" + args + ")";
if( !shortDescription )
- function += (model->isVirtual() ? QString("virtual; ") : QString("") ) + model->resultType() + " ";
+ function += (model->isVirtual() ? TQString("virtual; ") : TQString("") ) + model->resultType() + " ";
return function;
}
@@ -309,11 +309,11 @@ QString PascalSupportPart::formatModelItem( const CodeModelItem * item, bool sho
else if (item->isArgument())
{
const ArgumentModel *model = static_cast<const ArgumentModel*>(item);
- QString arg;
+ TQString arg;
arg += model->name();
arg += ": " + model->type();
if( !shortDescription )
- arg += model->defaultValue().isEmpty() ? QString("") : QString(" = ") + model->defaultValue();
+ arg += model->defaultValue().isEmpty() ? TQString("") : TQString(" = ") + model->defaultValue();
return arg.stripWhiteSpace();
}
else