comparison src/main.cpp @ 355:56109ef020b4 warnfix_no_size_t

Configure stuff and fixes for -Werror
author Chris Cannam
date Wed, 18 Jun 2014 09:13:25 +0100
parents fa329ca6d75e
children aa576f9213bf
comparison
equal deleted inserted replaced
354:11ba706b1e7a 355:56109ef020b4
98 98
99 bool m_readyForFiles; 99 bool m_readyForFiles;
100 QStringList m_filepathQueue; 100 QStringList m_filepathQueue;
101 101
102 virtual bool event(QEvent *event) { 102 virtual bool event(QEvent *event) {
103
104 // Avoid warnings/errors with -Wextra because we aren't explicitly
105 // handling all event types (-Wall is OK with this because of the
106 // default but the stricter level insists)
107 #pragma GCC diagnostic ignored "-Wswitch-enum"
108
103 switch (event->type()) { 109 switch (event->type()) {
104 case QEvent::FileOpen: 110 case QEvent::FileOpen:
105 { 111 {
106 QString path = static_cast<QFileOpenEvent *>(event)->file(); 112 QString path = static_cast<QFileOpenEvent *>(event)->file();
107 if (m_readyForFiles) { 113 if (m_readyForFiles) {
196 202
197 // Permit size_t and PropertyName to be used as args in queued signal calls 203 // Permit size_t and PropertyName to be used as args in queued signal calls
198 qRegisterMetaType<size_t>("size_t"); 204 qRegisterMetaType<size_t>("size_t");
199 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName"); 205 qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");
200 206
201 MainWindow *gui = new MainWindow(audioOutput, false); // no osc support 207 MainWindow *gui = new MainWindow(audioOutput);
202 application.setMainWindow(gui); 208 application.setMainWindow(gui);
203 if (splash) { 209 if (splash) {
204 QObject::connect(gui, SIGNAL(hideSplash()), splash, SLOT(hide())); 210 QObject::connect(gui, SIGNAL(hideSplash()), splash, SLOT(hide()));
205 } 211 }
206 212