diff options
Diffstat (limited to 'src/projectmanager.cpp')
-rw-r--r-- | src/projectmanager.cpp | 252 |
1 files changed, 126 insertions, 126 deletions
diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp index dfef6b3..ad6a32a 100644 --- a/src/projectmanager.cpp +++ b/src/projectmanager.cpp @@ -28,9 +28,9 @@ #include <kmessagebox.h> #include <kmimetype.h> #include <kstandarddirs.h> -#include <qdom.h> -#include <qpopupmenu.h> -#include <qwhatsthis.h> +#include <tqdom.h> +#include <tqpopupmenu.h> +#include <tqwhatsthis.h> #include <assert.h> @@ -42,9 +42,9 @@ LinkerOptions::LinkerOptions() } -QDomElement LinkerOptions::toDomElement( QDomDocument & doc, const KURL & baseURL ) const +TQDomElement LinkerOptions::toDomElement( TQDomDocument & doc, const KURL & baseURL ) const { - QDomElement node = doc.createElement("linker"); + TQDomElement node = doc.createElement("linker"); node.setAttribute( "hex-format", hexFormatToString(hexFormat()) ); node.setAttribute( "output-map-file", outputMapFile() ); @@ -52,18 +52,18 @@ QDomElement LinkerOptions::toDomElement( QDomDocument & doc, const KURL & baseUR node.setAttribute( "linker-script", linkerScript() ); node.setAttribute( "other", linkerOther() ); - QStringList::const_iterator end = m_linkedInternal.end(); - for ( QStringList::const_iterator it = m_linkedInternal.begin(); it != end; ++it ) + TQStringList::const_iterator end = m_linkedInternal.end(); + for ( TQStringList::const_iterator it = m_linkedInternal.begin(); it != end; ++it ) { - QDomElement child = doc.createElement("linked-internal"); + TQDomElement child = doc.createElement("linked-internal"); node.appendChild(child); child.setAttribute( "url", KURL::relativeURL( baseURL, *it ) ); } end = m_linkedExternal.end(); - for ( QStringList::const_iterator it = m_linkedExternal.begin(); it != end; ++it ) + for ( TQStringList::const_iterator it = m_linkedExternal.begin(); it != end; ++it ) { - QDomElement child = doc.createElement("linked-external"); + TQDomElement child = doc.createElement("linked-external"); node.appendChild(child); child.setAttribute( "url", *it ); } @@ -72,30 +72,30 @@ QDomElement LinkerOptions::toDomElement( QDomDocument & doc, const KURL & baseUR } -void LinkerOptions::domElementToLinkerOptions( const QDomElement & element, const KURL & baseURL ) +void LinkerOptions::domElementToLinkerOptions( const TQDomElement & element, const KURL & baseURL ) { - setHexFormat( stringToHexFormat( element.attribute( "hex-format", QString::null ) ) ); + setHexFormat( stringToHexFormat( element.attribute( "hex-format", TQString() ) ) ); setOutputMapFile( element.attribute( "output-map-file", "0" ).toInt() ); - setLibraryDir( element.attribute( "library-dir", QString::null ) ); - setLinkerScript( element.attribute( "linker-script", QString::null ) ); - setLinkerOther( element.attribute( "other", QString::null ) ); + setLibraryDir( element.attribute( "library-dir", TQString() ) ); + setLinkerScript( element.attribute( "linker-script", TQString() ) ); + setLinkerOther( element.attribute( "other", TQString() ) ); m_linkedInternal.clear(); m_linkedExternal.clear(); - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while ( !node.isNull() ) { - QDomElement childElement = node.toElement(); + TQDomElement childElement = node.toElement(); if ( !childElement.isNull() ) { - const QString tagName = childElement.tagName(); + const TQString tagName = childElement.tagName(); if ( tagName == "linked-internal" ) - m_linkedInternal << KURL( baseURL, childElement.attribute( "url", QString::null ) ).url(); + m_linkedInternal << KURL( baseURL, childElement.attribute( "url", TQString() ) ).url(); else if ( tagName == "linked-external" ) - m_linkedExternal << childElement.attribute( "url", QString::null ); + m_linkedExternal << childElement.attribute( "url", TQString() ); else kdError() << k_funcinfo << "Unrecognised element tag name: "<<tagName<<endl; @@ -106,7 +106,7 @@ void LinkerOptions::domElementToLinkerOptions( const QDomElement & element, cons } -QString LinkerOptions::hexFormatToString( HexFormat::type hexFormat ) +TQString LinkerOptions::hexFormatToString( HexFormat::type hexFormat ) { switch ( hexFormat ) { @@ -128,7 +128,7 @@ QString LinkerOptions::hexFormatToString( HexFormat::type hexFormat ) } -LinkerOptions::HexFormat::type LinkerOptions::stringToHexFormat( const QString & hexFormat ) +LinkerOptions::HexFormat::type LinkerOptions::stringToHexFormat( const TQString & hexFormat ) { if ( hexFormat == "inhx8m" ) return HexFormat::inhx8m; @@ -158,9 +158,9 @@ ProcessingOptions::~ProcessingOptions() } -QDomElement ProcessingOptions::toDomElement( QDomDocument & doc, const KURL & baseURL ) const +TQDomElement ProcessingOptions::toDomElement( TQDomDocument & doc, const KURL & baseURL ) const { - QDomElement node = doc.createElement("processing"); + TQDomElement node = doc.createElement("processing"); node.setAttribute( "output", KURL::relativeURL( baseURL, outputURL().url() ) ); node.setAttribute( "micro", m_microID ); @@ -169,20 +169,20 @@ QDomElement ProcessingOptions::toDomElement( QDomDocument & doc, const KURL & ba } -void ProcessingOptions::domElementToProcessingOptions( const QDomElement & element, const KURL & baseURL ) +void ProcessingOptions::domElementToProcessingOptions( const TQDomElement & element, const KURL & baseURL ) { - setOutputURL( KURL( baseURL, element.attribute( "output", QString::null ) ) ); - setMicroID( element.attribute("micro", QString::null ) ); + setOutputURL( KURL( baseURL, element.attribute( "output", TQString() ) ) ); + setMicroID( element.attribute("micro", TQString() ) ); } //END class ProcessingOptions //BEGIN class ProjectItem -ProjectItem::ProjectItem( ProjectItem * parent, Type type, ProjectManager * projectManager, KTechlab * ktechlab ) - : QObject() +ProjectItem::ProjectItem( ProjectItem * tqparent, Type type, ProjectManager * projectManager, KTechlab * ktechlab ) + : TQObject() { - m_pParent = parent; + m_pParent = tqparent; m_pILVItem = 0l; m_pProjectManager = projectManager; p_ktechlab = ktechlab; @@ -192,11 +192,11 @@ ProjectItem::ProjectItem( ProjectItem * parent, Type type, ProjectManager * proj ProjectItem::~ProjectItem() { - m_children.remove( (ProjectItem*)0l ); - ProjectItemList::iterator end = m_children.end(); - for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it ) + m_tqchildren.remove( (ProjectItem*)0l ); + ProjectItemList::iterator end = m_tqchildren.end(); + for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it ) (*it)->deleteLater(); - m_children.clear(); + m_tqchildren.clear(); delete m_pILVItem; m_pILVItem = 0l; @@ -228,7 +228,7 @@ void ProjectItem::updateILVItemPixmap() case ProgramType: { - QPixmap pm; + TQPixmap pm; pm.load( locate( "appdata", "icons/project_program.png" ) ); m_pILVItem->setPixmap( 0, pm ); break; @@ -236,7 +236,7 @@ void ProjectItem::updateILVItemPixmap() case LibraryType: { - QPixmap pm; + TQPixmap pm; pm.load( locate( "appdata", "icons/project_library.png" ) ); m_pILVItem->setPixmap( 0, pm ); break; @@ -254,10 +254,10 @@ void ProjectItem::updateILVItemPixmap() void ProjectItem::addChild( ProjectItem * child ) { - if ( !child || m_children.contains(child) ) + if ( !child || m_tqchildren.tqcontains(child) ) return; - m_children << child; + m_tqchildren << child; child->setILVItem( m_pILVItem ? new ILVItem( m_pILVItem, child->name() ) : @@ -283,14 +283,14 @@ void ProjectItem::updateControlChildMicroIDs() break; } - m_children.remove( (ProjectItem*)0l ); - ProjectItemList::iterator end = m_children.end(); - for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it ) + m_tqchildren.remove( (ProjectItem*)0l ); + ProjectItemList::iterator end = m_tqchildren.end(); + for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it ) (*it)->setUseParentMicroID( control ); } -void ProjectItem::setName( const QString & name ) +void ProjectItem::setName( const TQString & name ) { m_name = name; if (m_pILVItem) @@ -313,7 +313,7 @@ void ProjectItem::setURL( const KURL & url ) else if ( outputURL().isEmpty() ) { // Try and guess what the output url should be... - QString newExtension; + TQString newExtension; switch ( outputType() ) { @@ -335,9 +335,9 @@ void ProjectItem::setURL( const KURL & url ) if ( !newExtension.isEmpty() ) { - const QString fileName = url.url(); - QString extension = fileName.right( fileName.length() - fileName.findRev('.') ); - setOutputURL( QString(fileName).replace( extension, newExtension ) ); + const TQString fileName = url.url(); + TQString extension = fileName.right( fileName.length() - fileName.tqfindRev('.') ); + setOutputURL( TQString(fileName).tqreplace( extension, newExtension ) ); } } @@ -345,16 +345,16 @@ void ProjectItem::setURL( const KURL & url ) } -QString ProjectItem::microID() const +TQString ProjectItem::microID() const { if ( !m_bUseParentMicroID ) return m_microID; - return m_pParent ? m_pParent->microID() : QString::null; + return m_pParent ? m_pParent->microID() : TQString(); } -void ProjectItem::setMicroID( const QString & id ) +void ProjectItem::setMicroID( const TQString & id ) { ProcessingOptions::setMicroID(id); updateControlChildMicroIDs(); @@ -389,7 +389,7 @@ ProjectItem::OutputType ProjectItem::outputType() const case ProjectItem::FileType: { - kdWarning() << k_funcinfo << "Don't know how to handle parent item being a file" << endl; + kdWarning() << k_funcinfo << "Don't know how to handle tqparent item being a file" << endl; return UnknownOutput; } @@ -420,18 +420,18 @@ bool ProjectItem::build( ProcessOptionsList * pol ) if ( outputURL().isEmpty() ) { - KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (output url is empty).").arg(name()) ); + KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (output url is empty).").tqarg(name()) ); return false; } // Build all internal libraries that we depend on - QStringList::iterator send = m_linkedInternal.end(); - for ( QStringList::iterator it = m_linkedInternal.begin(); it != send; ++it ) + TQStringList::iterator send = m_linkedInternal.end(); + for ( TQStringList::iterator it = m_linkedInternal.begin(); it != send; ++it ) { ProjectItem * lib = projectInfo->findItem( projectInfo->directory() + *it ); if ( !lib ) { - KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (library does not exist in project).").arg(*it) ); + KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (library does not exist in project).").tqarg(*it) ); return false; } @@ -440,10 +440,10 @@ bool ProjectItem::build( ProcessOptionsList * pol ) } - // Build all children - m_children.remove( (ProjectItem*)0l ); - ProjectItemList::iterator cend = m_children.end(); - for ( ProjectItemList::iterator it = m_children.begin(); it != cend; ++it ) + // Build all tqchildren + m_tqchildren.remove( (ProjectItem*)0l ); + ProjectItemList::iterator cend = m_tqchildren.end(); + for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != cend; ++it ) { if ( ! (*it)->build(pol) ) return false; @@ -461,7 +461,7 @@ bool ProjectItem::build( ProcessOptionsList * pol ) switch ( outputType() ) { case UnknownOutput: - KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (unknown output type).").arg(name()) ); + KMessageBox::sorry( 0l, i18n("Don't know how to build \"%1\" (unknown output type).").tqarg(name()) ); return false; case ProgramOutput: @@ -491,12 +491,12 @@ bool ProjectItem::build( ProcessOptionsList * pol ) case ProgramType: case LibraryType: // Build up a list of input urls - QStringList inputFiles; + TQStringList inputFiles; // Link child objects - m_children.remove( (ProjectItem*)0l ); - ProjectItemList::iterator cend = m_children.end(); - for ( ProjectItemList::iterator it = m_children.begin(); it != cend; ++it ) + m_tqchildren.remove( (ProjectItem*)0l ); + ProjectItemList::iterator cend = m_tqchildren.end(); + for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != cend; ++it ) inputFiles << (*it)->outputURL().path(); po.setInputFiles(inputFiles); @@ -511,11 +511,11 @@ bool ProjectItem::build( ProcessOptionsList * pol ) po.m_linkOther = linkerOther(); // Link against libraries - QStringList::iterator lend = m_linkedInternal.end(); - for ( QStringList::iterator it = m_linkedInternal.begin(); it != lend; ++it ) + TQStringList::iterator lend = m_linkedInternal.end(); + for ( TQStringList::iterator it = m_linkedInternal.begin(); it != lend; ++it ) po.m_linkLibraries += projectInfo->directory() + *it; lend = m_linkedExternal.end(); - for ( QStringList::iterator it = m_linkedExternal.begin(); it != lend; ++it ) + for ( TQStringList::iterator it = m_linkedExternal.begin(); it != lend; ++it ) po.m_linkLibraries += *it; // Save our working file (if open) and append to the build list @@ -532,7 +532,7 @@ void ProjectItem::upload( ProcessOptionsList * pol ) { build( pol ); - ProgrammerDlg * dlg = new ProgrammerDlg( microID(), (QWidget*)p_ktechlab, "Programmer Dlg" ); + ProgrammerDlg * dlg = new ProgrammerDlg( microID(), (TQWidget*)p_ktechlab, "Programmer Dlg" ); dlg->exec(); if ( !dlg->isAccepted() ) @@ -553,9 +553,9 @@ void ProjectItem::upload( ProcessOptionsList * pol ) } -QDomElement ProjectItem::toDomElement( QDomDocument & doc, const KURL & baseURL ) const +TQDomElement ProjectItem::toDomElement( TQDomDocument & doc, const KURL & baseURL ) const { - QDomElement node = doc.createElement("item"); + TQDomElement node = doc.createElement("item"); node.setAttribute( "type", typeToString() ); node.setAttribute( "name", m_name ); @@ -565,8 +565,8 @@ QDomElement ProjectItem::toDomElement( QDomDocument & doc, const KURL & baseURL node.appendChild( ProcessingOptions::toDomElement( doc, baseURL ) ); - ProjectItemList::const_iterator end = m_children.end(); - for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it ) + ProjectItemList::const_iterator end = m_tqchildren.end(); + for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it ) { if (*it) node.appendChild( (*it)->toDomElement( doc, baseURL ) ); @@ -580,8 +580,8 @@ KURL::List ProjectItem::childOutputURLs( unsigned types, unsigned outputTypes ) { KURL::List urls; - ProjectItemList::const_iterator end = m_children.end(); - for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it ) + ProjectItemList::const_iterator end = m_tqchildren.end(); + for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it ) { if (!*it) continue; @@ -601,8 +601,8 @@ ProjectItem * ProjectItem::findItem( const KURL & url ) if ( this->url() == url ) return this; - ProjectItemList::const_iterator end = m_children.end(); - for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it ) + ProjectItemList::const_iterator end = m_tqchildren.end(); + for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it ) { if (!*it) continue; @@ -622,9 +622,9 @@ bool ProjectItem::closeOpenFiles() if ( doc && !doc->fileClose() ) return false; - m_children.remove( (ProjectItem*)0l ); - ProjectItemList::iterator end = m_children.end(); - for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it ) + m_tqchildren.remove( (ProjectItem*)0l ); + ProjectItemList::iterator end = m_tqchildren.end(); + for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it ) { if ( !(*it)->closeOpenFiles() ) return false; @@ -668,9 +668,9 @@ void ProjectItem::addFile( const KURL & url ) if ( url.isEmpty() ) return; - m_children.remove( (ProjectItem*)0l ); - ProjectItemList::iterator end = m_children.end(); - for ( ProjectItemList::iterator it = m_children.begin(); it != end; ++it ) + m_tqchildren.remove( (ProjectItem*)0l ); + ProjectItemList::iterator end = m_tqchildren.end(); + for ( ProjectItemList::iterator it = m_tqchildren.begin(); it != end; ++it ) { if ( (*it)->type() == FileType && (*it)->url() == url ) return; @@ -682,7 +682,7 @@ void ProjectItem::addFile( const KURL & url ) } -QString ProjectItem::typeToString() const +TQString ProjectItem::typeToString() const { switch (m_type) { @@ -698,11 +698,11 @@ QString ProjectItem::typeToString() const case LibraryType: return "Library"; } - return QString::null; + return TQString(); } -ProjectItem::Type ProjectItem::stringToType( const QString & type ) +ProjectItem::Type ProjectItem::stringToType( const TQString & type ) { if ( type == "Project" ) return ProjectType; @@ -720,11 +720,11 @@ ProjectItem::Type ProjectItem::stringToType( const QString & type ) } -void ProjectItem::domElementToItem( const QDomElement & element, const KURL & baseURL ) +void ProjectItem::domElementToItem( const TQDomElement & element, const KURL & baseURL ) { - Type type = stringToType( element.attribute( "type", QString::null ) ); - QString name = element.attribute( "name", QString::null ); - KURL url( baseURL, element.attribute( "url", QString::null ) ); + Type type = stringToType( element.attribute( "type", TQString() ) ); + TQString name = element.attribute( "name", TQString() ); + KURL url( baseURL, element.attribute( "url", TQString() ) ); ProjectItem * createdItem = new ProjectItem( this, type, m_pProjectManager, p_ktechlab ); createdItem->setName( name ); @@ -732,13 +732,13 @@ void ProjectItem::domElementToItem( const QDomElement & element, const KURL & ba addChild( createdItem ); - QDomNode node = element.firstChild(); + TQDomNode node = element.firstChild(); while ( !node.isNull() ) { - QDomElement childElement = node.toElement(); + TQDomElement childElement = node.toElement(); if ( !childElement.isNull() ) { - const QString tagName = childElement.tagName(); + const TQString tagName = childElement.tagName(); if ( tagName == "linker" ) createdItem->domElementToLinkerOptions( childElement, baseURL ); @@ -764,7 +764,7 @@ void ProjectItem::domElementToItem( const QDomElement & element, const KURL & ba ProjectInfo::ProjectInfo( ProjectManager * projectManager, KTechlab * ktechlab ) : ProjectItem( 0l, ProjectItem::ProjectType, projectManager, ktechlab ) { - m_microID = QString::null; + m_microID = TQString(); } @@ -775,7 +775,7 @@ ProjectInfo::~ ProjectInfo() bool ProjectInfo::open( const KURL & url ) { - QString target; + TQString target; if ( !KIO::NetAccess::download( url, target, 0l ) ) { // If the file could not be downloaded, for example does not @@ -785,39 +785,39 @@ bool ProjectInfo::open( const KURL & url ) return false; } - QFile file(target); + TQFile file(target); if ( !file.open( IO_ReadOnly ) ) { - KMessageBox::sorry( 0l, i18n("Could not open %1 for reading").arg(target) ); + KMessageBox::sorry( 0l, i18n("Could not open %1 for reading").tqarg(target) ); return false; } m_url = url; - QString xml; - QTextStream textStream( &file ); + TQString xml; + TQTextStream textStream( &file ); while ( !textStream.eof() ) xml += textStream.readLine() + '\n'; file.close(); - QDomDocument doc( "KTechlab" ); - QString errorMessage; + TQDomDocument doc( "KTechlab" ); + TQString errorMessage; if ( !doc.setContent( xml, &errorMessage ) ) { - KMessageBox::sorry( 0l, i18n("Couldn't parse xml:\n%1").arg(errorMessage) ); + KMessageBox::sorry( 0l, i18n("Couldn't parse xml:\n%1").tqarg(errorMessage) ); return false; } - QDomElement root = doc.documentElement(); + TQDomElement root = doc.documentElement(); - QDomNode node = root.firstChild(); + TQDomNode node = root.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { - const QString tagName = element.tagName(); + const TQString tagName = element.tagName(); if ( tagName == "linker" ) domElementToLinkerOptions( element, m_url ); @@ -842,27 +842,27 @@ bool ProjectInfo::open( const KURL & url ) bool ProjectInfo::save() { - QFile file( m_url.path() ); + TQFile file( m_url.path() ); if ( file.open(IO_WriteOnly) == false ) { - KMessageBox::sorry( NULL, i18n("Project could not be saved to \"%1\"").arg(m_url.path()), i18n("Saving Project") ); + KMessageBox::sorry( NULL, i18n("Project could not be saved to \"%1\"").tqarg(m_url.path()), i18n("Saving Project") ); return false; } - QDomDocument doc("KTechlab"); + TQDomDocument doc("KTechlab"); - QDomElement root = doc.createElement("project"); + TQDomElement root = doc.createElement("project"); doc.appendChild(root); // root.appendChild( LinkerOptions::toDomElement(doc) ); // root.appendChild( ProcessingOptions::toDomElement(doc) ); - m_children.remove( (ProjectItem*)0l ); - ProjectItemList::const_iterator end = m_children.end(); - for ( ProjectItemList::const_iterator it = m_children.begin(); it != end; ++it ) + m_tqchildren.remove( (ProjectItem*)0l ); + ProjectItemList::const_iterator end = m_tqchildren.end(); + for ( ProjectItemList::const_iterator it = m_tqchildren.begin(); it != end; ++it ) root.appendChild( (*it)->toDomElement( doc, m_url ) ); - QTextStream stream(&file); + TQTextStream stream(&file); stream << doc.toString(); file.close(); @@ -889,29 +889,29 @@ bool ProjectInfo::saveAndClose() //BEGIN class ProjectManager ProjectManager * ProjectManager::m_pSelf = 0l; -ProjectManager * ProjectManager::self( KTechlab * ktl, KateMDI::ToolView * parent ) +ProjectManager * ProjectManager::self( KTechlab * ktl, KateMDI::ToolView * tqparent ) { if ( !m_pSelf ) { assert(ktl); - assert(parent); - m_pSelf = new ProjectManager( ktl, parent ); + assert(tqparent); + m_pSelf = new ProjectManager( ktl, tqparent ); } return m_pSelf; } -ProjectManager::ProjectManager( KTechlab * ktl, KateMDI::ToolView * parent ) - : ItemSelector( parent, "Project Manager" ), +ProjectManager::ProjectManager( KTechlab * ktl, KateMDI::ToolView * tqparent ) + : ItemSelector( tqparent, "Project Manager" ), m_pCurrentProject(0l), p_ktechlab(ktl) { - QWhatsThis::add( this, i18n("Displays the list of files in the project.\nTo open or close a project, use the \"Project\" menu. Right click on a file to remove it from the project") ); + TQWhatsThis::add( this, i18n("Displays the list of files in the project.\nTo open or close a project, use the \"Project\" menu. Right click on a file to remove it from the project") ); setListCaption( i18n("File") ); setCaption( i18n("Project Manager") ); - connect( this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotItemClicked(QListViewItem*)) ); + connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotItemClicked(TQListViewItem*)) ); } @@ -934,7 +934,7 @@ void ProjectManager::slotNewProject() m_pCurrentProject->setName( newProjectDlg->projectName() ); m_pCurrentProject->setURL( newProjectDlg->location() + m_pCurrentProject->name().lower() + ".ktechlab" ); - QDir dir; + TQDir dir; if ( !dir.mkdir( m_pCurrentProject->directory() ) ) kdDebug() << "Error in creating directory " << m_pCurrentProject->directory() << endl; @@ -955,7 +955,7 @@ void ProjectManager::slotProjectOptions() void ProjectManager::slotOpenProject() { - KURL url = KFileDialog::getOpenURL(QString::null, + KURL url = KFileDialog::getOpenURL(TQString(), "*.ktechlab|KTechlab Project(*.ktechlab)\n*|All Files", this, i18n("Open Location")); if ( url.isEmpty() ) @@ -1130,7 +1130,7 @@ void ProjectManager::slotRemoveSelected() if ( !currentItem ) return; - int choice = KMessageBox::questionYesNo( this, i18n("Do you really want to remove \"%1\"?").arg( currentItem->text(0) ), i18n("Remove Project File?"), KGuiItem(i18n("Remove")), KGuiItem(i18n("Cancel")) ); + int choice = KMessageBox::questionYesNo( this, i18n("Do you really want to remove \"%1\"?").tqarg( currentItem->text(0) ), i18n("Remove Project File?"), KGuiItem(i18n("Remove")), KGuiItem(i18n("Cancel")) ); if ( choice == KMessageBox::No ) return; @@ -1175,7 +1175,7 @@ void ProjectManager::slotItemProcessingOptions() } -void ProjectManager::slotItemClicked( QListViewItem * item ) +void ProjectManager::slotItemClicked( TQListViewItem * item ) { ILVItem * ilvItem = dynamic_cast<ILVItem*>(item); if ( !ilvItem ) @@ -1189,9 +1189,9 @@ void ProjectManager::slotItemClicked( QListViewItem * item ) } -void ProjectManager::slotContextMenuRequested( QListViewItem * item, const QPoint& pos, int /*col*/ ) +void ProjectManager::slotContextMenuRequested( TQListViewItem * item, const TQPoint& pos, int /*col*/ ) { - QString popupName; + TQString popupName; ILVItem * ilvItem = dynamic_cast<ILVItem*>(item); KAction * linkerOptionsAct = p_ktechlab->action("project_item_linker_options"); linkerOptionsAct->setEnabled(false); @@ -1247,7 +1247,7 @@ void ProjectManager::slotContextMenuRequested( QListViewItem * item, const QPoin p_ktechlab->action("subproject_add_current_file")->setEnabled( haveFocusedDocument ); p_ktechlab->action("project_add_current_file")->setEnabled( haveFocusedDocument ); - QPopupMenu *pop = static_cast<QPopupMenu*>(p_ktechlab->factory()->container( popupName, p_ktechlab )); + TQPopupMenu *pop = static_cast<TQPopupMenu*>(p_ktechlab->factory()->container( popupName, p_ktechlab )); if (pop) pop->popup(pos); } |