Made some methods const

This commit is contained in:
Albert Vaca 2014-04-05 20:04:59 +02:00
parent 4dcbb3531a
commit baa0e5ff95
6 changed files with 11 additions and 10 deletions

View file

@ -52,6 +52,7 @@ public Q_SLOTS:
protected:
virtual bool doKill();
private:
void startTransfer();
QSharedPointer<QIODevice> mOrigin;

View file

@ -33,8 +33,8 @@ public:
explicit BatteryDbusInterface(QObject *parent);
virtual ~BatteryDbusInterface();
Q_SCRIPTABLE int charge() { return mCharge; }
Q_SCRIPTABLE bool isCharging() { return mIsCharging; }
Q_SCRIPTABLE int charge() const { return mCharge; }
Q_SCRIPTABLE bool isCharging() const { return mIsCharging; }
void updateValues(bool isCharging, int currentCharge);

View file

@ -41,11 +41,11 @@ public:
Notification(const NetworkPackage& np, const QString& iconPath, QObject* parent);
virtual ~Notification();
QString internalId() { return mId; }
QString appName() { return mAppName; }
QString ticker() { return mTicker; }
QString iconPath() { return mIconPath; }
bool dismissable() { return mDismissable; }
QString internalId() const { return mId; }
QString appName() const { return mAppName; }
QString ticker() const { return mTicker; }
QString iconPath() const { return mIconPath; }
bool dismissable() const { return mDismissable; }
public Q_SLOTS:
Q_SCRIPTABLE void dismiss();

View file

@ -37,7 +37,7 @@ public:
virtual ~Mounter();
bool wait();
bool isMounted() const {return m_started;}
bool isMounted() const { return m_started; }
Q_SIGNALS:
void mounted();

View file

@ -123,7 +123,7 @@ bool SftpPlugin::mountAndWait()
return m_d->mounter->wait();
}
bool SftpPlugin::isMounted()
bool SftpPlugin::isMounted() const
{
return m_d->mounter && m_d->mounter->isMounted();
}

View file

@ -56,7 +56,7 @@ public Q_SLOTS:
Q_SCRIPTABLE void mount();
Q_SCRIPTABLE void unmount();
Q_SCRIPTABLE bool mountAndWait();
Q_SCRIPTABLE bool isMounted();
Q_SCRIPTABLE bool isMounted() const;
Q_SCRIPTABLE bool startBrowsing();
Q_SCRIPTABLE QString mountPoint();