# HG changeset patch # User Chris Cannam # Date 1403096160 -3600 # Node ID 2700e13716efd057fdbcb3ed85437c9806c1263a # Parent 048daa7513de602e2f4cfcbea7a56ecd14a17927# Parent e2eca1898050921014aaa585884e173e2e0bf341 Merge from branch tony_integration diff -r e2eca1898050 -r 2700e13716ef .hgsubstate --- a/.hgsubstate Tue Jun 17 13:20:36 2014 +0100 +++ b/.hgsubstate Wed Jun 18 13:56:00 2014 +0100 @@ -1,5 +1,5 @@ -236814e07bd07473958c1ff89103124536a0c3c8 dataquay +d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay 3c5adc4a864fa75e5b1e67c260b77541aaa4f1f6 sv-dependency-builds -c32393c093049000d4f9d3bdee404269a9146ba8 svapp -5f021c13a4cccf895559c80ce63cd35143913981 svcore -5c4a405a70fcc3857c5adcfe834dea7eaab9f323 svgui +dfcc5b355f33005e177317d738031a8515812c4e svapp +0c1d6de8f44bc158bcb55866874602bcb912e2cf svcore +c4ef666721bf7c5f1174e700736e1a84dea8a224 svgui diff -r e2eca1898050 -r 2700e13716ef configure --- a/configure Tue Jun 17 13:20:36 2014 +0100 +++ b/configure Wed Jun 18 13:56:00 2014 +0100 @@ -4223,7 +4223,7 @@ CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS" if test "x$GCC" = "xyes"; then - CXXFLAGS_DEBUG="-Wall -Woverloaded-virtual -Wextra -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe" + CXXFLAGS_DEBUG="-Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe" CXXFLAGS_RELEASE="-g0 -O2 -Wall -pipe" CXXFLAGS_MINIMAL="-g0 -O0" fi diff -r e2eca1898050 -r 2700e13716ef configure.ac --- a/configure.ac Tue Jun 17 13:20:36 2014 +0100 +++ b/configure.ac Wed Jun 18 13:56:00 2014 +0100 @@ -50,7 +50,7 @@ CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS" if test "x$GCC" = "xyes"; then - CXXFLAGS_DEBUG="-Wall -Woverloaded-virtual -Wextra -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe" + CXXFLAGS_DEBUG="-Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe" CXXFLAGS_RELEASE="-g0 -O2 -Wall -pipe" CXXFLAGS_MINIMAL="-g0 -O0" fi diff -r e2eca1898050 -r 2700e13716ef deploy/src/archive-tip.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/src/archive-tip.sh Wed Jun 18 13:56:00 2014 +0100 @@ -0,0 +1,8 @@ +#!/bin/bash + +tag=`hg id | awk '{ print $1; }'` + +echo "Packaging from tag $tag..." + +hg archive -r"$tag" --subrepos --exclude sv-dependency-builds /tmp/sonic-visualiser-"$tag".tar.gz + diff -r e2eca1898050 -r 2700e13716ef main/MainWindow.cpp --- a/main/MainWindow.cpp Tue Jun 17 13:20:36 2014 +0100 +++ b/main/MainWindow.cpp Wed Jun 18 13:56:00 2014 +0100 @@ -283,6 +283,8 @@ m_currentLabel = new QLabel; statusBar()->addPermanentWidget(m_currentLabel); + finaliseMenus(); + connect(m_viewManager, SIGNAL(activity(QString)), m_activityLog, SLOT(activityHappened(QString))); connect(m_playSource, SIGNAL(activity(QString)), @@ -1135,6 +1137,11 @@ QString mainText, shortcutText, tipText, channelText; LayerFactory::LayerType type = backgroundTypes[i]; bool mono = true; + +// Avoid warnings/errors with -Wextra because we aren't explicitly +// handling all layer types (-Wall is OK with this because of the +// default but the stricter level insists) +#pragma GCC diagnostic ignored "-Wswitch-enum" switch (type) { @@ -2311,8 +2318,8 @@ QString description; - size_t ssr = getMainModel()->getSampleRate(); - size_t tsr = ssr; + int ssr = getMainModel()->getSampleRate(); + int tsr = ssr; if (m_playSource) tsr = m_playSource->getTargetSampleRate(); if (ssr != tsr) { @@ -2778,7 +2785,7 @@ visible = pane->getImageSize(pane->getFirstVisibleFrame(), pane->getLastVisibleFrame()); - size_t sf0 = 0, sf1 = 0; + int sf0 = 0, sf1 = 0; if (haveSelection) { MultiSelection::SelectionList selections = m_viewManager->getSelections(); @@ -2941,26 +2948,6 @@ } void -MainWindow::openSession() -{ - if (!checkSaveModified()) return; - - QString orig = m_audioFile; - if (orig == "") orig = "."; - else orig = QFileInfo(orig).absoluteDir().canonicalPath(); - - QString path = getOpenFileName(FileFinder::SessionFile); - - if (path.isEmpty()) return; - - if (openSessionFile(path) == FileOpenFailed) { - emit hideSplash(); - QMessageBox::critical(this, tr("Failed to open file"), - tr("File open failed
Session file \"%1\" could not be opened").arg(path));
- }
-}
-
-void
MainWindow::openSomething()
{
QString orig = m_audioFile;
@@ -3707,8 +3694,8 @@
if (defaultInputModel) break;
}
- size_t startFrame = 0, duration = 0;
- size_t endFrame = 0;
+ int startFrame = 0, duration = 0;
+ int endFrame = 0;
m_viewManager->getSelection().getExtents(startFrame, endFrame);
if (endFrame > startFrame) duration = endFrame - startFrame;
else startFrame = 0;
@@ -3907,7 +3894,7 @@
}
bool haveSelection = false;
- size_t startFrame = 0, endFrame = 0;
+ int startFrame = 0, endFrame = 0;
if (m_viewManager && m_viewManager->haveInProgressSelection()) {
@@ -3958,7 +3945,7 @@
if (!statusBar()->isVisible()) return;
Pane *pane = 0;
- size_t frame = m_viewManager->getPlaybackFrame();
+ int frame = m_viewManager->getPlaybackFrame();
if (m_paneStack) pane = m_paneStack->getCurrentPane();
if (!pane) return;
@@ -3985,7 +3972,7 @@
}
void
-MainWindow::sampleRateMismatch(size_t requested, size_t actual,
+MainWindow::sampleRateMismatch(int requested, int actual,
bool willResample)
{
if (!willResample) {
@@ -4042,7 +4029,7 @@
MIDIEvent ev(m_midiInput->readEvent());
- size_t frame = currentPane->alignFromReference(ev.getTime());
+ int frame = currentPane->alignFromReference(ev.getTime());
bool noteOn = (ev.getMessageType() == MIDIConstants::MIDI_NOTE_ON &&
ev.getVelocity() > 0);
@@ -4097,7 +4084,7 @@
}
void
-MainWindow::playStatusChanged(bool playing)
+MainWindow::playStatusChanged(bool )
{
Pane *currentPane = 0;
NoteLayer *currentNoteLayer = 0;
@@ -4219,7 +4206,7 @@
}
void
-MainWindow::modelGenerationWarning(QString transformName, QString message)
+MainWindow::modelGenerationWarning(QString /* transformName */, QString message)
{
emit hideSplash();
@@ -4253,7 +4240,8 @@
void
MainWindow::modelRegenerationWarning(QString layerName,
- QString transformName, QString message)
+ QString /* transformName */,
+ QString message)
{
emit hideSplash();
diff -r e2eca1898050 -r 2700e13716ef main/MainWindow.h
--- a/main/MainWindow.h Tue Jun 17 13:20:36 2014 +0100
+++ b/main/MainWindow.h Wed Jun 18 13:56:00 2014 +0100
@@ -47,7 +47,6 @@
void endFullScreen();
protected slots:
- virtual void openSession();
virtual void importAudio();
virtual void importMoreAudio();
virtual void replaceMainAudio();
@@ -66,7 +65,7 @@
virtual void closeSession();
virtual void preferences();
- virtual void sampleRateMismatch(size_t, size_t, bool);
+ virtual void sampleRateMismatch(int, int, bool);
virtual void audioOverloadPluginDisabled();
virtual void audioTimeStretchMultiChannelDisabled();
diff -r e2eca1898050 -r 2700e13716ef main/OSCHandler.cpp
--- a/main/OSCHandler.cpp Tue Jun 17 13:20:36 2014 +0100
+++ b/main/OSCHandler.cpp Wed Jun 18 13:56:00 2014 +0100
@@ -123,7 +123,7 @@
if (getMainModel()) {
- unsigned long frame = m_viewManager->getPlaybackFrame();
+ int frame = m_viewManager->getPlaybackFrame();
bool selection = false;
bool play = (message.getMethod() == "play");
@@ -255,7 +255,7 @@
Layer *layer = 0;
if (pane) layer = pane->getSelectedLayer();
if (layer) {
- size_t resolution;
+ int resolution;
layer->snapToFeatureFrame(pane, f0, resolution,
Layer::SnapLeft);
layer->snapToFeatureFrame(pane, f1, resolution,
diff -r e2eca1898050 -r 2700e13716ef main/main.cpp
--- a/main/main.cpp Tue Jun 17 13:20:36 2014 +0100
+++ b/main/main.cpp Wed Jun 18 13:56:00 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