diff options
Diffstat (limited to 'kcontrol/info/info_fbsd.cpp')
-rw-r--r-- | kcontrol/info/info_fbsd.cpp | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/kcontrol/info/info_fbsd.cpp b/kcontrol/info/info_fbsd.cpp index 6e936801a..3ccd1c086 100644 --- a/kcontrol/info/info_fbsd.cpp +++ b/kcontrol/info/info_fbsd.cpp @@ -49,22 +49,22 @@ #include <fstab.h> #include <string.h> -#include <qdict.h> -#include <qfile.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqdict.h> +#include <tqfile.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqtextstream.h> class Device { public: - Device (QString n=QString::null, QString d=QString::null) + Device (TQString n=TQString::null, TQString d=TQString::null) {name=n; description=d;} - QString name, description; + TQString name, description; }; -void ProcessChildren(QString name); -QString GetController(const QString &line); -Device *GetDevice(const QString &line); +void ProcessChildren(TQString name); +TQString GetController(const TQString &line); +Device *GetDevice(const TQString &line); #ifdef HAVE_DEVINFO_H extern "C" { @@ -75,7 +75,7 @@ extern "C" { } #endif -bool GetInfo_CPU (QListView *lBox) +bool GetInfo_CPU (TQListView *lBox) { // Modified 13 July 2000 for SMP by Brad Hughes - bhughes@trolltech.com @@ -85,7 +85,7 @@ bool GetInfo_CPU (QListView *lBox) len = sizeof(ncpu); sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0); - QString cpustring; + TQString cpustring; for (int i = ncpu; i > 0; i--) { /* Stuff for sysctl */ char *buf; @@ -105,7 +105,7 @@ bool GetInfo_CPU (QListView *lBox) } /* Put everything in the listbox */ - new QListViewItem(lBox, cpustring); + new TQListViewItem(lBox, cpustring); /* Clean up after ourselves, this time I mean it ;-) */ delete buf; @@ -114,7 +114,7 @@ bool GetInfo_CPU (QListView *lBox) return true; } -bool GetInfo_IRQ (QListView *lbox) +bool GetInfo_IRQ (TQListView *lbox) { #ifdef HAVE_DEVINFO_H /* systat lists the interrupts assigned to devices as well as how many were @@ -131,7 +131,7 @@ bool GetInfo_IRQ (QListView *lbox) #endif } -bool GetInfo_DMA (QListView *lbox) +bool GetInfo_DMA (TQListView *lbox) { #ifdef HAVE_DEVINFO_H /* Oh neat, current now has a neat little utility called devinfo */ @@ -144,7 +144,7 @@ bool GetInfo_DMA (QListView *lbox) #endif } -bool GetInfo_IO_Ports (QListView *lbox) +bool GetInfo_IO_Ports (TQListView *lbox) { #ifdef HAVE_DEVINFO_H /* Oh neat, current now has a neat little utility called devinfo */ @@ -157,21 +157,21 @@ bool GetInfo_IO_Ports (QListView *lbox) #endif } -bool GetInfo_Sound (QListView *lbox) +bool GetInfo_Sound (TQListView *lbox) { - QFile *sndstat = new QFile("/dev/sndstat"); - QTextStream *t; - QString s; - QListViewItem *olditem = 0; + TQFile *sndstat = new TQFile("/dev/sndstat"); + TQTextStream *t; + TQString s; + TQListViewItem *olditem = 0; if (!sndstat->exists() || !sndstat->open(IO_ReadOnly)) { s = i18n("Your sound system could not be queried. /dev/sndstat does not exist or is not readable."); - olditem = new QListViewItem(lbox, olditem, s); + olditem = new TQListViewItem(lbox, olditem, s); } else { - t = new QTextStream(sndstat); + t = new TQTextStream(sndstat); while (!(s=t->readLine()).isNull()) { - olditem = new QListViewItem(lbox, olditem, s); + olditem = new TQListViewItem(lbox, olditem, s); } delete t; @@ -182,32 +182,32 @@ bool GetInfo_Sound (QListView *lbox) return true; } -bool GetInfo_SCSI (QListView *lbox) +bool GetInfo_SCSI (TQListView *lbox) { FILE *pipe; - QFile *camcontrol = new QFile("/sbin/camcontrol"); - QTextStream *t; - QString s; - QListViewItem *olditem = 0; + TQFile *camcontrol = new TQFile("/sbin/camcontrol"); + TQTextStream *t; + TQString s; + TQListViewItem *olditem = 0; if (!camcontrol->exists()) { s = i18n ("SCSI subsystem could not be queried: /sbin/camcontrol could not be found"); - olditem = new QListViewItem(lbox, olditem, s); + olditem = new TQListViewItem(lbox, olditem, s); } else if ((pipe = popen("/sbin/camcontrol devlist 2>&1", "r")) == NULL) { s = i18n ("SCSI subsystem could not be queried: /sbin/camcontrol could not be executed"); - olditem = new QListViewItem(lbox, olditem, s); + olditem = new TQListViewItem(lbox, olditem, s); } else { /* This prints out a list of all the scsi devies, perhaps eventually we could parse it as opposed to schlepping it into a listbox */ - t = new QTextStream(pipe, IO_ReadOnly); + t = new TQTextStream(pipe, IO_ReadOnly); while (true) { s = t->readLine(); if ( s.isEmpty() ) break; - olditem = new QListViewItem(lbox, olditem, s); + olditem = new TQListViewItem(lbox, olditem, s); } delete t; @@ -222,25 +222,25 @@ bool GetInfo_SCSI (QListView *lbox) return true; } -bool GetInfo_PCI (QListView *lbox) +bool GetInfo_PCI (TQListView *lbox) { FILE *pipe; - QFile *pcicontrol; - QString s, cmd; - QListViewItem *olditem = 0; + TQFile *pcicontrol; + TQString s, cmd; + TQListViewItem *olditem = 0; - pcicontrol = new QFile("/usr/sbin/pciconf"); + pcicontrol = new TQFile("/usr/sbin/pciconf"); if (!pcicontrol->exists()) { delete pcicontrol; - pcicontrol = new QFile("/usr/X11R6/bin/scanpci"); + pcicontrol = new TQFile("/usr/X11R6/bin/scanpci"); if (!pcicontrol->exists()) { delete pcicontrol; - pcicontrol = new QFile("/usr/X11R6/bin/pcitweak"); + pcicontrol = new TQFile("/usr/X11R6/bin/pcitweak"); if (!pcicontrol->exists()) { - QString s; + TQString s; s = i18n("Could not find any programs with which to query your system's PCI information"); - (void) new QListViewItem(lbox, 0, s); + (void) new TQListViewItem(lbox, 0, s); delete pcicontrol; return true; } else { @@ -256,7 +256,7 @@ bool GetInfo_PCI (QListView *lbox) if ((pipe = popen(cmd.latin1(), "r")) == NULL) { s = i18n ("PCI subsystem could not be queried: %1 could not be executed").arg(cmd); - olditem = new QListViewItem(lbox, olditem, s); + olditem = new TQListViewItem(lbox, olditem, s); } else { /* This prints out a list of all the pci devies, perhaps eventually we could @@ -268,23 +268,23 @@ bool GetInfo_PCI (QListView *lbox) if (!lbox->childCount()) { s = i18n("The PCI subsystem could not be queried, this may need root privileges."); - olditem = new QListViewItem(lbox, olditem, s); + olditem = new TQListViewItem(lbox, olditem, s); return true; } return true; } -bool GetInfo_Partitions (QListView *lbox) +bool GetInfo_Partitions (TQListView *lbox) { struct fstab *fstab_ent; if (setfsent() != 1) /* Try to open fstab */ { int s_err = errno; - QString s; + TQString s; s = i18n("Could not check filesystem info: "); s += strerror(s_err); - (void)new QListViewItem(lbox, 0, s); + (void)new TQListViewItem(lbox, 0, s); } else { lbox->addColumn(i18n("Device")); lbox->addColumn(i18n("Mount Point")); @@ -292,7 +292,7 @@ bool GetInfo_Partitions (QListView *lbox) lbox->addColumn(i18n("Mount Options")); while ((fstab_ent=getfsent())!=NULL) { - new QListViewItem(lbox, fstab_ent->fs_spec, + new TQListViewItem(lbox, fstab_ent->fs_spec, fstab_ent->fs_file, fstab_ent->fs_vfstype, fstab_ent->fs_mntops); } @@ -305,19 +305,19 @@ bool GetInfo_Partitions (QListView *lbox) return true; } -bool GetInfo_XServer_and_Video (QListView *lBox) +bool GetInfo_XServer_and_Video (TQListView *lBox) { return GetInfo_XServer_Generic( lBox ); } -bool GetInfo_Devices (QListView *lbox) +bool GetInfo_Devices (TQListView *lbox) { - QFile *f = new QFile("/var/run/dmesg.boot"); + TQFile *f = new TQFile("/var/run/dmesg.boot"); if (f->open(IO_ReadOnly)) { - QTextStream qts(f); - QDict<QListViewItem> lv_items; + TQTextStream qts(f); + TQDict<TQListViewItem> lv_items; Device *dev; - QString line, controller; + TQString line, controller; lbox->setRootIsDecorated(true); lbox->addColumn("Device"); lbox->addColumn("Description"); @@ -331,12 +331,12 @@ bool GetInfo_Devices (QListView *lbox) // Ewww assuing motherboard is the only toplevel controller is rather gross if (controller == "motherboard") { if (!lv_items[dev->name]) { - lv_items.insert(dev->name, new QListViewItem(lbox, dev->name, dev->description) ); + lv_items.insert(dev->name, new TQListViewItem(lbox, dev->name, dev->description) ); } } else { - QListViewItem *parent=lv_items[controller]; + TQListViewItem *parent=lv_items[controller]; if (parent && !lv_items[dev->name]) { - lv_items.insert(dev->name, new QListViewItem(parent, dev->name, dev->description) ); + lv_items.insert(dev->name, new TQListViewItem(parent, dev->name, dev->description) ); } } } @@ -345,32 +345,32 @@ bool GetInfo_Devices (QListView *lbox) return false; } -QString GetController(const QString &line) +TQString GetController(const TQString &line) { if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.find(":") < 6) ) { - QString controller = line; + TQString controller = line; controller.remove(0, controller.find(" at ")+4); if (controller.find("-slave") != -1) { controller.remove(controller.find("-slave"), controller.length()); } else if (controller.find("-master") != -1) { controller.remove(controller.find("-master"), controller.length()); } else - controller=QString::null; + controller=TQString::null; if (!controller.isNull()) return controller; } if (line.find(" on ") != -1) { - QString controller; + TQString controller; controller = line; controller.remove(0, controller.find(" on ")+4); if (controller.find(" ") != -1) controller.remove(controller.find(" "), controller.length()); return controller; } - return QString::null; + return TQString::null; } -Device *GetDevice(const QString &line) +Device *GetDevice(const TQString &line) { Device *dev; int colon = line.find(":"); @@ -387,9 +387,9 @@ Device *GetDevice(const QString &line) int print_irq(struct devinfo_rman *rman, void *arg) { - QListView *lbox = (QListView *)arg; + TQListView *lbox = (TQListView *)arg; if (strcmp(rman->dm_desc, "Interrupt request lines")==0) { - (void)new QListViewItem(lbox, 0, rman->dm_desc); + (void)new TQListViewItem(lbox, 0, rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); @@ -397,9 +397,9 @@ int print_irq(struct devinfo_rman *rman, void *arg) int print_dma(struct devinfo_rman *rman, void *arg) { - QListView *lbox = (QListView *)arg; + TQListView *lbox = (TQListView *)arg; if (strcmp(rman->dm_desc, "DMA request lines")==0) { - (void)new QListViewItem(lbox, lbox->lastItem(), rman->dm_desc); + (void)new TQListViewItem(lbox, lbox->lastItem(), rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); @@ -407,14 +407,14 @@ int print_dma(struct devinfo_rman *rman, void *arg) int print_ioports(struct devinfo_rman *rman, void *arg) { - QListView *lbox = (QListView *)arg; + TQListView *lbox = (TQListView *)arg; if (strcmp(rman->dm_desc, "I/O ports")==0) { - (void)new QListViewItem(lbox, lbox->lastItem(), rman->dm_desc); + (void)new TQListViewItem(lbox, lbox->lastItem(), rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } else if (strcmp(rman->dm_desc, "I/O memory addresses")==0) { - (void)new QListViewItem(lbox, lbox->lastItem(), rman->dm_desc); + (void)new TQListViewItem(lbox, lbox->lastItem(), rman->dm_desc); devinfo_foreach_rman_resource(rman, print_resource, arg); } return(0); @@ -426,11 +426,11 @@ int print_resource(struct devinfo_res *res, void *arg) struct devinfo_rman *rman; int hexmode; - QListView *lbox; + TQListView *lbox; - lbox = (QListView *)arg; + lbox = (TQListView *)arg; - QString s, tmp; + TQString s, tmp; rman = devinfo_handle_to_rman(res->dr_rman); hexmode = (rman->dm_size > 100) || (rman->dm_size == 0); @@ -450,7 +450,7 @@ int print_resource(struct devinfo_res *res, void *arg) } s += tmp; - (void)new QListViewItem(lbox, lbox->lastItem(), s); + (void)new TQListViewItem(lbox, lbox->lastItem(), s); return(0); } |