summaryrefslogtreecommitdiffstats
path: root/klaptopdaemon/kpcmcia.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /klaptopdaemon/kpcmcia.cpp
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klaptopdaemon/kpcmcia.cpp')
-rw-r--r--klaptopdaemon/kpcmcia.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/klaptopdaemon/kpcmcia.cpp b/klaptopdaemon/kpcmcia.cpp
index 9dec605..50d7b4c 100644
--- a/klaptopdaemon/kpcmcia.cpp
+++ b/klaptopdaemon/kpcmcia.cpp
@@ -23,9 +23,9 @@
* kardinfo Copyright 1999, Mirko Sucker <mirko.sucker@unibw-hamburg.de>
*/
-#include <qtimer.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kinstance.h>
@@ -169,13 +169,13 @@ tv.tv_sec = 0; tv.tv_usec = 0;
* Read in the stab file.
*/
if (!stat(_stabPath.latin1(), &sb) && sb.st_mtime >= _last) {
- QFile f(_stabPath.latin1());
+ TQFile f(_stabPath.latin1());
if (f.open(IO_ReadOnly)) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
bool foundit = false;
- QString _thisreg = "^Socket %1: ";
- QRegExp thisreg ( _thisreg.arg(_num) );
+ TQString _thisreg = "^Socket %1: ";
+ TQRegExp thisreg ( _thisreg.arg(_num) );
if (flock(f.handle(), LOCK_SH)) return updated;
@@ -183,7 +183,7 @@ tv.tv_sec = 0; tv.tv_usec = 0;
// find the card
while(!foundit) {
- QString s;
+ TQString s;
if (ts.eof()) break;
s = ts.readLine();
if (s.contains(thisreg)) {
@@ -196,27 +196,27 @@ tv.tv_sec = 0; tv.tv_usec = 0;
// read it in
if (foundit && !ts.eof()) { // FIXME: ts.eof() is a bad error!!
- QString s = ts.readLine();
+ TQString s = ts.readLine();
int end;
s.simplifyWhiteSpace();
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
_type = s;
_type.truncate(end);
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
_module = s;
_module.truncate(end);
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
_device = s;
_device.truncate(end);
s = s.remove(0, end+1);
@@ -366,9 +366,9 @@ KPCMCIA::KPCMCIA(int maxSlots, const char *stabpath) : _maxSlots(maxSlots),
_refreshSpeed = 750;
_haveCardServices = false;
-_timer = new QTimer(this);
-connect(_timer, SIGNAL(timeout()), this, SLOT(updateCardInfo()));
-_cards = new QMemArray<KPCMCIACard *>(_maxSlots+1);
+_timer = new TQTimer(this);
+connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateCardInfo()));
+_cards = new TQMemArray<KPCMCIACard *>(_maxSlots+1);
_cardCnt = 0;
@@ -496,19 +496,19 @@ bool KPCMCIA::haveCardServices() {
#ifdef __linux__
static int lookupDevice(const char *x) {
-QFile df("/proc/devices");
-QString thisreg;
+TQFile df("/proc/devices");
+TQString thisreg;
thisreg = "^[0-9]+ %1$";
thisreg = thisreg.arg(x);
if (df.open(IO_ReadOnly)) {
- QTextStream t(&df);
- QString s;
+ TQTextStream t(&df);
+ TQString s;
while (!t.eof()) {
s = t.readLine();
- if (s.contains(QRegExp(thisreg))) {
+ if (s.contains(TQRegExp(thisreg))) {
int n = (s.left(3).stripWhiteSpace()).toInt();
df.close();
return n;
@@ -520,8 +520,8 @@ return -1;
}
static int openDevice(dev_t dev) {
-QString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName());
-QString ext = "_socket%1";
+TQString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName());
+TQString ext = "_socket%1";
tmp_path += ext.arg((int)dev);