From 1548a20cc8223923dca50aee3aadcb6aa1c6a270 Mon Sep 17 00:00:00 2001 From: James Hogan Date: Sun, 14 Nov 2010 23:49:05 +0000 Subject: [PATCH] Silence some unused parameter warnings Use Q_UNUSED to silence some unused parameter warnings, only in places where it was intended that the parameter is not used (there remain unimplemented functions where the warnings have not been silenced). --- kworship/bible/KwBibleManager.cpp | 1 + kworship/bible/KwBiblePlaylistItem.cpp | 1 + kworship/bible/KwBiblePlugin.cpp | 1 + kworship/css/KwCssScope.cpp | 2 ++ kworship/filters/zionworx/KwZionworxFilter.cpp | 1 + kworship/filters/zionworx/KwZionworxPlugin.cpp | 1 + kworship/media/KwMediaManager.cpp | 1 + kworship/playlist/KwPlaylistUnknown.cpp | 3 +++ kworship/songdb/KwSongdbPlugin.cpp | 2 ++ kworship/songdb/KwSongdbSongBooksEditWidget.cpp | 1 + unipresent/common/UpBackend.cpp | 1 + 11 files changed, 15 insertions(+) diff --git a/kworship/bible/KwBibleManager.cpp b/kworship/bible/KwBibleManager.cpp index e0a3a4f..647b30b 100644 --- a/kworship/bible/KwBibleManager.cpp +++ b/kworship/bible/KwBibleManager.cpp @@ -50,6 +50,7 @@ KwBibleManager* KwBibleManager::singleton(const QString& key) KwBibleManager::KwBibleManager(QObject* parent, const QStringList& params) : QObject(parent) { + Q_UNUSED(params); } /// Destructor. diff --git a/kworship/bible/KwBiblePlaylistItem.cpp b/kworship/bible/KwBiblePlaylistItem.cpp index 6b10bfd..89be83c 100644 --- a/kworship/bible/KwBiblePlaylistItem.cpp +++ b/kworship/bible/KwBiblePlaylistItem.cpp @@ -68,6 +68,7 @@ QString KwBiblePlaylistItem::itemType() const void KwBiblePlaylistItem::exportDetailsToDom(QDomDocument& document, QDomElement& element, KwResourceManager* resourceManager) const { + Q_UNUSED(resourceManager); QDomElement passageElem = document.createElement("passage"); element.appendChild(passageElem); m_passage.exportToDom(document, passageElem); diff --git a/kworship/bible/KwBiblePlugin.cpp b/kworship/bible/KwBiblePlugin.cpp index 7091180..9658ba5 100644 --- a/kworship/bible/KwBiblePlugin.cpp +++ b/kworship/bible/KwBiblePlugin.cpp @@ -72,6 +72,7 @@ KwBiblePlugin::KwBiblePlugin(QObject* parent, const QStringList& params) , m_editRange(0) , m_textPassage(0) { + Q_UNUSED(params); setXMLFile("bible/kworship_bibleui.rc"); } diff --git a/kworship/css/KwCssScope.cpp b/kworship/css/KwCssScope.cpp index 5fe53ad..d8950fa 100644 --- a/kworship/css/KwCssScope.cpp +++ b/kworship/css/KwCssScope.cpp @@ -86,6 +86,7 @@ KwCssScope::~KwCssScope() /// Import the style information from a DOM. void KwCssScope::importStylesFromDom(const QDomElement& element, KwResourceManager* resourceManager) { + Q_UNUSED(resourceManager); // Classes QDomNodeList elems = element.elementsByTagName("class"); for (int i = 0; i < elems.count(); ++i) @@ -119,6 +120,7 @@ void KwCssScope::importStylesFromDom(const QDomElement& element, KwResourceManag /// Export the style information to a DOM. void KwCssScope::exportStylesToDom(QDomDocument& document, QDomElement& element, KwResourceManager* resourceManager) const { + Q_UNUSED(resourceManager); // Start with the classes foreach (QString className, m_classes) { diff --git a/kworship/filters/zionworx/KwZionworxFilter.cpp b/kworship/filters/zionworx/KwZionworxFilter.cpp index 6aa9439..f3752fd 100644 --- a/kworship/filters/zionworx/KwZionworxFilter.cpp +++ b/kworship/filters/zionworx/KwZionworxFilter.cpp @@ -777,6 +777,7 @@ KwZionworxFilter::ExportToDom::ExportVTable KwZionworxFilter::ExportToDom::call; bool KwZionworxFilter::save(KwDocument* doc, const KUrl& url, const QString& mimeType) { + Q_UNUSED(mimeType); /// @todo Handle non-local files if (!url.isLocalFile()) { diff --git a/kworship/filters/zionworx/KwZionworxPlugin.cpp b/kworship/filters/zionworx/KwZionworxPlugin.cpp index d149864..2f51060 100644 --- a/kworship/filters/zionworx/KwZionworxPlugin.cpp +++ b/kworship/filters/zionworx/KwZionworxPlugin.cpp @@ -46,6 +46,7 @@ KwZionworxPlugin::KwZionworxPlugin(QObject* parent, const QStringList& params) i18n("Zionworx filters"), i18n("The Zionworx filters allow Zionworx playlists to be loaded and saved.")) { + Q_UNUSED(params); } /// Destructor. diff --git a/kworship/media/KwMediaManager.cpp b/kworship/media/KwMediaManager.cpp index 9e72ffa..97b008f 100644 --- a/kworship/media/KwMediaManager.cpp +++ b/kworship/media/KwMediaManager.cpp @@ -266,6 +266,7 @@ void KwMediaManager::stopVideo(bool stopLinkedAudio) { assert((*it).isValid()); bool disconnected = (*it).disconnect(); + Q_UNUSED(disconnected); assert(disconnected); disconnectVideoOutput(it.key()); } diff --git a/kworship/playlist/KwPlaylistUnknown.cpp b/kworship/playlist/KwPlaylistUnknown.cpp index 2f7707f..0631aaa 100644 --- a/kworship/playlist/KwPlaylistUnknown.cpp +++ b/kworship/playlist/KwPlaylistUnknown.cpp @@ -54,6 +54,9 @@ QString KwPlaylistUnknown::itemType() const void KwPlaylistUnknown::exportDetailsToDom(QDomDocument& document, QDomElement& element, KwResourceManager* resourceManager) const { + Q_UNUSED(document); + Q_UNUSED(element); + Q_UNUSED(resourceManager); // Do nothing, the preserved dom will be restored by KwPlaylistItem } diff --git a/kworship/songdb/KwSongdbPlugin.cpp b/kworship/songdb/KwSongdbPlugin.cpp index a567623..04e1d69 100644 --- a/kworship/songdb/KwSongdbPlugin.cpp +++ b/kworship/songdb/KwSongdbPlugin.cpp @@ -63,6 +63,8 @@ KwSongdbPlugin::KwSongdbPlugin(QObject* parent, const QStringList& params) , m_editSongAction(0) , m_editSongBooksAction(0) { + Q_UNUSED(params); + setXMLFile("songdb/kworship_songdbui.rc"); // Set up actions diff --git a/kworship/songdb/KwSongdbSongBooksEditWidget.cpp b/kworship/songdb/KwSongdbSongBooksEditWidget.cpp index 3d57def..2ef06d9 100644 --- a/kworship/songdb/KwSongdbSongBooksEditWidget.cpp +++ b/kworship/songdb/KwSongdbSongBooksEditWidget.cpp @@ -109,6 +109,7 @@ KwSongdbSongBooksEditWidget::KwSongdbSongBooksEditWidget() foreach (KwSongdbSongBook* songBook, songBooks) { KwSongdbSongBookItem* item = new KwSongdbSongBookItem(songBook, listSongBooks); + Q_UNUSED(item); } } diff --git a/unipresent/common/UpBackend.cpp b/unipresent/common/UpBackend.cpp index 8c54d9f..a9ed3f4 100644 --- a/unipresent/common/UpBackend.cpp +++ b/unipresent/common/UpBackend.cpp @@ -33,6 +33,7 @@ UpBackend::UpBackend(QObject* parent, const QStringList& params) : QObject(parent) { + Q_UNUSED(params); } /// Destructor. -- 2.11.4.GIT