summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-07-11 20:57:11 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-07-11 20:57:11 (GMT)
commitd5bdca64d2c0df5950d2c6491df34dee16fcb4aa (patch)
treec65bf66c1e5a341f68c53da82cae8660ff7b4964
parent25a1915daf2a10d29e5f89bec6a8d369e5d02da6 (diff)
Fix low hanging unused parameters warnings
-rw-r--r--core/generator.cpp5
-rw-r--r--core/rotationjob.cpp3
-rw-r--r--core/synctex/synctex_parser.c24
-rw-r--r--generators/kimgio/generator_kimgio.cpp2
-rw-r--r--generators/xps/generator_xps.cpp2
-rw-r--r--part.cpp2
-rw-r--r--shell/shell.cpp2
-rw-r--r--ui/formwidgets.cpp4
-rw-r--r--ui/searchlineedit.cpp4
9 files changed, 33 insertions, 15 deletions
diff --git a/core/generator.cpp b/core/generator.cpp
index 2900871..b7edabc 100644
--- a/core/generator.cpp
+++ b/core/generator.cpp
@@ -177,6 +177,9 @@ Generator::~Generator()
bool Generator::loadDocument( const QString & fileName, QVector< Page * > & pagesVector )
{
+ Q_UNUSED(fileName);
+ Q_UNUSED(pagesVector);
+
return false;
}
@@ -291,6 +294,8 @@ TextPage* Generator::textPage( Page* )
DocumentInfo Generator::generateDocumentInfo(const QSet<DocumentInfo::Key> &keys) const
{
+ Q_UNUSED(keys);
+
return DocumentInfo();
}
diff --git a/core/rotationjob.cpp b/core/rotationjob.cpp
index cf4cc09..228931e 100644
--- a/core/rotationjob.cpp
+++ b/core/rotationjob.cpp
@@ -99,6 +99,9 @@ Rotation RotationJobInternal::rotation() const
void RotationJobInternal::run(ThreadWeaver::JobPointer self, ThreadWeaver::Thread *thread)
{
+ Q_UNUSED(self);
+ Q_UNUSED(thread);
+
if ( mOldRotation == mNewRotation ) {
mRotatedImage = mImage;
return;
diff --git a/core/synctex/synctex_parser.c b/core/synctex/synctex_parser.c
index 8440fed..79b2390 100644
--- a/core/synctex/synctex_parser.c
+++ b/core/synctex/synctex_parser.c
@@ -1837,9 +1837,8 @@ synctex_status_t _synctex_setup_visible_box(synctex_node_t box) {
* With this method, one can enlarge the box to contain the given point (h,v).
*/
synctex_status_t _synctex_horiz_box_setup_visible(synctex_node_t node,int h, int v) {
-# ifdef __DARWIN_UNIX03
-# pragma unused(v)
-# endif
+ (void)v; /* unused */
+
int itsBtm, itsTop;
if (NULL == node || node->class->type != synctex_node_type_hbox) {
return SYNCTEX_STATUS_BAD_ARGUMENT;
@@ -3261,9 +3260,7 @@ int synctex_node_line(synctex_node_t node) {
return node?SYNCTEX_LINE(node):-1;
}
int synctex_node_column(synctex_node_t node) {
-# ifdef __DARWIN_UNIX03
-# pragma unused(node)
-# endif
+ (void)node; /* unused */
return -1;
}
# ifdef SYNCTEX_NOTHING
@@ -3290,9 +3287,8 @@ synctex_node_t synctex_sheet_content(synctex_scanner_t scanner,int page) {
# endif
int synctex_display_query(synctex_scanner_t scanner,const char * name,int line,int column) {
-# ifdef __DARWIN_UNIX03
-# pragma unused(column)
-# endif
+ (void)column; /* unused */
+
int tag = synctex_scanner_get_tag(scanner,name);
size_t size = 0;
int friend_index = 0;
@@ -3689,9 +3685,8 @@ int _synctex_point_h_distance(synctex_point_t hitPoint, synctex_node_t node, syn
* if node is at the bottom of the hit point, this distance is negative.*/
int _synctex_point_v_distance(synctex_point_t hitPoint, synctex_node_t node,synctex_bool_t visible);
int _synctex_point_v_distance(synctex_point_t hitPoint, synctex_node_t node,synctex_bool_t visible) {
-# ifdef __DARWIN_UNIX03
-# pragma unused(visible)
-# endif
+ (void)visible; /* unused */
+
if (node) {
int min,max;
switch(node->class->type) {
@@ -3779,9 +3774,8 @@ synctex_bool_t _synctex_point_in_box(synctex_point_t hitPoint, synctex_node_t no
}
int _synctex_node_distance_to_point(synctex_point_t hitPoint, synctex_node_t node, synctex_bool_t visible) {
-# ifdef __DARWIN_UNIX03
-# pragma unused(visible)
-# endif
+ (void)visible;
+
int result = INT_MAX; /* when the distance is meaning less (sheet, input...) */
if (node) {
int minH,maxH,minV,maxV;
diff --git a/generators/kimgio/generator_kimgio.cpp b/generators/kimgio/generator_kimgio.cpp
index 2cb1a22..fd07641 100644
--- a/generators/kimgio/generator_kimgio.cpp
+++ b/generators/kimgio/generator_kimgio.cpp
@@ -153,6 +153,8 @@ bool KIMGIOGenerator::print( QPrinter& printer )
Okular::DocumentInfo KIMGIOGenerator::generateDocumentInfo( const QSet<Okular::DocumentInfo::Key> &keys ) const
{
+ Q_UNUSED(keys);
+
return docInfo;
}
diff --git a/generators/xps/generator_xps.cpp b/generators/xps/generator_xps.cpp
index 0f8ea12..8b2be65 100644
--- a/generators/xps/generator_xps.cpp
+++ b/generators/xps/generator_xps.cpp
@@ -2127,6 +2127,8 @@ Okular::TextPage* XpsGenerator::textPage( Okular::Page * page )
Okular::DocumentInfo XpsGenerator::generateDocumentInfo( const QSet<Okular::DocumentInfo::Key> &keys ) const
{
+ Q_UNUSED(keys);
+
qCWarning(OkularXpsDebug) << "generating document metadata";
return m_xpsFile->generateDocumentInfo();
diff --git a/part.cpp b/part.cpp
index 5a9d6de..4d1be90 100644
--- a/part.cpp
+++ b/part.cpp
@@ -921,6 +921,8 @@ QUrl Part::realUrl() const
void Part::showSourceLocation(const QString& fileName, int line, int column, bool showGraphically)
{
+ Q_UNUSED(column);
+
const QString u = QStringLiteral( "src:%1 %2" ).arg( line + 1 ).arg( fileName );
GotoAction action( QString(), u );
m_document->processAction( &action );
diff --git a/shell/shell.cpp b/shell/shell.cpp
index 62a6a33..87f9017 100644
--- a/shell/shell.cpp
+++ b/shell/shell.cpp
@@ -143,6 +143,8 @@ Shell::Shell( const QString &serializedOptions )
bool Shell::eventFilter(QObject *obj, QEvent *event)
{
+ Q_UNUSED(obj);
+
QDragMoveEvent* dmEvent = dynamic_cast<QDragMoveEvent*>(event);
if (dmEvent) {
bool accept = dmEvent->mimeData()->hasUrls();
diff --git a/ui/formwidgets.cpp b/ui/formwidgets.cpp
index 3d1b98d..ebf1ef4 100644
--- a/ui/formwidgets.cpp
+++ b/ui/formwidgets.cpp
@@ -811,6 +811,8 @@ void ListEdit::slotHandleFormListChangedByUndoRedo( int pageNumber,
Okular::FormFieldChoice* listForm,
const QList< int > & choices )
{
+ Q_UNUSED(pageNumber);
+
if ( m_form != listForm ) {
return;
}
@@ -904,6 +906,8 @@ void ComboEdit::slotHandleFormComboChangedByUndoRedo( int pageNumber,
int cursorPos,
int anchorPos )
{
+ Q_UNUSED(pageNumber);
+
if ( m_form != form ) {
return;
}
diff --git a/ui/searchlineedit.cpp b/ui/searchlineedit.cpp
index b5c4df9..85516ef 100644
--- a/ui/searchlineedit.cpp
+++ b/ui/searchlineedit.cpp
@@ -165,6 +165,8 @@ void SearchLineEdit::findPrev()
void SearchLineEdit::slotTextChanged( const QString & text )
{
+ Q_UNUSED(text);
+
prepareLineEditForSearch();
restartSearch();
}
@@ -190,6 +192,8 @@ void SearchLineEdit::prepareLineEditForSearch()
void SearchLineEdit::slotReturnPressed( const QString &text )
{
+ Q_UNUSED(text);
+
m_inputDelayTimer->stop();
prepareLineEditForSearch();
if ( QApplication::keyboardModifiers() == Qt::ShiftModifier )