diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /buildtools/script | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'buildtools/script')
-rw-r--r-- | buildtools/script/scriptnewfiledlg.cpp | 48 | ||||
-rw-r--r-- | buildtools/script/scriptnewfiledlg.h | 6 | ||||
-rw-r--r-- | buildtools/script/scriptoptionswidget.cpp | 22 | ||||
-rw-r--r-- | buildtools/script/scriptoptionswidget.h | 2 | ||||
-rw-r--r-- | buildtools/script/scriptprojectpart.cpp | 156 | ||||
-rw-r--r-- | buildtools/script/scriptprojectpart.h | 46 |
6 files changed, 140 insertions, 140 deletions
diff --git a/buildtools/script/scriptnewfiledlg.cpp b/buildtools/script/scriptnewfiledlg.cpp index 336187d3..3bfeeee7 100644 --- a/buildtools/script/scriptnewfiledlg.cpp +++ b/buildtools/script/scriptnewfiledlg.cpp @@ -11,13 +11,13 @@ #include "scriptnewfiledlg.h" -#include <qcheckbox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kbuttonbox.h> #include <kdebug.h> #include <klocale.h> @@ -30,35 +30,35 @@ ScriptNewFileDialog::ScriptNewFileDialog(ScriptProjectPart *part, - QWidget *parent, const char *name) - : QDialog(parent, name, true) + TQWidget *parent, const char *name) + : TQDialog(parent, name, true) { setCaption(i18n("New File")); - QLabel *filename_label = new QLabel(i18n("&File name:"), this); + TQLabel *filename_label = new TQLabel(i18n("&File name:"), this); filename_edit = new KLineEdit(this); filename_edit->setFocus(); filename_label->setBuddy(this); - QFontMetrics fm(filename_edit->fontMetrics()); + TQFontMetrics fm(filename_edit->fontMetrics()); filename_edit->setMinimumWidth(fm.width('X')*35); - usetemplate_box = new QCheckBox(i18n("&Use file template"), this); + usetemplate_box = new TQCheckBox(i18n("&Use file template"), this); usetemplate_box->setChecked(true); - QFrame *frame = new QFrame(this); - frame->setFrameStyle(QFrame::HLine | QFrame::Sunken); + TQFrame *frame = new TQFrame(this); + frame->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); KButtonBox *buttonbox = new KButtonBox(this); buttonbox->addStretch(); - QPushButton *ok_button = buttonbox->addButton(KStdGuiItem::ok()); - QPushButton *cancel_button = buttonbox->addButton(KStdGuiItem::cancel()); + TQPushButton *ok_button = buttonbox->addButton(KStdGuiItem::ok()); + TQPushButton *cancel_button = buttonbox->addButton(KStdGuiItem::cancel()); ok_button->setDefault(true); - connect( ok_button, SIGNAL(clicked()), this, SLOT(accept()) ); - connect( cancel_button, SIGNAL(clicked()), this, SLOT(reject()) ); + connect( ok_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()) ); + connect( cancel_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()) ); buttonbox->layout(); - QVBoxLayout *layout = new QVBoxLayout(this, 10, 4); + TQVBoxLayout *layout = new TQVBoxLayout(this, 10, 4); layout->addWidget(filename_label); layout->addWidget(filename_edit); layout->addWidget(usetemplate_box); @@ -75,7 +75,7 @@ ScriptNewFileDialog::~ScriptNewFileDialog() void ScriptNewFileDialog::accept() { - QString fileName = filename_edit->text(); + TQString fileName = filename_edit->text(); if (fileName.find('/') != -1) { KMessageBox::sorry(this, i18n("Please enter the file name without '/' and so on.")); return; @@ -84,9 +84,9 @@ void ScriptNewFileDialog::accept() KDevProject *project = m_part->project(); if (!project->activeDirectory().isEmpty()) fileName.prepend(project->activeDirectory() + "/"); - QString destpath = project->projectDirectory() + "/" + fileName; + TQString destpath = project->projectDirectory() + "/" + fileName; - if (QFileInfo(destpath).exists()) { + if (TQFileInfo(destpath).exists()) { KMessageBox::sorry(this, i18n("A file with this name already exists.")); return; } @@ -94,14 +94,14 @@ void ScriptNewFileDialog::accept() bool success = false; if (usetemplate_box->isChecked()) { - QString extension = QFileInfo(destpath).extension(); + TQString extension = TQFileInfo(destpath).extension(); if (!FileTemplate::exists(m_part, extension)) { KMessageBox::sorry(this, i18n("A file template for this extension does not exist.")); return; } success = FileTemplate::copy(m_part, extension, destpath); } else { - QFile f(destpath); + TQFile f(destpath); success = f.open(IO_WriteOnly); if (success) f.close(); @@ -113,7 +113,7 @@ void ScriptNewFileDialog::accept() kdDebug(9015) << "AddFile1: " << fileName << endl; m_part->addFile(fileName); - QDialog::accept(); + TQDialog::accept(); } #include "scriptnewfiledlg.moc" diff --git a/buildtools/script/scriptnewfiledlg.h b/buildtools/script/scriptnewfiledlg.h index b3c73713..990fc663 100644 --- a/buildtools/script/scriptnewfiledlg.h +++ b/buildtools/script/scriptnewfiledlg.h @@ -12,7 +12,7 @@ #ifndef _SCRIPTNEWFILEDLG_H_ #define _SCRIPTNEWFILEDLG_H_ -#include <qdialog.h> +#include <tqdialog.h> class QCheckBox; class KLineEdit; @@ -24,14 +24,14 @@ class ScriptNewFileDialog : public QDialog Q_OBJECT public: - ScriptNewFileDialog( ScriptProjectPart *part, QWidget *parent=0, const char *name=0 ); + ScriptNewFileDialog( ScriptProjectPart *part, TQWidget *parent=0, const char *name=0 ); ~ScriptNewFileDialog(); protected: virtual void accept(); private: - QCheckBox *usetemplate_box; + TQCheckBox *usetemplate_box; KLineEdit *filename_edit; ScriptProjectPart *m_part; }; diff --git a/buildtools/script/scriptoptionswidget.cpp b/buildtools/script/scriptoptionswidget.cpp index c1660b00..d80cd501 100644 --- a/buildtools/script/scriptoptionswidget.cpp +++ b/buildtools/script/scriptoptionswidget.cpp @@ -11,27 +11,27 @@ #include "scriptoptionswidget.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <klineedit.h> -#include <qradiobutton.h> -#include <qtabwidget.h> +#include <tqradiobutton.h> +#include <tqtabwidget.h> #include "domutil.h" #include "kdevlanguagesupport.h" ScriptOptionsWidget::ScriptOptionsWidget(KDevPlugin *part, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : ScriptOptionsWidgetBase(parent, name) { m_part = part; - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); - QString includepatterns + TQString includepatterns = DomUtil::readEntry(dom, "/kdevscriptproject/general/includepatterns"); if (includepatterns.isNull() && part->languageSupport()){ - QStringList includepatternList; + TQStringList includepatternList; KMimeType::List list = part->languageSupport()->mimeTypes(); KMimeType::List::Iterator it = list.begin(); while( it != list.end() ){ @@ -41,7 +41,7 @@ ScriptOptionsWidget::ScriptOptionsWidget(KDevPlugin *part, includepatterns = includepatternList.join( "," ); } - QString excludepatterns + TQString excludepatterns = DomUtil::readEntry(dom, "/kdevscriptproject/general/excludepatterns"); if (excludepatterns.isNull()) excludepatterns = "*~"; @@ -57,10 +57,10 @@ ScriptOptionsWidget::~ScriptOptionsWidget() void ScriptOptionsWidget::accept() { - QDomDocument &dom = *m_part->projectDom(); + TQDomDocument &dom = *m_part->projectDom(); - QString includepatterns = includepatterns_edit->text(); - QString excludepatterns = excludepatterns_edit->text(); + TQString includepatterns = includepatterns_edit->text(); + TQString excludepatterns = excludepatterns_edit->text(); DomUtil::writeEntry(dom, "/kdevscriptproject/general/includepatterns", includepatterns); DomUtil::writeEntry(dom, "/kdevscriptproject/general/excludepatterns", excludepatterns); diff --git a/buildtools/script/scriptoptionswidget.h b/buildtools/script/scriptoptionswidget.h index c33d099d..3dc03058 100644 --- a/buildtools/script/scriptoptionswidget.h +++ b/buildtools/script/scriptoptionswidget.h @@ -22,7 +22,7 @@ class ScriptOptionsWidget : public ScriptOptionsWidgetBase Q_OBJECT public: - ScriptOptionsWidget( KDevPlugin *part, QWidget *parent=0, const char *name=0 ); + ScriptOptionsWidget( KDevPlugin *part, TQWidget *parent=0, const char *name=0 ); ~ScriptOptionsWidget(); public slots: diff --git a/buildtools/script/scriptprojectpart.cpp b/buildtools/script/scriptprojectpart.cpp index ff560f23..2bc19135 100644 --- a/buildtools/script/scriptprojectpart.cpp +++ b/buildtools/script/scriptprojectpart.cpp @@ -11,12 +11,12 @@ #include "scriptprojectpart.h" -#include <qdir.h> -#include <qregexp.h> -#include <qstringlist.h> -#include <qvaluestack.h> -#include <qvbox.h> -#include <qwhatsthis.h> +#include <tqdir.h> +#include <tqregexp.h> +#include <tqstringlist.h> +#include <tqvaluestack.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> #include <kaction.h> #include <kdebug.h> #include <kdialogbase.h> @@ -40,7 +40,7 @@ typedef KDevGenericFactory<ScriptProjectPart> ScriptProjectFactory; static const KDevPluginInfo data("kdevscriptproject"); K_EXPORT_COMPONENT_FACTORY( libkdevscriptproject, ScriptProjectFactory( data ) ) -ScriptProjectPart::ScriptProjectPart(QObject *parent, const char *name, const QStringList &) +ScriptProjectPart::ScriptProjectPart(TQObject *parent, const char *name, const TQStringList &) : KDevBuildTool(&data, parent, name ? name : "ScriptProjectPart") { setInstance(ScriptProjectFactory::instance()); @@ -51,17 +51,17 @@ ScriptProjectPart::ScriptProjectPart(QObject *parent, const char *name, const QS if (!extension<KDevCreateFile>("KDevelop/CreateFile")) { KAction *action; action = new KAction( i18n("New File..."), 0, - this, SLOT(slotNewFile()), + this, TQT_SLOT(slotNewFile()), actionCollection(), "file_newfile" ); action->setWhatsThis( i18n("<b>New file</b><p>Creates a new file.") ); action->setToolTip( i18n("Create a new file") ); } new KAction( i18n("Rescan Project"), 0, CTRL+ALT+Key_R, - this, SLOT(rescan()), + this, TQT_SLOT(rescan()), actionCollection(), "rescan" ); - connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)), - this, SLOT(projectConfigWidget(KDialogBase*)) ); + connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), + this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); } @@ -71,10 +71,10 @@ ScriptProjectPart::~ScriptProjectPart() void ScriptProjectPart::projectConfigWidget(KDialogBase *dlg) { - QVBox *vbox; + TQVBox *vbox; vbox = dlg->addVBoxPage(i18n("Script Project Options"), i18n("Script Project Options"), BarIcon("kdevelop", KIcon::SizeMedium)); ScriptOptionsWidget *w = new ScriptOptionsWidget(this, vbox); - connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) ); + connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } @@ -82,11 +82,11 @@ void ScriptProjectPart::projectConfigWidget(KDialogBase *dlg) * @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; } @@ -95,7 +95,7 @@ static bool matchesPattern(const QString &fileName, const QStringList &patternLi } -void ScriptProjectPart::openProject(const QString &dirName, const QString &projectName) +void ScriptProjectPart::openProject(const TQString &dirName, const TQString &projectName) { if (!languageSupport()) kdDebug(9015) << "ScriptProjectPart::openProject: no language support found!" << endl; @@ -103,7 +103,7 @@ void ScriptProjectPart::openProject(const QString &dirName, const QString &proje m_projectDirectory = dirName; m_projectName = projectName; - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); // Set the default directory radio to "executable" if (DomUtil::readEntry(dom, "/kdevscriptproject/run/directoryradio") == "" ) { @@ -111,28 +111,28 @@ void ScriptProjectPart::openProject(const QString &dirName, const QString &proje } // Put all files from all subdirectories into file list - QValueStack<QString> s; + TQValueStack<TQString> s; int prefixlen = m_projectDirectory.length()+1; s.push(m_projectDirectory); - QDir dir; + TQDir dir; do { dir.setPath(s.pop()); kdDebug(9015) << "Examining: " << dir.path() << endl; const QFileInfoList *dirEntries = dir.entryInfoList(); if ( dirEntries ) { - 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()) { //do not follow symlinks which point to the themselves if (it.current()->isSymLink()) { - QString symLink = it.current()->readLink(); + TQString symLink = it.current()->readLink(); if ((symLink == path) || (symLink == "./")) continue; } else if (canAddDirectoryToProject(path)) { @@ -157,18 +157,18 @@ void ScriptProjectPart::closeProject() } -QString ScriptProjectPart::projectDirectory() const +TQString ScriptProjectPart::projectDirectory() const { return m_projectDirectory; } -QString ScriptProjectPart::buildDirectory() const +TQString ScriptProjectPart::buildDirectory() const { return m_projectDirectory; } -QString ScriptProjectPart::projectName() const +TQString ScriptProjectPart::projectName() const { return m_projectName; } @@ -190,9 +190,9 @@ DomUtil::PairList ScriptProjectPart::runEnvironmentVars() const * if run/directoryradio == custom * The custom directory absolute path */ -QString ScriptProjectPart::runDirectory() const +TQString ScriptProjectPart::runDirectory() const { - QString cwd = defaultRunDirectory("kdevscriptproject"); + TQString cwd = defaultRunDirectory("kdevscriptproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; @@ -208,15 +208,15 @@ QString ScriptProjectPart::runDirectory() const * if run/directoryradio == custom or relative == false * The absolute path to executable */ -QString ScriptProjectPart::mainProgram() const +TQString ScriptProjectPart::mainProgram() const { - QDomDocument * dom = projectDom(); + TQDomDocument * dom = projectDom(); - if ( !dom ) return QString(); + if ( !dom ) return TQString(); - QString DomMainProgram = DomUtil::readEntry( *dom, "/kdevscriptproject/run/mainprogram"); + TQString DomMainProgram = DomUtil::readEntry( *dom, "/kdevscriptproject/run/mainprogram"); - if ( DomMainProgram.isEmpty() ) return QString(); + if ( DomMainProgram.isEmpty() ) return TQString(); if ( DomMainProgram.startsWith("/") ) // assume absolute path { @@ -227,36 +227,36 @@ QString ScriptProjectPart::mainProgram() const return projectDirectory() + "/" + DomMainProgram; } - return QString(); + return TQString(); } -/** Retuns a QString with the debug command line arguments */ -QString ScriptProjectPart::debugArguments() const +/** Retuns a TQString with the debug command line arguments */ +TQString ScriptProjectPart::debugArguments() const { return DomUtil::readEntry(*projectDom(), "/kdevscriptproject/run/globaldebugarguments"); } -/** Retuns a QString with the run command line arguments */ -QString ScriptProjectPart::runArguments() const +/** Retuns a TQString with the run command line arguments */ +TQString ScriptProjectPart::runArguments() const { return DomUtil::readEntry(*projectDom(), "/kdevscriptproject/run/programargs"); } -QString ScriptProjectPart::activeDirectory() const +TQString ScriptProjectPart::activeDirectory() const { - QDomDocument &dom = *projectDom(); + TQDomDocument &dom = *projectDom(); return DomUtil::readEntry(dom, "/kdevscriptproject/general/activedir"); } -QStringList ScriptProjectPart::allFiles() const +TQStringList ScriptProjectPart::allFiles() const { -/* QStringList res; +/* TQStringList res; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = m_sourceFiles.begin(); it != m_sourceFiles.end(); ++it) res += (m_projectDirectory + "/" + (*it)); @@ -266,19 +266,19 @@ QStringList ScriptProjectPart::allFiles() const return m_sourceFiles; } -void ScriptProjectPart::addFile(const QString &fileName) +void ScriptProjectPart::addFile(const TQString &fileName) { kdDebug(9015) << "AddFile2" << fileName << endl; - QStringList fileList; + TQStringList fileList; fileList.append ( fileName ); this->addFiles ( fileList ); } -void ScriptProjectPart::addFiles ( const QStringList& fileList ) +void ScriptProjectPart::addFiles ( const TQStringList& fileList ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = fileList.begin(); it != fileList.end(); ++it ) { @@ -288,19 +288,19 @@ void ScriptProjectPart::addFiles ( const QStringList& fileList ) emit addedFilesToProject ( fileList ); } -void ScriptProjectPart::removeFile(const QString &fileName) +void ScriptProjectPart::removeFile(const TQString &fileName) { - QStringList fileList; + TQStringList fileList; fileList.append ( fileName ); this->addFiles ( fileList ); } -void ScriptProjectPart::removeFiles ( const QStringList& fileList ) +void ScriptProjectPart::removeFiles ( const TQStringList& fileList ) { emit removedFilesFromProject ( fileList ); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = fileList.begin(); it != fileList.end(); ++it ) { @@ -317,13 +317,13 @@ void ScriptProjectPart::slotNewFile() /*! \fn ScriptProjectPart::distFiles() const */ -QStringList ScriptProjectPart::distFiles() const +TQStringList ScriptProjectPart::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( "*README*"); + TQString projectDir = projectDirectory(); + TQDir dir(projectDir); + TQStringList files = dir.entryList( "*README*"); return sourceList + files; } @@ -332,28 +332,28 @@ void ScriptProjectPart::rescan() // kdDebug() << "Directory " << path << " changed, scanning for new files in the project" << endl; // Put all files from all subdirectories into file list - QValueStack<QString> s; + TQValueStack<TQString> s; int prefixlen = m_projectDirectory.length()+1; s.push(m_projectDirectory); - QDir dir; + TQDir dir; do { dir.setPath(s.pop()); kdDebug(9015) << "Examining: " << dir.path() << endl; const QFileInfoList *dirEntries = dir.entryInfoList(); if ( dirEntries ) { - 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()) { //do not follow symlinks which point to the themselves if (it.current()->isSymLink()) { - QString symLink = it.current()->readLink(); + TQString symLink = it.current()->readLink(); if ((symLink == path) || (symLink == "./")) continue; } else if (canAddDirectoryToProject(path)) { @@ -370,18 +370,18 @@ void ScriptProjectPart::rescan() } } while (!s.isEmpty()); -/* const QFileInfoList *dirEntries = QDir(path).entryInfoList(); +/* const QFileInfoList *dirEntries = TQDir(path).entryInfoList(); if ( dirEntries ) { kdDebug() << "1" << endl; - QPtrListIterator<QFileInfo> it(*dirEntries); + TQPtrListIterator<TQFileInfo> it(*dirEntries); for (; it.current(); ++it) { kdDebug() << "2" << endl; - QString fileName = it.current()->fileName(); + TQString fileName = it.current()->fileName(); if (fileName == "." || fileName == "..") continue; kdDebug() << "3" << endl; - QString filePath = it.current()->absFilePath(); + TQString filePath = it.current()->absFilePath(); if (!it.current()->isDir() && canAddToProject(filePath) && !isProjectFile(filePath)) { kdDebug() << "=== adding " << filePath << endl; addFile(filePath); @@ -390,12 +390,12 @@ void ScriptProjectPart::rescan() }*/ } -bool ScriptProjectPart::canAddToProject(const QString & path) +bool ScriptProjectPart::canAddToProject(const TQString & path) { - QDomDocument &dom = *projectDom(); - QString includepatterns + TQDomDocument &dom = *projectDom(); + TQString includepatterns = DomUtil::readEntry(dom, "/kdevscriptproject/general/includepatterns"); - QStringList includepatternList; + TQStringList includepatternList; if ( includepatterns.isNull() ) { if ( languageSupport() ){ KMimeType::List list = languageSupport()->mimeTypes(); @@ -406,14 +406,14 @@ bool ScriptProjectPart::canAddToProject(const QString & path) } } } else { - includepatternList = QStringList::split(",", includepatterns); + includepatternList = TQStringList::split(",", includepatterns); } - QString excludepatterns + TQString excludepatterns = DomUtil::readEntry(dom, "/kdevscriptproject/general/excludepatterns"); if (excludepatterns.isNull()) excludepatterns = "*~"; - QStringList excludepatternList = QStringList::split(",", excludepatterns); + TQStringList excludepatternList = TQStringList::split(",", excludepatterns); if (matchesPattern(path, includepatternList) && !matchesPattern(path, excludepatternList)) { @@ -425,15 +425,15 @@ bool ScriptProjectPart::canAddToProject(const QString & path) } } -bool ScriptProjectPart::canAddDirectoryToProject(const QString & path) +bool ScriptProjectPart::canAddDirectoryToProject(const TQString & path) { - QDomDocument &dom = *projectDom(); - QString excludepatterns + TQDomDocument &dom = *projectDom(); + TQString excludepatterns = DomUtil::readEntry(dom, "/kdevscriptproject/general/excludepatterns"); if (excludepatterns.isNull()) { return true; } - QStringList excludepatternList = QStringList::split(",", excludepatterns); + TQStringList excludepatternList = TQStringList::split(",", excludepatterns); if (!matchesPattern(path, excludepatternList)) { return true; diff --git a/buildtools/script/scriptprojectpart.h b/buildtools/script/scriptprojectpart.h index b16c4ffb..b886bd46 100644 --- a/buildtools/script/scriptprojectpart.h +++ b/buildtools/script/scriptprojectpart.h @@ -12,8 +12,8 @@ #ifndef _SCRIPTPROJECTPART_H_ #define _SCRIPTPROJECTPART_H_ -#include <qdict.h> -#include <qguardedptr.h> +#include <tqdict.h> +#include <tqguardedptr.h> #include "kdevbuildtool.h" @@ -27,31 +27,31 @@ class ScriptProjectPart : public KDevBuildTool Q_OBJECT public: - ScriptProjectPart( QObject *parent, const char *name, const QStringList &args ); + ScriptProjectPart( TQObject *parent, const char *name, const TQStringList &args ); ~ScriptProjectPart(); - QStringList distFiles() const; + TQStringList distFiles() const; protected: - virtual void openProject(const QString &dirName, const QString &projectName); + virtual void openProject(const TQString &dirName, const TQString &projectName); virtual void closeProject(); - virtual QString projectDirectory() const; - virtual QString projectName() const; - virtual QString mainProgram() const; - virtual QString activeDirectory() const; - virtual QStringList allFiles() const; - virtual void addFile(const QString &fileName); - virtual void addFiles ( const QStringList& fileList ); - virtual void removeFile(const QString &fileName); - virtual void removeFiles ( const QStringList& fileList ); - virtual QString buildDirectory() const; - virtual QString runDirectory() const; - virtual QString debugArguments() const; - virtual QString runArguments() const; + virtual TQString projectDirectory() const; + virtual TQString projectName() const; + virtual TQString mainProgram() const; + virtual TQString activeDirectory() const; + virtual TQStringList allFiles() const; + virtual void addFile(const TQString &fileName); + virtual void addFiles ( const TQStringList& fileList ); + virtual void removeFile(const TQString &fileName); + virtual void removeFiles ( const TQStringList& fileList ); + virtual TQString buildDirectory() const; + virtual TQString runDirectory() const; + virtual TQString debugArguments() const; + virtual TQString runArguments() const; virtual DomUtil::PairList runEnvironmentVars() const; - bool canAddToProject(const QString &path); - bool canAddDirectoryToProject(const QString &path); + bool canAddToProject(const TQString &path); + bool canAddDirectoryToProject(const TQString &path); private slots: void projectConfigWidget(KDialogBase *dlg); @@ -59,9 +59,9 @@ private slots: void rescan(); private: - QString m_projectDirectory; - QString m_projectName; - QStringList m_sourceFiles; + TQString m_projectDirectory; + TQString m_projectName; + TQStringList m_sourceFiles; friend class ScriptNewFileDialog; }; |