diff options
Diffstat (limited to 'bibletime/frontend/cprofilemgr.cpp')
-rw-r--r-- | bibletime/frontend/cprofilemgr.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/bibletime/frontend/cprofilemgr.cpp b/bibletime/frontend/cprofilemgr.cpp index ef810a1..0e516ee 100644 --- a/bibletime/frontend/cprofilemgr.cpp +++ b/bibletime/frontend/cprofilemgr.cpp @@ -12,9 +12,9 @@ #include "cprofilemgr.h" //Qt includes -#include <qdir.h> -#include <qfile.h> -#include <qptrlist.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqptrlist.h> //KDE includes #include <kstandarddirs.h> @@ -27,9 +27,9 @@ CProfileMgr::CProfileMgr() : m_startupProfile(0) { KStandardDirs stdDirs; m_profilePath = stdDirs.saveLocation("data", "bibletime/sessions/"); - QDir d( m_profilePath ); - QStringList files = d.entryList("*.xml"); - for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it ) { + TQDir d( m_profilePath ); + TQStringList files = d.entryList("*.xml"); + for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { if ((*it) != "_startup_.xml") { m_profiles.append(new CProfile(m_profilePath + *it)); } @@ -45,13 +45,13 @@ CProfileMgr::~CProfileMgr() { } /** Returns a list of available profiles. */ -const QPtrList<CProfile>& CProfileMgr::profiles() { +const TQPtrList<CProfile>& CProfileMgr::profiles() { return m_profiles; } /** Creates a new profile with the name "name" (first parameter). @return The profile object */ -CProfile* CProfileMgr::create( const QString name ) { - CProfile* p = new CProfile(QString::null, name); +CProfile* CProfileMgr::create( const TQString name ) { + CProfile* p = new CProfile(TQString::null, name); m_profiles.append(p); return p; @@ -61,7 +61,7 @@ CProfile* CProfileMgr::create( const QString name ) { const bool CProfileMgr::remove ( CProfile* p ) { bool ret = false; - QFile f( p->filename() ); + TQFile f( p->filename() ); if (f.exists()) f.remove(); if(m_profiles.remove(p)) @@ -71,7 +71,7 @@ const bool CProfileMgr::remove } const bool CProfileMgr::remove - ( const QString& profile) { + ( const TQString& profile) { bool ret = false; for (CProfile* p = m_profiles.first(); p; p = m_profiles.next()) { if (p->name() == profile) { @@ -84,7 +84,7 @@ const bool CProfileMgr::remove } /** Returns the profile with the desired name. If there's no such profile 0 is returned. */ -CProfile* CProfileMgr::profile(const QString& name) { +CProfile* CProfileMgr::profile(const TQString& name) { for (m_profiles.first(); m_profiles.current(); m_profiles.next()) { if (m_profiles.current()->name() == name) { return m_profiles.current(); @@ -97,7 +97,7 @@ CProfile* CProfileMgr::profile(const QString& name) { /** Returns the startup profile if it exists, otherwise return 0. */ CProfile* CProfileMgr::startupProfile() { if (!m_startupProfile) { - m_startupProfile = new CProfile(QString::null, "_startup_"); + m_startupProfile = new CProfile(TQString::null, "_startup_"); } return m_startupProfile; @@ -106,9 +106,9 @@ CProfile* CProfileMgr::startupProfile() { /** Refreshes the profiles available on disk. Use this function to update the list of profiles after another instance of CProfileMgr created a new profile. */ void CProfileMgr::refresh() { m_profiles.clear(); //delete all profiles - QDir d( m_profilePath ); - QStringList files = d.entryList("*.xml"); - for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it ) { + TQDir d( m_profilePath ); + TQStringList files = d.entryList("*.xml"); + for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { CProfile p(m_profilePath + *it); if (p.name() == "_startup_") { //new startup profile if (!m_startupProfile) { //don't put this in the if clause above,it doesn't work! |