summaryrefslogtreecommitdiffstats
path: root/kcontrol/info/info_openbsd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/info/info_openbsd.cpp')
-rw-r--r--kcontrol/info/info_openbsd.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp
index 92995fd78..12ec8ee2d 100644
--- a/kcontrol/info/info_openbsd.cpp
+++ b/kcontrol/info/info_openbsd.cpp
@@ -35,10 +35,10 @@
#include <stdio.h> /* for NULL */
#include <stdlib.h> /* for malloc(3) */
-#include <qfile.h>
-#include <qfontmetrics.h>
-#include <qstrlist.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqfontmetrics.h>
+#include <tqstrlist.h>
+#include <tqtextstream.h>
#include <kdebug.h>
@@ -49,7 +49,7 @@ typedef struct
const char *title;
} hw_info_mib_list_t;
-bool GetInfo_CPU(QListView *lBox)
+bool GetInfo_CPU(TQListView *lBox)
{
static hw_info_mib_list_t hw_info_mib_list[]= {
{ 1, HW_MODEL, "Model" },
@@ -63,7 +63,7 @@ bool GetInfo_CPU(QListView *lBox)
int mib[2], num;
char *buf;
size_t len;
- QString value;
+ TQString value;
lBox->addColumn(i18n("Information"));
lBox->addColumn(i18n("Value"));
@@ -76,11 +76,11 @@ bool GetInfo_CPU(QListView *lBox)
sysctl(mib,2,NULL,&len,NULL,0);
if ( (buf = (char*)malloc(len)) ) {
sysctl(mib,2,buf,&len,NULL,0);
- value = QString::fromLocal8Bit(buf);
+ value = TQString::fromLocal8Bit(buf);
free(buf);
}
else {
- value = QString("Unknown");
+ value = TQString("Unknown");
}
}
else {
@@ -88,7 +88,7 @@ bool GetInfo_CPU(QListView *lBox)
sysctl(mib,2,&num,&len,NULL,0);
value.sprintf("%d", num);
}
- new QListViewItem(lBox, hw_info_mib->title, value);
+ new TQListViewItem(lBox, hw_info_mib->title, value);
}
return true;
@@ -96,30 +96,30 @@ bool GetInfo_CPU(QListView *lBox)
// this is used to find out which devices are currently
// on system
-static bool GetDmesgInfo(QListView *lBox, const char *filter,
- void func(QListView *, QString s, void **, bool))
+static bool GetDmesgInfo(TQListView *lBox, const char *filter,
+ void func(TQListView *, TQString s, void **, bool))
{
- QFile *dmesg = new QFile("/var/run/dmesg.boot");
+ TQFile *dmesg = new TQFile("/var/run/dmesg.boot");
bool usepipe=false;
FILE *pipe=NULL;
- QTextStream *t;
+ TQTextStream *t;
bool seencpu=false;
void *opaque=NULL;
- QString s;
+ TQString s;
bool found=false;
if (dmesg->exists() && dmesg->open(IO_ReadOnly)) {
- t = new QTextStream(dmesg);
+ t = new TQTextStream(dmesg);
}
else {
delete dmesg;
pipe = popen("/sbin/dmesg", "r");
if (!pipe) return false;
usepipe = true;
- t = new QTextStream(pipe, IO_ReadOnly);
+ t = new TQTextStream(pipe, IO_ReadOnly);
}
- QListViewItem *olditem = NULL;
+ TQListViewItem *olditem = NULL;
while(!(s = t->readLine()).isNull()) {
if (!seencpu) {
if (s.contains("cpu"))
@@ -136,7 +136,7 @@ static bool GetDmesgInfo(QListView *lBox, const char *filter,
func(lBox, s, &opaque, false);
}
else {
- olditem = new QListViewItem(lBox, olditem, s);
+ olditem = new TQListViewItem(lBox, olditem, s);
}
found = true;
}
@@ -159,22 +159,22 @@ static bool GetDmesgInfo(QListView *lBox, const char *filter,
}
-void AddIRQLine(QListView *lBox, QString s, void **opaque, bool ending)
+void AddIRQLine(TQListView *lBox, TQString s, void **opaque, bool ending)
{
- QStrList *strlist = (QStrList *) *opaque;
+ TQStrList *strlist = (TQStrList *) *opaque;
const char *str;
int pos, irqnum=0;
const char *p;
p = s.latin1();
if (!strlist) {
- strlist = new QStrList();
+ strlist = new TQStrList();
*opaque = (void *) strlist;
}
if (ending) {
str = strlist->first();
for(;str; str = strlist->next()) {
- new QListViewItem(lBox, str);
+ new TQListViewItem(lBox, str);
}
delete strlist;
return;
@@ -191,7 +191,7 @@ void AddIRQLine(QListView *lBox, QString s, void **opaque, bool ending)
strlist->inSort(s.latin1());
}
-bool GetInfo_IRQ (QListView *lBox)
+bool GetInfo_IRQ (TQListView *lBox)
{
lBox->addColumn(i18n("IRQ"));
lBox->addColumn(i18n("Device"));
@@ -199,34 +199,34 @@ bool GetInfo_IRQ (QListView *lBox)
return true;
}
-bool GetInfo_DMA (QListView *)
+bool GetInfo_DMA (TQListView *)
{
return false;
}
-bool GetInfo_PCI (QListView *lbox)
+bool GetInfo_PCI (TQListView *lbox)
{
if (!GetDmesgInfo(lbox, "at pci", NULL))
- new QListViewItem(lbox, i18n("No PCI devices found."));
+ new TQListViewItem(lbox, i18n("No PCI devices found."));
return true;
}
-bool GetInfo_IO_Ports (QListView *lbox)
+bool GetInfo_IO_Ports (TQListView *lbox)
{
if (!GetDmesgInfo(lbox, "port 0x", NULL))
- new QListViewItem(lbox, i18n("No I/O port devices found."));
+ new TQListViewItem(lbox, i18n("No I/O port devices found."));
return true;
}
-bool GetInfo_Sound (QListView *lbox)
+bool GetInfo_Sound (TQListView *lbox)
{
if (!GetDmesgInfo(lbox, "audio", NULL))
- new QListViewItem(lbox, i18n("No audio devices found."));
+ new TQListViewItem(lbox, i18n("No audio devices found."));
// append information on any audio devices found
- QListViewItem *lvitem = lbox->firstChild();
+ TQListViewItem *lvitem = lbox->firstChild();
for(; lvitem; lvitem = lvitem->nextSibling()) {
- QString s;
+ TQString s;
int pos, len;
const char *start, *end;
char *dev;
@@ -250,39 +250,39 @@ bool GetInfo_Sound (QListView *lbox)
return true;
}
-bool GetInfo_Devices (QListView *lBox)
+bool GetInfo_Devices (TQListView *lBox)
{
(void) GetDmesgInfo(lBox, NULL, NULL);
return true;
}
-bool GetInfo_SCSI (QListView *lbox)
+bool GetInfo_SCSI (TQListView *lbox)
{
if (!GetDmesgInfo(lbox, "scsibus", NULL))
- new QListViewItem(lbox, i18n("No SCSI devices found."));
+ new TQListViewItem(lbox, i18n("No SCSI devices found."));
return true;
}
-bool GetInfo_Partitions (QListView *lbox)
+bool GetInfo_Partitions (TQListView *lbox)
{
- QString s;
+ TQString s;
char *line, *orig_line;
const char *device, *mountpoint, *type, *flags;
FILE *pipe = popen("/sbin/mount", "r");
- QTextStream *t;
+ TQTextStream *t;
if (!pipe) {
kdError(0) << i18n("Unable to run /sbin/mount.") << endl;
return false;
}
- t = new QTextStream(pipe, IO_ReadOnly);
+ t = new TQTextStream(pipe, IO_ReadOnly);
lbox->addColumn(i18n("Device"));
lbox->addColumn(i18n("Mount Point"));
lbox->addColumn(i18n("FS Type"));
lbox->addColumn(i18n("Mount Options"));
- QListViewItem *olditem = 0;
+ TQListViewItem *olditem = 0;
while (!(s = t->readLine()).isNull()) {
orig_line = line = strdup(s.latin1());
@@ -296,7 +296,7 @@ bool GetInfo_Partitions (QListView *lbox)
flags = line;
- olditem = new QListViewItem(lbox, olditem, device, mountpoint,
+ olditem = new TQListViewItem(lbox, olditem, device, mountpoint,
type, flags);
free(orig_line);
@@ -307,7 +307,7 @@ 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 );
}