summaryrefslogtreecommitdiffstats
path: root/kdf/disks.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
commita2277b6bc715464e83882b90c2a058139b8a6b54 (patch)
treeab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /kdf/disks.cpp
parentd3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff)
downloadtdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz
tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdf/disks.cpp')
-rw-r--r--kdf/disks.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kdf/disks.cpp b/kdf/disks.cpp
index ca8f263..0ae7c2b 100644
--- a/kdf/disks.cpp
+++ b/kdf/disks.cpp
@@ -3,7 +3,7 @@
*
* Copyright (c) 1998 Michael Kropfberger <michael.kropfberger@gmx.net>
*
- * Requires the Qt widget libraries, available at no cost at
+ * Requires the TQt widget libraries, available at no cost at
* http://www.troll.no/
*
* This program is free software; you can redistribute it and/or modify
@@ -65,14 +65,14 @@ void DiskEntry::init()
}
-DiskEntry::DiskEntry(TQObject *parent, const char *name)
- : TQObject (parent, name)
+DiskEntry::DiskEntry(TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name)
{
init();
}
-DiskEntry::DiskEntry(const TQString & deviceName, TQObject *parent, const char *name)
- : TQObject (parent, name)
+DiskEntry::DiskEntry(const TQString & deviceName, TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name)
{
init();
@@ -104,13 +104,13 @@ int DiskEntry::mount()
{
// FreeBSD's mount(8) is picky: -o _must_ go before
// the device and mountpoint.
- cmdS=TQString::fromLatin1("mount -t%t -o%o %d %m");
+ cmdS=TQString::tqfromLatin1("mount -t%t -o%o %d %m");
}
- cmdS.replace(TQString::fromLatin1("%d"),deviceName());
- cmdS.replace(TQString::fromLatin1("%m"),mountPoint());
- cmdS.replace(TQString::fromLatin1("%t"),fsType());
- cmdS.replace(TQString::fromLatin1("%o"),mountOptions());
+ cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName());
+ cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint());
+ cmdS.tqreplace(TQString::tqfromLatin1("%t"),fsType());
+ cmdS.tqreplace(TQString::tqfromLatin1("%o"),mountOptions());
kdDebug() << "mount-cmd: [" << cmdS << "]" << endl;
int e=sysCall(cmdS);
@@ -126,8 +126,8 @@ int DiskEntry::umount()
if (cmdS.isEmpty()) // generate default umount cmd
cmdS="umount %d";
- cmdS.replace(TQString::fromLatin1("%d"),deviceName());
- cmdS.replace(TQString::fromLatin1("%m"),mountPoint());
+ cmdS.tqreplace(TQString::tqfromLatin1("%d"),deviceName());
+ cmdS.tqreplace(TQString::tqfromLatin1("%m"),mountPoint());
kdDebug() << "umount-cmd: [" << cmdS << "]" << endl;
int e=sysCall(cmdS);
@@ -193,23 +193,23 @@ TQString DiskEntry::guessIconName()
{
TQString iconName;
// try to be intelligent
- if (-1!=mountPoint().find("cdrom",0,FALSE)) iconName+="cdrom";
- else if (-1!=deviceName().find("cdrom",0,FALSE)) iconName+="cdrom";
- else if (-1!=mountPoint().find("writer",0,FALSE)) iconName+="cdwriter";
- else if (-1!=deviceName().find("writer",0,FALSE)) iconName+="cdwriter";
- else if (-1!=mountPoint().find("mo",0,FALSE)) iconName+="mo";
- else if (-1!=deviceName().find("mo",0,FALSE)) iconName+="mo";
- else if (-1!=deviceName().find("fd",0,FALSE)) {
- if (-1!=deviceName().find("360",0,FALSE)) iconName+="5floppy";
- if (-1!=deviceName().find("1200",0,FALSE)) iconName+="5floppy";
+ if (-1!=mountPoint().tqfind("cdrom",0,FALSE)) iconName+="cdrom";
+ else if (-1!=deviceName().tqfind("cdrom",0,FALSE)) iconName+="cdrom";
+ else if (-1!=mountPoint().tqfind("writer",0,FALSE)) iconName+="cdwriter";
+ else if (-1!=deviceName().tqfind("writer",0,FALSE)) iconName+="cdwriter";
+ else if (-1!=mountPoint().tqfind("mo",0,FALSE)) iconName+="mo";
+ else if (-1!=deviceName().tqfind("mo",0,FALSE)) iconName+="mo";
+ else if (-1!=deviceName().tqfind("fd",0,FALSE)) {
+ if (-1!=deviceName().tqfind("360",0,FALSE)) iconName+="5floppy";
+ if (-1!=deviceName().tqfind("1200",0,FALSE)) iconName+="5floppy";
else iconName+="3floppy";
}
- else if (-1!=mountPoint().find("floppy",0,FALSE)) iconName+="3floppy";
- else if (-1!=mountPoint().find("zip",0,FALSE)) iconName+="zip";
- else if (-1!=fsType().find("nfs",0,FALSE)) iconName+="nfs";
+ else if (-1!=mountPoint().tqfind("floppy",0,FALSE)) iconName+="3floppy";
+ else if (-1!=mountPoint().tqfind("zip",0,FALSE)) iconName+="zip";
+ else if (-1!=fsType().tqfind("nfs",0,FALSE)) iconName+="nfs";
else iconName+="hdd";
mounted() ? iconName+="_mount" : iconName+="_unmount";
-// if ( -1==mountOptions().find("user",0,FALSE) )
+// if ( -1==mountOptions().tqfind("user",0,FALSE) )
// iconName.prepend("root_"); // special root icon, normal user canīt mount
//debug("device %s is %s",deviceName().latin1(),iconName.latin1());
@@ -226,11 +226,11 @@ int DiskEntry::sysCall(const TQString & command)
{
if (readingSysStdErrOut || sysProc->isRunning() ) return -1;
- sysStringErrOut=i18n("Called: %1\n\n").arg(command); // put the called command on ErrOut
+ sysStringErrOut=i18n("Called: %1\n\n").tqarg(command); // put the called command on ErrOut
sysProc->clearArguments();
(*sysProc) << command;
if (!sysProc->start( KProcess::Block, KProcess::AllOutput ))
- kdFatal() << i18n("could not execute %1").arg(command.local8Bit().data()) << endl;
+ kdFatal() << i18n("could not execute %1").tqarg(command.local8Bit().data()) << endl;
if (sysProc->exitStatus()!=0) emit sysCallError(this, sysProc->exitStatus());