diff main/main.cpp @ 730:73a5884a0975 warnfix_no_size_t

Various size_t etc removals, and compiler warning fixes
author Chris Cannam
date Tue, 17 Jun 2014 16:42:51 +0100
parents c32abd18048b
children 5ebce191aa04
line wrap: on
line diff
--- a/main/main.cpp	Tue Jun 03 11:13:53 2014 +0100
+++ b/main/main.cpp	Tue Jun 17 16:42:51 2014 +0100
@@ -317,7 +317,7 @@
 
     QIcon icon;
     int sizes[] = { 16, 22, 24, 32, 48, 64, 128 };
-    for (int i = 0; i < sizeof(sizes)/sizeof(sizes[0]); ++i) {
+    for (int i = 0; i < int(sizeof(sizes)/sizeof(sizes[0])); ++i) {
         icon.addFile(QString(":icons/sv-%1x%2.png").arg(sizes[i]).arg(sizes[i]));
     }
     QApplication::setWindowIcon(icon);
@@ -478,7 +478,14 @@
 }
 
 bool SVApplication::event(QEvent *event){
+
+// Avoid warnings/errors with -Wextra because we aren't explicitly
+// handling all event types (-Wall is OK with this because of the
+// default but the stricter level insists)
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+
     QString thePath;
+
     switch (event->type()) {
     case QEvent::FileOpen:
         thePath = static_cast<QFileOpenEvent *>(event)->file();