diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-29 23:01:28 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-12-29 23:01:28 +0900 |
commit | 61cd5b18f00b0d36a7953596c5295e358324ebb7 (patch) | |
tree | 9e5fe82b53b2e1957358366b7c0149dab04206fb /kdevdesigner/designer/formfile.cpp | |
parent | 30ac86e18cc775007edbbf3cdb816082c172f38c (diff) | |
download | tdevelop-61cd5b18f00b0d36a7953596c5295e358324ebb7.tar.gz tdevelop-61cd5b18f00b0d36a7953596c5295e358324ebb7.zip |
Replaced various '#define' with actual strings - part 6
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kdevdesigner/designer/formfile.cpp')
-rw-r--r-- | kdevdesigner/designer/formfile.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp index 1ef0b0b7..abbd8991 100644 --- a/kdevdesigner/designer/formfile.cpp +++ b/kdevdesigner/designer/formfile.cpp @@ -83,7 +83,7 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name FormFile::~FormFile() { pro->removeFormFile( this ); - if ( TQT_TQOBJECT(formWindow()) ) + if ( formWindow() ) formWindow()->setFormFile( 0 ); } @@ -170,7 +170,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) if ( ed ) ed->save(); - if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { + if ( formWindow() && isModified( WFormWindow ) ) { if ( withMsgBox ) { if ( !formWindow()->checkCustomWidgets() ) return FALSE; @@ -221,7 +221,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) } } - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { Resource resource( MainWindow::self ); resource.setWidget( formWindow() ); bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); @@ -247,7 +247,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified ) bool FormFile::saveAs( bool ignoreModified ) { TQString f = pro->makeAbsolute( fileName() ); - if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { + if ( fileNameTemp && formWindow() ) { f = TQString( formWindow()->name() ).lower(); f.replace( "::", "_" ); f = pro->makeAbsolute( f + ".ui" ); @@ -293,7 +293,7 @@ bool FormFile::saveAs( bool ignoreModified ) } pro->setModified( TRUE ); timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); - if ( ed && TQT_TQOBJECT(formWindow()) ) + if ( ed && formWindow() ) ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); setModified( TRUE ); if ( pro->isDummy() ) @@ -307,7 +307,7 @@ bool FormFile::close() editor()->save(); editor()->close(); } - if ( TQT_TQOBJECT(formWindow()) ) + if ( formWindow() ) return formWindow()->close(); return TRUE; } @@ -372,7 +372,7 @@ bool FormFile::isModified( int who ) bool FormFile::isFormWindowModified() const { - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + if ( !formWindow() || !formWindow()->commandHistory() ) return FALSE; return formWindow()->commandHistory()->isModified(); } @@ -389,7 +389,7 @@ void FormFile::setFormWindowModified( bool m ) bool b = isFormWindowModified(); if ( m == b ) return; - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + if ( !formWindow() || !formWindow()->commandHistory() ) return; formWindow()->commandHistory()->setModified( m ); emit somethingChanged( this ); @@ -411,13 +411,13 @@ void FormFile::showFormWindow() { if ( !MainWindow::self ) return; - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { if ( ( formWindow()->hasFocus() || MainWindow::self->qWorkspace()->activeWindow() == formWindow() ) && MainWindow::self->propertyeditor()->formWindow() != formWindow() ) { - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); + MainWindow::self->propertyeditor()->setWidget( formWindow()->currentWidget(), formWindow() ); MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), - TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->currentWidget() ); } formWindow()->setFocus(); return; @@ -519,14 +519,14 @@ void FormFile::setCodeFileState( UihState s ) void FormFile::createFormCode() { - if ( !TQT_TQOBJECT(formWindow()) ) + if ( !formWindow() ) return; LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); if ( !iface ) return; if ( pro->isCpp() ) cod = codeComment(); - TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow() ); for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { cod += (!cod.isEmpty() ? "\n\n" : "") + iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), @@ -573,14 +573,14 @@ void FormFile::setCodeEdited( bool b ) void FormFile::parseCode( const TQString &txt, bool allowModify ) { - if ( !TQT_TQOBJECT(formWindow()) ) + if ( !formWindow() ) return; LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); if ( !iface ) return; TQValueList<LanguageInterface::Function> functions; TQValueList<MetaDataBase::Function> newFunctions, oldFunctions; - oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + oldFunctions = MetaDataBase::functionList( formWindow() ); iface->functions( txt, &functions ); TQMap<TQString, TQString> funcs; for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin(); @@ -634,7 +634,7 @@ void FormFile::parseCode( const TQString &txt, bool allowModify ) if ( allowModify && oldFunctions.count() > 0 ) setFormWindowModified( TRUE ); - MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); + MetaDataBase::setFunctionList( formWindow(), newFunctions ); } void FormFile::syncCode() @@ -704,7 +704,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function ) if ( !hasFunc ) { if ( !codeEdited && !timeStamp.isUpToDate() ) loadCode(); - MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); + MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( formWindow() ); TQString cn; if ( mi.classNameChanged ) cn = mi.className; @@ -802,7 +802,7 @@ void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &o TQString FormFile::formName() const { FormFile* that = (FormFile*) this; - if ( TQT_TQOBJECT(formWindow()) ) { + if ( formWindow() ) { that->cachedFormName = formWindow()->name(); return cachedFormName; } |