diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:33:34 +0000 |
commit | c663b6440964f6ac48027143ac9e63298991f9d0 (patch) | |
tree | 6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kioslave/media/mediamanager/removablebackend.cpp | |
parent | a061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff) | |
download | tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/media/mediamanager/removablebackend.cpp')
-rw-r--r-- | kioslave/media/mediamanager/removablebackend.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kioslave/media/mediamanager/removablebackend.cpp b/kioslave/media/mediamanager/removablebackend.cpp index ea8318ecf..f307ee2f8 100644 --- a/kioslave/media/mediamanager/removablebackend.cpp +++ b/kioslave/media/mediamanager/removablebackend.cpp @@ -33,19 +33,19 @@ RemovableBackend::RemovableBackend(MediaList &list) - : QObject(), BackendBase(list) + : TQObject(), BackendBase(list) { KDirWatch::self()->addFile(MTAB); - connect( KDirWatch::self(), SIGNAL( dirty(const QString&) ), - this, SLOT( slotDirty(const QString&) ) ); + connect( KDirWatch::self(), TQT_SIGNAL( dirty(const TQString&) ), + this, TQT_SLOT( slotDirty(const TQString&) ) ); KDirWatch::self()->startScan(); } RemovableBackend::~RemovableBackend() { - QStringList::iterator it = m_removableIds.begin(); - QStringList::iterator end = m_removableIds.end(); + TQStringList::iterator it = m_removableIds.begin(); + TQStringList::iterator end = m_removableIds.end(); for (; it!=end; ++it) { @@ -55,25 +55,25 @@ RemovableBackend::~RemovableBackend() KDirWatch::self()->removeFile(MTAB); } -bool RemovableBackend::plug(const QString &devNode, const QString &label) +bool RemovableBackend::plug(const TQString &devNode, const TQString &label) { - QString name = generateName(devNode); - QString id = generateId(devNode); + TQString name = generateName(devNode); + TQString id = generateId(devNode); if (!m_removableIds.contains(id)) { Medium *medium = new Medium(id, name); - medium->mountableState(devNode, QString::null, - QString::null, false); + medium->mountableState(devNode, TQString::null, + TQString::null, false); - QStringList words = QStringList::split(" ", label); + TQStringList words = TQStringList::split(" ", label); - QStringList::iterator it = words.begin(); - QStringList::iterator end = words.end(); + TQStringList::iterator it = words.begin(); + TQStringList::iterator end = words.end(); - QString tmp = (*it).lower(); + TQString tmp = (*it).lower(); tmp[0] = tmp[0].upper(); - QString new_label = tmp; + TQString new_label = tmp; ++it; for (; it!=end; ++it) @@ -92,9 +92,9 @@ bool RemovableBackend::plug(const QString &devNode, const QString &label) return false; } -bool RemovableBackend::unplug(const QString &devNode) +bool RemovableBackend::unplug(const TQString &devNode) { - QString id = generateId(devNode); + TQString id = generateId(devNode); if (m_removableIds.contains(id)) { m_removableIds.remove(id); @@ -103,18 +103,18 @@ bool RemovableBackend::unplug(const QString &devNode) return false; } -bool RemovableBackend::camera(const QString &devNode) +bool RemovableBackend::camera(const TQString &devNode) { - QString id = generateId(devNode); + TQString id = generateId(devNode); if (m_removableIds.contains(id)) { return m_mediaList.changeMediumState(id, - QString("camera:/"), false, "media/gphoto2camera"); + TQString("camera:/"), false, "media/gphoto2camera"); } return false; } -void RemovableBackend::slotDirty(const QString &path) +void RemovableBackend::slotDirty(const TQString &path) { if (path==MTAB) { @@ -125,7 +125,7 @@ void RemovableBackend::slotDirty(const QString &path) void RemovableBackend::handleMtabChange() { - QStringList new_mtabIds; + TQStringList new_mtabIds; KMountPoint::List mtab = KMountPoint::currentMountPoints(); KMountPoint::List::iterator it = mtab.begin(); @@ -133,11 +133,11 @@ void RemovableBackend::handleMtabChange() for (; it!=end; ++it) { - QString dev = (*it)->mountedFrom(); - QString mp = (*it)->mountPoint(); - QString fs = (*it)->mountType(); + TQString dev = (*it)->mountedFrom(); + TQString mp = (*it)->mountPoint(); + TQString fs = (*it)->mountType(); - QString id = generateId(dev); + TQString id = generateId(dev); new_mtabIds+=id; if ( !m_mtabIds.contains(id) @@ -148,8 +148,8 @@ void RemovableBackend::handleMtabChange() } } - QStringList::iterator it2 = m_mtabIds.begin(); - QStringList::iterator end2 = m_mtabIds.end(); + TQStringList::iterator it2 = m_mtabIds.begin(); + TQStringList::iterator end2 = m_mtabIds.end(); for (; it2!=end2; ++it2) { @@ -164,15 +164,15 @@ void RemovableBackend::handleMtabChange() m_mtabIds = new_mtabIds; } -QString RemovableBackend::generateId(const QString &devNode) +TQString RemovableBackend::generateId(const TQString &devNode) { - QString dev = KStandardDirs::realFilePath(devNode); + TQString dev = KStandardDirs::realFilePath(devNode); return "/org/kde/mediamanager/removable/" +dev.replace("/", ""); } -QString RemovableBackend::generateName(const QString &devNode) +TQString RemovableBackend::generateName(const TQString &devNode) { return KURL(devNode).fileName(); } |