diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /kdevdesigner/designer/sourceeditor.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-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 'kdevdesigner/designer/sourceeditor.cpp')
-rw-r--r-- | kdevdesigner/designer/sourceeditor.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp index f5915664..863abaab 100644 --- a/kdevdesigner/designer/sourceeditor.cpp +++ b/kdevdesigner/designer/sourceeditor.cpp @@ -1,15 +1,15 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** -** This file is part of Qt Designer. +** This file is part of TQt Designer. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** -** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition -** licenses may use this file in accordance with the Qt Commercial License +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE @@ -17,7 +17,7 @@ ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about Qt Commercial License Agreements. +** information about TQt Commercial License Agreements. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. @@ -40,14 +40,14 @@ #include <tqtextstream.h> #include "kdevdesigner_part.h" -SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ) - : TQVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 ) +SourceEditor::SourceEditor( TQWidget *tqparent, EditorInterface *iface, LanguageInterface *liface ) + : TQVBox( tqparent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 ) { iFace->addRef(); lIface->addRef(); editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), this, MainWindow::self->designerInterface() ); - iFace->onBreakPointChange( MainWindow::self, TQT_SLOT( breakPointsChanged() ) ); + iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); resize( 600, 400 ); setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); } @@ -77,7 +77,7 @@ void SourceEditor::setObject( TQObject *o, Project *p ) formWindow()->formFile()->setCodeEdited( FALSE ); formWindow()->formFile()->setEditor( 0 ); } - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqqt_cast<FormWindow*>(o) ) ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); save(); bool changed = FALSE; @@ -104,7 +104,7 @@ void SourceEditor::setObject( TQObject *o, Project *p ) if ( formWindow()->isFake() ) iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); else - iFace->setContext( formWindow()->mainContainer() ); + iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); } else { iFace->setContext( 0 ); } @@ -119,9 +119,9 @@ TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, TQString txt; if ( !o ) return txt; - if ( ::qt_cast<FormWindow*>(o) ) + if ( ::tqqt_cast<FormWindow*>(o) ) txt = ( (FormWindow*)o )->formFile()->code(); - else if ( ::qt_cast<SourceFile*>(o) ) + else if ( ::tqqt_cast<SourceFile*>(o) ) txt = ( (SourceFile*)o )->text(); return txt; } @@ -133,7 +133,7 @@ void SourceEditor::setFunction( const TQString &func, const TQString &clss ) void SourceEditor::setClass( const TQString &clss ) { - iFace->scrollTo( clss, TQString::null ); + iFace->scrollTo( clss, TQString() ); } void SourceEditor::closeEvent( TQCloseEvent *e ) @@ -235,7 +235,7 @@ void SourceEditor::resetContext() if ( formWindow()->isFake() ) iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); else - iFace->setContext( formWindow()->mainContainer() ); + iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); } else { iFace->setContext( 0 ); } @@ -307,14 +307,14 @@ bool SourceEditor::saveAs() SourceFile *SourceEditor::sourceFile() const { - if ( !::qt_cast<SourceFile*>((TQObject *)obj) ) + if ( !::tqqt_cast<SourceFile*>((TQObject *)obj) ) return 0; return (SourceFile*)(TQObject*)obj; } FormWindow *SourceEditor::formWindow() const { - if ( !::qt_cast<FormWindow*>((TQObject *)obj) ) + if ( !::tqqt_cast<FormWindow*>((TQObject *)obj) ) return 0; return (FormWindow*)(TQObject*)obj; } |