]> git.sur5r.net Git - minitube/commitdiff
Fix compiler warnings reported by clang.
authordreamer.dead <dreamer.dead@gmail.com>
Tue, 28 Apr 2015 22:15:52 +0000 (01:15 +0300)
committerdreamer.dead <dreamer.dead@gmail.com>
Tue, 28 Apr 2015 22:18:42 +0000 (01:18 +0300)
src/channelitemdelegate.cpp
src/channelview.cpp
src/downloadmodel.h
src/mainwindow.cpp
src/mediaview.cpp
src/paginatedvideosource.cpp
src/refinesearchbutton.cpp
src/regionsview.h
src/searchlineedit.cpp
src/searchlineedit.h
src/standardfeedsview.h

index 797b82a539a2ea502776ce60a75e0367c4543e3b..4c13dfe7446bb618c756a05debc03fd236cb4c4f 100644 (file)
@@ -56,6 +56,7 @@ void ChannelItemDelegate::paint( QPainter* painter,
 void ChannelItemDelegate::paintAggregate(QPainter* painter,
                                           const QStyleOptionViewItem& option,
                                           const QModelIndex& index) const {
+    Q_UNUSED(index);
     painter->save();
 
     painter->translate(option.rect.topLeft());
@@ -73,6 +74,7 @@ void ChannelItemDelegate::paintAggregate(QPainter* painter,
 void ChannelItemDelegate::paintUnwatched(QPainter* painter,
                                           const QStyleOptionViewItem& option,
                                           const QModelIndex& index) const {
+    Q_UNUSED(index);
     painter->save();
 
     painter->translate(option.rect.topLeft());
index 893f891288ee2764f19e98215898023ce0dbd7f5..205618ac8f0d40226535e569dd7bb133fa8a8ef1 100644 (file)
@@ -202,7 +202,7 @@ void ChannelView::leaveEvent(QEvent *event) {
     // channelsModel->clearHover();
 }
 
-void ChannelView::itemEntered(const QModelIndex &index) {
+void ChannelView::itemEntered(const QModelIndex &) {
     // channelsModel->setHoveredRow(index.row());
 }
 
@@ -285,6 +285,7 @@ void ChannelView::toggleShowUpdated(bool enable) {
 }
 
 void ChannelView::updateQuery(bool transition) {
+    Q_UNUSED(transition);
     errorMessage.clear();
     if (!Database::exists()) return;
 
index 7dd8f4901d942206de190d8ca9f91f67af43d4cb..a4348c4b978dce6b395cb11ecbec98ea24a0b641 100644 (file)
@@ -46,9 +46,9 @@ public slots:
     void updatePlayIcon();
 
 private:
-    int columnCount() { return 1; }
+    int columnCount(const QModelIndex &/*parent*/ = QModelIndex()) const { return 1; }
 
-    DownloadManager *downloadManager;
+    DownloadManager *const downloadManager;
     int hoveredRow;
     bool playIconHovered;
     bool playIconPressed;
index 08a20a64087bff3f5e8f14c279454a921e03b468..81b1e242cec45cde0a0f4b7570e34d40d7b90491 100644 (file)
@@ -887,7 +887,7 @@ void MainWindow::goBack() {
 }
 
 void MainWindow::showWidget(QWidget* widget, bool transition) {
-
+    Q_UNUSED(transition);
     if (compactViewAct->isChecked())
         compactViewAct->toggle();
 
index a0a36dbbf35c23aa3e927372ff103bea1e08e33e..4d191fd1926d4631b8dcc49620f42ca8f6e1f238 100644 (file)
@@ -64,12 +64,13 @@ MediaView* MediaView::instance() {
     return i;
 }
 
-MediaView::MediaView(QWidget *parent) : QWidget(parent),
-    stopped(false),
+MediaView::MediaView(QWidget *parent) : QWidget(parent)
+    , stopped(false)
+    , downloadItem(0)
     #ifdef APP_SNAPSHOT
-    snapshotSettings(0),
+    , snapshotSettings(0)
     #endif
-    downloadItem(0) { }
+    { }
 
 void MediaView::initialize() {
     QBoxLayout *layout = new QVBoxLayout(this);
@@ -213,6 +214,7 @@ void MediaView::search(SearchParams *searchParams) {
 }
 
 void MediaView::setVideoSource(VideoSource *videoSource, bool addToHistory, bool back) {
+    Q_UNUSED(back);
     stopped = false;
 
 #ifdef APP_ACTIVATION
@@ -900,6 +902,7 @@ void MediaView::startDownloading() {
 }
 
 void MediaView::sliderMoved(int value) {
+    Q_UNUSED(value);
 #ifdef APP_PHONON
 #ifndef APP_PHONON_SEEK
 
index 5ef69dc51b6251dfe0a15406d7d574e02032a03b..fe98ba664a2d1c501b55466355f79a8a1a4816e5 100644 (file)
@@ -35,9 +35,9 @@ QHash<QString, QAction*>* globalActions();
 
 PaginatedVideoSource::PaginatedVideoSource(QObject *parent) : VideoSource(parent)
   , tokenTimestamp(0)
-  , reloadingToken(false)
   , currentMax(0)
   , currentStartIndex(0)
+  , reloadingToken(false)
   , asyncDetails(false) { }
 
 bool PaginatedVideoSource::hasMoreVideos() {
index aa78fccc7a81835a93e661ced1c29f15bd1d5639..eeb4fe18f2e3413c7ef3b6d4586723a68a188a44 100644 (file)
@@ -40,7 +40,7 @@ void RefineSearchButton::paintBackground() const {
 
 }
 
-void RefineSearchButton::paintEvent(QPaintEvent *event) {
+void RefineSearchButton::paintEvent(QPaintEvent *) {
     // QPushButton::paintEvent(event);
     QPainter painter(this);
     painter.setRenderHints(QPainter::Antialiasing, true);
index 73681881610ea038e50b44d073cb6e49032c4379..2caacd2ad002f64eb69f2624b75beb417e047b28 100644 (file)
@@ -27,7 +27,7 @@ $END_LICENSE */
 #endif
 #include "view.h"
 
-class YTRegion;
+struct YTRegion;
 
 class RegionsView : public QWidget, public View {
 
index d31675275b7e3a1e4f8f1b84af4c73f1dc458c3a..dc5115c55f877f559978d1a04a2ed8f01350ac4f 100644 (file)
@@ -45,12 +45,12 @@ void ClearButton::leaveEvent(QEvent *e) {
     hovered = false;
 }
 
-void ClearButton::mousePressEvent(QEvent *e) {
+void ClearButton::mousePressEvent(QMouseEvent *e) {
     Q_UNUSED(e);
     mousePressed = true;
 }
 
-void ClearButton::mouseReleaseEvent(QEvent *e) {
+void ClearButton::mouseReleaseEvent(QMouseEvent *e) {
     Q_UNUSED(e);
     mousePressed = false;
 }
index 64b0d285a1da979d2b66eee1eb7e863dee741297..83405d06c330bdfa7c4cde3f5ad7fff893c631a1 100644 (file)
@@ -33,8 +33,8 @@ protected:
     void enterEvent(QEvent *e);
     void leaveEvent(QEvent *e);
 
-    void mousePressEvent(QEvent *e);
-    void mouseReleaseEvent(QEvent *e);
+    void mousePressEvent(QMouseEvent *e);
+    void mouseReleaseEvent(QMouseEvent *e);
 
 private:
     bool hovered;
index f7e1485ffe2144e77a55f88f8fb9f1faaefb28b2..94a2be43eba6073aaed22c572ceada10330b3aef 100644 (file)
@@ -28,7 +28,7 @@ $END_LICENSE */
 #include "view.h"
 
 class VideoSource;
-class YTCategory;
+struct YTCategory;
 class YTStandardFeed;
 
 class StandardFeedsView : public QWidget, public View {