summaryrefslogtreecommitdiffstats
path: root/kioslave/media/mediamanager
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit9a3f0aacd44fb866833ebcb852df3cd31475cb33 (patch)
tree9f699684624f4e78e13e7dd2393a103cc6fa8274 /kioslave/media/mediamanager
parent341ad02235b9c85cd31782225181ed475b74eaa3 (diff)
downloadtdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.tar.gz
tdebase-9a3f0aacd44fb866833ebcb852df3cd31475cb33.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/media/mediamanager')
-rw-r--r--kioslave/media/mediamanager/fstabbackend.cpp80
-rw-r--r--kioslave/media/mediamanager/halbackend.cpp40
-rw-r--r--kioslave/media/mediamanager/linuxcdpolling.cpp16
-rw-r--r--kioslave/media/mediamanager/medialist.cpp22
-rw-r--r--kioslave/media/mediamanager/removablebackend.cpp16
5 files changed, 87 insertions, 87 deletions
diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp
index 71dbdb1f0..189f52aee 100644
--- a/kioslave/media/mediamanager/fstabbackend.cpp
+++ b/kioslave/media/mediamanager/fstabbackend.cpp
@@ -137,24 +137,24 @@ bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly)
|| mount->mountType() == "fdescfs"
|| mount->mountType() == "kernfs"
|| mount->mountType() == "usbfs"
- || mount->mountType().tqcontains( "proc" )
+ || mount->mountType().contains( "proc" )
|| mount->mountType() == "unknown"
|| mount->mountType() == "none"
|| mount->mountType() == "sunrpc"
|| mount->mountedFrom() == "none"
|| mount->mountedFrom() == "tmpfs"
- || mount->mountedFrom().tqfind("shm") != -1
+ || mount->mountedFrom().find("shm") != -1
|| mount->mountPoint() == "/dev/swap"
|| mount->mountPoint() == "/dev/pts"
- || mount->mountPoint().tqfind("/proc") == 0
- || mount->mountPoint().tqfind("/sys") == 0
+ || mount->mountPoint().find("/proc") == 0
+ || mount->mountPoint().find("/sys") == 0
// We might want to display only network shares
// since HAL doesn't handle them
|| ( networkSharesOnly
- && mount->mountType().tqfind( "smb" ) == -1
- && mount->mountType().tqfind( "cifs" ) == -1
- && mount->mountType().tqfind( "nfs" ) == -1
+ && mount->mountType().find( "smb" ) == -1
+ && mount->mountType().find( "cifs" ) == -1
+ && mount->mountType().find( "nfs" ) == -1
)
)
{
@@ -187,7 +187,7 @@ void FstabBackend::handleMtabChange(bool allowNotification)
nothing has changed, do not stat the mount point. Avoids
hang if network shares are stalling */
TQString mtabEntry = dev + "*" + mp + "*" + fs;
- if(m_mtabEntries.tqcontains(mtabEntry)) {
+ if(m_mtabEntries.contains(mtabEntry)) {
new_mtabIds += m_mtabEntries[mtabEntry];
continue;
}
@@ -196,7 +196,7 @@ void FstabBackend::handleMtabChange(bool allowNotification)
new_mtabIds+=id;
m_mtabEntries[mtabEntry] = id;
- if ( !m_mtabIds.tqcontains(id) && m_fstabIds.tqcontains(id) )
+ if ( !m_mtabIds.contains(id) && m_fstabIds.contains(id) )
{
TQString mime, icon, label;
guess(dev, mp, fs, true, mime, icon, label);
@@ -204,7 +204,7 @@ void FstabBackend::handleMtabChange(bool allowNotification)
mime, icon, label);
}
#if 0
- else if ( !m_mtabIds.tqcontains(id) )
+ else if ( !m_mtabIds.contains(id) )
{
TQString name = generateName(dev, fs);
@@ -229,7 +229,7 @@ void FstabBackend::handleMtabChange(bool allowNotification)
for (; it2!=end2; ++it2)
{
- if ( !new_mtabIds.tqcontains(*it2) && m_fstabIds.tqcontains(*it2) )
+ if ( !new_mtabIds.contains(*it2) && m_fstabIds.contains(*it2) )
{
const Medium *medium = m_mediaList.findById(*it2);
@@ -248,7 +248,7 @@ void FstabBackend::handleMtabChange(bool allowNotification)
mime, icon, label);
}
#if 0
- else if ( !new_mtabIds.tqcontains(*it2) )
+ else if ( !new_mtabIds.contains(*it2) )
{
m_mediaList.removeMedium(*it2, allowNotification);
}
@@ -277,7 +277,7 @@ void FstabBackend::handleFstabChange(bool allowNotification)
TQString id = generateId(dev, mp);
new_fstabIds+=id;
- if ( !m_fstabIds.tqcontains(id) )
+ if ( !m_fstabIds.contains(id) )
{
TQString name = generateName(dev, fs);
@@ -301,7 +301,7 @@ void FstabBackend::handleFstabChange(bool allowNotification)
for (; it2!=end2; ++it2)
{
- if ( !new_fstabIds.tqcontains(*it2) )
+ if ( !new_fstabIds.contains(*it2) )
{
m_mediaList.removeMedium(*it2, allowNotification);
}
@@ -317,8 +317,8 @@ TQString FstabBackend::generateId(const TQString &devNode,
TQString m = KStandardDirs::realPath(mountPoint);
return "/org/kde/mediamanager/fstab/"
- +d.tqreplace("/", "")
- +m.tqreplace("/", "");
+ +d.replace("/", "")
+ +m.replace("/", "");
}
TQString FstabBackend::generateName(const TQString &devNode, const TQString &fsType)
@@ -363,7 +363,7 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint,
{
TQString buf;
m.readLine(buf, 1024);
- if(buf.tqcontains("cdrom"))
+ if(buf.contains("cdrom"))
isCd=true;
m.close();
}
@@ -387,37 +387,37 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint,
}
#endif
if ( devType == CDWRITER
- || devNode.tqfind("cdwriter")!=-1 || mountPoint.tqfind("cdwriter")!=-1
- || devNode.tqfind("cdrecorder")!=-1 || mountPoint.tqfind("cdrecorder")!=-1
- || devNode.tqfind("cdburner")!=-1 || mountPoint.tqfind("cdburner")!=-1
- || devNode.tqfind("cdrw")!=-1 || mountPoint.tqfind("cdrw")!=-1
- || devNode.tqfind("graveur")!=-1
+ || devNode.find("cdwriter")!=-1 || mountPoint.find("cdwriter")!=-1
+ || devNode.find("cdrecorder")!=-1 || mountPoint.find("cdrecorder")!=-1
+ || devNode.find("cdburner")!=-1 || mountPoint.find("cdburner")!=-1
+ || devNode.find("cdrw")!=-1 || mountPoint.find("cdrw")!=-1
+ || devNode.find("graveur")!=-1
)
{
mimeType = "media/cdwriter";
label = i18n("CD Recorder");
}
else if ( devType == DVD || devType == DVDWRITER
- || devNode.tqfind("dvd")!=-1 || mountPoint.tqfind("dvd")!=-1 )
+ || devNode.find("dvd")!=-1 || mountPoint.find("dvd")!=-1 )
{
mimeType = "media/dvd";
label = i18n("DVD");
}
else if ( devType == CD
- || devNode.tqfind("cdrom")!=-1 || mountPoint.tqfind("cdrom")!=-1
+ || devNode.find("cdrom")!=-1 || mountPoint.find("cdrom")!=-1
// LINUX SPECIFIC
- || devNode.tqfind("/dev/scd")!=-1 || devNode.tqfind("/dev/sr")!=-1
+ || devNode.find("/dev/scd")!=-1 || devNode.find("/dev/sr")!=-1
// FREEBSD SPECIFIC
- || devNode.tqfind("/acd")!=-1 || devNode.tqfind("/scd")!=-1
+ || devNode.find("/acd")!=-1 || devNode.find("/scd")!=-1
)
{
mimeType = "media/cdrom";
label = i18n("CD-ROM");
}
- else if ( devNode.tqfind("fd")!=-1 || mountPoint.tqfind("fd")!=-1
- || devNode.tqfind("floppy")!=-1 || mountPoint.tqfind("floppy")!=-1 )
+ else if ( devNode.find("fd")!=-1 || mountPoint.find("fd")!=-1
+ || devNode.find("floppy")!=-1 || mountPoint.find("floppy")!=-1 )
{
- if ( devNode.tqfind("360")!=-1 || devNode.tqfind("1200")!=-1 )
+ if ( devNode.find("360")!=-1 || devNode.find("1200")!=-1 )
{
mimeType = "media/floppy5";
}
@@ -427,32 +427,32 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint,
}
label = i18n("Floppy");
}
- else if ( mountPoint.tqfind("zip")!=-1
+ else if ( mountPoint.find("zip")!=-1
// FREEBSD SPECIFIC
- || devNode.tqfind("/afd")!=-1
+ || devNode.find("/afd")!=-1
)
{
mimeType = "media/zip";
label = i18n("Zip Disk");
}
- else if ( mountPoint.tqfind("removable")!=-1
- || mountPoint.tqfind("hotplug")!=-1
- || mountPoint.tqfind("usb")!=-1
- || mountPoint.tqfind("firewire")!=-1
- || mountPoint.tqfind("ieee1394")!=-1
- || devNode.tqfind("/usb/")!= -1
+ else if ( mountPoint.find("removable")!=-1
+ || mountPoint.find("hotplug")!=-1
+ || mountPoint.find("usb")!=-1
+ || mountPoint.find("firewire")!=-1
+ || mountPoint.find("ieee1394")!=-1
+ || devNode.find("/usb/")!= -1
)
{
mimeType = "media/removable";
label = i18n("Removable Device");
}
- else if ( fsType.tqfind("nfs")!=-1 )
+ else if ( fsType.find("nfs")!=-1 )
{
mimeType = "media/nfs";
label = i18n("Remote Share");
}
- else if ( fsType.tqfind("smb")!=-1 || fsType.tqfind("cifs")!=-1
- || devNode.tqfind("//")!=-1 )
+ else if ( fsType.find("smb")!=-1 || fsType.find("cifs")!=-1
+ || devNode.find("//")!=-1 )
{
mimeType = "media/smb";
label = i18n("Remote Share");
diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp
index d44826590..74f123c93 100644
--- a/kioslave/media/mediamanager/halbackend.cpp
+++ b/kioslave/media/mediamanager/halbackend.cpp
@@ -942,7 +942,7 @@ TQStringList HALBackend::mountoptions(const TQString &name)
result << TQString("automount=%1").arg(value ? "true" : "false");
- if (valids.tqcontains("ro"))
+ if (valids.contains("ro"))
{
value = config.readBoolEntry("ro", false);
tmp = TQString("ro=%1").arg(value ? "true" : "false");
@@ -950,7 +950,7 @@ TQStringList HALBackend::mountoptions(const TQString &name)
result << tmp;
}
- if (valids.tqcontains("quiet"))
+ if (valids.contains("quiet"))
{
value = config.readBoolEntry("quiet", false);
tmp = TQString("quiet=%1").arg(value ? "true" : "false");
@@ -958,28 +958,28 @@ TQStringList HALBackend::mountoptions(const TQString &name)
result << tmp;
}
- if (valids.tqcontains("flush"))
+ if (valids.contains("flush"))
{
value = config.readBoolEntry("flush", fstype.endsWith("fat"));
tmp = TQString("flush=%1").arg(value ? "true" : "false");
result << tmp;
}
- if (valids.tqcontains("uid"))
+ if (valids.contains("uid"))
{
value = config.readBoolEntry("uid", true);
tmp = TQString("uid=%1").arg(value ? "true" : "false");
result << tmp;
}
- if (valids.tqcontains("utf8"))
+ if (valids.contains("utf8"))
{
value = config.readBoolEntry("utf8", true);
tmp = TQString("utf8=%1").arg(value ? "true" : "false");
result << tmp;
}
- if (valids.tqcontains("shortname"))
+ if (valids.contains("shortname"))
{
TQString svalue = config.readEntry("shortname", "lower").lower();
if (svalue == "winnt")
@@ -993,7 +993,7 @@ TQStringList HALBackend::mountoptions(const TQString &name)
}
// pass our locale to the ntfs-3g driver so it can translate local characters
- if (valids.tqcontains("locale") && fstype == "ntfs-3g")
+ if (valids.contains("locale") && fstype == "ntfs-3g")
{
// have to obtain LC_CTYPE as returned by the `locale` command
// check in the same order as `locale` does
@@ -1003,15 +1003,15 @@ TQStringList HALBackend::mountoptions(const TQString &name)
}
}
- if (valids.tqcontains("sync"))
+ if (valids.contains("sync"))
{
- value = config.readBoolEntry("sync", ( valids.tqcontains("flush") && !fstype.endsWith("fat") ) && removable);
+ value = config.readBoolEntry("sync", ( valids.contains("flush") && !fstype.endsWith("fat") ) && removable);
tmp = TQString("sync=%1").arg(value ? "true" : "false");
if (fstype != "iso9660") // makes no sense
result << tmp;
}
- if (valids.tqcontains("noatime"))
+ if (valids.contains("noatime"))
{
value = config.readBoolEntry("atime", !fstype.endsWith("fat"));
tmp = TQString("atime=%1").arg(value ? "true" : "false");
@@ -1031,7 +1031,7 @@ TQStringList HALBackend::mountoptions(const TQString &name)
result << TQString("mountpoint=%1").arg(mount_point);
result << TQString("filesystem=%1").arg(fstype);
- if (valids.tqcontains("data"))
+ if (valids.contains("data"))
{
TQString svalue = config.readEntry("journaling").lower();
if (svalue == "ordered")
@@ -1058,19 +1058,19 @@ bool HALBackend::setMountoptions(const TQString &name, const TQStringList &optio
const char *names[] = { "ro", "quiet", "atime", "uid", "utf8", "flush", "sync", 0 };
for (int index = 0; names[index]; ++index)
- if (valids.tqcontains(names[index]))
+ if (valids.contains(names[index]))
config.writeEntry(names[index], valids[names[index]] == "true");
- if (valids.tqcontains("shortname"))
+ if (valids.contains("shortname"))
config.writeEntry("shortname", valids["shortname"]);
- if (valids.tqcontains("journaling"))
+ if (valids.contains("journaling"))
config.writeEntry("journaling", valids["journaling"]);
- if (!mountoptions(name).tqcontains(TQString("mountpoint=%1").arg(valids["mountpoint"])))
+ if (!mountoptions(name).contains(TQString("mountpoint=%1").arg(valids["mountpoint"])))
config.writeEntry("mountpoint", valids["mountpoint"]);
- if (valids.tqcontains("automount")) {
+ if (valids.contains("automount")) {
TQString drive_udi = libhal_device_get_property_QString(m_halContext, name.latin1(), "block.storage_device");
config.setGroup(drive_udi);
config.writeEntry("automount", valids["automount"]);
@@ -1376,7 +1376,7 @@ TQString HALBackend::isInFstab(const Medium *medium)
if ((*it)->mountedFrom() == medium->deviceNode() || ( !medium->deviceNode().isEmpty() && reald == medium->deviceNode() ) )
{
TQStringList opts = (*it)->mountOptions();
- if (opts.tqcontains("user") || opts.tqcontains("users"))
+ if (opts.contains("user") || opts.contains("users"))
return (*it)->mountPoint();
}
}
@@ -1451,17 +1451,17 @@ TQString HALBackend::mount(const Medium *medium)
if (mount_point.startsWith("/media/"))
mount_point = mount_point.mid(7);
- if (valids.tqcontains("shortname"))
+ if (valids.contains("shortname"))
{
soptions << TQString("shortname=%1").arg(valids["shortname"]);
}
- if (valids.tqcontains("locale"))
+ if (valids.contains("locale"))
{
soptions << TQString("locale=%1").arg(valids["locale"]);
}
- if (valids.tqcontains("journaling"))
+ if (valids.contains("journaling"))
{
TQString option = valids["journaling"];
if (option == "data")
diff --git a/kioslave/media/mediamanager/linuxcdpolling.cpp b/kioslave/media/mediamanager/linuxcdpolling.cpp
index 5a1359b6d..0fcda8d0f 100644
--- a/kioslave/media/mediamanager/linuxcdpolling.cpp
+++ b/kioslave/media/mediamanager/linuxcdpolling.cpp
@@ -209,14 +209,14 @@ void LinuxCDPolling::slotMediumAdded(const TQString &id)
{
kdDebug(1219) << "LinuxCDPolling::slotMediumAdded(" << id << ")" << endl;
- if (m_threads.tqcontains(id)) return;
+ if (m_threads.contains(id)) return;
const Medium *medium = m_mediaList.findById(id);
TQString mime = medium->mimeType();
kdDebug(1219) << "mime == " << mime << endl;
- if (mime.tqfind("dvd")==-1 && mime.tqfind("cd")==-1) return;
+ if (mime.find("dvd")==-1 && mime.find("cd")==-1) return;
if (!medium->isMounted())
{
@@ -234,7 +234,7 @@ void LinuxCDPolling::slotMediumRemoved(const TQString &id)
{
kdDebug(1219) << "LinuxCDPolling::slotMediumRemoved(" << id << ")" << endl;
- if (!m_threads.tqcontains(id)) return;
+ if (!m_threads.contains(id)) return;
PollingThread *thread = m_threads[id];
m_threads.remove(id);
@@ -255,9 +255,9 @@ void LinuxCDPolling::slotMediumStateChanged(const TQString &id)
TQString mime = medium->mimeType();
kdDebug(1219) << "mime == " << mime << endl;
- if (mime.tqfind("dvd")==-1 && mime.tqfind("cd")==-1) return;
+ if (mime.find("dvd")==-1 && mime.find("cd")==-1) return;
- if (!m_threads.tqcontains(id) && !medium->isMounted())
+ if (!m_threads.contains(id) && !medium->isMounted())
{
// It is just a mount state change, no need to notify
m_excludeNotification.append( id );
@@ -268,7 +268,7 @@ void LinuxCDPolling::slotMediumStateChanged(const TQString &id)
thread->start();
m_timer.start(500);
}
- else if (m_threads.tqcontains(id) && medium->isMounted())
+ else if (m_threads.contains(id) && medium->isMounted())
{
PollingThread *thread = m_threads[id];
m_threads.remove(id);
@@ -319,7 +319,7 @@ static TQString baseType(const Medium *medium)
FstabBackend::guess(devNode, mountPoint, fsType, mounted,
mimeType, iconName, label);
- if (devNode.tqfind("dvd")!=-1)
+ if (devNode.find("dvd")!=-1)
{
kdDebug(1219) << "=> dvd" << endl;
return "dvd";
@@ -360,7 +360,7 @@ void LinuxCDPolling::applyType(DiscType type, const Medium *medium)
TQString id = medium->id();
TQString dev = medium->deviceNode();
- bool notify = !m_excludeNotification.tqcontains(id);
+ bool notify = !m_excludeNotification.contains(id);
m_excludeNotification.remove(id);
switch (type)
diff --git a/kioslave/media/mediamanager/medialist.cpp b/kioslave/media/mediamanager/medialist.cpp
index 2e766bb07..bb0de6248 100644
--- a/kioslave/media/mediamanager/medialist.cpp
+++ b/kioslave/media/mediamanager/medialist.cpp
@@ -38,7 +38,7 @@ const Medium *MediaList::findById(const TQString &id) const
{
kdDebug(1219) << "MediaList::findById(" << id << ")" << endl;
- if ( !m_idMap.tqcontains(id) ) return 0L;
+ if ( !m_idMap.contains(id) ) return 0L;
return m_idMap[id];
}
@@ -47,7 +47,7 @@ const Medium *MediaList::findByName(const TQString &name) const
{
kdDebug(1219) << "MediaList::findByName(" << name << ")" << endl;
- if ( !m_nameMap.tqcontains(name) ) return 0L;
+ if ( !m_nameMap.contains(name) ) return 0L;
return m_nameMap[name];
}
@@ -70,13 +70,13 @@ TQString MediaList::addMedium(Medium *medium, bool allowNotification)
kdDebug(1219) << "MediaList::addMedium(@" << medium->id() << ")" << endl;
TQString id = medium->id();
- if ( m_idMap.tqcontains(id) ) return TQString::null;
+ if ( m_idMap.contains(id) ) return TQString::null;
m_media.append( medium );
m_idMap[id] = medium;
TQString name = medium->name();
- if ( !m_nameMap.tqcontains(name) )
+ if ( !m_nameMap.contains(name) )
{
m_nameMap[name] = medium;
@@ -90,7 +90,7 @@ TQString MediaList::addMedium(Medium *medium, bool allowNotification)
TQString base_name = name+"_";
int i = 1;
- while ( m_nameMap.tqcontains(base_name+TQString::number(i)) )
+ while ( m_nameMap.contains(base_name+TQString::number(i)) )
{
i++;
}
@@ -109,7 +109,7 @@ bool MediaList::removeMedium(const TQString &id, bool allowNotification)
{
kdDebug(1219) << "MediaList::removeMedium(" << id << ")" << endl;
- if ( !m_idMap.tqcontains(id) ) return false;
+ if ( !m_idMap.contains(id) ) return false;
Medium *medium = m_idMap[id];
TQString name = medium->name();
@@ -126,7 +126,7 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification)
{
kdDebug(1219) << "MediaList::changeMediumState(const Medium &)" << endl;
- if ( !m_idMap.tqcontains(medium.id()) ) return false;
+ if ( !m_idMap.contains(medium.id()) ) return false;
Medium *m = m_idMap[medium.id()];
@@ -177,7 +177,7 @@ bool MediaList::changeMediumState(const TQString &id,
<< baseURL << ", " << mimeType << ", " << iconName << ")"
<< endl;
- if ( !m_idMap.tqcontains(id) ) return false;
+ if ( !m_idMap.contains(id) ) return false;
Medium *medium = m_idMap[id];
@@ -218,7 +218,7 @@ bool MediaList::changeMediumState(const TQString &id,
<< mounted << ", " << mimeType << ", " << iconName << ")"
<< endl;
- if ( !m_idMap.tqcontains(id) ) return false;
+ if ( !m_idMap.contains(id) ) return false;
Medium *medium = m_idMap[id];
@@ -255,7 +255,7 @@ bool MediaList::changeMediumState(const TQString &id, bool mounted,
<< mounted << ", " << mimeType << ", " << iconName << ")"
<< endl;
- if ( !m_idMap.tqcontains(id) ) return false;
+ if ( !m_idMap.contains(id) ) return false;
Medium *medium = m_idMap[id];
@@ -287,7 +287,7 @@ bool MediaList::setUserLabel(const TQString &name, const TQString &label)
kdDebug(1219) << "MediaList::setUserLabel(" << name << ", "
<< label << ")" << endl;
- if ( !m_nameMap.tqcontains(name) ) return false;
+ if ( !m_nameMap.contains(name) ) return false;
Medium *medium = m_nameMap[name];
medium->setUserLabel(label);
diff --git a/kioslave/media/mediamanager/removablebackend.cpp b/kioslave/media/mediamanager/removablebackend.cpp
index 7db497c38..f307ee2f8 100644
--- a/kioslave/media/mediamanager/removablebackend.cpp
+++ b/kioslave/media/mediamanager/removablebackend.cpp
@@ -60,7 +60,7 @@ bool RemovableBackend::plug(const TQString &devNode, const TQString &label)
TQString name = generateName(devNode);
TQString id = generateId(devNode);
- if (!m_removableIds.tqcontains(id))
+ if (!m_removableIds.contains(id))
{
Medium *medium = new Medium(id, name);
medium->mountableState(devNode, TQString::null,
@@ -95,7 +95,7 @@ bool RemovableBackend::plug(const TQString &devNode, const TQString &label)
bool RemovableBackend::unplug(const TQString &devNode)
{
TQString id = generateId(devNode);
- if (m_removableIds.tqcontains(id))
+ if (m_removableIds.contains(id))
{
m_removableIds.remove(id);
return m_mediaList.removeMedium(id);
@@ -106,7 +106,7 @@ bool RemovableBackend::unplug(const TQString &devNode)
bool RemovableBackend::camera(const TQString &devNode)
{
TQString id = generateId(devNode);
- if (m_removableIds.tqcontains(id))
+ if (m_removableIds.contains(id))
{
return m_mediaList.changeMediumState(id,
TQString("camera:/"), false, "media/gphoto2camera");
@@ -140,8 +140,8 @@ void RemovableBackend::handleMtabChange()
TQString id = generateId(dev);
new_mtabIds+=id;
- if ( !m_mtabIds.tqcontains(id)
- && m_removableIds.tqcontains(id) )
+ if ( !m_mtabIds.contains(id)
+ && m_removableIds.contains(id) )
{
m_mediaList.changeMediumState(id, dev, mp, fs, true,
false, "media/removable_mounted");
@@ -153,8 +153,8 @@ void RemovableBackend::handleMtabChange()
for (; it2!=end2; ++it2)
{
- if ( !new_mtabIds.tqcontains(*it2)
- && m_removableIds.tqcontains(*it2) )
+ if ( !new_mtabIds.contains(*it2)
+ && m_removableIds.contains(*it2) )
{
m_mediaList.changeMediumState(*it2, false,
false, "media/removable_unmounted");
@@ -169,7 +169,7 @@ TQString RemovableBackend::generateId(const TQString &devNode)
TQString dev = KStandardDirs::realFilePath(devNode);
return "/org/kde/mediamanager/removable/"
- +dev.tqreplace("/", "");
+ +dev.replace("/", "");
}
TQString RemovableBackend::generateName(const TQString &devNode)