]> granicus.if.org Git - transmission/commitdiff
fix CL warnings in the Qt code. mikedld
authorJordan Lee <jordan@transmissionbt.com>
Sun, 8 Sep 2013 18:39:37 +0000 (18:39 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sun, 8 Sep 2013 18:39:37 +0000 (18:39 +0000)
qt/formatter.h
qt/freespace-label.h
qt/make-dialog.h
qt/options.cc
qt/torrent-filter.cc
qt/torrent.h
qt/tracker-delegate.h

index 7ae4739ae8ea64feaf40214255df0fdd04ec95ac..8b3be736349098fdfabfbf66ce753bf093c00175 100644 (file)
@@ -17,6 +17,8 @@
 #include <QObject>
 #include <QIcon>
 
+#include <stdint.h> // int64_t
+
 class Speed;
 
 class Formatter: public QObject
index e79cc9c46184f4cf0f6591a73ae399cd4fd131da..5ef0a821b502f988c047fca95e11cb10dd573473 100644 (file)
 #ifndef QTR_FREESPACE_LABEL_H
 #define QTR_FREESPACE_LABEL_H
 
+#include <stdint.h>
+
 #include <QString>
 #include <QTimer>
-
 #include <QLabel>
 
 class Session;
index 060a8074be5fa5791ff952a04c219ac59bd2f2ff..fda27f0e0b1ef7ec35021d3523626e8af5a64c9e 100644 (file)
 #include <QDialog>
 #include <QTimer>
 
-struct QAbstractButton;
-struct QPlainTextEdit;
-struct QLineEdit;
-struct QCheckBox;
-struct QLabel;
-struct QPushButton;
-struct QRadioButton;
-struct Session;
-struct QProgressBar;
-struct QDialogButtonBox;
+class QAbstractButton;
+class QPlainTextEdit;
+class QLineEdit;
+class QCheckBox;
+class QLabel;
+class QPushButton;
+class QRadioButton;
+class Session;
+class QProgressBar;
+class QDialogButtonBox;
 
 extern "C"
 {
index 2f5ad80af136e927313b7bc76545538cc6dfd90c..a1a388f74d58f094d104b3329c4b7e97885dff18 100644 (file)
@@ -10,6 +10,8 @@
  * $Id$
  */
 
+#include <algorithm> // std::min()
+
 #include <QApplication>
 #include <QCheckBox>
 #include <QComboBox>
index e5eecc1884cab8354b1693d3bab0d80c487f97d3..ba5c1f1d6b2d17ef8a8fa8f250ae6b0a196ea7e9 100644 (file)
@@ -211,7 +211,7 @@ TorrentFilter :: hiddenRowCount( ) const
 void
 TorrentFilter :: countTorrentsPerMode (int * setmeCounts) const
 {
-  std::fill_n (setmeCounts, FilterMode::NUM_MODES, 0);
+  std::fill_n (setmeCounts, static_cast<std::size_t>(FilterMode::NUM_MODES), 0);
 
   for (int row(0); ; ++row)
     { 
index 0b6470313b12768dd9f02349b080b7ce2ddb410a..336d7ef95a68da39c9129b919d379a3fce449844 100644 (file)
 #include "speed.h"
 #include "types.h"
 
+#ifdef ERROR
+ #undef ERROR
+#endif
+
 extern "C"
 {
   struct tr_variant;
index 1bef8398c336a04bd23757f3796720886b3eb5f4..30606935506e5ab7171e72e6bfbedf5af7dc3fc6 100644 (file)
@@ -10,8 +10,8 @@
  * $Id$
  */
 
-#ifndef QTR_TORRENT_DELEGATE_H
-#define QTR_TORRENT_DELEGATE_H
+#ifndef QTR_TRACKER_DELEGATE_H
+#define QTR_TRACKER_DELEGATE_H
 
 #include <QItemDelegate>
 #include <QSize>
@@ -20,7 +20,7 @@ class QPainter;
 class QStyleOptionViewItem;
 class QStyle;
 class Session;
-class TrackerInfo;
+struct TrackerInfo;
 
 class TrackerDelegate: public QItemDelegate
 {