summaryrefslogtreecommitdiffstats
path: root/languages/sql/sqlsupport_part.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/sql/sqlsupport_part.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
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
Diffstat (limited to 'languages/sql/sqlsupport_part.cpp')
-rw-r--r--languages/sql/sqlsupport_part.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/languages/sql/sqlsupport_part.cpp b/languages/sql/sqlsupport_part.cpp
index 78c1c1f2..c31a4499 100644
--- a/languages/sql/sqlsupport_part.cpp
+++ b/languages/sql/sqlsupport_part.cpp
@@ -29,14 +29,14 @@
#include "sqloutputwidget.h"
#include "domutil.h"
-typedef KDevGenericFactory<SQLSupportPart> SQLSupportFactory;
+typedef KDevGenericFactory<STQLSupportPart> STQLSupportFactory;
static const KDevPluginInfo data("kdevsqlsupport");
-K_EXPORT_COMPONENT_FACTORY( libkdevsqlsupport, SQLSupportFactory( data ) )
+K_EXPORT_COMPONENT_FACTORY( libkdevsqlsupport, STQLSupportFactory( data ) )
-SQLSupportPart::SQLSupportPart( TQObject *parent, const char *name, const TQStringList& )
- : KDevLanguageSupport ( &data, parent, name ? name : "SQLSupportPart" )
+STQLSupportPart::STQLSupportPart( TQObject *tqparent, const char *name, const TQStringList& )
+ : KDevLanguageSupport ( &data, tqparent, name ? name : "STQLSupportPart" )
{
- setInstance( SQLSupportFactory::instance() );
+ setInstance( STQLSupportFactory::instance() );
setXMLFile( "kdevsqlsupport.rc" );
KAction *action;
@@ -46,7 +46,7 @@ SQLSupportPart::SQLSupportPart( TQObject *parent, const char *name, const TQStri
dbAction = new SqlListAction( this, i18n( "&Database Connections" ), 0, this, TQT_SLOT(activeConnectionChanged()), actionCollection(), "connection_combo" );
- kdDebug( 9000 ) << "Creating SQLSupportPart" << endl;
+ kdDebug( 9000 ) << "Creating STQLSupportPart" << endl;
connect( core(), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ),
this, TQT_SLOT( projectConfigWidget( KDialogBase* ) ) );
@@ -61,30 +61,30 @@ SQLSupportPart::SQLSupportPart( TQObject *parent, const char *name, const TQStri
}
-SQLSupportPart::~SQLSupportPart()
+STQLSupportPart::~STQLSupportPart()
{
mainWindow()->removeView(m_widget);
delete m_widget;
}
-TQString SQLSupportPart::cryptStr(const TQString& aStr)
+TQString STQLSupportPart::cryptStr(const TQString& aStr)
{
TQString result;
for (unsigned int i = 0; i < aStr.length(); i++)
- result += (aStr[i].unicode() < 0x20) ? aStr[i] :
- TQChar(0x1001F - aStr[i].unicode());
+ result += (aStr[i].tqunicode() < 0x20) ? aStr[i] :
+ TQChar(0x1001F - aStr[i].tqunicode());
return result;
}
-void SQLSupportPart::activeConnectionChanged()
+void STQLSupportPart::activeConnectionChanged()
{
updateCatalog();
}
-void SQLSupportPart::clearConfig()
+void STQLSupportPart::clearConfig()
{
for ( TQStringList::Iterator it = conNames.begin(); it != conNames.end(); ++it ) {
- if ( TQSqlDatabase::contains( *it ) ) {
+ if ( TQSqlDatabase::tqcontains( *it ) ) {
TQSqlDatabase::database( *it, false )->close();
TQSqlDatabase::removeDatabase( *it );
} else {
@@ -96,7 +96,7 @@ void SQLSupportPart::clearConfig()
dbAction->refresh();
}
-void SQLSupportPart::loadConfig()
+void STQLSupportPart::loadConfig()
{
clearConfig();
@@ -110,10 +110,10 @@ void SQLSupportPart::loadConfig()
if ( (int)sdb.size() < 6 )
break;
- conName = "KDEVSQLSUPPORT_";
+ conName = "KDEVSTQLSUPPORT_";
conName += TQString::number( i );
conNames << conName;
- TQSqlDatabase* db = TQSqlDatabase::addDatabase( sdb[0], TQString( "KDEVSQLSUPPORT_%1" ).arg( i ) );
+ TQSqlDatabase* db = TQSqlDatabase::addDatabase( sdb[0], TQString( "KDEVSTQLSUPPORT_%1" ).tqarg( i ) );
db->setDatabaseName( sdb[1] );
db->setHostName( sdb[2] );
bool ok;
@@ -130,7 +130,7 @@ void SQLSupportPart::loadConfig()
dbAction->refresh();
}
-void SQLSupportPart::projectConfigWidget( KDialogBase *dlg )
+void STQLSupportPart::projectConfigWidget( KDialogBase *dlg )
{
TQVBox *vbox = dlg->addVBoxPage( TQString( "SQL" ), i18n( "Specify Your Database Connections" ), BarIcon("source", KIcon::SizeMedium) );
SqlConfigWidget *w = new SqlConfigWidget( (TQWidget*)vbox, "SQL config widget" );
@@ -140,7 +140,7 @@ void SQLSupportPart::projectConfigWidget( KDialogBase *dlg )
connect( w, TQT_SIGNAL(newConfigSaved()), this, TQT_SLOT(loadConfig()) );
}
-void SQLSupportPart::projectOpened()
+void STQLSupportPart::projectOpened()
{
connect( project(), TQT_SIGNAL( addedFilesToProject( const TQStringList & ) ),
this, TQT_SLOT( addedFilesToProject( const TQStringList & ) ) );
@@ -155,12 +155,12 @@ void SQLSupportPart::projectOpened()
}
-void SQLSupportPart::projectClosed()
+void STQLSupportPart::projectClosed()
{
clearConfig();
}
-void SQLSupportPart::slotRun ()
+void STQLSupportPart::slotRun ()
{
TQString cName = dbAction->currentConnectionName();
if ( cName.isEmpty() ) {
@@ -183,20 +183,20 @@ static TQString dbCaption(const TQSqlDatabase* db)
if (!db)
return res;
res = db->driverName();
- res += TQString::fromLatin1("@");
+ res += TQString::tqfromLatin1("@");
res += db->hostName();
if (db->port() >= 0)
- res += TQString::fromLatin1(":") + TQString::number(db->port());
+ res += TQString::tqfromLatin1(":") + TQString::number(db->port());
return res;
}
#endif
-void SQLSupportPart::parse()
+void STQLSupportPart::parse()
{
// @todo
}
-void SQLSupportPart::updateCatalog()
+void STQLSupportPart::updateCatalog()
{
if (!project() || !dbAction)
return;
@@ -236,7 +236,7 @@ void SQLSupportPart::updateCatalog()
emit updatedSourceInfo();
}
-void SQLSupportPart::addedFilesToProject( const TQStringList &fileList )
+void STQLSupportPart::addedFilesToProject( const TQStringList &fileList )
{
TQStringList::ConstIterator it;
@@ -248,7 +248,7 @@ void SQLSupportPart::addedFilesToProject( const TQStringList &fileList )
}
-void SQLSupportPart::removedFilesFromProject( const TQStringList &fileList )
+void STQLSupportPart::removedFilesFromProject( const TQStringList &fileList )
{
TQStringList::ConstIterator it;
@@ -259,20 +259,20 @@ void SQLSupportPart::removedFilesFromProject( const TQStringList &fileList )
emit updatedSourceInfo();
}
-void SQLSupportPart::savedFile( const KURL &fileName )
+void STQLSupportPart::savedFile( const KURL &fileName )
{
- if ( project() ->allFiles().contains( fileName.path().mid ( project() ->projectDirectory().length() + 1 ) ) ) {
+ if ( project() ->allFiles().tqcontains( fileName.path().mid ( project() ->projectDirectory().length() + 1 ) ) ) {
// parse( fileName );
// emit updatedSourceInfo();
}
}
-KDevLanguageSupport::Features SQLSupportPart::features()
+KDevLanguageSupport::Features STQLSupportPart::features()
{
return Features( Classes | Functions );
}
-KMimeType::List SQLSupportPart::mimeTypes( )
+KMimeType::List STQLSupportPart::mimeTypes( )
{
KMimeType::List list;
KMimeType::Ptr mime = KMimeType::mimeType( "text/plain" );