diff options
Diffstat (limited to 'buildtools/pascal')
-rw-r--r-- | buildtools/pascal/pascalglobaloptionsdlg.cpp | 28 | ||||
-rw-r--r-- | buildtools/pascal/pascalglobaloptionsdlg.h | 18 | ||||
-rw-r--r-- | buildtools/pascal/pascalproject_part.cpp | 188 | ||||
-rw-r--r-- | buildtools/pascal/pascalproject_part.h | 66 | ||||
-rw-r--r-- | buildtools/pascal/pascalproject_widget.cpp | 2 | ||||
-rw-r--r-- | buildtools/pascal/pascalproject_widget.h | 4 | ||||
-rw-r--r-- | buildtools/pascal/pascalprojectoptionsdlg.cpp | 70 | ||||
-rw-r--r-- | buildtools/pascal/pascalprojectoptionsdlg.h | 22 | ||||
-rw-r--r-- | buildtools/pascal/service.cpp | 26 | ||||
-rw-r--r-- | buildtools/pascal/service.h | 12 |
10 files changed, 218 insertions, 218 deletions
diff --git a/buildtools/pascal/pascalglobaloptionsdlg.cpp b/buildtools/pascal/pascalglobaloptionsdlg.cpp index a710db19..c2c32f9e 100644 --- a/buildtools/pascal/pascalglobaloptionsdlg.cpp +++ b/buildtools/pascal/pascalglobaloptionsdlg.cpp @@ -8,10 +8,10 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include <qlayout.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcombobox.h> #include <kurlrequester.h> #include <kdebug.h> @@ -23,7 +23,7 @@ #include "pascalproject_part.h" #include "pascalglobaloptionsdlg.h" -PascalGlobalOptionsDlg::PascalGlobalOptionsDlg(PascalProjectPart *part, QWidget* parent, const char* name, WFlags fl) +PascalGlobalOptionsDlg::PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl) :PascalProjectOptionsDlgBase(parent,name,fl), m_part(part) { delete config_label; @@ -47,7 +47,7 @@ PascalGlobalOptionsDlg::PascalGlobalOptionsDlg(PascalProjectPart *part, QWidget* if (offers.isEmpty()) options_button->setEnabled(false); - currentCompiler = QString::null; + currentCompiler = TQString::null; /*kdDebug() << ServiceComboBox::defaultCompiler() << endl; kdDebug() << ServiceComboBox::itemForText(ServiceComboBox::defaultCompiler(), service_names) << endl; @@ -63,17 +63,17 @@ PascalGlobalOptionsDlg::~PascalGlobalOptionsDlg() void PascalGlobalOptionsDlg::optionsButtonClicked() { - QString name = ServiceComboBox::currentText(compiler_box, service_names); + TQString name = ServiceComboBox::currentText(compiler_box, service_names); KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { - QString flags = plugin->exec(this, options_edit->text()); + TQString flags = plugin->exec(this, options_edit->text()); options_edit->setText(flags); delete plugin; } } -void PascalGlobalOptionsDlg::compiler_box_activated(const QString& text) +void PascalGlobalOptionsDlg::compiler_box_activated(const TQString& text) { kdDebug() << "text changed from " << currentCompiler << " to " << text << endl; if (currentCompiler == text) @@ -91,14 +91,14 @@ void PascalGlobalOptionsDlg::accept() saveConfigCache(); } -void PascalGlobalOptionsDlg::saveCompilerOpts( QString compiler ) +void PascalGlobalOptionsDlg::saveCompilerOpts( TQString compiler ) { configCache[compiler] = options_edit->text(); } -void PascalGlobalOptionsDlg::readCompilerOpts( QString compiler ) +void PascalGlobalOptionsDlg::readCompilerOpts( TQString compiler ) { - QString settings = configCache[compiler]; + TQString settings = configCache[compiler]; if (settings.isEmpty()) { KConfig *config = KGlobal::config(); @@ -114,7 +114,7 @@ void PascalGlobalOptionsDlg::readConfigCache( ) /* KConfig *config = KGlobal::config(); config->setGroup("Pascal Compiler"); - QMap<QString, QString> settings = config->entryMap("Pascal Compiler"); + TQMap<TQString, TQString> settings = config->entryMap("Pascal Compiler"); */ } @@ -123,7 +123,7 @@ void PascalGlobalOptionsDlg::saveConfigCache( ) KConfig *config = KGlobal::config(); config->setGroup("Pascal Compiler"); - for (QMap<QString, QString>::iterator it = configCache.begin(); it != configCache.end(); ++it) + for (TQMap<TQString, TQString>::iterator it = configCache.begin(); it != configCache.end(); ++it) { config->writeEntry(it.key(), it.data()); } diff --git a/buildtools/pascal/pascalglobaloptionsdlg.h b/buildtools/pascal/pascalglobaloptionsdlg.h index 14da2221..b0c19e0e 100644 --- a/buildtools/pascal/pascalglobaloptionsdlg.h +++ b/buildtools/pascal/pascalglobaloptionsdlg.h @@ -11,7 +11,7 @@ #ifndef PASCALGLOBALOPTIONSDLG_H #define PASCALGLOBALOPTIONSDLG_H -#include <qmap.h> +#include <tqmap.h> #include <ktrader.h> @@ -24,7 +24,7 @@ class PascalGlobalOptionsDlg : public PascalProjectOptionsDlgBase Q_OBJECT public: - PascalGlobalOptionsDlg(PascalProjectPart *part, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + PascalGlobalOptionsDlg(PascalProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~PascalGlobalOptionsDlg(); public slots: @@ -32,18 +32,18 @@ public slots: protected slots: virtual void optionsButtonClicked(); - virtual void compiler_box_activated(const QString& text); + virtual void compiler_box_activated(const TQString& text); private: PascalProjectPart *m_part; KTrader::OfferList offers; - QString currentCompiler; - QStringList service_names; - QStringList service_execs; - QMap<QString, QString> configCache; + TQString currentCompiler; + TQStringList service_names; + TQStringList service_execs; + TQMap<TQString, TQString> configCache; - void saveCompilerOpts(QString compiler); - void readCompilerOpts(QString compiler); + void saveCompilerOpts(TQString compiler); + void readCompilerOpts(TQString compiler); void readConfigCache(); void saveConfigCache(); diff --git a/buildtools/pascal/pascalproject_part.cpp b/buildtools/pascal/pascalproject_part.cpp index 3fe09420..2ed25fc0 100644 --- a/buildtools/pascal/pascalproject_part.cpp +++ b/buildtools/pascal/pascalproject_part.cpp @@ -10,13 +10,13 @@ ***************************************************************************/ #include "pascalproject_part.h" -#include <qdom.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qvaluestack.h> -#include <qregexp.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqdom.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqvaluestack.h> +#include <tqregexp.h> +#include <tqvbox.h> +#include <tqlabel.h> #include <kiconloader.h> #include <klocale.h> @@ -52,7 +52,7 @@ typedef KDevGenericFactory<PascalProjectPart> PascalProjectFactory; static const KDevPluginInfo data("kdevpascalproject"); K_EXPORT_COMPONENT_FACTORY( libkdevpascalproject, PascalProjectFactory( data ) ) -PascalProjectPart::PascalProjectPart(QObject *parent, const char *name, const QStringList& ) +PascalProjectPart::PascalProjectPart(TQObject *parent, const char *name, const TQStringList& ) :KDevBuildTool(&data, parent, name ? name : "PascalProjectPart" ) { setInstance(PascalProjectFactory::instance()); @@ -60,27 +60,27 @@ PascalProjectPart::PascalProjectPart(QObject *parent, const char *name, const QS KAction *action; action = new KAction( i18n("&Build Project"), "make_kdevelop", Key_F8, - this, SLOT(slotBuild()), + this, TQT_SLOT(slotBuild()), actionCollection(), "build_build" ); action->setToolTip(i18n("Build project")); action->setWhatsThis(i18n("<b>Build project</b><p>Runs the compiler on a main source file of the project. " "The compiler and the main source file can be set in project settings, <b>Pascal Compiler</b> tab.")); action = new KAction( i18n("Execute Program"), "exec", 0, - this, SLOT(slotExecute()), + this, TQT_SLOT(slotExecute()), actionCollection(), "build_execute" ); action->setToolTip(i18n("Execute program")); action->setWhatsThis(i18n("<b>Execute program</b><p>Executes the main program specified in project settings, <b>Run options</b> tab. " "If nothing is set, the binary file with the same name as the main source file name is executed.")); - connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), - this, SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), + this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( core(), SIGNAL(configWidget(KDialogBase*)), - this, SLOT(configWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)), + this, TQT_SLOT(configWidget(KDialogBase*)) ); // m_widget = new PascalProjectWidget(this); -// QWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); +// TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); // now you decide what should happen to the widget. Take a look at kdevcore.h // or at other plugins how to embed it. @@ -101,11 +101,11 @@ PascalProjectPart::~PascalProjectPart() * @todo This should really be merged with FileTreeWidget::matchesHidePattern() * and put in its own class. Currently this is repeated in scriptprojectpart.cpp, pascalproject_part.cpp, adaproject_part.cpp */ -static bool matchesPattern(const QString &fileName, const QStringList &patternList) +static bool matchesPattern(const TQString &fileName, const TQStringList &patternList) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = patternList.begin(); it != patternList.end(); ++it) { - QRegExp re(*it, true, true); + TQRegExp re(*it, true, true); if (re.search(fileName) == 0 && re.matchedLength() == (int)fileName.length()) return true; } @@ -113,13 +113,13 @@ static bool matchesPattern(const QString &fileName, const QStringList &patternLi return false; } -void PascalProjectPart::openProject(const QString &dirName, const QString &projectName) +void PascalProjectPart::openProject(const TQString &dirName, const TQString &projectName) { m_buildDir = dirName; m_projectDir = dirName; m_projectName = projectName; - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); // Set the default directory radio to "executable" if (DomUtil::readEntry(dom, "/kdevpascalproject/run/directoryradio") == "" ) { DomUtil::writeEntry(dom, "/kdevpascalproject/run/directoryradio", "executable"); @@ -128,11 +128,11 @@ void PascalProjectPart::openProject(const QString &dirName, const QString &proje loadProjectConfig(); // Put all files from all subdirectories into file list - QValueStack<QString> s; + TQValueStack<TQString> s; int prefixlen = m_projectDir.length()+1; s.push(m_projectDir); - QStringList includepatternList; + TQStringList includepatternList; if ( languageSupport() ) { KMimeType::List list = languageSupport()->mimeTypes(); @@ -142,20 +142,20 @@ void PascalProjectPart::openProject(const QString &dirName, const QString &proje ++it; } } - QString excludepatterns = "*~"; - QStringList excludepatternList = QStringList::split(",", excludepatterns); + TQString excludepatterns = "*~"; + TQStringList excludepatternList = TQStringList::split(",", excludepatterns); - QDir dir; + TQDir dir; do { dir.setPath(s.pop()); kdDebug(9033) << "Examining: " << dir.path() << endl; const QFileInfoList *dirEntries = dir.entryInfoList(); - QPtrListIterator<QFileInfo> it(*dirEntries); + TQPtrListIterator<TQFileInfo> it(*dirEntries); for (; it.current(); ++it) { - QString fileName = it.current()->fileName(); + TQString fileName = it.current()->fileName(); if (fileName == "." || fileName == "..") continue; - QString path = it.current()->absFilePath(); + TQString path = it.current()->absFilePath(); if (it.current()->isDir()) { kdDebug(9033) << "Pushing: " << path << endl; s.push(path); @@ -195,9 +195,9 @@ DomUtil::PairList PascalProjectPart::runEnvironmentVars() const * if run/directoryradio == custom * The custom directory absolute path */ -QString PascalProjectPart::runDirectory() const +TQString PascalProjectPart::runDirectory() const { - QString cwd = defaultRunDirectory("kdevpascalproject"); + TQString cwd = defaultRunDirectory("kdevpascalproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; @@ -213,15 +213,15 @@ QString PascalProjectPart::runDirectory() const * if run/directoryradio == custom or relative == false * The absolute path to executable */ -QString PascalProjectPart::mainProgram() const +TQString PascalProjectPart::mainProgram() const { - QDomDocument * dom = projectDom(); + TQDomDocument * dom = projectDom(); - if ( !dom ) return QString(); + if ( !dom ) return TQString(); - QString DomMainProgram = DomUtil::readEntry( *dom, "/kdevpascalproject/run/mainprogram"); + TQString DomMainProgram = DomUtil::readEntry( *dom, "/kdevpascalproject/run/mainprogram"); - if ( DomMainProgram.isEmpty() ) return QString(); + if ( DomMainProgram.isEmpty() ) return TQString(); if ( DomMainProgram.startsWith("/") ) // assume absolute path { @@ -232,63 +232,63 @@ QString PascalProjectPart::mainProgram() const return projectDirectory() + "/" + DomMainProgram; } - return QString(); + return TQString(); } -/** Retuns a QString with the debug command line arguments */ -QString PascalProjectPart::debugArguments() const +/** Retuns a TQString with the debug command line arguments */ +TQString PascalProjectPart::debugArguments() const { return DomUtil::readEntry(*projectDom(), "/kdevpascalproject/run/globaldebugarguments"); } -/** Retuns a QString with the run command line arguments */ -QString PascalProjectPart::runArguments() const +/** Retuns a TQString with the run command line arguments */ +TQString PascalProjectPart::runArguments() const { return DomUtil::readEntry(*projectDom(), "/kdevpascalproject/run/programargs"); } -QString PascalProjectPart::mainSource() const +TQString PascalProjectPart::mainSource() const { return projectDirectory() + "/" + m_mainSource; } -void PascalProjectPart::setMainSource(QString fullPath) +void PascalProjectPart::setMainSource(TQString fullPath) { - QString olddir = activeDirectory(); - m_mainSource = fullPath.replace(QRegExp(QString(projectDirectory() + QString("/"))),""); + TQString olddir = activeDirectory(); + m_mainSource = fullPath.replace(TQRegExp(TQString(projectDirectory() + TQString("/"))),""); emit activeDirectoryChanged( olddir, activeDirectory() ); } -QString PascalProjectPart::projectDirectory() const +TQString PascalProjectPart::projectDirectory() const { return m_projectDir; } -QString PascalProjectPart::projectName() const +TQString PascalProjectPart::projectName() const { return m_projectName; } -QString PascalProjectPart::activeDirectory() const +TQString PascalProjectPart::activeDirectory() const { - QFileInfo fi(mainSource()); - return fi.dirPath(true).replace(QRegExp(projectDirectory()),""); + TQFileInfo fi(mainSource()); + return fi.dirPath(true).replace(TQRegExp(projectDirectory()),""); } -QString PascalProjectPart::buildDirectory() const +TQString PascalProjectPart::buildDirectory() const { - QFileInfo fi(mainSource()); + TQFileInfo fi(mainSource()); return fi.dirPath(true); } -void PascalProjectPart::listOfFiles(QStringList &result, QString path) const +void PascalProjectPart::listOfFiles(TQStringList &result, TQString path) const { - QDir d(path); + TQDir d(path); if (!d.exists()) return; - QFileInfoList *entries = const_cast<QFileInfoList*>(d.entryInfoList(QDir::Dirs | QDir::Files | QDir::Hidden)); - for (QFileInfo *it = entries->first(); it; it = entries->next()) + QFileInfoList *entries = const_cast<QFileInfoList*>(d.entryInfoList(TQDir::Dirs | TQDir::Files | TQDir::Hidden)); + for (TQFileInfo *it = entries->first(); it; it = entries->next()) { if ((it->isDir()) && (it->filePath() != path)) { @@ -303,9 +303,9 @@ void PascalProjectPart::listOfFiles(QStringList &result, QString path) const } } -QStringList PascalProjectPart::allFiles() const +TQStringList PascalProjectPart::allFiles() const { -// QStringList files; +// TQStringList files; // listOfFiles(files, projectDirectory()); @@ -313,19 +313,19 @@ QStringList PascalProjectPart::allFiles() const return m_sourceFiles; } -void PascalProjectPart::addFile(const QString& /*fileName*/) +void PascalProjectPart::addFile(const TQString& /*fileName*/) { } -void PascalProjectPart::addFiles(const QStringList& /*fileList*/) +void PascalProjectPart::addFiles(const TQStringList& /*fileList*/) { } -void PascalProjectPart::removeFile(const QString& /*fileName*/) +void PascalProjectPart::removeFile(const TQString& /*fileName*/) { } -void PascalProjectPart::removeFiles(const QStringList& /*fileList*/) +void PascalProjectPart::removeFiles(const TQStringList& /*fileList*/) { } @@ -334,7 +334,7 @@ void PascalProjectPart::slotBuild() if (partController()->saveAllFiles()==false) return; //user cancelled - QString cmdline = m_compilerExec + " " + m_compilerOpts + " "; + TQString cmdline = m_compilerExec + " " + m_compilerOpts + " "; if (cmdline.isEmpty()) { @@ -342,10 +342,10 @@ void PascalProjectPart::slotBuild() return; } - QFileInfo fi(mainSource()); + TQFileInfo fi(mainSource()); cmdline += fi.fileName(); - QString dircmd = "cd "; + TQString dircmd = "cd "; dircmd += KProcess::quote(buildDirectory()); dircmd += " && "; @@ -356,7 +356,7 @@ void PascalProjectPart::slotExecute() { partController()->saveAllFiles(); - QDomDocument &dom = *(projectDom()); + TQDomDocument &dom = *(projectDom()); bool runInTerminal = DomUtil::readBoolEntry(dom, "/kdevpascalproject/run/terminal", true); // Get the run environment variables pairs into the environstr string @@ -366,7 +366,7 @@ void PascalProjectPart::slotExecute() DomUtil::PairList envvars = DomUtil::readPairListEntry(*projectDom(), "/kdevpascalproject/run/envvars", "envvar", "name", "value"); - QString environstr; + TQString environstr; DomUtil::PairList::ConstIterator it; for (it = envvars.begin(); it != envvars.end(); ++it) { environstr += (*it).first; @@ -375,50 +375,50 @@ void PascalProjectPart::slotExecute() environstr += " "; } - QString program = mainProgram(); + TQString program = mainProgram(); program.prepend(environstr); program += " " + DomUtil::readEntry(*projectDom(), "/kdevpascalproject/run/programargs"); appFrontend()->startAppCommand(buildDirectory(), program, runInTerminal); } -void PascalProjectPart::changedFiles( const QStringList & fileList ) +void PascalProjectPart::changedFiles( const TQStringList & fileList ) { KDevProject::changedFiles(fileList); } -void PascalProjectPart::changedFile( const QString & fileName ) +void PascalProjectPart::changedFile( const TQString & fileName ) { KDevProject::changedFile(fileName); } void PascalProjectPart::projectConfigWidget( KDialogBase * dlg ) { - QVBox *vbox; + TQVBox *vbox; vbox = dlg->addVBoxPage(i18n("Pascal Compiler")); PascalProjectOptionsDlg *w = new PascalProjectOptionsDlg(this, vbox); - connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) ); - connect( dlg, SIGNAL(okClicked()), this, SLOT(loadProjectConfig()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(loadProjectConfig()) ); vbox = dlg->addVBoxPage(i18n("Run Options"), i18n("Run Options"), BarIcon( "make", KIcon::SizeMedium )); RunOptionsWidget *w3 = new RunOptionsWidget(*projectDom(), "/kdevpascalproject", buildDirectory(), vbox); - connect( dlg, SIGNAL(okClicked()), w3, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w3, TQT_SLOT(accept()) ); } void PascalProjectPart::loadProjectConfig( ) { - QDomDocument &dom = *(projectDom()); + TQDomDocument &dom = *(projectDom()); - QString config = DomUtil::readEntry(dom, "/kdevpascalproject/general/useconfiguration", "default"); - m_mainSource = DomUtil::readEntry(dom, QString("/kdevpascalproject/configurations/") + config + QString("/mainsource") ); - m_compilerOpts = DomUtil::readEntry(dom, QString("/kdevpascalproject/configurations/") + config + QString("/compileroptions")); - m_compilerExec = DomUtil::readEntry(dom, QString("/kdevpascalproject/configurations/") + config + QString("/compilerexec")); + TQString config = DomUtil::readEntry(dom, "/kdevpascalproject/general/useconfiguration", "default"); + m_mainSource = DomUtil::readEntry(dom, TQString("/kdevpascalproject/configurations/") + config + TQString("/mainsource") ); + m_compilerOpts = DomUtil::readEntry(dom, TQString("/kdevpascalproject/configurations/") + config + TQString("/compileroptions")); + m_compilerExec = DomUtil::readEntry(dom, TQString("/kdevpascalproject/configurations/") + config + TQString("/compilerexec")); if (m_compilerExec.isEmpty()) { KTrader::OfferList offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Pascal'"); - QValueList<KService::Ptr>::ConstIterator it; + TQValueList<KService::Ptr>::ConstIterator it; for (it = offers.begin(); it != offers.end(); ++it) { if ((*it)->property("X-KDevelop-Default").toBool()) { m_compilerExec = (*it)->exec(); @@ -430,13 +430,13 @@ void PascalProjectPart::loadProjectConfig( ) void PascalProjectPart::configWidget( KDialogBase * dlg ) { - QVBox *vbox; + TQVBox *vbox; vbox = dlg->addVBoxPage(i18n("Pascal Compiler")); PascalGlobalOptionsDlg *w = new PascalGlobalOptionsDlg(this, vbox); - connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } -KDevCompilerOptions *PascalProjectPart::createCompilerOptions(const QString &name) +KDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &name) { KService::Ptr service = KService::serviceByDesktopName(name); if (!service) { @@ -444,20 +444,20 @@ KDevCompilerOptions *PascalProjectPart::createCompilerOptions(const QString &nam return 0; } - 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(); KMessageBox::error(0, i18n("There was an error loading the module %1.\n" "The diagnostics is:\n%2").arg(service->name()).arg(errorMessage)); exit(1); } - QStringList args; - QVariant prop = service->property("X-KDevelop-Args"); + TQStringList args; + TQVariant prop = service->property("X-KDevelop-Args"); if (prop.isValid()) - args = QStringList::split(" ", prop.toString()); + args = TQStringList::split(" ", prop.toString()); - QObject *obj = factory->create(this, service->name().latin1(), + TQObject *obj = factory->create(this, service->name().latin1(), "KDevCompilerOptions", args); if (!obj->inherits("KDevCompilerOptions")) { @@ -469,7 +469,7 @@ KDevCompilerOptions *PascalProjectPart::createCompilerOptions(const QString &nam return dlg; } -QString PascalProjectPart::defaultOptions( const QString compiler ) const +TQString PascalProjectPart::defaultOptions( const TQString compiler ) const { KConfig *config = KGlobal::config(); config->setGroup("Pascal Compiler"); @@ -482,12 +482,12 @@ QString PascalProjectPart::defaultOptions( const QString compiler ) const /*! \fn PascalProjectPart::distFiles() const */ -QStringList PascalProjectPart::distFiles() const +TQStringList PascalProjectPart::distFiles() const { - QStringList sourceList = allFiles(); + TQStringList sourceList = allFiles(); // Scan current source directory for any .pro files. - QString projectDir = projectDirectory(); - QDir dir(projectDir); - QStringList files = dir.entryList( "Makefile"); + TQString projectDir = projectDirectory(); + TQDir dir(projectDir); + TQStringList files = dir.entryList( "Makefile"); return sourceList + files; } diff --git a/buildtools/pascal/pascalproject_part.h b/buildtools/pascal/pascalproject_part.h index 3273011d..944250e4 100644 --- a/buildtools/pascal/pascalproject_part.h +++ b/buildtools/pascal/pascalproject_part.h @@ -11,7 +11,7 @@ #ifndef __KDEVPART_PASCALPROJECT_H__ #define __KDEVPART_PASCALPROJECT_H__ -#include <qguardedptr.h> +#include <tqguardedptr.h> #include "kdevbuildtool.h" @@ -23,47 +23,47 @@ class PascalProjectPart : public KDevBuildTool { Q_OBJECT public: - PascalProjectPart(QObject *parent, const char *name, const QStringList &); + PascalProjectPart(TQObject *parent, const char *name, const TQStringList &); ~PascalProjectPart(); - virtual void openProject(const QString &dirName, const QString &projectName); + virtual void openProject(const TQString &dirName, const TQString &projectName); virtual void closeProject(); /**Returns the name of the main source file without extension. All pascal compilers call the binary by that way*/ - virtual QString mainProgram() const; + virtual TQString mainProgram() const; /**Main source file (like src/main.pp)*/ - virtual QString mainSource() const; - virtual void setMainSource(QString fullPath); + virtual TQString mainSource() const; + virtual void setMainSource(TQString fullPath); - virtual QString projectDirectory() const; - virtual QString projectName() const; - virtual QString activeDirectory() const; + virtual TQString projectDirectory() const; + virtual TQString projectName() const; + virtual TQString activeDirectory() const; /**The location of the main source file*/ - virtual QString buildDirectory() const; - virtual QString runDirectory() const; - virtual QString debugArguments() const; - virtual QString runArguments() const; + virtual TQString buildDirectory() const; + virtual TQString runDirectory() const; + virtual TQString debugArguments() const; + virtual TQString runArguments() const; virtual DomUtil::PairList runEnvironmentVars() const; /**Returns everything in the project directory*/ - virtual QStringList allFiles() const; + virtual TQStringList allFiles() const; /**This does absolutelly nothing*/ - virtual void addFile(const QString &fileName); + virtual void addFile(const TQString &fileName); /**This does absolutelly nothing*/ - virtual void addFiles(const QStringList &fileList); + virtual void addFiles(const TQStringList &fileList); /**This does absolutelly nothing*/ - virtual void removeFile(const QString &fileName); + virtual void removeFile(const TQString &fileName); /**This does absolutelly nothing*/ - virtual void removeFiles(const QStringList &fileList); + virtual void removeFiles(const TQStringList &fileList); - virtual void changedFiles( const QStringList & fileList ); - virtual void changedFile( const QString & fileName ); + virtual void changedFiles( const TQStringList & fileList ); + virtual void changedFile( const TQString & fileName ); - KDevCompilerOptions *createCompilerOptions(const QString &name); + KDevCompilerOptions *createCompilerOptions(const TQString &name); - virtual QString defaultOptions(const QString compiler) const; - QStringList distFiles() const; + virtual TQString defaultOptions(const TQString compiler) const; + TQStringList distFiles() const; public slots: /**loads config from project file*/ @@ -76,20 +76,20 @@ private slots: void configWidget(KDialogBase *dlg); private: - QGuardedPtr<PascalProjectWidget> m_widget; + TQGuardedPtr<PascalProjectWidget> m_widget; - void listOfFiles(QStringList &result, QString path) const; + void listOfFiles(TQStringList &result, TQString path) const; - QString m_buildDir; - QString m_projectDir; - QString m_projectName; + TQString m_buildDir; + TQString m_projectDir; + TQString m_projectName; - QString m_mainProg; - QString m_mainSource; - QString m_compilerExec; - QString m_compilerOpts; + TQString m_mainProg; + TQString m_mainSource; + TQString m_compilerExec; + TQString m_compilerOpts; - QStringList m_sourceFiles; + TQStringList m_sourceFiles; }; #endif diff --git a/buildtools/pascal/pascalproject_widget.cpp b/buildtools/pascal/pascalproject_widget.cpp index 039c97e6..9e0c533c 100644 --- a/buildtools/pascal/pascalproject_widget.cpp +++ b/buildtools/pascal/pascalproject_widget.cpp @@ -12,7 +12,7 @@ PascalProjectWidget::PascalProjectWidget(PascalProjectPart *part) - : QWidget(0, "PascalProject widget") + : TQWidget(0, "PascalProject widget") { Q_UNUSED( part ); } diff --git a/buildtools/pascal/pascalproject_widget.h b/buildtools/pascal/pascalproject_widget.h index 198cf794..bfd9c328 100644 --- a/buildtools/pascal/pascalproject_widget.h +++ b/buildtools/pascal/pascalproject_widget.h @@ -2,8 +2,8 @@ #define __PASCALPROJECT_WIDGET_H__ -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> class KDevProject; diff --git a/buildtools/pascal/pascalprojectoptionsdlg.cpp b/buildtools/pascal/pascalprojectoptionsdlg.cpp index 7a97cea3..6bbff084 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.cpp +++ b/buildtools/pascal/pascalprojectoptionsdlg.cpp @@ -14,10 +14,10 @@ #include <kmessagebox.h> #include <klocale.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qregexp.h> -#include <qvalidator.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqregexp.h> +#include <tqvalidator.h> #include "domutil.h" #include "kdevcompileroptions.h" @@ -26,10 +26,10 @@ #include "pascalproject_part.h" #include "pascalprojectoptionsdlg.h" -PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, QWidget* parent, const char* name, WFlags fl) +PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent, const char* name, WFlags fl) : PascalProjectOptionsDlgBase(parent,name, fl), m_part(part) { - config_combo->setValidator(new QRegExpValidator(QRegExp("^\\D.*"), this)); + config_combo->setValidator(new TQRegExpValidator(TQRegExp("^\\D.*"), this)); offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Pascal'"); @@ -43,8 +43,8 @@ PascalProjectOptionsDlg::PascalProjectOptionsDlg(PascalProjectPart *part, QWidge dirty = false; - QDomDocument &dom = *(m_part->projectDom()); - currentConfig = QString::null; + TQDomDocument &dom = *(m_part->projectDom()); + currentConfig = TQString::null; configChanged(DomUtil::readEntry(dom, "/kdevpascalproject/general/useconfiguration", "default")); } @@ -52,17 +52,17 @@ PascalProjectOptionsDlg::~PascalProjectOptionsDlg() { } -QStringList PascalProjectOptionsDlg::allBuildConfigs() +TQStringList PascalProjectOptionsDlg::allBuildConfigs() { - QDomDocument &dom = *(m_part->projectDom()); + TQDomDocument &dom = *(m_part->projectDom()); - QStringList allConfigs; + TQStringList allConfigs; allConfigs.append("default"); - QDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); - QDomElement childEl = node.firstChild().toElement(); + TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); + TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { - QString config = childEl.tagName(); + TQString config = childEl.tagName(); kdDebug() << "Found config " << config << endl; if (config != "default") allConfigs.append(config); @@ -81,35 +81,35 @@ void PascalProjectOptionsDlg::accept() } } -void PascalProjectOptionsDlg::compiler_box_activated( const QString& /*s*/ ) +void PascalProjectOptionsDlg::compiler_box_activated( const TQString& /*s*/ ) { - QString exec = ServiceComboBox::currentText(compiler_box, service_execs); + TQString exec = ServiceComboBox::currentText(compiler_box, service_execs); exec_edit->setText(exec); } -void PascalProjectOptionsDlg::saveConfig( QString config ) +void PascalProjectOptionsDlg::saveConfig( TQString config ) { - QDomDocument dom = *m_part->projectDom(); - QString prefix = "/kdevpascalproject/configurations/" + config + "/"; + TQDomDocument dom = *m_part->projectDom(); + TQString prefix = "/kdevpascalproject/configurations/" + config + "/"; DomUtil::writeEntry(dom, prefix + "compiler", ServiceComboBox::currentText(compiler_box, service_names)); DomUtil::writeEntry(dom, prefix + "compileroptions", options_edit->text()); DomUtil::writeEntry(dom, prefix + "compilerexec", exec_edit->text()); - DomUtil::writeEntry(dom, prefix + "mainsource", mainSourceUrl->url().replace(QRegExp(m_part->projectDirectory() + QString("/")),"")); + DomUtil::writeEntry(dom, prefix + "mainsource", mainSourceUrl->url().replace(TQRegExp(m_part->projectDirectory() + TQString("/")),"")); } -void PascalProjectOptionsDlg::readConfig( QString config ) +void PascalProjectOptionsDlg::readConfig( TQString config ) { - QDomDocument dom = *m_part->projectDom(); - QString prefix = "/kdevpascalproject/configurations/" + config + "/"; + TQDomDocument dom = *m_part->projectDom(); + TQString prefix = "/kdevpascalproject/configurations/" + config + "/"; - QString compiler = DomUtil::readEntry(dom, prefix + "compiler", ""); + TQString compiler = DomUtil::readEntry(dom, prefix + "compiler", ""); if (compiler.isEmpty()) { offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Pascal'"); - QValueList<KService::Ptr>::ConstIterator it; + TQValueList<KService::Ptr>::ConstIterator it; for (it = offers.begin(); it != offers.end(); ++it) { if ((*it)->property("X-KDevelop-Default").toBool()) { compiler = (*it)->name(); @@ -120,7 +120,7 @@ void PascalProjectOptionsDlg::readConfig( QString config ) } ServiceComboBox::setCurrentText(compiler_box, compiler, service_names); - QString exec = DomUtil::readEntry(dom, prefix + "compilerexec", ""); + TQString exec = DomUtil::readEntry(dom, prefix + "compilerexec", ""); if (exec.isEmpty()) exec = ServiceComboBox::currentText(compiler_box, service_execs); exec_edit->setText(exec); @@ -128,7 +128,7 @@ void PascalProjectOptionsDlg::readConfig( QString config ) mainSourceUrl->setURL(m_part->projectDirectory() + "/" + DomUtil::readEntry(dom, prefix + "mainsource")); } -void PascalProjectOptionsDlg::configComboTextChanged(const QString &config) +void PascalProjectOptionsDlg::configComboTextChanged(const TQString &config) { bool canAdd = !allConfigs.contains(config) && !config.contains("/") && !config.isEmpty(); bool canRemove = allConfigs.contains(config) && config != "default"; @@ -137,7 +137,7 @@ void PascalProjectOptionsDlg::configComboTextChanged(const QString &config) } -void PascalProjectOptionsDlg::configChanged(const QString &config) +void PascalProjectOptionsDlg::configChanged(const TQString &config) { if (config == currentConfig || !allConfigs.contains(config)) return; @@ -157,7 +157,7 @@ void PascalProjectOptionsDlg::configChanged(const QString &config) void PascalProjectOptionsDlg::configAdded() { - QString config = config_combo->currentText(); + TQString config = config_combo->currentText(); allConfigs.append(config); @@ -170,27 +170,27 @@ void PascalProjectOptionsDlg::configAdded() void PascalProjectOptionsDlg::configRemoved() { - QString config = config_combo->currentText(); + TQString config = config_combo->currentText(); - QDomDocument dom = *m_part->projectDom(); - QDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); + TQDomDocument dom = *m_part->projectDom(); + TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); node.removeChild(node.namedItem(config)); allConfigs.remove(config); config_combo->clear(); config_combo->insertStringList(allConfigs); - currentConfig = QString::null; + currentConfig = TQString::null; configChanged("default"); } void PascalProjectOptionsDlg::optionsButtonClicked( ) { - QString name = ServiceComboBox::currentText(compiler_box, service_names); + TQString name = ServiceComboBox::currentText(compiler_box, service_names); KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { - QString flags = plugin->exec(this, options_edit->text()); + TQString flags = plugin->exec(this, options_edit->text()); options_edit->setText(flags); delete plugin; } diff --git a/buildtools/pascal/pascalprojectoptionsdlg.h b/buildtools/pascal/pascalprojectoptionsdlg.h index 70e911de..6e483338 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.h +++ b/buildtools/pascal/pascalprojectoptionsdlg.h @@ -23,16 +23,16 @@ class PascalProjectOptionsDlg : public PascalProjectOptionsDlgBase Q_OBJECT public: - PascalProjectOptionsDlg(PascalProjectPart *part, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + PascalProjectOptionsDlg(PascalProjectPart *part, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~PascalProjectOptionsDlg(); public slots: virtual void accept(); protected slots: - virtual void compiler_box_activated(const QString &s); - void configComboTextChanged(const QString &config); - void configChanged(const QString &config); + virtual void compiler_box_activated(const TQString &s); + void configComboTextChanged(const TQString &config); + void configChanged(const TQString &config); void configAdded(); void configRemoved(); void optionsButtonClicked(); @@ -40,19 +40,19 @@ protected slots: void setDefaultOptions(); private: - QStringList allConfigs; - QString currentConfig; + TQStringList allConfigs; + TQString currentConfig; bool dirty; KTrader::OfferList offers; - QStringList service_names; - QStringList service_execs; + TQStringList service_names; + TQStringList service_execs; PascalProjectPart *m_part; - void saveConfig(QString config); - void readConfig(QString config); - QStringList allBuildConfigs(); + void saveConfig(TQString config); + void readConfig(TQString config); + TQStringList allBuildConfigs(); }; #endif diff --git a/buildtools/pascal/service.cpp b/buildtools/pascal/service.cpp index c678f916..ea3846b2 100644 --- a/buildtools/pascal/service.cpp +++ b/buildtools/pascal/service.cpp @@ -10,8 +10,8 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include <qcombobox.h> -#include <qvaluelist.h> +#include <tqcombobox.h> +#include <tqvaluelist.h> #include <kservice.h> #include <kdebug.h> @@ -19,10 +19,10 @@ #include "service.h" -void ServiceComboBox::insertStringList(QComboBox *combo, const QValueList<KService::Ptr> &list, - QStringList *names, QStringList *execs) +void ServiceComboBox::insertStringList(TQComboBox *combo, const TQValueList<KService::Ptr> &list, + TQStringList *names, TQStringList *execs) { - QValueList<KService::Ptr>::ConstIterator it; + TQValueList<KService::Ptr>::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { combo->insertItem((*it)->comment()); (*names) << (*it)->desktopEntryName(); @@ -31,16 +31,16 @@ void ServiceComboBox::insertStringList(QComboBox *combo, const QValueList<KServi } } -QString ServiceComboBox::currentText(QComboBox *combo, const QStringList &names) +TQString ServiceComboBox::currentText(TQComboBox *combo, const TQStringList &names) { if (combo->currentItem() == -1) - return QString::null; + return TQString::null; return names[combo->currentItem()]; } -void ServiceComboBox::setCurrentText(QComboBox *combo, const QString &str, const QStringList &names) +void ServiceComboBox::setCurrentText(TQComboBox *combo, const TQString &str, const TQStringList &names) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; int i = 0; for (it = names.begin(); it != names.end(); ++it) { if (*it == str) { @@ -51,9 +51,9 @@ void ServiceComboBox::setCurrentText(QComboBox *combo, const QString &str, const } } -int ServiceComboBox::itemForText(const QString &str, const QStringList &names) +int ServiceComboBox::itemForText(const TQString &str, const TQStringList &names) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; int i = 0; for (it = names.begin(); it != names.end(); ++it) { if (*it == str) { @@ -64,10 +64,10 @@ int ServiceComboBox::itemForText(const QString &str, const QStringList &names) return 0; } -QString ServiceComboBox::defaultCompiler() +TQString ServiceComboBox::defaultCompiler() { KTrader::OfferList offers = KTrader::self()->query("KDevelop/CompilerOptions", "[X-KDevelop-Language] == 'Pascal'"); - QValueList<KService::Ptr>::ConstIterator it; + TQValueList<KService::Ptr>::ConstIterator it; for (it = offers.begin(); it != offers.end(); ++it) { if ((*it)->property("X-KDevelop-Default").toBool()) { return (*it)->name();; diff --git a/buildtools/pascal/service.h b/buildtools/pascal/service.h index 30bb142b..26c302fd 100644 --- a/buildtools/pascal/service.h +++ b/buildtools/pascal/service.h @@ -18,12 +18,12 @@ class ServiceComboBox { public: - static void insertStringList(QComboBox *combo, const QValueList<KService::Ptr> &list, - QStringList *names, QStringList *execs); - static QString currentText(QComboBox *combo, const QStringList &names); - static void setCurrentText(QComboBox *combo, const QString &str, const QStringList &names); - static int itemForText(const QString &str, const QStringList &names); - static QString defaultCompiler(); + static void insertStringList(TQComboBox *combo, const TQValueList<KService::Ptr> &list, + TQStringList *names, TQStringList *execs); + static TQString currentText(TQComboBox *combo, const TQStringList &names); + static void setCurrentText(TQComboBox *combo, const TQString &str, const TQStringList &names); + static int itemForText(const TQString &str, const TQStringList &names); + static TQString defaultCompiler(); }; #endif |