summaryrefslogtreecommitdiffstats
path: root/languages/sql/sqloutputwidget.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/sqloutputwidget.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/sqloutputwidget.cpp')
-rw-r--r--languages/sql/sqloutputwidget.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/languages/sql/sqloutputwidget.cpp b/languages/sql/sqloutputwidget.cpp
index f7d84fde..73228dd7 100644
--- a/languages/sql/sqloutputwidget.cpp
+++ b/languages/sql/sqloutputwidget.cpp
@@ -24,11 +24,11 @@
#include "sqloutputwidget.h"
-class QCustomSqlCursor: public QSqlCursor
+class TQCustomSqlCursor: public TQSqlCursor
{
public:
- QCustomSqlCursor( const TQString & query = TQString::null, bool autopopulate = TRUE, TQSqlDatabase* db = 0 ) :
- TQSqlCursor( TQString::null, autopopulate, db )
+ TQCustomSqlCursor( const TQString & query = TQString(), bool autopopulate = TRUE, TQSqlDatabase* db = 0 ) :
+ TQSqlCursor( TQString(), autopopulate, db )
{
exec( query );
if ( isSelect() && autopopulate ) {
@@ -39,23 +39,23 @@ public:
}
setMode( TQSqlCursor::ReadOnly );
}
- QCustomSqlCursor( const QCustomSqlCursor & other ): TQSqlCursor( other ) {}
+ TQCustomSqlCursor( const TQCustomSqlCursor & other ): TQSqlCursor( other ) {}
bool select( const TQString & /*filter*/, const TQSqlIndex & /*sort*/ = TQSqlIndex() )
{ return exec( lastQuery() ); }
TQSqlIndex primaryIndex( bool /*prime*/ = TRUE ) const
{ return TQSqlIndex(); }
- int insert( bool /*invalidate*/ = TRUE )
+ int insert( bool /*tqinvalidate*/ = TRUE )
{ return FALSE; }
- int update( bool /*invalidate*/ = TRUE )
+ int update( bool /*tqinvalidate*/ = TRUE )
{ return FALSE; }
- int del( bool /*invalidate*/ = TRUE )
+ int del( bool /*tqinvalidate*/ = TRUE )
{ return FALSE; }
void setName( const TQString& /*name*/, bool /*autopopulate*/ = TRUE ) {}
};
-SqlOutputWidget::SqlOutputWidget ( TQWidget* parent, const char* name ) :
- TQWidget( parent, name )
+SqlOutputWidget::SqlOutputWidget ( TQWidget* tqparent, const char* name ) :
+ TQWidget( tqparent, name )
{
m_stack = new TQWidgetStack( this );
m_table = new TQDataTable( this );
@@ -67,8 +67,8 @@ SqlOutputWidget::SqlOutputWidget ( TQWidget* parent, const char* name ) :
m_stack->addWidget( m_textEdit );
m_stack->addWidget( m_table );
- TQVBoxLayout* layout = new TQVBoxLayout( this );
- layout->addWidget( m_stack );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->addWidget( m_stack );
}
SqlOutputWidget::~SqlOutputWidget()
@@ -78,7 +78,7 @@ void SqlOutputWidget::showQuery( const TQString& connectionName, const TQString&
{
TQSqlDatabase* db = TQSqlDatabase::database( connectionName, true );
if ( !db ) {
- showError( i18n("No such connection: %1").arg( connectionName ) );
+ showError( i18n("No such connection: %1").tqarg( connectionName ) );
return;
}
if ( !db->isOpen() ) {
@@ -86,7 +86,7 @@ void SqlOutputWidget::showQuery( const TQString& connectionName, const TQString&
return;
}
- TQSqlCursor* cur = new QCustomSqlCursor( query, true, db );
+ TQSqlCursor* cur = new TQCustomSqlCursor( query, true, db );
if ( !cur->isActive() ) {
showError( cur->lastError() );
} else if ( cur->isSelect() ) {
@@ -101,7 +101,7 @@ void SqlOutputWidget::showQuery( const TQString& connectionName, const TQString&
void SqlOutputWidget::showSuccess( int rowsAffected )
{
m_textEdit->clear();
- m_textEdit->setText( i18n("Query successful, number of rows affected: %1").arg( rowsAffected ) );
+ m_textEdit->setText( i18n("Query successful, number of rows affected: %1").tqarg( rowsAffected ) );
m_stack->raiseWidget( m_textEdit );
}