diff options
author | Jean Claveau <jean.claveau@c277.fr> | 2014-11-16 01:29:35 +0100 |
---|---|---|
committer | Jean Claveau <jean.claveau@c277.fr> | 2014-11-16 01:29:35 +0100 |
commit | 49f0e2f49a557767354d9858420d88b428f3b7c8 (patch) | |
tree | 42eff305dda584aa94b783656d3ce99bab84f2b3 | |
parent | 35ebbf4e8169b80319919826ff125e520755cac5 (diff) |
consts + cleaning
-rw-r--r-- | src/skin/pixmapsource.cpp | 6 | ||||
-rw-r--r-- | src/skin/pixmapsource.h | 6 | ||||
-rw-r--r-- | src/widget/wpushbutton.cpp | 1 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/skin/pixmapsource.cpp b/src/skin/pixmapsource.cpp index 0215ae3bb8..c7b8132a0b 100644 --- a/src/skin/pixmapsource.cpp +++ b/src/skin/pixmapsource.cpp @@ -5,7 +5,7 @@ PixmapSource::PixmapSource() { } -PixmapSource::PixmapSource( QString filepath ) { +PixmapSource::PixmapSource(const QString filepath) { setPath(filepath); } @@ -20,7 +20,7 @@ QString PixmapSource::getPath() const { return m_path; } -void PixmapSource::setPath( QString newPath ) { +void PixmapSource::setPath(const QString newPath) { m_baData.truncate(0); m_path = newPath; if (m_path.endsWith(".svg", Qt::CaseInsensitive)) { @@ -42,7 +42,7 @@ bool PixmapSource::isBitmap() const { return m_eType == BITMAP; } -void PixmapSource::setSVG( QByteArray content ) { +void PixmapSource::setSVG(const QByteArray content) { m_baData.truncate(0); m_baData += content; m_eType = SVG; diff --git a/src/skin/pixmapsource.h b/src/skin/pixmapsource.h index 5dff39eef8..53f4385475 100644 --- a/src/skin/pixmapsource.h +++ b/src/skin/pixmapsource.h @@ -6,14 +6,14 @@ class PixmapSource { public: PixmapSource(); - PixmapSource( QString filepath ); + PixmapSource(const QString filepath); virtual ~PixmapSource(); bool isEmpty() const; bool isSVG() const; bool isBitmap() const; - void setSVG( QByteArray content ); - void setPath( QString newPath ); + void setSVG(const QByteArray content); + void setPath(const QString newPath); QString getPath() const; QByteArray getData() const; QString getId() const; diff --git a/src/widget/wpushbutton.cpp b/src/widget/wpushbutton.cpp index ef06ebc8a0..6578ff5e12 100644 --- a/src/widget/wpushbutton.cpp +++ b/src/widget/wpushbutton.cpp @@ -75,7 +75,6 @@ void WPushButton::setup(QDomNode node, const SkinContext& context) { int iState = stateContext.selectInt(state, "Number"); if (iState < m_iNoStates) { - QString pixmapPath; PixmapSource pixmapSource; pixmapSource = stateContext.getPixmapSource(stateContext.selectNode(state, "Unpressed")); |