diff options
Diffstat (limited to 'src/project.cpp')
-rw-r--r-- | src/project.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/project.cpp b/src/project.cpp index 06e1332..9e72648 100644 --- a/src/project.cpp +++ b/src/project.cpp @@ -36,10 +36,10 @@ #define PROJECT_CONFIG_VER 2 -inline void flListFromStringList(FileLocationList& fll, const QStringList& sl) +inline void flListFromStringList(FileLocationList& fll, const TQStringList& sl) { - QStringList::ConstIterator itr; - QString sPath; + TQStringList::ConstIterator itr; + TQString sPath; uint nLine, nCol; // Transform the string into a list of file locations @@ -51,11 +51,11 @@ inline void flListFromStringList(FileLocationList& fll, const QStringList& sl) } } -inline void stringListFromFlList(QStringList& sl, const FileLocationList& fll) +inline void stringListFromFlList(TQStringList& sl, const FileLocationList& fll) { FileLocationList* pList; FileLocation* pLoc; - QString sLoc; + TQString sLoc; // Nasty... pList = (FileLocationList*)&fll; @@ -65,7 +65,7 @@ inline void stringListFromFlList(QStringList& sl, const FileLocationList& fll) // the configuration file for (pLoc = pList->first(); pLoc != NULL; pLoc = pList->next()) { sLoc = ""; - QTextOStream(&sLoc) << pLoc->m_sPath << ":" << pLoc->m_nLine << ":" + TQTextOStream(&sLoc) << pLoc->m_sPath << ":" << pLoc->m_nLine << ":" << pLoc->m_nCol; sl.append(sLoc); } @@ -87,9 +87,9 @@ Project::~Project() /** */ -bool Project::open(const QString& sPath) +bool Project::open(const TQString& sPath) { - QString sConfFile; + TQString sConfFile; Options opt; // Associate the object with the project directory @@ -116,7 +116,7 @@ bool Project::open(const QString& sPath) // Get the project name m_pConf->setGroup("Project"); m_sName = m_pConf->readEntry("Name"); - if (m_sName == QString::null) { + if (m_sName == TQString::null) { KMessageBox::error(0, i18n("Cannot read project name")); return false; } @@ -146,9 +146,9 @@ void Project::close() * Returns a semi-colon separated list of the file types included in the * current project. */ -QString Project::getFileTypes() const +TQString Project::getFileTypes() const { - QString sTypes; + TQString sTypes; m_pConf->setGroup("Project"); return m_pConf->readEntry("FileTypes"); @@ -199,7 +199,7 @@ void Project::setOptions(const Options& opt) */ void Project::loadSession(Session& sess) { - QStringList slEntry; + TQStringList slEntry; m_pConf->setGroup("Session"); @@ -233,7 +233,7 @@ void Project::loadSession(Session& sess) */ void Project::storeSession(const Session& sess) { - QStringList slEntry; + TQStringList slEntry; m_pConf->setGroup("Session"); @@ -271,15 +271,15 @@ void Project::storeSession(const Session& sess) */ bool Project::loadFileList(FileListTarget* pList) { - QString sFilePath; + TQString sFilePath; // Open the 'cscope.files' file if (!m_fiFileList.open(IO_ReadOnly)) return false; // Read all file names from the file - QTextStream str(&m_fiFileList); - while ((sFilePath = str.readLine()) != QString::null) { + TQTextStream str(&m_fiFileList); + while ((sFilePath = str.readLine()) != TQString::null) { // Skip option lines if (sFilePath.at(0) == '-') continue; @@ -299,13 +299,13 @@ bool Project::loadFileList(FileListTarget* pList) */ bool Project::storeFileList(FileListSource* pList) { - QString sFilePath; + TQString sFilePath; // Open the 'cscope.files' file if (!m_fiFileList.open(IO_WriteOnly | IO_Truncate)) return false; - QTextStream str(&m_fiFileList); + TQTextStream str(&m_fiFileList); // Write all file names if (pList->firstItem(sFilePath)) { @@ -323,14 +323,14 @@ bool Project::storeFileList(FileListSource* pList) * @param sPath The path of the file to add * @return true if successful, false otherwise */ -bool Project::addFile(const QString& sPath) +bool Project::addFile(const TQString& sPath) { // Open the 'cscope.files' file if (!m_fiFileList.open(IO_WriteOnly | IO_Append)) return false; // Write the file path - QTextStream str(&m_fiFileList); + TQTextStream str(&m_fiFileList); str << sPath << "\n"; m_fiFileList.close(); @@ -347,7 +347,7 @@ bool Project::addFile(const QString& sPath) */ bool Project::isEmpty() { - QString sPath, sFileName; + TQString sPath, sFileName; bool bResult = true; // Open the 'cscope.files' file @@ -355,8 +355,8 @@ bool Project::isEmpty() return true; // Find at least one file name entry in the file - QTextStream str(&m_fiFileList); - while ((sPath = str.readLine()) != QString::null) { + TQTextStream str(&m_fiFileList); + while ((sPath = str.readLine()) != TQString::null) { if (sPath.at(0) != '-') { bResult = false; break; @@ -371,7 +371,7 @@ bool Project::isEmpty() * Copies the list of previously queried symbols to the target object. * @param slSymHistory The list object to copy into */ -void Project::getSymHistory(QStringList& slSymHistory) const +void Project::getSymHistory(TQStringList& slSymHistory) const { slSymHistory = m_slSymHistory; } @@ -380,12 +380,12 @@ void Project::getSymHistory(QStringList& slSymHistory) const * Copies the list of previously queried symbols from the target object. * @param slSymHistory The list object to copy from */ -void Project::setSymHistory(QStringList& slSymHistory) +void Project::setSymHistory(TQStringList& slSymHistory) { m_slSymHistory = slSymHistory; } -void Project::getMakeParams(QString& sCmd, QString& sDir) const +void Project::getMakeParams(TQString& sCmd, TQString& sDir) const { sCmd = m_sMakeCmd; sDir = m_sMakeRoot; @@ -398,7 +398,7 @@ void Project::getMakeParams(QString& sCmd, QString& sDir) const * @param sPath The full path of the project's directory * @param opt Project options */ -bool Project::create(const QString& sName, const QString& sPath, +bool Project::create(const TQString& sName, const TQString& sPath, const Options& opt) { // Prepare the project's files |