diff options
Diffstat (limited to 'parts/appwizard')
-rw-r--r-- | parts/appwizard/appwizarddlg.cpp | 368 | ||||
-rw-r--r-- | parts/appwizard/appwizarddlg.h | 138 | ||||
-rw-r--r-- | parts/appwizard/appwizardpart.cpp | 18 | ||||
-rw-r--r-- | parts/appwizard/appwizardpart.h | 8 | ||||
-rw-r--r-- | parts/appwizard/filepropspage.cpp | 18 | ||||
-rw-r--r-- | parts/appwizard/filepropspage.h | 26 | ||||
-rw-r--r-- | parts/appwizard/importdlg.cpp | 188 | ||||
-rw-r--r-- | parts/appwizard/importdlg.h | 30 | ||||
-rw-r--r-- | parts/appwizard/kdevfile.cpp | 2 | ||||
-rw-r--r-- | parts/appwizard/kdevfile.h | 2 | ||||
-rw-r--r-- | parts/appwizard/kdevlicense.cpp | 54 | ||||
-rw-r--r-- | parts/appwizard/kdevlicense.h | 18 | ||||
-rw-r--r-- | parts/appwizard/misc.cpp | 12 | ||||
-rw-r--r-- | parts/appwizard/misc.h | 4 | ||||
-rw-r--r-- | parts/appwizard/profilesupport.cpp | 6 | ||||
-rw-r--r-- | parts/appwizard/profilesupport.h | 4 |
16 files changed, 448 insertions, 448 deletions
diff --git a/parts/appwizard/appwizarddlg.cpp b/parts/appwizard/appwizarddlg.cpp index 816786ff..3d854ba0 100644 --- a/parts/appwizard/appwizarddlg.cpp +++ b/parts/appwizard/appwizarddlg.cpp @@ -13,26 +13,26 @@ #include "appwizarddlg.h" -#include <qvbox.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qtabwidget.h> -#include <qwidgetstack.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qgrid.h> -#include <qheader.h> -#include <qmap.h> -#include <qmultilineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qregexp.h> -#include <qtextstream.h> -#include <qtextview.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qvalidator.h> -#include <qtimer.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqtabwidget.h> +#include <tqwidgetstack.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqgrid.h> +#include <tqheader.h> +#include <tqmap.h> +#include <tqmultilineedit.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqregexp.h> +#include <tqtextstream.h> +#include <tqtextview.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqvalidator.h> +#include <tqtimer.h> #include <klistview.h> #include <kiconview.h> #include <kconfig.h> @@ -53,7 +53,7 @@ #include <ktrader.h> #include <kparts/componentfactory.h> #include <kio/netaccess.h> -#include <qfile.h> +#include <tqfile.h> #include <kmacroexpander.h> #include <karchive.h> #include <ktar.h> @@ -61,7 +61,7 @@ #include <kfileitem.h> #include <kio/chmodjob.h> -#include <qlayout.h> +#include <tqlayout.h> #include "domutil.h" #include "kdevversioncontrol.h" @@ -90,7 +90,7 @@ #include "propeditor/propertylist.h" #include "propeditor/propertyeditor.h" -AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const char *name) +AppWizardDialog::AppWizardDialog(AppWizardPart *part, TQWidget *parent, const char *name) : AppWizardDialogBase(parent, name,true), m_pCurrentAppInfo(0), m_profileSupport(new ProfileSupport(part)) { @@ -98,17 +98,17 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha m_customOptions = 0L; loadLicenses(); - connect( this, SIGNAL( selected( const QString & ) ), this, SLOT( pageChanged() ) ); + connect( this, TQT_SIGNAL( selected( const TQString & ) ), this, TQT_SLOT( pageChanged() ) ); helpButton()->hide(); templates_listview->header()->hide(); - templates_listview->setColumnWidthMode(0, QListView::Maximum); //to provide horiz scrollbar. + templates_listview->setColumnWidthMode(0, TQListView::Maximum); //to provide horiz scrollbar. m_templatesMenu = new KPopupMenu(templates_listview); - m_templatesMenu->insertItem(i18n("&Add to Favorites"), this, SLOT(addTemplateToFavourites())); + m_templatesMenu->insertItem(i18n("&Add to Favorites"), this, TQT_SLOT(addTemplateToFavourites())); m_favouritesMenu = new KPopupMenu(favourites_iconview); - m_favouritesMenu->insertItem(i18n("&Remove Favorite"), this, SLOT(removeFavourite())); + m_favouritesMenu->insertItem(i18n("&Remove Favorite"), this, TQT_SLOT(removeFavourite())); m_pathIsValid=false; m_part = part; @@ -122,15 +122,15 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha //templates_tabwidget->setCurrentPage(config->readNumEntry("CurrentTab", 0)); config->setGroup("General Options"); - QString defaultProjectsDir = config->readPathEntry("DefaultProjectsDir", QDir::homeDirPath()+"/"); + TQString defaultProjectsDir = config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/"); KStandardDirs *dirs = AppWizardFactory::instance()->dirs(); - QStringList m_templateNames = dirs->findAllResources("apptemplates", QString::null, false, true); + TQStringList m_templateNames = dirs->findAllResources("apptemplates", TQString::null, false, true); kdDebug(9010) << "Templates: " << endl; - QStringList categories; + TQStringList categories; - QStringList::Iterator it; + TQStringList::Iterator it; for (it = m_templateNames.begin(); it != m_templateNames.end(); ++it) { kdDebug(9010) << (*it) << endl; @@ -147,10 +147,10 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha info->comment = templateConfig.readEntry("Comment"); info->fileTemplates = templateConfig.readEntry("FileTemplates"); info->openFilesAfterGeneration = templateConfig.readListEntry("ShowFilesAfterGeneration"); - QString destDir = templateConfig.readPathEntry("DefaultDestinatonDir", defaultProjectsDir); - destDir.replace(QRegExp("HOMEDIR"), QDir::homeDirPath()); + TQString destDir = templateConfig.readPathEntry("DefaultDestinatonDir", defaultProjectsDir); + destDir.replace(TQRegExp("HOMEDIR"), TQDir::homeDirPath()); info->defaultDestDir = destDir; - QString category = templateConfig.readEntry("Category"); + TQString category = templateConfig.readEntry("Category"); // format category to a unique status if (category.right(1) == "/") category.remove(category.length()-1, 1); // remove / @@ -161,13 +161,13 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha info->sourceArchive = templateConfig.readEntry("Archive"); // Grab includes list - QStringList groups = templateConfig.groupList(); + TQStringList groups = templateConfig.groupList(); groups.remove("General"); - QStringList::Iterator group = groups.begin(); + TQStringList::Iterator group = groups.begin(); for( ; group != groups.end(); ++group) { templateConfig.setGroup( (*group) ); - QString type = templateConfig.readEntry("Type").lower(); + TQString type = templateConfig.readEntry("Type").lower(); if( type == "include" ) // Add value { info->includes.append( templateConfig.readEntry( "File" ) ); @@ -176,16 +176,16 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha } // Build builtins map to bootstrap. - QString source = kdevRoot( info->templateName ); + TQString source = kdevRoot( info->templateName ); info->subMap.insert("kdevelop", source ); // Add includes to the main template... - QStringList::Iterator include = info->includes.begin(); + TQStringList::Iterator include = info->includes.begin(); for( ; include != info->includes.end(); ++include) { if( !(*include).isEmpty() ) { - QString file = KMacroExpander::expandMacros( ( *include ), info->subMap); + TQString file = KMacroExpander::expandMacros( ( *include ), info->subMap); KConfig tmpCfg( file ); tmpCfg.copyTo( "", &templateConfig); kdDebug(9010) << "Merging: " << tmpCfg.name() << endl; @@ -197,15 +197,15 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha for( ; group != groups.end(); ++group) { templateConfig.setGroup( (*group) ); - QString type = templateConfig.readEntry("Type", "value").lower(); + TQString type = templateConfig.readEntry("Type", "value").lower(); kdDebug(9010) << "Reading " << (*group) << " of type " << type << endl; if( type == "value" ) // Add value { - QString name = templateConfig.readEntry( "Value" ); - QString label = templateConfig.readEntry( "Comment" ); - QString type = templateConfig.readEntry( "ValueType", "String" ); - QVariant::Type variantType = QVariant::nameToType( type.latin1()); - QVariant value = templateConfig.readPropertyEntry( "Default", variantType ); + TQString name = templateConfig.readEntry( "Value" ); + TQString label = templateConfig.readEntry( "Comment" ); + TQString type = templateConfig.readEntry( "ValueType", "String" ); + TQVariant::Type variantType = TQVariant::nameToType( type.latin1()); + TQVariant value = templateConfig.readPropertyEntry( "Default", variantType ); value.cast( variantType ); // fix this in kdelibs... if( !name.isEmpty() && !label.isEmpty() ) info->propValues->addProperty( new PropertyLib::Property( (int)variantType, name, label, value ) ); @@ -245,7 +245,7 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha } else if( type == "ui") { - QString name = templateConfig.readPathEntry("File"); + TQString name = templateConfig.readPathEntry("File"); info->customUI = name; } else if( type == "message" ) @@ -264,9 +264,9 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha insertCategoryIntoTreeView(*it); // Insert items into list view - QPtrListIterator<ApplicationInfo> ait(m_appsInfo); + TQPtrListIterator<ApplicationInfo> ait(m_appsInfo); for (; ait.current(); ++ait) { - QListViewItem *item = m_categoryMap.find(ait.current()->category); + TQListViewItem *item = m_categoryMap.find(ait.current()->category); if (item) { item = new KListViewItem(item, ait.current()->name); @@ -281,11 +281,11 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha //Load favourites from config populateFavourites(); - QString author, email; + TQString author, email; AppWizardUtil::guessAuthorAndEmail(&author, &email); author_edit->setText(author); email_edit->setText(email); - QToolTip::add( dest_edit->button(), i18n("Choose projects directory") ); + TQToolTip::add( dest_edit->button(), i18n("Choose projects directory") ); dest_edit->setURL(defaultProjectsDir); dest_edit->setMode(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly); @@ -297,20 +297,20 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha setNextEnabled(generalPage, false); -// QRegExp appname_regexp ("[a-zA-Z][a-zA-Z0-9_]*"); //Non-Unicode version +// TQRegExp appname_regexp ("[a-zA-Z][a-zA-Z0-9_]*"); //Non-Unicode version /* appname will start with a letter, and will contain letters, digits or underscores. */ - QRegExp appname_regexp ("[a-zA-Z][a-zA-Z0-9_]*"); + TQRegExp appname_regexp ("[a-zA-Z][a-zA-Z0-9_]*"); // How about names like "__" or "123" for project name? Are they legal? - QRegExpValidator *appname_edit_validator; - appname_edit_validator = new QRegExpValidator (appname_regexp, + TQRegExpValidator *appname_edit_validator; + appname_edit_validator = new TQRegExpValidator (appname_regexp, appname_edit, "AppNameValidator"); appname_edit->setValidator(appname_edit_validator); // insert the licenses into the license_combo - QDict< KDevLicense > lics( licenses() ); - QDictIterator< KDevLicense > dit(lics); + TQDict< KDevLicense > lics( licenses() ); + TQDictIterator< KDevLicense > dit(lics); int idx=1; for( ; dit.current(); ++dit ) { @@ -319,9 +319,9 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, QWidget *parent, const cha license_combo->setCurrentItem( idx - 1 ); } - connect( license_combo, SIGNAL(activated(int)), this, SLOT(licenseChanged()) ); + connect( license_combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(licenseChanged()) ); - m_custom_options_layout = new QHBoxLayout( custom_options ); + m_custom_options_layout = new TQHBoxLayout( custom_options ); m_custom_options_layout->setAutoAdd(true); showTemplates(false); @@ -347,15 +347,15 @@ void AppWizardDialog::loadVcs() kdDebug(9010) << "AppWizardDialog::loadVcs: creating vcs integrator " << service->name() << endl; - KLibFactory *factory = KLibLoader::self()->factory(QFile::encodeName(service->library())); + KLibFactory *factory = KLibLoader::self()->factory(TQFile::encodeName(service->library())); if (!factory) { - QString errorMessage = KLibLoader::self()->lastErrorMessage(); + TQString errorMessage = KLibLoader::self()->lastErrorMessage(); kdDebug(9010) << "There was an error loading the module " << service->name() << endl << "The diagnostics is:" << endl << errorMessage << endl; continue; } - QStringList args; - QObject *obj = factory->create(0, service->name().latin1(), + TQStringList args; + TQObject *obj = factory->create(0, service->name().latin1(), "KDevVCSIntegrator", args); KDevVCSIntegrator *integrator = (KDevVCSIntegrator*) obj; @@ -365,7 +365,7 @@ void AppWizardDialog::loadVcs() { kdDebug(9010) << " success" << endl; - QString vcsName = service->property("X-KDevelop-VCS").toString(); + TQString vcsName = service->property("X-KDevelop-VCS").toString(); m_vcsForm->combo->insertItem(vcsName, i); m_integrators.insert(vcsName, integrator); @@ -373,7 +373,7 @@ void AppWizardDialog::loadVcs() if (vcs) { m_integratorDialogs[i] = vcs; - QWidget *w = vcs->self(); + TQWidget *w = vcs->self(); if (w) m_vcsForm->stack->addWidget(w, i++); else @@ -409,19 +409,19 @@ void AppWizardDialog::textChanged() void AppWizardDialog::licenseChanged() { - QValueList<AppWizardFileTemplate>::Iterator it; + TQValueList<AppWizardFileTemplate>::Iterator it; if( license_combo->currentItem() == 0 ) { for (it = m_fileTemplates.begin(); it != m_fileTemplates.end(); ++it) { - QMultiLineEdit *edit = (*it).edit; - edit->setText( QString::null ); + TQMultiLineEdit *edit = (*it).edit; + edit->setText( TQString::null ); } } else { KDevLicense* lic = licenses()[ license_combo->currentText() ]; for (it = m_fileTemplates.begin(); it != m_fileTemplates.end(); ++it) { - QString style = (*it).style; - QMultiLineEdit *edit = (*it).edit; + TQString style = (*it).style; + TQMultiLineEdit *edit = (*it).edit; KDevFile::CommentingStyle commentStyle = KDevFile::CPPStyle; if (style == "PStyle") { @@ -434,25 +434,25 @@ void AppWizardDialog::licenseChanged() commentStyle = KDevFile::XMLStyle; } - QString text; + TQString text; text = lic->assemble( commentStyle, author_edit->text(), email_edit->text() , 0 ); edit->setText(text); } } } -QString AppWizardDialog::kdevRoot(const QString &templateName ) const +TQString AppWizardDialog::kdevRoot(const TQString &templateName ) const { - QString source; - QFileInfo finfo(templateName); - QDir dir(finfo.dir()); + TQString source; + TQFileInfo finfo(templateName); + TQDir dir(finfo.dir()); dir.cdUp(); return dir.absPath(); } void AppWizardDialog::accept() { - QFileInfo fi(finalLoc_label->text()); + TQFileInfo fi(finalLoc_label->text()); // check /again/ whether the dir already exists; maybe users create it in the meantime if (fi.exists() ) { KMessageBox::sorry(this, i18n("The directory you have chosen as the location for " @@ -463,7 +463,7 @@ void AppWizardDialog::accept() return; } - if( !QFileInfo(dest_edit->url()).isWritable() ){ + if( !TQFileInfo(dest_edit->url()).isWritable() ){ KMessageBox::sorry(this, i18n("The directory you have chosen as the location for " "the project is not writeable.")); showPage(generalPage); @@ -472,7 +472,7 @@ void AppWizardDialog::accept() return; } - QString source = kdevRoot( m_pCurrentAppInfo->templateName ); + TQString source = kdevRoot( m_pCurrentAppInfo->templateName ); // Unpack template archive to temp dir, and get the name kdDebug(9010) << "Unpacking archive to temp dir" << endl; @@ -503,18 +503,18 @@ void AppWizardDialog::accept() m_pCurrentAppInfo->subMap.insert("dest", finalLoc_label->text() ); m_pCurrentAppInfo->subMap.insert("APPNAME", appname_edit->text() ); m_pCurrentAppInfo->subMap.insert("APPNAMELC", appname_edit->text().lower() ); - m_pCurrentAppInfo->subMap.insert("APPNAMESC", QString(appname_edit->text()[0]).upper() + appname_edit->text().mid(1)); + m_pCurrentAppInfo->subMap.insert("APPNAMESC", TQString(appname_edit->text()[0]).upper() + appname_edit->text().mid(1)); m_pCurrentAppInfo->subMap.insert("APPNAMEUC", appname_edit->text().upper() ); m_pCurrentAppInfo->subMap.insert("AUTHOR", author_edit->text() ); m_pCurrentAppInfo->subMap.insert("EMAIL", email_edit->text() ); m_pCurrentAppInfo->subMap.insert("VERSION", version_edit->text()); m_pCurrentAppInfo->subMap.insert( "I18N", "i18n" ); - m_pCurrentAppInfo->subMap.insert("YEAR", QString::number( QDate::currentDate().year() ) ); + m_pCurrentAppInfo->subMap.insert("YEAR", TQString::number( TQDate::currentDate().year() ) ); // This isn't too pretty, but we have several templates that use KAboutData::License_${LICENSE} // and unsurprisingly, KAboutData doesn't cover every imaginable case. // These are the licenses known to KDE-3.2 KAboutData, KDevelop doesn't have all of these as prepared options today - QString license = license_combo->currentText(); + TQString license = license_combo->currentText(); if ( license == "GPL" || license == "GPL_V2" || license == "LGPL" || license == "LGPL_V2"|| license == "BSD" || license == "NCSA" || license == "MIT" || license == "Artistic" || license == "QPL" || license == "QPL_V1_0" ) @@ -527,7 +527,7 @@ void AppWizardDialog::accept() } - QStringList cleanUpSubstMap; + TQStringList cleanUpSubstMap; cleanUpSubstMap << "src" << "I18N" << "kdevelop"; @@ -542,37 +542,37 @@ void AppWizardDialog::accept() m_pCurrentAppInfo->dirList.prepend( baseDir ); // This is too silly for words, but it's either this or reimplementing FileTemplate - QString tempProjectDomSource = "<!DOCTYPE kdevelop><kdevelop><general><author>%1</author><email>%2</email><version>%3</version></general></kdevelop>"; + TQString tempProjectDomSource = "<!DOCTYPE kdevelop><kdevelop><general><author>%1</author><email>%2</email><version>%3</version></general></kdevelop>"; tempProjectDomSource = tempProjectDomSource.arg( author_edit->text() ).arg( email_edit->text() ).arg( version_edit->text() ); - QDomDocument tempProjectDom; + TQDomDocument tempProjectDom; tempProjectDom.setContent( tempProjectDomSource ); - QValueList<AppWizardFileTemplate>::Iterator it; + TQValueList<AppWizardFileTemplate>::Iterator it; for (it = m_fileTemplates.begin(); it != m_fileTemplates.end(); ++it) { KTempFile *tempFile = new KTempFile(); m_tempFiles.append(tempFile); - QString templateText( FileTemplate::makeSubstitutions( tempProjectDom, (*it).edit->text() ) ); - QFile f; + TQString templateText( FileTemplate::makeSubstitutions( tempProjectDom, (*it).edit->text() ) ); + TQFile f; f.open(IO_WriteOnly, tempFile->handle()); - QTextStream temps(&f); - temps.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream temps(&f); + temps.setEncoding(TQTextStream::UnicodeUTF8); temps << templateText; f.flush(); - QString templateName( QString( "%1_TEMPLATE" ).arg( (*it).suffix ).upper() ); + TQString templateName( TQString( "%1_TEMPLATE" ).arg( (*it).suffix ).upper() ); cleanUpSubstMap << templateName; m_pCurrentAppInfo->subMap.insert( templateName, KMacroExpander::expandMacros(templateText , m_pCurrentAppInfo->subMap) ); installFile file; file.source = tempFile->name(); - file.dest = QString( "%{dest}/templates/%1" ).arg( (*it).suffix ); + file.dest = TQString( "%{dest}/templates/%1" ).arg( (*it).suffix ); file.process = true; file.isXML = false; m_pCurrentAppInfo->fileList.append( file ); } // Add license file to the file list - QString licenseFile, licenseName = i18n("Custom"); + TQString licenseFile, licenseName = i18n("Custom"); if( license_combo->currentItem() != 0 ) { @@ -580,13 +580,13 @@ void AppWizardDialog::accept() KDevLicense* lic = licenses()[ licenseName ]; if( lic ) { - QStringList files( lic->copyFiles() ); - QStringList::Iterator it = files.begin(); + TQStringList files( lic->copyFiles() ); + TQStringList::Iterator it = files.begin(); for( ; it != files.end(); ++it ) { installFile file; - file.source = QString( "%{kdevelop}/template-common/%1" ).arg( *it ); - file.dest = QString("%{dest}/%1").arg( *it ); + file.source = TQString( "%{kdevelop}/template-common/%1" ).arg( *it ); + file.dest = TQString("%{dest}/%1").arg( *it ); file.process = true; file.isXML = false; m_pCurrentAppInfo->fileList.append( file ); @@ -597,7 +597,7 @@ void AppWizardDialog::accept() } // Run macro expander on both the dir map and file maps - QValueList<installFile>::Iterator fileIt = m_pCurrentAppInfo->fileList.begin(); + TQValueList<installFile>::Iterator fileIt = m_pCurrentAppInfo->fileList.begin(); for( ; fileIt != m_pCurrentAppInfo->fileList.end(); ++fileIt) { (*fileIt).source = KMacroExpander::expandMacros((*fileIt).source , m_pCurrentAppInfo->subMap); @@ -605,14 +605,14 @@ void AppWizardDialog::accept() (*fileIt).dest = KMacroExpander::expandMacros((*fileIt).dest , m_pCurrentAppInfo->subMap); } - QValueList<installArchive>::Iterator archIt = m_pCurrentAppInfo->archList.begin(); + TQValueList<installArchive>::Iterator archIt = m_pCurrentAppInfo->archList.begin(); for( ; archIt != m_pCurrentAppInfo->archList.end(); ++archIt) { (*archIt).source = KMacroExpander::expandMacros((*archIt).source , m_pCurrentAppInfo->subMap); (*archIt).dest = KMacroExpander::expandMacros((*archIt).dest , m_pCurrentAppInfo->subMap); } - QValueList<installDir>::Iterator dirIt = m_pCurrentAppInfo->dirList.begin(); + TQValueList<installDir>::Iterator dirIt = m_pCurrentAppInfo->dirList.begin(); for( ; dirIt != m_pCurrentAppInfo->dirList.end(); ++dirIt) { (*dirIt).dir = KMacroExpander::expandMacros((*dirIt).dir , m_pCurrentAppInfo->subMap); @@ -626,10 +626,10 @@ void AppWizardDialog::accept() m_pCurrentAppInfo->finishCmdDir, m_pCurrentAppInfo->subMap ); } - QMap<QString,QString>::Iterator mapIt( m_pCurrentAppInfo->subMap.begin() ); + TQMap<TQString,TQString>::Iterator mapIt( m_pCurrentAppInfo->subMap.begin() ); for( ; mapIt != m_pCurrentAppInfo->subMap.end(); ++mapIt ) { - QString escaped( mapIt.data() ); + TQString escaped( mapIt.data() ); escaped.replace( "&", "&" ); escaped.replace( "<", "<" ); escaped.replace( ">", ">" ); @@ -698,7 +698,7 @@ void AppWizardDialog::accept() // KMessageBox::information(this, KMacroExpander::expandMacros(m_pCurrentAppInfo->message, m_pCurrentAppInfo->subMap)); - QStringList::Iterator cleanIt = cleanUpSubstMap.begin(); + TQStringList::Iterator cleanIt = cleanUpSubstMap.begin(); for(;cleanIt != cleanUpSubstMap.end(); ++cleanIt ) { m_pCurrentAppInfo->subMap.remove( *cleanIt ); @@ -737,7 +737,7 @@ void AppWizardDialog::accept() kdDebug(9010) << "vcs integrator wasn't selected" << endl; openAfterGeneration(); - QWizard::accept(); + TQWizard::accept(); } bool AppWizardDialog::copyFile( const installFile& file ) @@ -751,23 +751,23 @@ bool AppWizardDialog::copyFile( const installFile& file ) #include <sys/stat.h> #include <unistd.h> -bool AppWizardDialog::copyFile( const QString &source, const QString &dest, bool isXML, bool process ) +bool AppWizardDialog::copyFile( const TQString &source, const TQString &dest, bool isXML, bool process ) { kdDebug( 9010 ) << "Copy: " << source << " to " << dest << endl; if( process ) { // Process the file and save it at the destFile location - QFile inputFile( source); - QFile outputFile( dest ); + TQFile inputFile( source); + TQFile outputFile( dest ); - const QMap<QString,QString> &subMap = isXML ? + const TQMap<TQString,TQString> &subMap = isXML ? m_pCurrentAppInfo->subMapXML : m_pCurrentAppInfo->subMap; if( inputFile.open( IO_ReadOnly ) && outputFile.open(IO_WriteOnly) ) { - QTextStream input( &inputFile ); - input.setEncoding(QTextStream::UnicodeUTF8); - QTextStream output( &outputFile ); - output.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream input( &inputFile ); + input.setEncoding(TQTextStream::UnicodeUTF8); + TQTextStream output( &outputFile ); + output.setEncoding(TQTextStream::UnicodeUTF8); while( !input.atEnd() ) output << KMacroExpander::expandMacros(input.readLine(), subMap) << "\n"; // Preserve file mode... @@ -791,16 +791,16 @@ bool AppWizardDialog::copyFile( const QString &source, const QString &dest, bool return true; } -void AppWizardDialog::unpackArchive( const KArchiveDirectory *dir, const QString &dest, bool process ) +void AppWizardDialog::unpackArchive( const KArchiveDirectory *dir, const TQString &dest, bool process ) { KIO::NetAccess::mkdir( dest , this ); kdDebug(9010) << "Dir : " << dir->name() << " at " << dest << endl; - QStringList entries = dir->entries(); + TQStringList entries = dir->entries(); kdDebug(9010) << "Entries : " << entries.join(",") << endl; KTempDir tdir; - QStringList::Iterator entry = entries.begin(); + TQStringList::Iterator entry = entries.begin(); for( ; entry != entries.end(); ++entry ) { @@ -822,7 +822,7 @@ void AppWizardDialog::unpackArchive( const KArchiveDirectory *dir, const QString file->copyTo(tdir.name()); // assume that an archive does not contain XML files // ( where should we currently get that info from? ) - if ( !copyFile( QDir::cleanDirPath(tdir.name()+"/"+file->name()), dest + "/" + file->name(), false, process ) ) + if ( !copyFile( TQDir::cleanDirPath(tdir.name()+"/"+file->name()), dest + "/" + file->name(), false, process ) ) { KMessageBox::sorry(this, i18n("The file %1 cannot be created.").arg( dest) ); return; @@ -834,14 +834,14 @@ void AppWizardDialog::unpackArchive( const KArchiveDirectory *dir, const QString tdir.unlink(); } -void AppWizardDialog::templatesTreeViewClicked(QListViewItem *item) +void AppWizardDialog::templatesTreeViewClicked(TQListViewItem *item) { if( m_customOptions ) delete m_customOptions; // Delete old file template pages while (!m_fileTemplates.isEmpty()) { - QMultiLineEdit *edit = m_fileTemplates.first().edit; + TQMultiLineEdit *edit = m_fileTemplates.first().edit; removePage(edit); delete edit; m_fileTemplates.remove(m_fileTemplates.begin()); @@ -852,10 +852,10 @@ void AppWizardDialog::templatesTreeViewClicked(QListViewItem *item) if (info) { m_pCurrentAppInfo = info; if (!info->icon.isEmpty()) { - QFileInfo fi(info->templateName); - QDir dir(fi.dir()); + TQFileInfo fi(info->templateName); + TQDir dir(fi.dir()); dir.cdUp(); - QPixmap pm; + TQPixmap pm; pm.load(dir.filePath(info->icon)); icon_label->setPixmap(pm); } else { @@ -872,11 +872,11 @@ void AppWizardDialog::templatesTreeViewClicked(QListViewItem *item) // Create new file template pages - QStringList l = QStringList::split(",", info->fileTemplates); + TQStringList l = TQStringList::split(",", info->fileTemplates); if (l.empty()) //if the app template doesn't show file templates, we need to set another m_lastPage, aleXXX m_lastPage=m_vcsForm; - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while (it != l.end()) { AppWizardFileTemplate fileTemplate; fileTemplate.suffix = *it; @@ -887,8 +887,8 @@ void AppWizardDialog::templatesTreeViewClicked(QListViewItem *item) } else fileTemplate.style = ""; - QMultiLineEdit *edit = new QMultiLineEdit(this); - edit->setWordWrap(QTextEdit::NoWrap); + TQMultiLineEdit *edit = new TQMultiLineEdit(this); + edit->setWordWrap(TQTextEdit::NoWrap); edit->setFont(KGlobalSettings::fixedFont()); if (it == l.end()) m_lastPage = edit; @@ -908,15 +908,15 @@ void AppWizardDialog::templatesTreeViewClicked(QListViewItem *item) } -void AppWizardDialog::destButtonClicked(const QString& dir) +void AppWizardDialog::destButtonClicked(const TQString& dir) { if(!dir.isEmpty()) { // set new location as default project dir? KConfig *config = kapp->config(); config->setGroup("General Options"); - QDir defPrjDir( config->readPathEntry("DefaultProjectsDir", QDir::homeDirPath()) ); - QDir newDir (dir); + TQDir defPrjDir( config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()) ); + TQDir newDir (dir); kdDebug(9010) << "DevPrjDir == newdir?: " << defPrjDir.absPath() << " == " << newDir.absPath() << endl; if (defPrjDir != newDir) { if (KMessageBox::questionYesNo(this, i18n("Set default project location to: %1?").arg( newDir.absPath() ), @@ -941,8 +941,8 @@ void AppWizardDialog::projectLocationChanged() // Jakob Simon-Gaarde: Got tired of the anoying bug with the appname/location confussion. // This version insures WYSIWYG and checks pathvalidity finalLoc_label->setText(dest_edit->url() + (dest_edit->url().right(1)=="/" ? "":"/") + appname_edit->text()); - QDir qd(dest_edit->url()); - QFileInfo fi(dest_edit->url() + "/" + appname_edit->text()); + TQDir qd(dest_edit->url()); + TQFileInfo fi(dest_edit->url() + "/" + appname_edit->text()); if (!qd.exists() || appname_edit->displayText().isEmpty()||fi.exists()) { if (!fi.exists() || appname_edit->displayText().isEmpty()) { @@ -958,17 +958,17 @@ void AppWizardDialog::projectLocationChanged() } -void AppWizardDialog::insertCategoryIntoTreeView(const QString &completeCategoryPath) +void AppWizardDialog::insertCategoryIntoTreeView(const TQString &completeCategoryPath) { kdDebug(9010) << "TemplateCategory: " << completeCategoryPath << endl; - QStringList categories = QStringList::split("/", completeCategoryPath); - QString category =""; - QListViewItem* pParentItem=0; + TQStringList categories = TQStringList::split("/", completeCategoryPath); + TQString category =""; + TQListViewItem* pParentItem=0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = categories.begin(); it != categories.end(); ++it) { category = category + "/" + *it; - QListViewItem *item = m_categoryMap.find(category); + TQListViewItem *item = m_categoryMap.find(category); if (!item) { // not found, create it if (!pParentItem) pParentItem = new KListViewItem(templates_listview,*it); @@ -987,9 +987,9 @@ void AppWizardDialog::insertCategoryIntoTreeView(const QString &completeCategory } -ApplicationInfo *AppWizardDialog::templateForItem(QListViewItem *item) +ApplicationInfo *AppWizardDialog::templateForItem(TQListViewItem *item) { - QPtrListIterator<ApplicationInfo> it(m_appsInfo); + TQPtrListIterator<ApplicationInfo> it(m_appsInfo); for (; it.current(); ++it) if (it.current()->item == item) return it.current(); @@ -999,16 +999,16 @@ ApplicationInfo *AppWizardDialog::templateForItem(QListViewItem *item) void AppWizardDialog::openAfterGeneration() { - QString projectFile( finalLoc_label->text() + "/" + appname_edit->text().lower() + ".kdevelop" ); + TQString projectFile( finalLoc_label->text() + "/" + appname_edit->text().lower() + ".kdevelop" ); // Read the DOM of the newly created project - QFile file( projectFile ); + TQFile file( projectFile ); if( !file.open( IO_ReadOnly ) ) return; - QDomDocument projectDOM; + TQDomDocument projectDOM; int errorLine, errorCol; - QString errorMsg; + TQString errorMsg; bool success = projectDOM.setContent( &file, &errorMsg, &errorLine, &errorCol); file.close(); if ( !success ) @@ -1023,7 +1023,7 @@ void AppWizardDialog::openAfterGeneration() DomUtil::writeMapEntry( projectDOM, "substmap", m_pCurrentAppInfo->subMap ); //save the selected vcs - KTrader::OfferList offers = KTrader::self()->query("KDevelop/VCSIntegrator", QString("[X-KDevelop-VCS]=='%1'").arg(m_vcsForm->combo->currentText())); + KTrader::OfferList offers = KTrader::self()->query("KDevelop/VCSIntegrator", TQString("[X-KDevelop-VCS]=='%1'").arg(m_vcsForm->combo->currentText())); if (offers.count() == 1) { KService::Ptr service = offers.first(); @@ -1031,11 +1031,11 @@ void AppWizardDialog::openAfterGeneration() } // figure out what plugins we should disable by default - QString profileName = DomUtil::readEntry( projectDOM, "general/profile" ); + TQString profileName = DomUtil::readEntry( projectDOM, "general/profile" ); if ( profileName.isEmpty() ) { - QString language = DomUtil::readEntry( projectDOM, "general/primarylanguage" ); - QStringList keywords = DomUtil::readListEntry( projectDOM, "general/keywords", "keyword" ); + TQString language = DomUtil::readEntry( projectDOM, "general/primarylanguage" ); + TQStringList keywords = DomUtil::readListEntry( projectDOM, "general/keywords", "keyword" ); profileName = Settings::profileByAttributes( language, keywords ); } @@ -1043,14 +1043,14 @@ void AppWizardDialog::openAfterGeneration() ProfileEngine & engine = m_part->pluginController()->engine(); Profile * profile = engine.findProfile( profileName ); - QStringList disableList; + TQStringList disableList; Profile::EntryList disableEntryList = profile->list( Profile::ExplicitDisable ); for ( Profile::EntryList::const_iterator it = disableEntryList.constBegin(); it != disableEntryList.constEnd(); ++it ) { disableList << (*it).name; } - QStringList projectIgnoreparts = DomUtil::readListEntry( projectDOM, "/general/ignoreparts", "part" ); + TQStringList projectIgnoreparts = DomUtil::readListEntry( projectDOM, "/general/ignoreparts", "part" ); projectIgnoreparts += disableList; DomUtil::writeListEntry( projectDOM, "/general/ignoreparts", "part", projectIgnoreparts ); @@ -1059,8 +1059,8 @@ void AppWizardDialog::openAfterGeneration() // write the dom back if( !file.open( IO_WriteOnly ) ) return; - QTextStream ts( &file ); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts( &file ); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << projectDOM.toString(2); file.close(); @@ -1071,10 +1071,10 @@ void AppWizardDialog::openAfterGeneration() // timer to queue opening (so that files will not be opened before the project // which is also queued by ProjectManager ) KURL::List urlsToOpen; - QStringList::Iterator it = m_pCurrentAppInfo->openFilesAfterGeneration.begin(); + TQStringList::Iterator it = m_pCurrentAppInfo->openFilesAfterGeneration.begin(); for( ; it != m_pCurrentAppInfo->openFilesAfterGeneration.end(); ++it ) { - QString fileName( *it ); + TQString fileName( *it ); if ( !fileName.isNull() ) { fileName = KMacroExpander::expandMacros(fileName, m_pCurrentAppInfo->subMap); @@ -1093,7 +1093,7 @@ void AppWizardDialog::pageChanged() //it is possible that project name was changed - we need to update all vcs integrator dialogs - for (QMap<int, VCSDialog*>::iterator it = m_integratorDialogs.begin(); + for (TQMap<int, VCSDialog*>::iterator it = m_integratorDialogs.begin(); it != m_integratorDialogs.end(); ++it) (*it)->init(getProjectName(), getProjectLocation()); } @@ -1103,7 +1103,7 @@ void AppWizardDialog::addTemplateToFavourites() addFavourite(templates_listview->currentItem()); } -void AppWizardDialog::addFavourite(QListViewItem* item, QString favouriteName) +void AppWizardDialog::addFavourite(TQListViewItem* item, TQString favouriteName) { if(item->childCount()) return; @@ -1120,9 +1120,9 @@ void AppWizardDialog::addFavourite(QListViewItem* item, QString favouriteName) } } -ApplicationInfo* AppWizardDialog::findFavouriteInfo(QIconViewItem* item) +ApplicationInfo* AppWizardDialog::findFavouriteInfo(TQIconViewItem* item) { - QPtrListIterator<ApplicationInfo> info(m_appsInfo); + TQPtrListIterator<ApplicationInfo> info(m_appsInfo); for (; info.current(); ++info) if (info.current()->favourite == item) return info.current(); @@ -1130,7 +1130,7 @@ ApplicationInfo* AppWizardDialog::findFavouriteInfo(QIconViewItem* item) return 0; } -void AppWizardDialog::favouritesIconViewClicked( QIconViewItem* item) +void AppWizardDialog::favouritesIconViewClicked( TQIconViewItem* item) { ApplicationInfo* info = findFavouriteInfo(item); templatesTreeViewClicked(info->item); @@ -1138,10 +1138,10 @@ void AppWizardDialog::favouritesIconViewClicked( QIconViewItem* item) void AppWizardDialog::removeFavourite() { - QIconViewItem* curFavourite = favourites_iconview->currentItem(); + TQIconViewItem* curFavourite = favourites_iconview->currentItem(); //remove reference to favourite from associated appinfo - QPtrListIterator<ApplicationInfo> info(m_appsInfo); + TQPtrListIterator<ApplicationInfo> info(m_appsInfo); for (; info.current(); ++info) { if(info.current()->favourite && info.current()->favourite == curFavourite) @@ -1163,14 +1163,14 @@ void AppWizardDialog::populateFavourites() //favourites are stored in config as a list of templates and a seperate //list of icon names. - QStringList templatesList = config->readPathListEntry("FavTemplates"); - QStringList iconNamesList = config->readListEntry("FavNames"); + TQStringList templatesList = config->readPathListEntry("FavTemplates"); + TQStringList iconNamesList = config->readListEntry("FavNames"); - QStringList::Iterator curTemplate = templatesList.begin(); - QStringList::Iterator curIconName = iconNamesList.begin(); + TQStringList::Iterator curTemplate = templatesList.begin(); + TQStringList::Iterator curIconName = iconNamesList.begin(); while(curTemplate != templatesList.end()) { - QPtrListIterator<ApplicationInfo> info(m_appsInfo); + TQPtrListIterator<ApplicationInfo> info(m_appsInfo); for (; info.current(); ++info) { if(info.current()->templateName == *curTemplate) @@ -1190,11 +1190,11 @@ void AppWizardDialog::done(int r) //it's icon name. We have a one list for the templates //and one for the names. - QStringList templatesList; - QStringList iconNamesList; + TQStringList templatesList; + TQStringList iconNamesList; //Built the stringlists for each template that has a favourite. - QPtrListIterator<ApplicationInfo> it(m_appsInfo); + TQPtrListIterator<ApplicationInfo> it(m_appsInfo); for (; it.current(); ++it) { if(it.current()->favourite) @@ -1211,24 +1211,24 @@ void AppWizardDialog::done(int r) //config->writeEntry("CurrentTab", templates_tabwidget->currentPageIndex()); config->sync(); - QDialog::done(r); + TQDialog::done(r); } -void AppWizardDialog::templatesContextMenu(QListViewItem* item, const QPoint& point, int) +void AppWizardDialog::templatesContextMenu(TQListViewItem* item, const TQPoint& point, int) { if(item && !item->childCount()) m_templatesMenu->popup(point); } -void AppWizardDialog::favouritesContextMenu(QIconViewItem* item, const QPoint& point) +void AppWizardDialog::favouritesContextMenu(TQIconViewItem* item, const TQPoint& point) { if(item) m_favouritesMenu->popup(point); } -void AppWizardDialog::setPermissions(const KArchiveFile *source, QString dest) +void AppWizardDialog::setPermissions(const KArchiveFile *source, TQString dest) { - kdDebug(9010) << "AppWizardDialog::setPermissions(const KArchiveFile *source, QString dest)" << endl; + kdDebug(9010) << "AppWizardDialog::setPermissions(const KArchiveFile *source, TQString dest)" << endl; kdDebug(9010) << " dest: " << dest << endl; if (source->permissions() & 00100) @@ -1273,7 +1273,7 @@ void AppWizardDialog::setPermissions(const installFile &file) } } -QDict<KDevLicense> AppWizardDialog::licenses() +TQDict<KDevLicense> AppWizardDialog::licenses() { return m_licenses; } @@ -1283,14 +1283,14 @@ void AppWizardDialog::loadLicenses() // kdDebug(9010) << "======================== Entering loadLicenses" << endl; KStandardDirs* dirs = KGlobal::dirs(); dirs->addResourceType( "licenses", KStandardDirs::kde_default( "data" ) + "kdevelop/licenses/" ); - QStringList licNames = dirs->findAllResources( "licenses", QString::null, false, true ); + TQStringList licNames = dirs->findAllResources( "licenses", TQString::null, false, true ); - QStringList::Iterator it; + TQStringList::Iterator it; for (it = licNames.begin(); it != licNames.end(); ++it) { - QString licPath( dirs->findResource( "licenses", *it ) ); + TQString licPath( dirs->findResource( "licenses", *it ) ); kdDebug(9010) << "Loading license file: " << licPath << endl; - QString licName = licPath.mid( licPath.findRev('/') + 1 ); + TQString licName = licPath.mid( licPath.findRev('/') + 1 ); KDevLicense* lic = new KDevLicense( licName, licPath ); m_licenses.insert( licName, lic ); } @@ -1301,7 +1301,7 @@ void AppWizardDialog::showTemplates(bool all) { if (all) { - QListViewItemIterator it(templates_listview); + TQListViewItemIterator it(templates_listview); while ( it.current() ) { it.current()->setVisible(true); ++it; @@ -1309,19 +1309,19 @@ void AppWizardDialog::showTemplates(bool all) } else { - QPtrListIterator<ApplicationInfo> ait(m_appsInfo); + TQPtrListIterator<ApplicationInfo> ait(m_appsInfo); for (; ait.current(); ++ait) { ait.current()->item->setVisible(m_profileSupport->isInTemplateList(ait.current()->templateName)); } - QDictIterator<QListViewItem> dit(m_categoryMap); + TQDictIterator<TQListViewItem> dit(m_categoryMap); for (; dit.current(); ++dit) { //checking whether all children are not visible kdDebug(9010) << "check: " << dit.current()->text(0) << endl; bool visible = false; - QListViewItemIterator it(dit.current()); + TQListViewItemIterator it(dit.current()); while ( it.current() ) { if ((it.current()->childCount() == 0) && it.current()->isVisible()) { @@ -1337,9 +1337,9 @@ void AppWizardDialog::showTemplates(bool all) } } -void AppWizardDialog::checkAndHideItems(QListView *view) +void AppWizardDialog::checkAndHideItems(TQListView *view) { - QListViewItem *item = view->firstChild(); + TQListViewItem *item = view->firstChild(); while (item) { if (!m_categoryItems.contains(item)) @@ -1349,11 +1349,11 @@ void AppWizardDialog::checkAndHideItems(QListView *view) } } -bool AppWizardDialog::checkAndHideItems(QListViewItem *item) +bool AppWizardDialog::checkAndHideItems(TQListViewItem *item) { if (!m_categoryItems.contains(item)) return !item->isVisible(); - QListViewItem *child = item->firstChild(); + TQListViewItem *child = item->firstChild(); bool hide = true; while (child) { diff --git a/parts/appwizard/appwizarddlg.h b/parts/appwizard/appwizarddlg.h index 7ce8c2ff..d69d069c 100644 --- a/parts/appwizard/appwizarddlg.h +++ b/parts/appwizard/appwizarddlg.h @@ -25,11 +25,11 @@ class QHBoxLayout; class KArchiveDirectory; class KArchiveFile; class ProfileSupport; -#include <qptrlist.h> -#include <qdict.h> +#include <tqptrlist.h> +#include <tqdict.h> #include <klineedit.h> -#include <qlabel.h> -#include <qstringlist.h> +#include <tqlabel.h> +#include <tqstringlist.h> #include <klistview.h> #include <kiconview.h> #include "kdevversioncontrol.h" @@ -46,60 +46,60 @@ namespace PropertyLib { struct installFile { - QString source; - QString dest; - QString option; + TQString source; + TQString dest; + TQString option; bool process; bool isXML; }; struct installArchive { - QString source; - QString dest; - QString option; + TQString source; + TQString dest; + TQString option; bool process; }; struct installDir { - QString dir; - QString option; + TQString dir; + TQString option; int perms; }; struct ApplicationInfo { - QString templateName; - QString name; - QString comment; - QString icon; - QString category; - QString defaultDestDir; - QString fileTemplates; - QStringList openFilesAfterGeneration; - QString templateFile; - QMap<QString,QString> subMap; - QMap<QString,QString> subMapXML; - QStringList includes; - - //QMap<autoKey,QVariant> subValues; + TQString templateName; + TQString name; + TQString comment; + TQString icon; + TQString category; + TQString defaultDestDir; + TQString fileTemplates; + TQStringList openFilesAfterGeneration; + TQString templateFile; + TQMap<TQString,TQString> subMap; + TQMap<TQString,TQString> subMapXML; + TQStringList includes; + + //TQMap<autoKey,TQVariant> subValues; PropertyLib::PropertyList *propValues; - QValueList<installFile> fileList; - QValueList<installArchive> archList; - QValueList<installDir> dirList; - QString customUI; - QString message; - QString finishCmd; - QString finishCmdDir; - QString sourceArchive; + TQValueList<installFile> fileList; + TQValueList<installArchive> archList; + TQValueList<installDir> dirList; + TQString customUI; + TQString message; + TQString finishCmd; + TQString finishCmdDir; + TQString sourceArchive; //! item pointer to the listview - QListViewItem *item; + TQListViewItem *item; //! pointer to favourite icon (NULL if there isn't one) - QIconViewItem *favourite; + TQIconViewItem *favourite; ApplicationInfo() : item( 0 ), favourite( 0 ) @@ -108,9 +108,9 @@ struct ApplicationInfo struct AppWizardFileTemplate { - QString suffix; - QString style; - QMultiLineEdit *edit; + TQString suffix; + TQString style; + TQMultiLineEdit *edit; AppWizardFileTemplate() : edit( 0 ) @@ -123,27 +123,27 @@ class AppWizardDialog : public AppWizardDialogBase Q_OBJECT public: - AppWizardDialog( AppWizardPart *part, QWidget *parent=0, const char *name=0 ); + AppWizardDialog( AppWizardPart *part, TQWidget *parent=0, const char *name=0 ); ~AppWizardDialog(); - QString getProjectName() { return appname_edit->text(); } - QString getProjectLocation() { return finalLoc_label->text(); } + TQString getProjectName() { return appname_edit->text(); } + TQString getProjectLocation() { return finalLoc_label->text(); } protected: virtual void accept(); - virtual QDict<KDevLicense> licenses(); + virtual TQDict<KDevLicense> licenses(); void loadLicenses(); protected slots: - virtual void templatesTreeViewClicked(QListViewItem*); + virtual void templatesTreeViewClicked(TQListViewItem*); virtual void textChanged(); virtual void licenseChanged(); - virtual void destButtonClicked(const QString&); + virtual void destButtonClicked(const TQString&); virtual void projectNameChanged(); virtual void projectLocationChanged(); - virtual void favouritesIconViewClicked( QIconViewItem * ); - virtual void templatesContextMenu(QListViewItem*, const QPoint&, int); - virtual void favouritesContextMenu(QIconViewItem* item, const QPoint& point); + virtual void favouritesIconViewClicked( TQIconViewItem * ); + virtual void templatesContextMenu(TQListViewItem*, const TQPoint&, int); + virtual void favouritesContextMenu(TQIconViewItem* item, const TQPoint& point); virtual void addTemplateToFavourites(); virtual void done(int r); virtual void removeFavourite(); @@ -151,42 +151,42 @@ protected slots: private: //methods - ApplicationInfo *templateForItem(QListViewItem *item); - void insertCategoryIntoTreeView(const QString &completeCategoryPath); + ApplicationInfo *templateForItem(TQListViewItem *item); + void insertCategoryIntoTreeView(const TQString &completeCategoryPath); void loadVcs(); void updateNextButtons(); void populateFavourites(); - void addFavourite(QListViewItem* item, QString favouriteName=""); - ApplicationInfo* findFavouriteInfo(QIconViewItem* item); + void addFavourite(TQListViewItem* item, TQString favouriteName=""); + ApplicationInfo* findFavouriteInfo(TQIconViewItem* item); - void unpackArchive( const KArchiveDirectory *dir, const QString &dest, bool process ); + void unpackArchive( const KArchiveDirectory *dir, const TQString &dest, bool process ); bool copyFile( const installFile& file ); - bool copyFile( const QString &source, const QString &dest, bool isXML, bool process ); - QString kdevRoot(const QString &templateName ) const; + bool copyFile( const TQString &source, const TQString &dest, bool isXML, bool process ); + TQString kdevRoot(const TQString &templateName ) const; void openAfterGeneration(); - void setPermissions(const KArchiveFile *source, QString dest); + void setPermissions(const KArchiveFile *source, TQString dest); void setPermissions(const installFile &file); - void checkAndHideItems(QListView *view); - bool checkAndHideItems(QListViewItem *item); + void checkAndHideItems(TQListView *view); + bool checkAndHideItems(TQListViewItem *item); private: //data - QPtrList<ApplicationInfo> m_appsInfo; - QValueList<AppWizardFileTemplate> m_fileTemplates; + TQPtrList<ApplicationInfo> m_appsInfo; + TQValueList<AppWizardFileTemplate> m_fileTemplates; //! Store the category name and the pointer in the treeview - QDict<QListViewItem> m_categoryMap; - QValueList<QListViewItem*> m_categoryItems; + TQDict<TQListViewItem> m_categoryMap; + TQValueList<TQListViewItem*> m_categoryItems; //! A list of currently available version control systems -// QDict<KDevVersionControl> m_availVcs; +// TQDict<KDevVersionControl> m_availVcs; - QHBoxLayout *m_custom_options_layout; + TQHBoxLayout *m_custom_options_layout; PropertyLib::PropertyEditor *m_customOptions; AppWizardPart *m_part; - QWidget *m_lastPage; - QPtrList<KTempFile> m_tempFiles; + TQWidget *m_lastPage; + TQPtrList<KTempFile> m_tempFiles; ApplicationInfo* m_pCurrentAppInfo; bool m_projectLocationWasChanged; VcsForm *m_vcsForm; @@ -194,9 +194,9 @@ private: //data KPopupMenu* m_favouritesMenu; KPopupMenu* m_templatesMenu; - QDict<KDevLicense> m_licenses; - QDict<KDevVCSIntegrator> m_integrators; - QMap<int, VCSDialog*> m_integratorDialogs; + TQDict<KDevLicense> m_licenses; + TQDict<KDevVCSIntegrator> m_integrators; + TQMap<int, VCSDialog*> m_integratorDialogs; ProfileSupport *m_profileSupport; diff --git a/parts/appwizard/appwizardpart.cpp b/parts/appwizard/appwizardpart.cpp index 8a19f548..6b57b320 100644 --- a/parts/appwizard/appwizardpart.cpp +++ b/parts/appwizard/appwizardpart.cpp @@ -9,9 +9,9 @@ * * ***************************************************************************/ -#include <qdir.h> -#include <qwidget.h> -#include <qtimer.h> +#include <tqdir.h> +#include <tqwidget.h> +#include <tqtimer.h> #include "appwizardpart.h" @@ -23,7 +23,7 @@ #include <kgenericfactory.h> #include <kstandarddirs.h> #include <kaction.h> -#include <qmessagebox.h> +#include <tqmessagebox.h> #include "importdlg.h" #include "appwizarddlg.h" @@ -34,7 +34,7 @@ #include <kdevcore.h> #include <codemodel.h> -AppWizardPart::AppWizardPart(QObject *parent, const char *name, const QStringList &) +AppWizardPart::AppWizardPart(TQObject *parent, const char *name, const TQStringList &) : KDevPlugin(AppWizardFactory::info(), parent, name ? name : "AppWizardPart") { setInstance(AppWizardFactory::instance()); @@ -43,7 +43,7 @@ AppWizardPart::AppWizardPart(QObject *parent, const char *name, const QStringLis KAction *action; action = new KAction( i18n("&New Project..."), "window_new", 0, - this, SLOT(slotNewProject()), + this, TQT_SLOT(slotNewProject()), actionCollection(), "project_new" ); action->setToolTip( i18n("Generate a new project from a template") ); action->setWhatsThis( i18n("<b>New project</b><p>" @@ -52,7 +52,7 @@ AppWizardPart::AppWizardPart(QObject *parent, const char *name, const QStringLis "application from a set of templates.") ); action = new KAction( i18n("&Import Existing Project..."),"wizard", 0, - this, SLOT(slotImportProject()), + this, TQT_SLOT(slotImportProject()), actionCollection(), "project_import" ); action->setToolTip( i18n("Import existing project") ); action->setWhatsThis( i18n("<b>Import existing project</b><p>Creates a project file for a given directory.") ); @@ -82,7 +82,7 @@ void AppWizardPart::slotImportProject() void AppWizardPart::openFilesAfterGeneration(const KURL::List urlsToOpen) { m_urlsToOpen = urlsToOpen; - connect( core(), SIGNAL( projectOpened() ), this, SLOT( openFilesAfterGeneration() ) ); + connect( core(), TQT_SIGNAL( projectOpened() ), this, TQT_SLOT( openFilesAfterGeneration() ) ); } void AppWizardPart::openFilesAfterGeneration() @@ -90,7 +90,7 @@ void AppWizardPart::openFilesAfterGeneration() for (KURL::List::const_iterator it = m_urlsToOpen.begin(); it != m_urlsToOpen.end(); ++it) partController()->editDocument(*it); m_urlsToOpen.clear(); - disconnect( core(), SIGNAL( projectOpened() ), this, SLOT( openFilesAfterGeneration() ) ); + disconnect( core(), TQT_SIGNAL( projectOpened() ), this, TQT_SLOT( openFilesAfterGeneration() ) ); } #include "appwizardpart.moc" diff --git a/parts/appwizard/appwizardpart.h b/parts/appwizard/appwizardpart.h index 0678d04a..5b434ebf 100644 --- a/parts/appwizard/appwizardpart.h +++ b/parts/appwizard/appwizardpart.h @@ -12,10 +12,10 @@ #ifndef _APPWIZARDPART_H_ #define _APPWIZARDPART_H_ -#include <qguardedptr.h> +#include <tqguardedptr.h> #include "kdevplugin.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kurl.h> class AppWizardDialog; @@ -26,7 +26,7 @@ class AppWizardPart : public KDevPlugin Q_OBJECT public: - AppWizardPart( QObject *parent, const char *name, const QStringList & ); + AppWizardPart( TQObject *parent, const char *name, const TQStringList & ); ~AppWizardPart(); void openFilesAfterGeneration(const KURL::List urlsToOpen); diff --git a/parts/appwizard/filepropspage.cpp b/parts/appwizard/filepropspage.cpp index 8b60e369..e7436d04 100644 --- a/parts/appwizard/filepropspage.cpp +++ b/parts/appwizard/filepropspage.cpp @@ -1,18 +1,18 @@ #include "filepropspage.h" -#include <qlistbox.h> +#include <tqlistbox.h> #include <klineedit.h> -#include <qtextview.h> +#include <tqtextview.h> #include <klocale.h> -#include <qlabel.h> -#include <qmultilineedit.h> +#include <tqlabel.h> +#include <tqmultilineedit.h> /* * Constructs a FilePropsPage which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -FilePropsPage::FilePropsPage( QWidget* parent, const char* name, WFlags fl ) +FilePropsPage::FilePropsPage( TQWidget* parent, const char* name, WFlags fl ) : FilePropsPageBase( parent, name, fl ){ - m_props = new QPtrList<ClassFileProp>; + m_props = new TQPtrList<ClassFileProp>; m_current_class = 9999; // no current } @@ -60,7 +60,7 @@ void FilePropsPage::slotSelectionChanged() m_current_class = item; } -void FilePropsPage::setClassFileProps(QPtrList<ClassFileProp> props,bool different_header_impl){ +void FilePropsPage::setClassFileProps(TQPtrList<ClassFileProp> props,bool different_header_impl){ *m_props = props; m_different_header_impl = different_header_impl; if (!m_different_header_impl){ @@ -78,10 +78,10 @@ void FilePropsPage::setClassFileProps(QPtrList<ClassFileProp> props,bool differe slotSelectionChanged(); } -QPtrList<ClassFileProp> FilePropsPage::getClassFileProps(){ +TQPtrList<ClassFileProp> FilePropsPage::getClassFileProps(){ return *m_props; } -void FilePropsPage::slotClassnameChanged(const QString& text){ +void FilePropsPage::slotClassnameChanged(const TQString& text){ classes_listbox->changeItem(text, classes_listbox->currentItem()); } diff --git a/parts/appwizard/filepropspage.h b/parts/appwizard/filepropspage.h index 3435dfa2..a0c923ed 100644 --- a/parts/appwizard/filepropspage.h +++ b/parts/appwizard/filepropspage.h @@ -1,19 +1,19 @@ #ifndef FILEPROPSPAGE_H #define FILEPROPSPAGE_H #include "filepropspagebase.h" -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> class ClassFileProp { public: - QString m_classname; - QString m_implfile; - QString m_headerfile; - QString m_baseclass; - QString m_description; // rich text + TQString m_classname; + TQString m_implfile; + TQString m_headerfile; + TQString m_baseclass; + TQString m_description; // rich text /** to idetify this object*/ - QString m_key; + TQString m_key; bool m_change_baseclass; }; @@ -22,17 +22,17 @@ class FilePropsPage : public FilePropsPageBase Q_OBJECT public: - FilePropsPage( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + FilePropsPage( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~FilePropsPage(); - void setClassFileProps(QPtrList<ClassFileProp> props,bool different_header_impl=true); - QPtrList<ClassFileProp> getClassFileProps(); + void setClassFileProps(TQPtrList<ClassFileProp> props,bool different_header_impl=true); + TQPtrList<ClassFileProp> getClassFileProps(); public slots: void slotSelectionChanged(); - virtual void slotClassnameChanged(const QString&); + virtual void slotClassnameChanged(const TQString&); protected: - QPtrList<ClassFileProp>* m_props; + TQPtrList<ClassFileProp>* m_props; bool m_different_header_impl; uint m_current_class; diff --git a/parts/appwizard/importdlg.cpp b/parts/appwizard/importdlg.cpp index b900181d..9cb9838a 100644 --- a/parts/appwizard/importdlg.cpp +++ b/parts/appwizard/importdlg.cpp @@ -11,17 +11,17 @@ #include "importdlg.h" #include <stdlib.h> -#include <qcombobox.h> -#include <qdir.h> -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqcombobox.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qtextstream.h> -#include <qtooltip.h> -#include <qcheckbox.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqtextstream.h> +#include <tqtooltip.h> +#include <tqcheckbox.h> #include <kbuttonbox.h> #include <kdebug.h> #include <kdialog.h> @@ -51,25 +51,25 @@ #include "misc.h" -ImportDialog::ImportDialog(AppWizardPart *part, QWidget *parent, const char *name) +ImportDialog::ImportDialog(AppWizardPart *part, TQWidget *parent, const char *name) : ImportDialogBase(parent, name, true), m_part(part) { - QString author, email; + TQString author, email; AppWizardUtil::guessAuthorAndEmail(&author, &email); author_edit->setText(author); email_edit->setText(email); - QToolTip::add( urlinput_edit->button(), i18n("Choose directory to import") ); + TQToolTip::add( urlinput_edit->button(), i18n("Choose directory to import") ); urlinput_edit->setMode(KFile::Directory|KFile::ExistingOnly|KFile::LocalOnly); KStandardDirs *dirs = AppWizardFactory::instance()->dirs(); - importNames = dirs->findAllResources("appimports", QString::null, false, true); + importNames = dirs->findAllResources("appimports", TQString::null, false, true); importNames.sort(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = importNames.begin(); it != importNames.end(); ++it) { KConfig config(KGlobal::dirs()->findResource("appimports", *it)); config.setGroup("General"); - QString type = config.readEntry("Comment"); + TQString type = config.readEntry("Comment"); project_combo->insertItem(type); if (config.hasGroup("Infrastructure")) @@ -86,12 +86,12 @@ ImportDialog::ImportDialog(AppWizardPart *part, QWidget *parent, const char *nam infrastructureBox->setEnabled(false); setProjectType("c"); - connect( name_edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotProjectNameChanged( const QString & ) ) ); + connect( name_edit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotProjectNameChanged( const TQString & ) ) ); // scanAvailableVCS(); - connect( fetchModuleButton, SIGNAL(clicked()), - this, SLOT(slotFetchModulesFromRepository()) ); - connect(urlinput_edit, SIGNAL(urlSelected(const QString& )), this, SLOT(dirChanged())); - connect(urlinput_edit, SIGNAL(returnPressed(const QString& )), this, SLOT(dirChanged())); + connect( fetchModuleButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotFetchModulesFromRepository()) ); + connect(urlinput_edit, TQT_SIGNAL(urlSelected(const TQString& )), this, TQT_SLOT(dirChanged())); + connect(urlinput_edit, TQT_SIGNAL(returnPressed(const TQString& )), this, TQT_SLOT(dirChanged())); slotProjectNameChanged( name_edit->text() ); } @@ -99,20 +99,20 @@ ImportDialog::ImportDialog(AppWizardPart *part, QWidget *parent, const char *nam ImportDialog::~ImportDialog() {} -void ImportDialog::slotProjectNameChanged( const QString &_text ) +void ImportDialog::slotProjectNameChanged( const TQString &_text ) { - ok_button->setEnabled( !_text.isEmpty() && !urlinput_edit->url().contains( QRegExp("\\s") ) ); + ok_button->setEnabled( !_text.isEmpty() && !urlinput_edit->url().contains( TQRegExp("\\s") ) ); } void ImportDialog::accept() { - QDir dir(urlinput_edit->url()); + TQDir dir(urlinput_edit->url()); if (urlinput_edit->url().isEmpty() || !dir.exists()) { KMessageBox::sorry(this, i18n("You have to choose a directory.")); return; } - QString projectName = name_edit->text(); + TQString projectName = name_edit->text(); if (projectName.isEmpty()) { KMessageBox::sorry(this, i18n("You have to choose a project name.")); return; @@ -127,13 +127,13 @@ void ImportDialog::accept() if (infrastructureBox->isVisible() && infrastructureBox->isChecked()) createProjectInfrastructure(); -// QString author = author_edit->text(); -// QString email = email_edit->text(); +// TQString author = author_edit->text(); +// TQString email = email_edit->text(); - QFileInfo finfo(importNames[project_combo->currentItem()]); - QDir importdir(finfo.dir()); + TQFileInfo finfo(importNames[project_combo->currentItem()]); + TQDir importdir(finfo.dir()); importdir.cdUp(); - QFile src(importdir.filePath("importfiles/" + finfo.fileName() + ".kdevelop")); + TQFile src(importdir.filePath("importfiles/" + finfo.fileName() + ".kdevelop")); kdDebug(9010) << "Import template " << src.name() << endl; if (!src.open(IO_ReadOnly)) { KMessageBox::sorry(this, i18n("Cannot open project template.")); @@ -141,10 +141,10 @@ void ImportDialog::accept() } // Read the DOM of the newly created project - QDomDocument projectDOM; + TQDomDocument projectDOM; int errorLine, errorCol; - QString errorMsg; + TQString errorMsg; bool success = projectDOM.setContent( &src, &errorMsg, &errorLine, &errorCol); src.close(); if ( !success ) @@ -165,11 +165,11 @@ void ImportDialog::accept() } // figure out what plugins we should disable by default - QString profileName = DomUtil::readEntry( projectDOM, "general/profile" ); + TQString profileName = DomUtil::readEntry( projectDOM, "general/profile" ); if ( profileName.isEmpty() ) { - QString language = DomUtil::readEntry( projectDOM, "general/primarylanguage" ); - QStringList keywords = DomUtil::readListEntry( projectDOM, "general/keywords", "keyword" ); + TQString language = DomUtil::readEntry( projectDOM, "general/primarylanguage" ); + TQStringList keywords = DomUtil::readListEntry( projectDOM, "general/keywords", "keyword" ); profileName = Settings::profileByAttributes( language, keywords ); } @@ -177,7 +177,7 @@ void ImportDialog::accept() ProfileEngine & engine = m_part->pluginController()->engine(); Profile * profile = engine.findProfile( profileName ); - QStringList disableList; + TQStringList disableList; Profile::EntryList disableEntryList = profile->list( Profile::ExplicitDisable ); for ( Profile::EntryList::const_iterator it = disableEntryList.constBegin(); it != disableEntryList.constEnd(); ++it ) { @@ -188,25 +188,25 @@ void ImportDialog::accept() // write the dom back - QFile dest(dir.filePath(projectName + ".kdevelop")); + TQFile dest(dir.filePath(projectName + ".kdevelop")); if (!dest.open(IO_WriteOnly)) { KMessageBox::sorry(this, i18n("Cannot write the project file.")); return; } - QTextStream ts( &dest ); - ts.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream ts( &dest ); + ts.setEncoding(TQTextStream::UnicodeUTF8); ts << projectDOM.toString(2); dest.close(); -// QTextStream srcstream(&src); -// QTextStream deststream(&dest); +// TQTextStream srcstream(&src); +// TQTextStream deststream(&dest); // // while (!srcstream.atEnd()) { -// QString line = srcstream.readLine(); -// line.replace(QRegExp("\\$APPNAMELC\\$"), projectName); -// line.replace(QRegExp("\\$AUTHOR\\$"), author); -// line.replace(QRegExp("\\$EMAIL\\$"), email); +// TQString line = srcstream.readLine(); +// line.replace(TQRegExp("\\$APPNAMELC\\$"), projectName); +// line.replace(TQRegExp("\\$AUTHOR\\$"), author); +// line.replace(TQRegExp("\\$EMAIL\\$"), email); // deststream << line << endl; // } // @@ -217,31 +217,31 @@ void ImportDialog::accept() kdDebug(9010) << "OPENING PROJECT: " << dir.filePath(projectName + ".kdevelop") << endl; - QDialog::accept(); + TQDialog::accept(); } // Checks if the directory dir and all of its subdirectories // (one level recursion) have files that follow patterns // patterns is comma-separated -static bool dirHasFiles(QDir &dir, const QString &patterns) +static bool dirHasFiles(TQDir &dir, const TQString &patterns) { - QStringList::ConstIterator pit, sit; + TQStringList::ConstIterator pit, sit; - QStringList patternList = QStringList::split(",", patterns); + TQStringList patternList = TQStringList::split(",", patterns); for (pit = patternList.begin(); pit != patternList.end(); ++pit) { - if (!dir.entryList(*pit, QDir::Files).isEmpty()) { + if (!dir.entryList(*pit, TQDir::Files).isEmpty()) { kdDebug(9010) << "Has files " << (*pit) << endl; return true; } } - QStringList subdirList = dir.entryList("*", QDir::Dirs); + TQStringList subdirList = dir.entryList("*", TQDir::Dirs); for (sit = subdirList.begin(); sit != subdirList.end(); ++sit) { - QDir subdir(dir); + TQDir subdir(dir); subdir.cd(*sit); for (pit = patternList.begin(); pit != patternList.end(); ++pit) { - if (!subdir.entryList(*pit, QDir::Files).isEmpty()) { + if (!subdir.entryList(*pit, TQDir::Files).isEmpty()) { kdDebug(9010) << "Has files " << (*pit) << " in " << (*sit) << endl; return true; } @@ -255,12 +255,12 @@ static bool dirHasFiles(QDir &dir, const QString &patterns) void ImportDialog::dirChanged() { kdDebug(9010) << "ImportDialog::dirChanged" << endl; - QString dirName = urlinput_edit->url(); - QDir dir(dirName); + TQString dirName = urlinput_edit->url(); + TQDir dir(dirName); if (!dir.exists()) return; - if ( dirName.contains( QRegExp("\\s") ) ) + if ( dirName.contains( TQRegExp("\\s") ) ) { ok_button->setEnabled( false ); return; @@ -270,7 +270,7 @@ void ImportDialog::dirChanged() } // KDevelop legacy project? - QStringList files = dir.entryList("*.kdevprj"); + TQStringList files = dir.entryList("*.kdevprj"); if (!files.isEmpty()) { scanLegacyKDevelopProject(dir.absFilePath(files.first())); return; @@ -290,7 +290,7 @@ void ImportDialog::dirChanged() } // Remove any characters from the dirName that would be invalid in a project name - QString projectName(dir.dirName().replace(QRegExp("[^a-zA-Z0-9_]"), "_")); + TQString projectName(dir.dirName().replace(TQRegExp("[^a-zA-Z0-9_]"), "_")); // Set the project name name_edit->setText(projectName); @@ -328,7 +328,7 @@ void ImportDialog::dirChanged() } -void ImportDialog::scanLegacyKDevelopProject(const QString &fileName) +void ImportDialog::scanLegacyKDevelopProject(const TQString &fileName) { kdDebug(9010) << "Scanning legacy KDevelop project file " << fileName << endl; @@ -338,8 +338,8 @@ void ImportDialog::scanLegacyKDevelopProject(const QString &fileName) email_edit->setText(config.readEntry("email")); name_edit->setText(config.readEntry("project_name")); - QString legacyType = config.readEntry("project_type"); - if (QStringList::split(",", "normal_kde,normal_kde2,kde2_normal,mdi_kde2").contains(legacyType)) + TQString legacyType = config.readEntry("project_type"); + if (TQStringList::split(",", "normal_kde,normal_kde2,kde2_normal,mdi_kde2").contains(legacyType)) setProjectType("kde"); else if (legacyType == "normal_gnome") setProjectType("gnome"); @@ -350,7 +350,7 @@ void ImportDialog::scanLegacyKDevelopProject(const QString &fileName) } -void ImportDialog::scanLegacyStudioProject(const QString &fileName) +void ImportDialog::scanLegacyStudioProject(const TQString &fileName) { kdDebug(9010) << "Scanning legacy studio project file " << fileName << endl; @@ -361,15 +361,15 @@ void ImportDialog::scanLegacyStudioProject(const QString &fileName) } -void ImportDialog::scanAutomakeProject(const QString &dirName) +void ImportDialog::scanAutomakeProject(const TQString &dirName) { kdDebug(9010) << "Scanning automake project directory " << dirName << endl; bool stop = false; - if (QFile::exists(dirName + "/admin/am_edit")) { + if (TQFile::exists(dirName + "/admin/am_edit")) { setProjectType("kde"); stop = true; - } else if (QFile::exists(dirName + "/macros/gnome.m4")) { + } else if (TQFile::exists(dirName + "/macros/gnome.m4")) { setProjectType("gnome"); stop = true; } else { @@ -377,13 +377,13 @@ void ImportDialog::scanAutomakeProject(const QString &dirName) } // if we get an authors file, use it. - QFile af(dirName + "/AUTHORS"); + TQFile af(dirName + "/AUTHORS"); if (af.open(IO_ReadOnly)){ - QTextStream astream(&af); + TQTextStream astream(&af); - QRegExp authorre("(.*)<(.*)>"); + TQRegExp authorre("(.*)<(.*)>"); while (!astream.atEnd()) { - QString s = astream.readLine(); + TQString s = astream.readLine(); if (authorre.search(s) != -1) { author_edit->setText(authorre.cap(1).stripWhiteSpace()); email_edit->setText(authorre.cap(2).stripWhiteSpace()); @@ -396,30 +396,30 @@ void ImportDialog::scanAutomakeProject(const QString &dirName) // we ignore old AC_INIT that had no version.. // only match the if there is a comma and at least two args.. // AC_INIT (package, version, [bug-report], [tarname]) - QRegExp ac_init("^AC_INIT\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); + TQRegExp ac_init("^AC_INIT\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); // AM_INIT_AUTOMAKE([OPTIONS]) // example: AM_INIT_AUTOMAKE([gnits 1.5 no-define dist-bzip2]) - QRegExp am_autoSpace("^AM_INIT_AUTOMAKE\\s{0,}\\(\\s{0,}([\\[\\s]{0,}[^\\s]+)\\s+([^\\s\\)\\]]+)(.*)"); + TQRegExp am_autoSpace("^AM_INIT_AUTOMAKE\\s{0,}\\(\\s{0,}([\\[\\s]{0,}[^\\s]+)\\s+([^\\s\\)\\]]+)(.*)"); // AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) - QRegExp am_autoComma("^AM_INIT_AUTOMAKE\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); + TQRegExp am_autoComma("^AM_INIT_AUTOMAKE\\s*\\(\\s*([^,]+),([^,\\)]+)(.*)"); // look for version in a define. // AC_DEFINE(VERSION, "5.6") - QRegExp ac_define("^AC_DEFINE\\s*\\(\\s*[^,]+,([^\\)]+)"); - QRegExp version("(\\bversion\\b)"); + TQRegExp ac_define("^AC_DEFINE\\s*\\(\\s*[^,]+,([^\\)]+)"); + TQRegExp version("(\\bversion\\b)"); version.setCaseSensitive(FALSE); - QTextStream cstream; + TQTextStream cstream; // try for configure.in.in, configure.in, then configure.ac - QFile configInIn(dirName + "/configure.in.in"); - QFile configIn(dirName+"/configure.in"); - QFile configAc(dirName+"/configure.ac"); + TQFile configInIn(dirName + "/configure.in.in"); + TQFile configIn(dirName+"/configure.in"); + TQFile configAc(dirName+"/configure.ac"); if (configInIn.open(IO_ReadOnly)){ cstream.setDevice(&configInIn); while (!cstream.atEnd()) { - QString line = cstream.readLine(); + TQString line = cstream.readLine(); if ( ac_init.search(line) >= 0){ projectVersion=ac_init.cap(2).stripWhiteSpace(); } @@ -448,11 +448,11 @@ void ImportDialog::scanAutomakeProject(const QString &dirName) } } - QRegExp namere("\\s*AM_INIT_AUTOMAKE\\((.*),.*\\).*"); - QRegExp cppre("\\s*AC_PROG_CXX"); - QRegExp f77re("\\s*AC_PROG_F77"); + TQRegExp namere("\\s*AM_INIT_AUTOMAKE\\((.*),.*\\).*"); + TQRegExp cppre("\\s*AC_PROG_CXX"); + TQRegExp f77re("\\s*AC_PROG_F77"); while (!cstream.atEnd()) { - QString line = cstream.readLine(); + TQString line = cstream.readLine(); if ( ac_init.search(line) >= 0){ projectVersion=ac_init.cap(2).stripWhiteSpace(); } @@ -481,14 +481,14 @@ void ImportDialog::scanAutomakeProject(const QString &dirName) } -void ImportDialog::setProjectType(const QString &type) +void ImportDialog::setProjectType(const TQString &type) { kdDebug(9010) << "Setting project type " << type << endl; - QString suffix = "/" + type; + TQString suffix = "/" + type; int suffixLength = suffix.length(); int i=0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = importNames.begin(); it != importNames.end(); ++it) { if ((*it).right(suffixLength) == suffix) { project_combo->setCurrentItem(i); @@ -512,7 +512,7 @@ void ImportDialog::scanAvailableVCS() } */ /* -void ImportDialog::slotFinishedCheckout( QString destinationDir ) +void ImportDialog::slotFinishedCheckout( TQString destinationDir ) { urlinput_edit->setURL( destinationDir ); @@ -531,8 +531,8 @@ void ImportDialog::slotFetchModulesFromRepository() setCursor( KCursor::waitCursor() ); // setEnabled( false ); - connect( vcs, SIGNAL(finishedFetching(QString)), - this, SLOT(slotFinishedCheckout(QString)) ); + connect( vcs, TQT_SIGNAL(finishedFetching(TQString)), + this, TQT_SLOT(slotFinishedCheckout(TQString)) ); //restore cursor if we can't fetch repository if ( !vcs->fetchFromRepository() ) @@ -540,7 +540,7 @@ void ImportDialog::slotFetchModulesFromRepository() } */ -void ImportDialog::projectTypeChanged( const QString &type ) +void ImportDialog::projectTypeChanged( const TQString &type ) { if (m_infrastructure[type].isOn) { @@ -561,14 +561,14 @@ void ImportDialog::createProjectInfrastructure( ) if (!cmd.isOn) return; - QDir dir (urlinput_edit->url()); - QStringList files = dir.entryList(cmd.existingPattern); + TQDir dir (urlinput_edit->url()); + TQStringList files = dir.entryList(cmd.existingPattern); if (!files.isEmpty()) { - if (KMessageBox::questionYesNo(this, i18n("Project infrastrucure already exists in target directory.\nGenerate new project infrastructure and overwrite old?"), QString::null, i18n("Generate"), i18n("Do Not Generate")) == KMessageBox::No) + if (KMessageBox::questionYesNo(this, i18n("Project infrastrucure already exists in target directory.\nGenerate new project infrastructure and overwrite old?"), TQString::null, i18n("Generate"), i18n("Do Not Generate")) == KMessageBox::No) return; } - QString command = "cd " + urlinput_edit->url() + " && " + cmd.command; + TQString command = "cd " + urlinput_edit->url() + " && " + cmd.command; kdDebug(9010) << "executing " << command.ascii() << endl; system(command.ascii()); } diff --git a/parts/appwizard/importdlg.h b/parts/appwizard/importdlg.h index daa136b6..35772133 100644 --- a/parts/appwizard/importdlg.h +++ b/parts/appwizard/importdlg.h @@ -13,16 +13,16 @@ #define _IMPORTDLG_H_ #include "importdlgbase.h" -#include <qstringlist.h> +#include <tqstringlist.h> class AppWizardPart; struct InfrastructureCmd{ bool isOn; - QString comment; - QString command; - QString existingPattern; + TQString comment; + TQString command; + TQString existingPattern; }; class ImportDialog : public ImportDialogBase @@ -30,7 +30,7 @@ class ImportDialog : public ImportDialogBase Q_OBJECT public: - ImportDialog( AppWizardPart *part, QWidget *parent=0, const char *name=0 ); + ImportDialog( AppWizardPart *part, TQWidget *parent=0, const char *name=0 ); ~ImportDialog(); protected: @@ -38,27 +38,27 @@ protected: protected slots: virtual void dirChanged(); - virtual void projectTypeChanged(const QString &type); + virtual void projectTypeChanged(const TQString &type); virtual void projectTypeChanged(int type); private slots: -// void slotFinishedCheckout( QString destinationDir ); +// void slotFinishedCheckout( TQString destinationDir ); // void slotFetchModulesFromRepository(); - void slotProjectNameChanged( const QString &_text ); + void slotProjectNameChanged( const TQString &_text ); private: // void scanAvailableVCS(); - void scanLegacyKDevelopProject(const QString &fileName); - void scanLegacyStudioProject(const QString &fileName); - void scanAutomakeProject(const QString &dirName); - void setProjectType(const QString &type); + void scanLegacyKDevelopProject(const TQString &fileName); + void scanLegacyStudioProject(const TQString &fileName); + void scanAutomakeProject(const TQString &dirName); + void setProjectType(const TQString &type); void createProjectInfrastructure(); - QStringList importNames; + TQStringList importNames; AppWizardPart *m_part; - QString projectVersion; + TQString projectVersion; - QMap<QString, InfrastructureCmd> m_infrastructure; + TQMap<TQString, InfrastructureCmd> m_infrastructure; }; #endif diff --git a/parts/appwizard/kdevfile.cpp b/parts/appwizard/kdevfile.cpp index 12e4826f..4edb62c7 100644 --- a/parts/appwizard/kdevfile.cpp +++ b/parts/appwizard/kdevfile.cpp @@ -40,7 +40,7 @@ static struct MimeTypeMapping { NULL, KDevFile::NoCommenting } }; -KDevFile::CommentingStyle KDevFile::commentingStyleFromMimeType( const QString& mimeType ) +KDevFile::CommentingStyle KDevFile::commentingStyleFromMimeType( const TQString& mimeType ) { int idx = 0; while( mimeTypeMapping[idx].szMimeType ) diff --git a/parts/appwizard/kdevfile.h b/parts/appwizard/kdevfile.h index ea822357..6b2e2699 100644 --- a/parts/appwizard/kdevfile.h +++ b/parts/appwizard/kdevfile.h @@ -47,7 +47,7 @@ public: public: /**@return A commenting style for a given mime type. @param mimeType A string which defines a mime type (like "text/x-c+++src").*/ - static CommentingStyle commentingStyleFromMimeType(const QString& mimeType); + static CommentingStyle commentingStyleFromMimeType(const TQString& mimeType); /**@return A commenting style for a given mime type. @param mimeType The mime type.*/ diff --git a/parts/appwizard/kdevlicense.cpp b/parts/appwizard/kdevlicense.cpp index 6987a54d..5e189422 100644 --- a/parts/appwizard/kdevlicense.cpp +++ b/parts/appwizard/kdevlicense.cpp @@ -18,23 +18,23 @@ */ #include "kdevlicense.h" -#include <qfile.h> -#include <qdatetime.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqdatetime.h> +#include <tqregexp.h> -KDevLicense::KDevLicense( const QString& name, const QString& fileName ) +KDevLicense::KDevLicense( const TQString& name, const TQString& fileName ) : m_name( name ) { readFile( fileName ); } -void KDevLicense::readFile( const QString& fileName ) +void KDevLicense::readFile( const TQString& fileName ) { - QFile f(fileName); + TQFile f(fileName); if (!f.open(IO_ReadOnly)) return; - QTextStream stream(&f); - QString str; + TQTextStream stream(&f); + TQString str; enum { readingText, readingFiles } mode = readingText; for(;;) { @@ -57,25 +57,25 @@ void KDevLicense::readFile( const QString& fileName ) } -QString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const QString& author, const QString& email, int leadingSpaces ) +TQString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ) { // first, build a CPP Style license - QString strFill; + TQString strFill; strFill.fill( ' ', leadingSpaces ); - QString str = + TQString str = strFill + "/***************************************************************************\n" + strFill + " * Copyright (C) $YEAR$ by $AUTHOR$ *\n" + strFill + " * $EMAIL$ *\n" + strFill + " * *\n"; -// str = str.arg(QDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); +// str = str.arg(TQDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); - QStringList::Iterator it; + TQStringList::Iterator it; for( it = m_rawLines.begin(); it != m_rawLines.end(); ++it ) { - str += QString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); + str += TQString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); } str += strFill + " ***************************************************************************/\n"; @@ -87,28 +87,28 @@ QString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const return str; case KDevFile::PascalStyle: - str.replace(QRegExp("/\\**\n \\*"), "{\n "); - str.replace(QRegExp("\\*\n \\*"), " \n "); - str.replace(QRegExp(" *\\**/\n"), "}\n"); + str.replace(TQRegExp("/\\**\n \\*"), "{\n "); + str.replace(TQRegExp("\\*\n \\*"), " \n "); + str.replace(TQRegExp(" *\\**/\n"), "}\n"); return str; case KDevFile::AdaStyle: - str.replace(QRegExp("/\\*"), "--"); - str.replace(QRegExp(" \\*"), "--"); - str.replace(QRegExp("\\*/"), "*"); + str.replace(TQRegExp("/\\*"), "--"); + str.replace(TQRegExp(" \\*"), "--"); + str.replace(TQRegExp("\\*/"), "*"); return str; case KDevFile::BashStyle: - str.replace(QRegExp("\\*|/"), "#"); - str.replace(QRegExp("\n ##"), "\n##"); - str.replace(QRegExp("\n #"), "\n# "); + str.replace(TQRegExp("\\*|/"), "#"); + str.replace(TQRegExp("\n ##"), "\n##"); + str.replace(TQRegExp("\n #"), "\n# "); return str; case KDevFile::XMLStyle: - str.replace(QRegExp("/\\*"), "<!--"); - str.replace(QRegExp("\n \\*"), "\n<!--"); - str.replace(QRegExp("\\*/?\n"), "-->\n"); - str.replace(QRegExp("\\*"), "_"); + str.replace(TQRegExp("/\\*"), "<!--"); + str.replace(TQRegExp("\n \\*"), "\n<!--"); + str.replace(TQRegExp("\\*/?\n"), "-->\n"); + str.replace(TQRegExp("\\*"), "_"); return str; } diff --git a/parts/appwizard/kdevlicense.h b/parts/appwizard/kdevlicense.h index 0f8a41ce..2e81c9ec 100644 --- a/parts/appwizard/kdevlicense.h +++ b/parts/appwizard/kdevlicense.h @@ -24,7 +24,7 @@ The interface to installed licenses. */ -#include <qstringlist.h> +#include <tqstringlist.h> #include "kdevfile.h" @@ -35,41 +35,41 @@ public: /**Constructs a KDevLicense and loads the given license template file. @param name The name of this license. @param fileName The file name where license template text is kept.*/ - KDevLicense(const QString& name, const QString& fileName); + KDevLicense(const TQString& name, const TQString& fileName); public: /**Assembles the license to a string suitable for replacement of a %{LICENSE} .*/ - QString assemble(KDevFile::CommentingStyle commentingStyle, const QString& author, const QString& email, int leadingSpaces ); + TQString assemble(KDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ); /** * returns the name of this license. */ - QString name() const { return m_name; } + TQString name() const { return m_name; } /** * returns list of files tat must be present in the project's root directory * if any source files uses this license. */ - QStringList copyFiles(){ return m_copyFiles; } + TQStringList copyFiles(){ return m_copyFiles; } private: - void readFile( const QString& fileName ); + void readFile( const TQString& fileName ); private: /** * Name of this license */ - QString m_name; + TQString m_name; /** * Raw lines of the license. Should contain no spaces at * the start or end of each line. */ - QStringList m_rawLines; + TQStringList m_rawLines; /** * List of files that must be added to the project, if any * file in the project uses this license. */ - QStringList m_copyFiles; + TQStringList m_copyFiles; }; #endif diff --git a/parts/appwizard/misc.cpp b/parts/appwizard/misc.cpp index 3590b589..63d670b5 100644 --- a/parts/appwizard/misc.cpp +++ b/parts/appwizard/misc.cpp @@ -11,7 +11,7 @@ #include "misc.h" -#include <qstring.h> +#include <tqstring.h> #include <kemailsettings.h> #include <pwd.h> @@ -21,12 +21,12 @@ #include <kstandarddirs.h> #include <kconfig.h> -void AppWizardUtil::guessAuthorAndEmail(QString *author, QString *email) +void AppWizardUtil::guessAuthorAndEmail(TQString *author, TQString *email) { KEMailSettings emailConfig; emailConfig.setProfile( emailConfig.defaultProfileName() ); - QString fromAddr = emailConfig.getSetting( KEMailSettings::EmailAddress ); - QString name = emailConfig.getSetting( KEMailSettings::RealName ); + TQString fromAddr = emailConfig.getSetting( KEMailSettings::EmailAddress ); + TQString name = emailConfig.getSetting( KEMailSettings::RealName ); if ( !fromAddr.isEmpty() && !name.isEmpty() ) { *author = name; @@ -45,11 +45,11 @@ void AppWizardUtil::guessAuthorAndEmail(QString *author, QString *email) (void) ::gethostname(hostname, sizeof hostname); if ( name.isEmpty() ) - *author = QString::fromLocal8Bit( pw->pw_gecos ); + *author = TQString::fromLocal8Bit( pw->pw_gecos ); else *author = name; if ( fromAddr.isEmpty() ) - *email = QString(pw->pw_name) + "@" + hostname; + *email = TQString(pw->pw_name) + "@" + hostname; else *email = fromAddr; } diff --git a/parts/appwizard/misc.h b/parts/appwizard/misc.h index 1378943b..8d9402b3 100644 --- a/parts/appwizard/misc.h +++ b/parts/appwizard/misc.h @@ -12,12 +12,12 @@ #ifndef _MISC_H_ #define _MISC_H_ -#include <qstring.h> +#include <tqstring.h> class AppWizardUtil { public: - static void guessAuthorAndEmail(QString *author, QString *email); + static void guessAuthorAndEmail(TQString *author, TQString *email); }; #endif diff --git a/parts/appwizard/profilesupport.cpp b/parts/appwizard/profilesupport.cpp index e50e5535..084156f5 100644 --- a/parts/appwizard/profilesupport.cpp +++ b/parts/appwizard/profilesupport.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ #include "profilesupport.h" -#include <qfileinfo.h> +#include <tqfileinfo.h> #include <kdebug.h> #include <kconfig.h> @@ -38,7 +38,7 @@ ProfileSupport::ProfileSupport(KDevPlugin *parent) } } -bool ProfileSupport::isInTemplateList(const QString &templateUrl) +bool ProfileSupport::isInTemplateList(const TQString &templateUrl) { - return m_templateList.contains(QFileInfo(templateUrl).baseName()); + return m_templateList.contains(TQFileInfo(templateUrl).baseName()); } diff --git a/parts/appwizard/profilesupport.h b/parts/appwizard/profilesupport.h index f3b89ac8..b18a9620 100644 --- a/parts/appwizard/profilesupport.h +++ b/parts/appwizard/profilesupport.h @@ -25,10 +25,10 @@ class ProfileSupport{ public: ProfileSupport(KDevPlugin *parent); - bool isInTemplateList(const QString &templateUrl); + bool isInTemplateList(const TQString &templateUrl); private: - QStringList m_templateList; + TQStringList m_templateList; }; #endif |