Commit fbe31bde authored by Vincent PINON's avatar Vincent PINON

fix scan-build warnings (1)

parent 17cbdbe7
......@@ -59,7 +59,6 @@ static const int SLIDETAB = 3;
static const int IMAGETAB = 4;
static const int MARKERTAB = 5;
static const int METATAB = 6;
static const int ADVANCEDTAB = 7;
ClipProperties::ClipProperties(DocClipBase *clip, const Timecode &tc, double fps, QWidget * parent) :
......
......@@ -123,8 +123,6 @@ QImage HistogramGenerator::calculateHistogram(const QSize &paradeSize, const QIm
if (drawB) {
drawComponentFull(&davinci, b, scaling, QRect(0, wy, ww, partH + dist), QColor(0, 128, 255, 255), dist, unscaled, 256);
wy += partH + d;
}
return histogram;
......
......@@ -17,7 +17,6 @@
#endif
const QString EXTENSION_PNG = ".png";
const int SCALE_RANGE = 80;
ColorPlaneExport::ColorPlaneExport(QWidget *parent) :
QDialog(parent)
......
......@@ -33,7 +33,6 @@ public:
private:
ColorTools *m_colorTools;
float m_scaling;
float m_Y;
void enableSliderScaling(bool enable);
void enableSliderColor(bool enable);
void enableCbVariant(bool enable);
......
......@@ -1191,7 +1191,7 @@ void KdenliveSettingsDialog::slotEditVideo4LinuxProfile()
void KdenliveSettingsDialog::slotReloadBlackMagic()
{
Render::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice, true);
if (!Render::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device), true) {
if (!Render::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device, true)) {
// No blackmagic card found
m_configSdl.kcfg_external_display->setEnabled(false);
}
......
......@@ -120,8 +120,8 @@ void FFTTools::fftNormalized(const QVector<int16_t> audioFrame, const uint chann
const uint numSamples = audioFrame.size()/numChannels;
Q_ASSERT((windowSize & 1) == 0);
Q_ASSERT(windowSize > 0);
if (windowSize & 1 || windowSize < 2)
return;
const QString cfgSig = cfgSignature(windowSize);
const QString winSig = windowSignature(windowType, windowSize, param);
......
......@@ -102,13 +102,11 @@ Point2 NearestPointOnCurve(Point2 P, Point2 *V, double *tOut)
free((char *)w);
/* Compare distances of P to all candidates, and to t=0, and t=1 */
{
double dist, new_dist;
Point2 p;
Vector2 v;
int i;
/* Check distance to beginning of curve, where t = 0 */
dist = V2SquaredLength(V2Sub(&P, &V[0], &v));
t = 0.0;
......@@ -127,13 +125,11 @@ Point2 NearestPointOnCurve(Point2 P, Point2 *V, double *tOut)
/* Finally, look at distance to end point, where t = 1.0 */
new_dist = V2SquaredLength(V2Sub(&P, &V[DEGREE], &v));
if (new_dist < dist) {
dist = new_dist;
t = 1.0;
}
}
/* Return the point on the curve at parameter value t */
// printf("t : %4.12f\n", t);
// printf("t : %4.12f\n", t);
*tOut = t;
return (Bezier(V, DEGREE, t, (Point2 *)NULL, (Point2 *)NULL));
}
......@@ -225,10 +221,10 @@ static int FindRoots(Point2 *w, int degree, double *t, int depth)
right_t[W_DEGREE+1];
switch (CrossingCount(w, degree)) {
case 0 : { /* No solutions here */
case 0 : /* No solutions here */
return 0;
}
case 1 : { /* Unique solution */
case 1 : /* Unique solution */
/* Stop recursion when the tree is deep enough */
/* if deep enough, return 1 solution at midpoint */
if (depth >= MAXDEPTH) {
......@@ -241,7 +237,6 @@ static int FindRoots(Point2 *w, int degree, double *t, int depth)
}
break;
}
}
/* Otherwise, solve recursively after */
/* subdividing control polygon */
......@@ -252,10 +247,10 @@ static int FindRoots(Point2 *w, int degree, double *t, int depth)
/* Gather solutions together */
for (i = 0; i < left_count; ++i) {
t[i] = left_t[i];
t[i] = left_t[i]; /* FIXME: static analyzer says left_t can be undefined */
}
for (i = 0; i < right_count; ++i) {
t[i+left_count] = right_t[i];
t[i+left_count] = right_t[i]; /* FIXME: static analyzer says right_t can be undefined */
}
/* Send back total number of solutions */
......@@ -277,7 +272,7 @@ static int CrossingCount(Point2 *V, int degree)
int n_crossings = 0; /* Number of zero-crossings */
int sign, old_sign; /* Sign of coefficients */
sign = old_sign = SGN(V[0].y);
old_sign = SGN(V[0].y);
for (i = 1; i <= degree; ++i) {
sign = SGN(V[i].y);
if (sign != old_sign) n_crossings++;
......
......@@ -94,15 +94,13 @@ AbstractScopeWidget::AbstractScopeWidget(bool trackMouse, QWidget *parent) :
this->setContextMenuPolicy(Qt::CustomContextMenu);
bool b = true;
b &= connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(customContextMenuRequested(QPoint)));
b &= connect(this, SIGNAL(signalHUDRenderingFinished(uint,uint)), this, SLOT(slotHUDRenderingFinished(uint,uint)));
b &= connect(this, SIGNAL(signalScopeRenderingFinished(uint,uint)), this, SLOT(slotScopeRenderingFinished(uint,uint)));
b &= connect(this, SIGNAL(signalBackgroundRenderingFinished(uint,uint)), this, SLOT(slotBackgroundRenderingFinished(uint,uint)));
b &= connect(m_aRealtime, SIGNAL(toggled(bool)), this, SLOT(slotResetRealtimeFactor(bool)));
b &= connect(m_aAutoRefresh, SIGNAL(toggled(bool)), this, SLOT(slotAutoRefreshToggled(bool)));
Q_ASSERT(b);
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(customContextMenuRequested(QPoint)));
connect(this, SIGNAL(signalHUDRenderingFinished(uint,uint)), this, SLOT(slotHUDRenderingFinished(uint,uint)));
connect(this, SIGNAL(signalScopeRenderingFinished(uint,uint)), this, SLOT(slotScopeRenderingFinished(uint,uint)));
connect(this, SIGNAL(signalBackgroundRenderingFinished(uint,uint)), this, SLOT(slotBackgroundRenderingFinished(uint,uint)));
connect(m_aRealtime, SIGNAL(toggled(bool)), this, SLOT(slotResetRealtimeFactor(bool)));
connect(m_aAutoRefresh, SIGNAL(toggled(bool)), this, SLOT(slotAutoRefreshToggled(bool)));
// Enable mouse tracking if desired.
// Causes the mouseMoved signal to be emitted when the mouse moves inside the
......
......@@ -84,11 +84,9 @@ AudioSpectrum::AudioSpectrum(QWidget *parent) :
ui->windowFunction->addItem(i18n("Hamming window"), FFTTools::Window_Hamming);
bool b = true;
b &= connect(m_aResetHz, SIGNAL(triggered()), this, SLOT(slotResetMaxFreq()));
b &= connect(ui->windowFunction, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdate()));
b &= connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
Q_ASSERT(b);
connect(m_aResetHz, SIGNAL(triggered()), this, SLOT(slotResetMaxFreq()));
connect(ui->windowFunction, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdate()));
connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
// Note: These strings are used in both Spectogram and AudioSpectrum. Ideally change both (if necessary) to reduce workload on translators
......
......@@ -76,11 +76,9 @@ Spectrogram::Spectrogram(QWidget *parent) :
ui->windowSize->setToolTip(i18n("A bigger window improves the accuracy at the cost of computational power."));
ui->windowFunction->setToolTip(i18n("The rectangular window function is good for signals with equal signal strength (narrow peak), but creates more smearing. See Window function on Wikipedia."));
bool b = true;
b &= connect(m_aResetHz, SIGNAL(triggered()), this, SLOT(slotResetMaxFreq()));
b &= connect(ui->windowFunction, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdate()));
b &= connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
Q_ASSERT(b);
connect(m_aResetHz, SIGNAL(triggered()), this, SLOT(slotResetMaxFreq()));
connect(ui->windowFunction, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdate()));
connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
AbstractScopeWidget::init();
}
......
......@@ -20,8 +20,6 @@
#ifdef DEBUG_AGSW
#endif
const int REALTIME_FPS = 30;
AbstractGfxScopeWidget::AbstractGfxScopeWidget(bool trackMouse, QWidget *parent) :
AbstractScopeWidget(trackMouse, parent)
{
......
......@@ -37,16 +37,14 @@ Histogram::Histogram(QWidget *parent) :
m_menu->addAction(m_aRec601);
m_menu->addAction(m_aRec709);
bool b = true;
b &= connect(ui->cbY, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(ui->cbS, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(ui->cbR, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(ui->cbG, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(ui->cbB, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(m_aUnscaled, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(m_aRec601, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(m_aRec709, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
Q_ASSERT(b);
connect(ui->cbY, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(ui->cbS, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(ui->cbR, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(ui->cbG, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(ui->cbB, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(m_aUnscaled, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(m_aRec601, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(m_aRec709, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
init();
m_histogramGenerator = new HistogramGenerator();
......
......@@ -24,22 +24,20 @@ RGBParade::RGBParade(QWidget *parent) :
ui->paintMode->addItem(i18n("RGB"), QVariant(RGBParadeGenerator::PaintMode_RGB));
ui->paintMode->addItem(i18n("White"), QVariant(RGBParadeGenerator::PaintMode_White));
bool b = true;
m_menu->addSeparator();
m_aAxis = new QAction(i18n("Draw axis"), this);
m_aAxis->setCheckable(true);
m_menu->addAction(m_aAxis);
b &= connect(m_aAxis, SIGNAL(changed()), this, SLOT(forceUpdateScope()));
connect(m_aAxis, SIGNAL(changed()), this, SLOT(forceUpdateScope()));
m_aGradRef = new QAction(i18n("Gradient reference line"), this);
m_aGradRef->setCheckable(true);
m_menu->addAction(m_aGradRef);
b &= connect(m_aGradRef, SIGNAL(changed()), this, SLOT(forceUpdateScope()));
connect(m_aGradRef, SIGNAL(changed()), this, SLOT(forceUpdateScope()));
b &= connect(ui->paintMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdateScope()));
b &= connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
Q_ASSERT(b);
connect(ui->paintMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdateScope()));
connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
m_rgbParadeGenerator = new RGBParadeGenerator();
init();
......
......@@ -22,7 +22,6 @@
#include "colorcorrection/vectorscopegenerator.h"
const float P75 = .75;
const unsigned char DEFAULT_Y = 255;
const QPointF YUV_R(-.147, .615);
const QPointF YUV_G(-.289, -.515);
......@@ -65,11 +64,10 @@ Vectorscope::Vectorscope(QWidget *parent) :
ui->sliderGain->setMinimum(0);
ui->sliderGain->setMaximum(40);
bool b = true;
b &= connect(ui->backgroundMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotBackgroundChanged()));
b &= connect(ui->sliderGain, SIGNAL(valueChanged(int)), this, SLOT(slotGainChanged(int)));
b &= connect(ui->paintMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdateScope()));
b &= connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
connect(ui->backgroundMode, SIGNAL(currentIndexChanged(int)), this, SLOT(slotBackgroundChanged()));
connect(ui->sliderGain, SIGNAL(valueChanged(int)), this, SLOT(slotGainChanged(int)));
connect(ui->paintMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdateScope()));
connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
ui->sliderGain->setValue(0);
......@@ -79,24 +77,24 @@ Vectorscope::Vectorscope(QWidget *parent) :
m_aExportBackground = new QAction(i18n("Export background"), this);
m_menu->addAction(m_aExportBackground);
b &= connect(m_aExportBackground, SIGNAL(triggered()), this, SLOT(slotExportBackground()));
connect(m_aExportBackground, SIGNAL(triggered()), this, SLOT(slotExportBackground()));
m_menu->addSeparator()->setText(i18n("Drawing options"));
m_a75PBox = new QAction(i18n("75% box"), this);
m_a75PBox->setCheckable(true);
m_menu->addAction(m_a75PBox);
b &= connect(m_a75PBox, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));
connect(m_a75PBox, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));
m_aAxisEnabled = new QAction(i18n("Draw axis"), this);
m_aAxisEnabled->setCheckable(true);
m_menu->addAction(m_aAxisEnabled);
b &= connect(m_aAxisEnabled, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));
connect(m_aAxisEnabled, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));
m_aIQLines = new QAction(i18n("Draw I/Q lines"), this);
m_aIQLines->setCheckable(true);
m_menu->addAction(m_aIQLines);
b &= connect(m_aIQLines, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));
connect(m_aIQLines, SIGNAL(changed()), this, SLOT(forceUpdateBackground()));
m_menu->addSeparator()->setText(i18n("Color Space"));
m_aColorSpace_YPbPr = new QAction(i18n("YPbPr"), this);
......@@ -108,10 +106,8 @@ Vectorscope::Vectorscope(QWidget *parent) :
m_agColorSpace->addAction(m_aColorSpace_YUV);
m_menu->addAction(m_aColorSpace_YPbPr);
m_menu->addAction(m_aColorSpace_YUV);
b &= connect(m_aColorSpace_YPbPr, SIGNAL(toggled(bool)), this, SLOT(slotColorSpaceChanged()));
b &= connect(m_aColorSpace_YUV, SIGNAL(toggled(bool)), this, SLOT(slotColorSpaceChanged()));
Q_ASSERT(b);
connect(m_aColorSpace_YPbPr, SIGNAL(toggled(bool)), this, SLOT(slotColorSpaceChanged()));
connect(m_aColorSpace_YUV, SIGNAL(toggled(bool)), this, SLOT(slotColorSpaceChanged()));
// To make the 1.0x text show
slotGainChanged(ui->sliderGain->value());
......
......@@ -47,12 +47,10 @@ Waveform::Waveform(QWidget *parent) :
m_menu->addAction(m_aRec709);
bool b = true;
b &= connect(ui->paintMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdateScope()));
b &= connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
b &= connect(m_aRec601, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
b &= connect(m_aRec709, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
Q_ASSERT(b);
connect(ui->paintMode, SIGNAL(currentIndexChanged(int)), this, SLOT(forceUpdateScope()));
connect(this, SIGNAL(signalMousePositionChanged()), this, SLOT(forceUpdateHUD()));
connect(m_aRec601, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
connect(m_aRec709, SIGNAL(toggled(bool)), this, SLOT(forceUpdateScope()));
init();
m_waveformGenerator = new WaveformGenerator();
......
......@@ -27,11 +27,9 @@ ScopeManager::ScopeManager(MonitorManager *monitorManager) :
{
m_signalMapper = new QSignalMapper(this);
bool b = true;
b &= connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateActiveRenderer()));
b &= connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes()));
b &= connect(m_signalMapper, SIGNAL(mapped(QString)), this, SLOT(slotRequestFrame(QString)));
Q_ASSERT(b);
connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateActiveRenderer()));
connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes()));
connect(m_signalMapper, SIGNAL(mapped(QString)), this, SLOT(slotRequestFrame(QString)));
slotUpdateActiveRenderer();
}
......@@ -60,14 +58,11 @@ bool ScopeManager::addScope(AbstractAudioScopeWidget *audioScope, QDockWidget *a
asd.scopeDockWidget = audioScopeWidget;
m_audioScopes.append(asd);
bool b = true;
b &= connect(audioScope, SIGNAL(requestAutoRefresh(bool)), this, SLOT(slotCheckActiveScopes()));
// b &= connect(audioScope, SIGNAL(signalFrameRequest(QString)), this, SLOT(slotRequestFrame(QString)));
connect(audioScope, SIGNAL(requestAutoRefresh(bool)), this, SLOT(slotCheckActiveScopes()));
if (audioScopeWidget != NULL) {
b &= connect(audioScopeWidget, SIGNAL(visibilityChanged(bool)), this, SLOT(slotCheckActiveScopes()));
b &= connect(audioScopeWidget, SIGNAL(visibilityChanged(bool)), m_signalMapper, SLOT(map()));
connect(audioScopeWidget, SIGNAL(visibilityChanged(bool)), this, SLOT(slotCheckActiveScopes()));
connect(audioScopeWidget, SIGNAL(visibilityChanged(bool)), m_signalMapper, SLOT(map()));
}
Q_ASSERT(b);
added = true;
}
......@@ -95,14 +90,12 @@ bool ScopeManager::addScope(AbstractGfxScopeWidget *colorScope, QDockWidget *col
gsd.scopeDockWidget = colorScopeWidget;
m_colorScopes.append(gsd);
bool b = true;
b &= connect(colorScope, SIGNAL(requestAutoRefresh(bool)), this, SLOT(slotCheckActiveScopes()));
b &= connect(colorScope, SIGNAL(signalFrameRequest(QString)), this, SLOT(slotRequestFrame(QString)));
connect(colorScope, SIGNAL(requestAutoRefresh(bool)), this, SLOT(slotCheckActiveScopes()));
connect(colorScope, SIGNAL(signalFrameRequest(QString)), this, SLOT(slotRequestFrame(QString)));
if (colorScopeWidget != NULL) {
b &= connect(colorScopeWidget, SIGNAL(visibilityChanged(bool)), this, SLOT(slotCheckActiveScopes()));
b &= connect(colorScopeWidget, SIGNAL(visibilityChanged(bool)), m_signalMapper, SLOT(map()));
connect(colorScopeWidget, SIGNAL(visibilityChanged(bool)), this, SLOT(slotCheckActiveScopes()));
connect(colorScopeWidget, SIGNAL(visibilityChanged(bool)), m_signalMapper, SLOT(map()));
}
Q_ASSERT(b);
added = true;
}
......@@ -190,15 +183,12 @@ void ScopeManager::slotClearColorScopes()
void ScopeManager::slotUpdateActiveRenderer()
{
bool b = true;
// Disconnect old connections
if (m_lastConnectedRenderer != NULL) {
#ifdef DEBUG_SM
qDebug() << "Disconnected previous renderer: " << m_lastConnectedRenderer->name();
#endif
b &= m_lastConnectedRenderer->disconnect(this);
Q_ASSERT(b);
m_lastConnectedRenderer->disconnect(this);
}
m_lastConnectedRenderer = m_monitorManager->activeRenderer();
......@@ -207,11 +197,10 @@ void ScopeManager::slotUpdateActiveRenderer()
// Connect new renderer
if (m_lastConnectedRenderer != NULL) {
b &= connect(m_lastConnectedRenderer, SIGNAL(frameUpdated(QImage)),
connect(m_lastConnectedRenderer, SIGNAL(frameUpdated(QImage)),
this, SLOT(slotDistributeFrame(QImage)), Qt::UniqueConnection);
b &= connect(m_lastConnectedRenderer, SIGNAL(audioSamplesSignal(QVector<int16_t>,int,int,int)),
connect(m_lastConnectedRenderer, SIGNAL(audioSamplesSignal(QVector<int16_t>,int,int,int)),
this, SLOT(slotDistributeAudio(QVector<int16_t>,int,int,int)), Qt::UniqueConnection);
Q_ASSERT(b);
#ifdef DEBUG_SM
qDebug() << "Renderer connected to ScopeManager: " << m_lastConnectedRenderer->name();
......
......@@ -191,10 +191,12 @@ bool ArchiveOrg::startItemPreview(QListWidgetItem *item)
if (!item) return false;
QString url = item->data(previewRole).toString();
if (url.isEmpty()) return false;
if (m_previewProcess && m_previewProcess->state() != QProcess::NotRunning) {
if (m_previewProcess) {
if (m_previewProcess->state() != QProcess::NotRunning) {
m_previewProcess->close();
}
m_previewProcess->start(KdenliveSettings::ffplaypath(), QStringList() << url << "-nodisp");
}
return true;
}
......
......@@ -205,15 +205,17 @@ bool FreeSound::startItemPreview(QListWidgetItem *item)
const QString url = item->data(previewRole).toString();
if (url.isEmpty())
return false;
if (m_previewProcess && m_previewProcess->state() != QProcess::NotRunning) {
if (m_previewProcess) {
if (m_previewProcess->state() != QProcess::NotRunning) {
m_previewProcess->close();
}
m_previewProcess->start(KdenliveSettings::ffplaypath(), QStringList() << url << "-nodisp");
}
return true;
}
void FreeSound::stopItemPreview(QListWidgetItem */*item*/)
void FreeSound::stopItemPreview(QListWidgetItem * /*item*/)
{
if (m_previewProcess && m_previewProcess->state() != QProcess::NotRunning) {
m_previewProcess->close();
......
......@@ -329,7 +329,7 @@ void ResourceWidget::slotChangeService()
m_currentService = new OpenClipArt(search_results);
} else if (service == ARCHIVEORG) {
m_currentService = new ArchiveOrg(search_results);
}
} else return;
connect(m_currentService, SIGNAL(gotMetaInfo(QString)), this, SLOT(slotSetMetadata(QString)));
connect(m_currentService, SIGNAL(gotMetaInfo(QMap<QString,QString>)), this, SLOT(slotDisplayMetaInfo(QMap<QString,QString>)));
......
......@@ -1160,7 +1160,7 @@ void TitleWidget::slotValueChanged(int type)
double alpha = (double) t.rotatez / 180.0 * M_PI;
// New length
double length = val;
double length;
// Scaling factor
double scale = 1;
......@@ -2193,12 +2193,12 @@ void TitleWidget::deleteAnimInfoText()
// end animation editing, remove info text
while (!m_startViewport->childItems().isEmpty()) {
QGraphicsItem *item = m_startViewport->childItems().at(0);
m_scene->removeItem(item);
if (m_scene) m_scene->removeItem(item);
delete item;
}
while (!m_endViewport->childItems().isEmpty()) {
QGraphicsItem *item = m_endViewport->childItems().at(0);
m_scene->removeItem(item);
if (m_scene) m_scene->removeItem(item);
delete item;
}
}
......
......@@ -122,7 +122,7 @@ uint MltPreview::imageVariance(const QImage &image)
uint delta = 0;
uint avg = 0;
uint bytes = image.numBytes();
if (bytes == 0) return 0;
if (bytes < 2) return 0;
uint STEPS = bytes / 2;
QVarLengthArray<uchar> pivot(STEPS);
kDebug(DBG_AREA) << "Using " << STEPS << " steps\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment