Mercurial > hg > sonic-visualiser
comparison 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 |
comparison
equal
deleted
inserted
replaced
728:b959148258a4 | 730:73a5884a0975 |
---|---|
315 } | 315 } |
316 settings.endGroup(); | 316 settings.endGroup(); |
317 | 317 |
318 QIcon icon; | 318 QIcon icon; |
319 int sizes[] = { 16, 22, 24, 32, 48, 64, 128 }; | 319 int sizes[] = { 16, 22, 24, 32, 48, 64, 128 }; |
320 for (int i = 0; i < sizeof(sizes)/sizeof(sizes[0]); ++i) { | 320 for (int i = 0; i < int(sizeof(sizes)/sizeof(sizes[0])); ++i) { |
321 icon.addFile(QString(":icons/sv-%1x%2.png").arg(sizes[i]).arg(sizes[i])); | 321 icon.addFile(QString(":icons/sv-%1x%2.png").arg(sizes[i]).arg(sizes[i])); |
322 } | 322 } |
323 QApplication::setWindowIcon(icon); | 323 QApplication::setWindowIcon(icon); |
324 | 324 |
325 QString language = QLocale::system().name(); | 325 QString language = QLocale::system().name(); |
476 | 476 |
477 return rv; | 477 return rv; |
478 } | 478 } |
479 | 479 |
480 bool SVApplication::event(QEvent *event){ | 480 bool SVApplication::event(QEvent *event){ |
481 | |
482 // Avoid warnings/errors with -Wextra because we aren't explicitly | |
483 // handling all event types (-Wall is OK with this because of the | |
484 // default but the stricter level insists) | |
485 #pragma GCC diagnostic ignored "-Wswitch-enum" | |
486 | |
481 QString thePath; | 487 QString thePath; |
488 | |
482 switch (event->type()) { | 489 switch (event->type()) { |
483 case QEvent::FileOpen: | 490 case QEvent::FileOpen: |
484 thePath = static_cast<QFileOpenEvent *>(event)->file(); | 491 thePath = static_cast<QFileOpenEvent *>(event)->file(); |
485 if(m_readyForFiles) | 492 if(m_readyForFiles) |
486 handleFilepathArgument(thePath, NULL); | 493 handleFilepathArgument(thePath, NULL); |