diff options
| author | 2018-11-27 20:29:47 -0500 | |
|---|---|---|
| committer | 2018-11-28 22:02:03 -0500 | |
| commit | 081bcfd8329b1ef2a0c027c6ab5da5d7c0686d09 (patch) | |
| tree | fe7f068c7f0c24320a5981411c9646817fcfcfff /src/modules/objects | |
| parent | Modernize to C++17 (diff) | |
| download | KVIrc-081bcfd8329b1ef2a0c027c6ab5da5d7c0686d09.tar.gz KVIrc-081bcfd8329b1ef2a0c027c6ab5da5d7c0686d09.tar.bz2 KVIrc-081bcfd8329b1ef2a0c027c6ab5da5d7c0686d09.zip | |
Remove Q_UNUSED macros
Diffstat (limited to 'src/modules/objects')
| -rw-r--r-- | src/modules/objects/KvsObject_comboBox.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_painter.cpp | 4 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_pixmap.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_socket.cpp | 1 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_tableWidget.cpp | 4 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_treeWidget.cpp | 3 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_vBox.cpp | 5 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_webView.cpp | 4 | ||||
| -rw-r--r-- | src/modules/objects/object_macros.h | 2 |
9 files changed, 3 insertions, 24 deletions
diff --git a/src/modules/objects/KvsObject_comboBox.cpp b/src/modules/objects/KvsObject_comboBox.cpp index 331f3fe5a..e4ec1924c 100644 --- a/src/modules/objects/KvsObject_comboBox.cpp +++ b/src/modules/objects/KvsObject_comboBox.cpp @@ -306,8 +306,6 @@ KVSO_CLASS_FUNCTION(comboBox, setCurrentItem) } KVSO_CLASS_FUNCTION(comboBox, popup) { - Q_UNUSED(c); - if(widget()) ((QComboBox *)widget())->showPopup(); return true; diff --git a/src/modules/objects/KvsObject_painter.cpp b/src/modules/objects/KvsObject_painter.cpp index 084cd9123..aa2e7b548 100644 --- a/src/modules/objects/KvsObject_painter.cpp +++ b/src/modules/objects/KvsObject_painter.cpp @@ -1271,8 +1271,6 @@ void KvsObject_painter::detachDevice() KVSO_CLASS_FUNCTION(painter, end) { - Q_UNUSED(c); - if(!m_pDeviceObject) { m_pPainter->end(); @@ -1958,7 +1956,6 @@ KVSO_CLASS_FUNCTION(painter, setGradientAsBrush) KVSO_CLASS_FUNCTION(painter, clearGradient) { - Q_UNUSED(c); if(!m_pGradient) delete m_pGradient; m_pGradient = nullptr; @@ -2144,7 +2141,6 @@ KVSO_CLASS_FUNCTION(painter, setCompositionMode) } KVSO_CLASS_FUNCTION(painter, resetPath) { - Q_UNUSED(c); if(m_pPainterPath) { delete m_pPainterPath; diff --git a/src/modules/objects/KvsObject_pixmap.cpp b/src/modules/objects/KvsObject_pixmap.cpp index c2b56476d..e3ef0a5c8 100644 --- a/src/modules/objects/KvsObject_pixmap.cpp +++ b/src/modules/objects/KvsObject_pixmap.cpp @@ -533,7 +533,6 @@ KVSO_CLASS_FUNCTION(pixmap, loadAnimation) KVSO_CLASS_FUNCTION(pixmap, startAnimation) { - Q_UNUSED(c); if(m_pAnimatedPixmap) m_pAnimatedPixmap->start(); return true; @@ -541,7 +540,6 @@ KVSO_CLASS_FUNCTION(pixmap, startAnimation) KVSO_CLASS_FUNCTION(pixmap, stopAnimation) { - Q_UNUSED(c); if(m_pAnimatedPixmap) m_pAnimatedPixmap->stop(); return true; diff --git a/src/modules/objects/KvsObject_socket.cpp b/src/modules/objects/KvsObject_socket.cpp index ba47de24d..b1e492c7e 100644 --- a/src/modules/objects/KvsObject_socket.cpp +++ b/src/modules/objects/KvsObject_socket.cpp @@ -325,7 +325,6 @@ KVSO_CLASS_FUNCTION(socket, status) KVSO_CLASS_FUNCTION(socket, close) { - Q_UNUSED(c); m_pSocket->disconnectFromHost(); return true; } diff --git a/src/modules/objects/KvsObject_tableWidget.cpp b/src/modules/objects/KvsObject_tableWidget.cpp index 17c12fd66..d2d7bee17 100644 --- a/src/modules/objects/KvsObject_tableWidget.cpp +++ b/src/modules/objects/KvsObject_tableWidget.cpp @@ -737,28 +737,24 @@ KVSO_CLASS_FUNCTION(tableWidget, setCellWidget) KVSO_CLASS_FUNCTION(tableWidget, hideHorizontalHeader) { - Q_UNUSED(c); ((QTableWidget *)widget())->horizontalHeader()->hide(); return true; } KVSO_CLASS_FUNCTION(tableWidget, hideVerticalHeader) { - Q_UNUSED(c); ((QTableWidget *)widget())->verticalHeader()->hide(); return true; } KVSO_CLASS_FUNCTION(tableWidget, showHorizontalHeader) { - Q_UNUSED(c); ((QTableWidget *)widget())->horizontalHeader()->show(); return true; } KVSO_CLASS_FUNCTION(tableWidget, showVerticalHeader) { - Q_UNUSED(c); ((QTableWidget *)widget())->verticalHeader()->show(); return true; } diff --git a/src/modules/objects/KvsObject_treeWidget.cpp b/src/modules/objects/KvsObject_treeWidget.cpp index afaf389ca..15b8e1a47 100644 --- a/src/modules/objects/KvsObject_treeWidget.cpp +++ b/src/modules/objects/KvsObject_treeWidget.cpp @@ -318,7 +318,6 @@ KVSO_CLASS_FUNCTION(treeWidget, setAcceptDrops) KVSO_CLASS_FUNCTION(treeWidget, clear) { - Q_UNUSED(c); if(widget()) ((QTreeWidget *)object())->clear(); return true; @@ -443,14 +442,12 @@ KVSO_CLASS_FUNCTION(treeWidget, setAllColumnsShowFocus) KVSO_CLASS_FUNCTION(treeWidget, hideListViewHeader) { - Q_UNUSED(c); ((QTreeWidget *)widget())->header()->hide(); return true; } KVSO_CLASS_FUNCTION(treeWidget, showListViewHeader) { - Q_UNUSED(c); ((QTreeWidget *)widget())->header()->show(); return true; } diff --git a/src/modules/objects/KvsObject_vBox.cpp b/src/modules/objects/KvsObject_vBox.cpp index 61464bfe7..557dd5b35 100644 --- a/src/modules/objects/KvsObject_vBox.cpp +++ b/src/modules/objects/KvsObject_vBox.cpp @@ -111,11 +111,8 @@ KVSO_BEGIN_DESTRUCTOR(KvsObject_vBox) KVSO_END_CONSTRUCTOR(KvsObject_vBox) -bool KvsObject_vBox::init(KviKvsRunTimeContext * pContext, KviKvsVariantList * pParams) +bool KvsObject_vBox::init(KviKvsRunTimeContext *, KviKvsVariantList *) { - Q_UNUSED(pContext); - Q_UNUSED(pParams); - SET_OBJECT(KviTalVBox); return true; } diff --git a/src/modules/objects/KvsObject_webView.cpp b/src/modules/objects/KvsObject_webView.cpp index 0a0a24354..abb46faba 100644 --- a/src/modules/objects/KvsObject_webView.cpp +++ b/src/modules/objects/KvsObject_webView.cpp @@ -1094,7 +1094,6 @@ KVSO_CLASS_FUNCTION(webView, addToJavaScriptWindowObject) } KVSO_CLASS_FUNCTION(webView, setEventFilter) { - Q_UNUSED(c); QWebFrame * pFrame; pFrame = ((QWebView *)widget())->page()->mainFrame(); pFrame->addToJavaScriptWindowObject("kvs", this); @@ -1323,8 +1322,7 @@ void KvsObject_webView::slotDownloadRequest(const QNetworkRequest & r) pReply->deleteLater(); return; } - KviKvsDownloadHandler * pHandler = new KviKvsDownloadHandler(this, pFile, pReply, g_iDownloadId); - Q_UNUSED(pHandler); + (void)new KviKvsDownloadHandler(this, pFile, pReply, g_iDownloadId); g_iDownloadId++; } } diff --git a/src/modules/objects/object_macros.h b/src/modules/objects/object_macros.h index f89318575..c6e92c9dc 100644 --- a/src/modules/objects/object_macros.h +++ b/src/modules/objects/object_macros.h @@ -92,7 +92,7 @@ } #define KVSO_CLASS_FUNCTION(__className, __functionName) \ - bool KvsObject_##__className::__functionName(KviKvsObjectFunctionCall * c) + bool KvsObject_##__className::__functionName([[maybe_unused]] KviKvsObjectFunctionCall * c) #define CHECK_INTERNAL_POINTER(__pointer) \ if(!__pointer) \ |
