From 285e7737f47c508ee816c5a96ebfc4207dc78438 Mon Sep 17 00:00:00 2001 From: zecke Date: Thu, 28 Aug 2003 14:46:42 +0000 Subject: Use /proc/fstab --- (limited to 'core/launcher') diff --git a/core/launcher/stabmon.cpp b/core/launcher/stabmon.cpp index 3d0d534..4e5f290 100644 --- a/core/launcher/stabmon.cpp +++ b/core/launcher/stabmon.cpp @@ -1,7 +1,7 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software @@ -21,13 +21,17 @@ #include "stabmon.h" -#include +#ifdef QWS +#include +#endif #include #include #include +#if defined(Q_OS_LINUX) || defined(_OS_LINUX_) #include +#endif #include SysFileMonitor::SysFileMonitor(QObject* parent) : @@ -59,11 +63,13 @@ void SysFileMonitor::timerEvent(QTimerEvent*) ch=TRUE; } if ( ch ) { +#ifndef QT_NO_COP QCopEnvelope("QPE/Card", "stabChanged()" ); +#endif break; } } - + // st_size is no use, it's 0 for /proc/mounts too. Read it all. static int mtabSize = 0; QFile f( "/proc/mounts" ); @@ -73,7 +79,9 @@ void SysFileMonitor::timerEvent(QTimerEvent*) QByteArray ba = f.readAll(); if ( (int)ba.size() != mtabSize ) { mtabSize = (int)ba.size(); +#ifndef QT_NO_COP QCopEnvelope("QPE/Card", "mtabChanged()" ); +#endif } #else QString s; @@ -84,9 +92,11 @@ void SysFileMonitor::timerEvent(QTimerEvent*) } if ( (int)s.length() != mtabSize ) { mtabSize = (int)s.length(); +#ifndef QT_NO_COP QCopEnvelope("QPE/Card", "mtabChanged()" ); +#endif } -#endif +#endif } } -- cgit v0.9.0.2