diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
commit | 8155225c9be993acc0512956416d195edfef4eb9 (patch) | |
tree | de4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kcontrol/info | |
parent | 364641b8e0279758d236af39abd138d379328a19 (diff) | |
download | tdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip |
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/info')
-rw-r--r-- | kcontrol/info/info.cpp | 16 | ||||
-rw-r--r-- | kcontrol/info/info.h | 4 | ||||
-rw-r--r-- | kcontrol/info/info_fbsd.cpp | 26 | ||||
-rw-r--r-- | kcontrol/info/info_linux.cpp | 14 | ||||
-rw-r--r-- | kcontrol/info/info_netbsd.cpp | 22 | ||||
-rw-r--r-- | kcontrol/info/info_openbsd.cpp | 12 | ||||
-rw-r--r-- | kcontrol/info/info_solaris.cpp | 4 | ||||
-rw-r--r-- | kcontrol/info/info_svr4.cpp | 4 | ||||
-rw-r--r-- | kcontrol/info/memory.cpp | 12 | ||||
-rw-r--r-- | kcontrol/info/opengl.cpp | 10 |
10 files changed, 62 insertions, 62 deletions
diff --git a/kcontrol/info/info.cpp b/kcontrol/info/info.cpp index 770b2cdf3..54f0bdf86 100644 --- a/kcontrol/info/info.cpp +++ b/kcontrol/info/info.cpp @@ -80,7 +80,7 @@ static const TQString HexStr(unsigned long val, int digits ) { TQString hexstr; int i; - hexstr = TQString::fromLatin1("0x%1").arg(val, digits, 16/*=HEX*/); + hexstr = TQString::tqfromLatin1("0x%1").arg(val, digits, 16/*=HEX*/); for (i=hexstr.length()-1; i>0; --i) if (hexstr[i]==' ') hexstr[i] = '0'; @@ -167,7 +167,7 @@ static TQListViewItem* XServer_fill_screen_info( TQListViewItem *lBox, TQListVie for (i = 0; i < ndepths; i++) { txt = txt + Value(depths[i]); if (i < ndepths - 1) - txt = txt + TQString::fromLatin1(", "); + txt = txt + TQString::tqfromLatin1(", "); } last = new TQListViewItem(item, last, i18n("Depths (%1)").arg(ndepths,-1), txt); @@ -204,7 +204,7 @@ static TQListViewItem* XServer_fill_screen_info( TQListViewItem *lBox, TQListVie &width, &height); last = new TQListViewItem(item, last, i18n("Largest Cursor"), (width == 65535 && height == 65535) - ? i18n("unlimited") : TQString::fromLatin1("%1 x %2").arg(width).arg(height)); + ? i18n("unlimited") : TQString::tqfromLatin1("%1 x %2").arg(width).arg(height)); last = new TQListViewItem(item, last, i18n("Current Input Event Mask"), HexStr((unsigned long)EventMaskOfScreen(s),HEXDIGITS)); @@ -272,12 +272,12 @@ static bool GetInfo_XServer_Generic( TQListView *lBox ) last = new TQListViewItem(next, i18n("Name of the Display"), DisplayString(dpy)); - last = new TQListViewItem(next, last, i18n("Vendor String"), TQString::fromLatin1(ServerVendor(dpy))); + last = new TQListViewItem(next, last, i18n("Vendor String"), TQString::tqfromLatin1(ServerVendor(dpy))); last = new TQListViewItem(next, last, i18n("Vendor Release Number"), Value((int)VendorRelease(dpy))); last = new TQListViewItem(next, last, i18n("Version Number"), - TQString::fromLatin1("%1.%2").arg((int)ProtocolVersion(dpy)) + TQString::tqfromLatin1("%1.%2").arg((int)ProtocolVersion(dpy)) .arg((int)ProtocolRevision(dpy))); last = item = new TQListViewItem(next, last, i18n("Available Screens")); @@ -294,7 +294,7 @@ static bool GetInfo_XServer_Generic( TQListView *lBox ) int extCount; char **extensions = XListExtensions( dpy, &extCount ); for ( i = 0; i < extCount; i++ ) { - item = new TQListViewItem( last, item, TQString::fromLatin1( extensions[i] ) ); + item = new TQListViewItem( last, item, TQString::tqfromLatin1( extensions[i] ) ); } XFreeExtensionList( extensions ); @@ -356,7 +356,7 @@ void KInfoListWidget::load() retrieve-function. If the function wants the widget to show another string, then it change *GetInfo_ErrorString ! */ ErrorString = i18n("No information available about %1.").arg(title) - + TQString::fromLatin1("\n\n") + DEFAULT_ERRORSTRING; + + TQString::tqfromLatin1("\n\n") + DEFAULT_ERRORSTRING; GetInfo_ErrorString = &ErrorString; /* save the address of ErrorString */ sorting_allowed = true; /* the functions may set that */ @@ -425,7 +425,7 @@ KInfoListWidget::KInfoListWidget(const TQString &_title, TQWidget *parent, const TQWhatsThis::add( lBox, i18n( "This list displays system information on the selected category." ) ); NoInfoText = new TQLabel(widgetStack); widgetStack->addWidget(NoInfoText, 1); - NoInfoText->setAlignment(AlignCenter | WordBreak); + NoInfoText->tqsetAlignment(AlignCenter | WordBreak); widgetStack->raiseWidget(NoInfoText); load(); } diff --git a/kcontrol/info/info.h b/kcontrol/info/info.h index 723d35df5..80f200d2a 100644 --- a/kcontrol/info/info.h +++ b/kcontrol/info/info.h @@ -45,8 +45,8 @@ private: bool (*getlistbox) (TQListView *); TQString title; - QLabel *NoInfoText; - QString ErrorString; + TQLabel *NoInfoText; + TQString ErrorString; TQWidgetStack *widgetStack; }; diff --git a/kcontrol/info/info_fbsd.cpp b/kcontrol/info/info_fbsd.cpp index 3ccd1c086..3f67b4b7a 100644 --- a/kcontrol/info/info_fbsd.cpp +++ b/kcontrol/info/info_fbsd.cpp @@ -347,24 +347,24 @@ bool GetInfo_Devices (TQListView *lbox) TQString GetController(const TQString &line) { - if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.find(":") < 6) ) { + if ( ( (line.startsWith("ad")) || (line.startsWith("afd")) || (line.startsWith("acd")) ) && (line.tqfind(":") < 6) ) { 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()); + controller.remove(0, controller.tqfind(" at ")+4); + if (controller.tqfind("-slave") != -1) { + controller.remove(controller.tqfind("-slave"), controller.length()); + } else if (controller.tqfind("-master") != -1) { + controller.remove(controller.tqfind("-master"), controller.length()); } else controller=TQString::null; if (!controller.isNull()) return controller; } - if (line.find(" on ") != -1) { + if (line.tqfind(" on ") != -1) { TQString controller; controller = line; - controller.remove(0, controller.find(" on ")+4); - if (controller.find(" ") != -1) - controller.remove(controller.find(" "), controller.length()); + controller.remove(0, controller.tqfind(" on ")+4); + if (controller.tqfind(" ") != -1) + controller.remove(controller.tqfind(" "), controller.length()); return controller; } return TQString::null; @@ -373,13 +373,13 @@ TQString GetController(const TQString &line) Device *GetDevice(const TQString &line) { Device *dev; - int colon = line.find(":"); + int colon = line.tqfind(":"); if (colon == -1) return 0; dev = new Device; dev->name = line.mid(0, colon); - dev->description = line.mid(line.find("<")+1, line.length()); - dev->description.remove(dev->description.find(">"), dev->description.length()); + dev->description = line.mid(line.tqfind("<")+1, line.length()); + dev->description.remove(dev->description.tqfind(">"), dev->description.length()); return dev; } diff --git a/kcontrol/info/info_linux.cpp b/kcontrol/info/info_linux.cpp index 18287c45f..196029781 100644 --- a/kcontrol/info/info_linux.cpp +++ b/kcontrol/info/info_linux.cpp @@ -109,7 +109,7 @@ bool GetInfo_ReadfromFile(TQListView * lbox, const char *FileName, line = stream.readLine(); if (!line.isEmpty()) { if (!splitChar.isNull()) { - int pos = line.find(splitChar); + int pos = line.tqfind(splitChar); s1 = line.left(pos-1).stripWhiteSpace(); s2 = line.mid(pos+1).stripWhiteSpace(); } @@ -228,11 +228,11 @@ bool GetInfo_Devices(TQListView * lBox) while (!stream.atEnd()) { line = stream.readLine(); if (!line.isEmpty()) { - if (-1 != line.find("character device",0,false)) { + if (-1 != line.tqfind("character device",0,false)) { parent = new TQListViewItem(lBox,parent,i18n("Character Devices")); parent->setPixmap(0,SmallIcon("chardevice")); parent->setOpen(true); - } else if (-1 != line.find("block device",0,false)) { + } else if (-1 != line.tqfind("block device",0,false)) { parent = new TQListViewItem(lBox,parent,i18n("Block Devices")); parent->setPixmap(0,SmallIcon("blockdevice")); parent->setOpen(true); @@ -293,7 +293,7 @@ static void cleanPassword(TQString & str) while (index >= 0) { - index = str.find(passwd, index, FALSE); + index = str.tqfind(passwd, index, FALSE); if (index >= 0) { index += passwd.length(); while (index < (int) str.length() && @@ -473,7 +473,7 @@ bool GetInfo_Partitions(TQListView * lbox) while (file->readLine(buf, sizeof( buf )) > 0) { str = TQString::fromLocal8Bit(buf); if (str.length()) { - int p = str.find(' '); /* find first space. */ + int p = str.tqfind(' '); /* find first space. */ if (p) str.remove(p, 1024); /* erase all chars including space. */ Mounted_Partitions.append(str); @@ -503,7 +503,7 @@ bool GetInfo_Partitions(TQListView * lbox) #endif { total = avail = 0; /* initialize size.. */ - found_in_List = (Mounted_Partitions.contains(FS_NAME) > 0); + found_in_List = (Mounted_Partitions.tqcontains(FS_NAME) > 0); if (found_in_List && statfs(FS_FILE, &sfs) == 0) { total = ((LONG_TYPE) sfs.f_blocks) * sfs.f_bsize; avail = (getuid()? sfs.f_bavail : sfs.f_bfree) @@ -573,7 +573,7 @@ bool GetInfo_CD_ROM(TQListView * lBox) if (-1 != rx.search(line)) { TQString text = rx.cap(1); TQString value = rx.cap(2); - if (!text.contains('#')) { + if (!text.tqcontains('#')) { if (value == "0") value = KStdGuiItem::no().plainText(); if (value == "1") diff --git a/kcontrol/info/info_netbsd.cpp b/kcontrol/info/info_netbsd.cpp index 02fd98b1d..8eb9acf2e 100644 --- a/kcontrol/info/info_netbsd.cpp +++ b/kcontrol/info/info_netbsd.cpp @@ -125,18 +125,18 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter, TQListViewItem *olditem = NULL; while(!(s = t->readLine().local8Bit()).isEmpty()) { if (!seencpu) { - if (s.contains("cpu")) + if (s.tqcontains("cpu")) seencpu = true; else continue; } - if (s.contains("boot device") || - s.contains("WARNING: old BSD partition ID!")) + if (s.tqcontains("boot device") || + s.tqcontains("WARNING: old BSD partition ID!")) break; if (!filter - || (filter[0] == '^' && s.find(&filter[1]) == 0) - || (filter[0] != '^' && s.contains(filter))) { + || (filter[0] == '^' && s.tqfind(&filter[1]) == 0) + || (filter[0] != '^' && s.tqcontains(filter))) { if (func) func(lBox, s); else @@ -163,7 +163,7 @@ AddIRQLine(TQListView *lBox, TQString s) int pos, irqnum; char numstr[3]; - pos = s.find(" irq "); + pos = s.tqfind(" irq "); irqnum = (pos < 0) ? 0 : atoi(&s.ascii()[pos+5]); if (irqnum) snprintf(numstr, 3, "%02d", irqnum); @@ -221,7 +221,7 @@ bool GetInfo_Sound (TQListView *lbox) s = lvitem->text(0); // The autoconf message is in form 'audio0 at auvia0: ...' - if (s.find("audio") == 0 && (pos = s.find(" at ")) > 0) { + if (s.tqfind("audio") == 0 && (pos = s.tqfind(" at ")) > 0) { pos += 4; // skip " at " start = s.ascii() + pos; len = (int) strcspn(start, ":\n\t "); @@ -253,7 +253,7 @@ bool GetInfo_SCSI (TQListView *lbox) for(; lvitem; lvitem = lvitem->nextSibling()) { TQString s = lvitem->text(0); - if (s.contains("seconds for devices to settle")) { + if (s.tqcontains("seconds for devices to settle")) { lbox->removeItem(lvitem); break; } @@ -296,18 +296,18 @@ bool GetInfo_Partitions (TQListView *lbox) // convert to strings vv[0] = KIO::convertSize(big[0]); - vv[1] = TQString::fromLatin1("%1 (%2%%)") + vv[1] = TQString::tqfromLatin1("%1 (%2%%)") .arg(KIO::convertSize(big[1])) .arg(mnt->f_blocks ? mnt->f_bavail*100/mnt->f_blocks : 0); // FIXME: these two are large enough to punctuate vv[2] = TQString::number(mnt->f_files); - vv[3] = TQString::fromLatin1("%1 (%2%%) ") + vv[3] = TQString::tqfromLatin1("%1 (%2%%) ") .arg(mnt->f_ffree) .arg(mnt->f_files ? mnt->f_ffree*100/mnt->f_files : 0); vv[4] = TQString::null; -#define MNTF(x) if (mnt->f_flags & MNT_##x) vv[4] += TQString::fromLatin1(#x " "); +#define MNTF(x) if (mnt->f_flags & MNT_##x) vv[4] += TQString::tqfromLatin1(#x " "); MNTF(ASYNC) MNTF(DEFEXPORTED) MNTF(EXKERB) diff --git a/kcontrol/info/info_openbsd.cpp b/kcontrol/info/info_openbsd.cpp index 12ec8ee2d..6a68e33cb 100644 --- a/kcontrol/info/info_openbsd.cpp +++ b/kcontrol/info/info_openbsd.cpp @@ -122,16 +122,16 @@ static bool GetDmesgInfo(TQListView *lBox, const char *filter, TQListViewItem *olditem = NULL; while(!(s = t->readLine()).isNull()) { if (!seencpu) { - if (s.contains("cpu")) + if (s.tqcontains("cpu")) seencpu = true; else continue; } - if (s.contains("boot device") || - s.contains("WARNING: old BSD partition ID!")) + if (s.tqcontains("boot device") || + s.tqcontains("WARNING: old BSD partition ID!")) break; - if (!filter || s.contains(filter)) { + if (!filter || s.tqcontains(filter)) { if (func) { func(lBox, s, &opaque, false); } @@ -180,7 +180,7 @@ void AddIRQLine(TQListView *lBox, TQString s, void **opaque, bool ending) return; } - pos = s.find(" irq "); + pos = s.tqfind(" irq "); irqnum = (pos < 0) ? 0 : atoi(&p[pos+5]); if (irqnum) { s.sprintf("%02d%s", irqnum, p); @@ -232,7 +232,7 @@ bool GetInfo_Sound (TQListView *lbox) char *dev; s = lvitem->text(0); - if ((pos = s.find("at ")) >= 0) { + if ((pos = s.tqfind("at ")) >= 0) { pos += 3; // skip "at " start = end = s.ascii(); for(; (*end!=':') && (*end!='\n'); end++); diff --git a/kcontrol/info/info_solaris.cpp b/kcontrol/info/info_solaris.cpp index 9f2b17e1b..6dd215f55 100644 --- a/kcontrol/info/info_solaris.cpp +++ b/kcontrol/info/info_solaris.cpp @@ -184,10 +184,10 @@ bool GetInfo_Partitions( TQListView *lBox ) { lBox->addColumn( i18n( "Mount Point" )); lBox->addColumn( i18n( "FS Type" )); lBox->addColumn( i18n( "Total Size" )); - // XXX: FIXME: how do I set column alignment correctly? + // XXX: FIXME: how do I set column tqalignment correctly? lBox->setColumnAlignment( 3, 2 ); lBox->addColumn( i18n( "Free Size" )); - // XXX: FIXME: how do I set column alignment correctly? + // XXX: FIXME: how do I set column tqalignment correctly? lBox->setColumnAlignment( 4, 2 ); lBox->addColumn( i18n( "Mount Time" )); lBox->addColumn( i18n( "Mount Options" )); diff --git a/kcontrol/info/info_svr4.cpp b/kcontrol/info/info_svr4.cpp index ba491a50e..1f71246b7 100644 --- a/kcontrol/info/info_svr4.cpp +++ b/kcontrol/info/info_svr4.cpp @@ -55,9 +55,9 @@ bool GetInfo_ReadfromFile( TQListView *lBox, char *Name, char splitchar ) } TQString s1 = TQString::fromLocal8Bit(buf); - TQString s2 = s1.mid(s1.find(splitchar)+1); + TQString s2 = s1.mid(s1.tqfind(splitchar)+1); - s1.truncate(s1.find(splitchar)); + s1.truncate(s1.tqfind(splitchar)); if(!(s1.isEmpty() || s2.isEmpty())) olditem = new TQListViewItem(lBox, olditem, s1, s2); } diff --git a/kcontrol/info/memory.cpp b/kcontrol/info/memory.cpp index 7bfe52948..cd7c9b010 100644 --- a/kcontrol/info/memory.cpp +++ b/kcontrol/info/memory.cpp @@ -163,7 +163,7 @@ KMemoryWidget::KMemoryWidget(TQWidget * parent, const char *name) break; }; Widget = new TQLabel(title, this); - Widget->setAlignment(AlignLeft); + Widget->tqsetAlignment(AlignLeft); vbox->addWidget(Widget, 1); } @@ -174,7 +174,7 @@ KMemoryWidget::KMemoryWidget(TQWidget * parent, const char *name) if (i == SWAP_MEM) vbox->addSpacing(SPACING); Widget = new TQLabel(this); - Widget->setAlignment(AlignRight); + Widget->tqsetAlignment(AlignRight); MemSizeLabel[i][j] = Widget; vbox->addWidget(Widget, 1); } @@ -228,7 +228,7 @@ KMemoryWidget::KMemoryWidget(TQWidget * parent, const char *name) hint = "<qt>" + hint + "</qt>"; Widget = new TQLabel("<b>" + title + "</b>", this); - Widget->setAlignment(AlignCenter); + Widget->tqsetAlignment(AlignCenter); TQToolTip::add(Widget, hint); vbox->addWidget(Widget); vbox->addSpacing(SPACING / 2); @@ -243,7 +243,7 @@ KMemoryWidget::KMemoryWidget(TQWidget * parent, const char *name) vbox->addSpacing(SPACING / 2); Widget = new TQLabel(this); /* xx MB used. */ - Widget->setAlignment(AlignCenter); + Widget->tqsetAlignment(AlignCenter); TQToolTip::add(Widget, hint); GraphLabel[i] = Widget; vbox->addWidget(Widget); @@ -288,7 +288,7 @@ bool KMemoryWidget::Display_Graph(int widgetindex, TQPixmap pm(width, height); TQPainter paint; - paint.begin(&pm, this); + paint.tqbegin(&pm, this); TQPen pen(TQColor(0, 0, 0)); @@ -342,7 +342,7 @@ bool KMemoryWidget::Display_Graph(int widgetindex, /* draw surrounding box */ paint.setPen(pen); TQRect r = graph->rect(); - qDrawShadePanel(&paint, r.x(), r.y(), r.width(), r.height(), palette().active(), true, 1); + qDrawShadePanel(&paint, r.x(), r.y(), r.width(), r.height(), tqpalette().active(), true, 1); paint.end(); bitBlt(graph, 0, 0, &pm); diff --git a/kcontrol/info/opengl.cpp b/kcontrol/info/opengl.cpp index 061e368e6..c92d85721 100644 --- a/kcontrol/info/opengl.cpp +++ b/kcontrol/info/opengl.cpp @@ -107,7 +107,7 @@ static bool get_dri_device() TQTextStream stream(&file); TQString line = stream.readLine(); if (!line.isEmpty()) { - dri_info.module = line.mid(0, line.find(0x20)); + dri_info.module = line.mid(0, line.tqfind(0x20)); // possible formats, for regression testing // line = " PCI:01:00:0"; @@ -115,8 +115,8 @@ static bool get_dri_device() TQRegExp rx = TQRegExp("\\b[Pp][Cc][Ii][:]([0-9a-fA-F]+[:])?([0-9a-fA-F]+[:][0-9a-fA-F]+[:.][0-9a-fA-F]+)\\b"); if (rx.search(line)>0) { dri_info.pci = rx.cap(2); - int end = dri_info.pci.findRev(':'); - int end2 = dri_info.pci.findRev('.'); + int end = dri_info.pci.tqfindRev(':'); + int end2 = dri_info.pci.tqfindRev('.'); if (end2>end) end=end2; dri_info.pci[end]='.'; @@ -151,7 +151,7 @@ static bool get_dri_device() { TQStringList pci_info; if (ReadPipe("sysctl -n hw.dri.0.name",pci_info)) { - dri_info.module = pci_info[0].mid(0, pci_info[0].find(0x20)); + dri_info.module = pci_info[0].mid(0, pci_info[0].tqfind(0x20)); } return false; } @@ -194,7 +194,7 @@ print_extension_list(const char *ext, TQListViewItem *l1) if (!ext || !ext[0]) return; - TQString qext = TQString::fromLatin1(ext); + TQString qext = TQString::tqfromLatin1(ext); TQListViewItem *l2 = NULL; i = j = 0; |