diff options
author | Xizhi Zhu <xizhi.zhu@nokia.com> | 2012-03-05 15:46:29 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-08 01:30:22 +0100 |
commit | 90e787d91977420d9c893c6eb090ca85158d4f32 (patch) | |
tree | f349984e4ff4631abf7b4779f96709b662103c40 /src/imports | |
parent | 057c96a65671b2085573eb26f21e4c00b67a6775 (diff) |
Remove the monitorAllLogicalDrives property.
Change-Id: Idf3aa4fcb43cbd7ace05ba1fdcb0f44eec3c91b4
Reviewed-by: Steffen Hahn <steffen.hahn@nokia.com>
Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/systeminfo/qdeclarativestorageinfo.cpp | 27 | ||||
-rw-r--r-- | src/imports/systeminfo/qdeclarativestorageinfo_p.h | 8 |
2 files changed, 1 insertions, 34 deletions
diff --git a/src/imports/systeminfo/qdeclarativestorageinfo.cpp b/src/imports/systeminfo/qdeclarativestorageinfo.cpp index e8543cb7..ac3d0adf 100644 --- a/src/imports/systeminfo/qdeclarativestorageinfo.cpp +++ b/src/imports/systeminfo/qdeclarativestorageinfo.cpp @@ -56,7 +56,6 @@ QT_BEGIN_NAMESPACE QDeclarativeStorageInfo::QDeclarativeStorageInfo(QObject *parent) : QObject(parent) , storageInfo(new QStorageInfo(this)) - , isMonitorAllLogicalDrives(false) { } @@ -68,37 +67,13 @@ QDeclarativeStorageInfo::~QDeclarativeStorageInfo() } /*! - \qmlproperty bool StorageInfo::monitorAllLogicalDrives - - This property triggers the active monitoring of all available logical drives. - */ -bool QDeclarativeStorageInfo::monitorAllLogicalDrives() const -{ - return isMonitorAllLogicalDrives; -} - -void QDeclarativeStorageInfo::setMonitorAllLogicalDrives(bool monitor) -{ - if (monitor != isMonitorAllLogicalDrives) { - isMonitorAllLogicalDrives = monitor; - if (monitor) { - connect(storageInfo, SIGNAL(logicalDriveChanged(QString,bool)), - this, SIGNAL(logicalDriveChanged(QString,bool))); - } else { - disconnect(storageInfo, SIGNAL(logicalDriveChanged(QString,bool)), - this, SIGNAL(logicalDriveChanged(QString,bool))); - } - emit monitorAllLogicalDrivesChanged(); - } -} - -/*! \qmlproperty stringlist StorageInfo::allLogicalDrives This property holds a list of all the available logical drives. */ QStringList QDeclarativeStorageInfo::allLogicalDrives() const { + connect(storageInfo, SIGNAL(logicalDriveChanged(QString,bool)), this, SIGNAL(logicalDriveChanged(QString,bool))); return storageInfo->allLogicalDrives(); } diff --git a/src/imports/systeminfo/qdeclarativestorageinfo_p.h b/src/imports/systeminfo/qdeclarativestorageinfo_p.h index 156bb75f..2f638f86 100644 --- a/src/imports/systeminfo/qdeclarativestorageinfo_p.h +++ b/src/imports/systeminfo/qdeclarativestorageinfo_p.h @@ -64,8 +64,6 @@ class QDeclarativeStorageInfo : public QObject Q_ENUMS(DriveType) - Q_PROPERTY(bool monitorAllLogicalDrives READ monitorAllLogicalDrives WRITE setMonitorAllLogicalDrives NOTIFY monitorAllLogicalDrivesChanged) - Q_PROPERTY(QStringList allLogicalDrives READ allLogicalDrives NOTIFY logicalDriveChanged) public: @@ -81,8 +79,6 @@ public: QDeclarativeStorageInfo(QObject *parent = 0); virtual ~QDeclarativeStorageInfo(); - bool monitorAllLogicalDrives() const; - void setMonitorAllLogicalDrives(bool monitor); QStringList allLogicalDrives() const; Q_INVOKABLE qlonglong availableDiskSpace(const QString &drive) const; @@ -91,14 +87,10 @@ public: Q_INVOKABLE int driveType(const QString &drive) const; Q_SIGNALS: - void monitorAllLogicalDrivesChanged(); - void logicalDriveChanged(const QString &drive, bool added); private: QStorageInfo *storageInfo; - - bool isMonitorAllLogicalDrives; }; QT_END_NAMESPACE |