Commit 58294261 authored by Sune Vuorela's avatar Sune Vuorela

clean up a lot of unused-but-set-variable warnings

parent f6059d5d
......@@ -282,6 +282,7 @@ void KisPainter::bitBltWithFixedSelection(qint32 dstX, qint32 dstY,
/* Trying to read outside a KisFixedPaintDevice is inherently wrong and shouldn't be done,
so crash if someone attempts to do this. Don't resize YET as it would obfuscate the mistake. */
Q_ASSERT(selection->bounds().contains(selRect));
Q_UNUSED(selRect); // only used by the above Q_ASSERT
/* KisPaintDevice is a tricky beast, and it can easily have unpredictable exactBounds() or extent()
in limit cases (for example, when brushes become too small in a brush engine). That's why there's no
......@@ -831,6 +832,7 @@ void KisPainter::bltFixed(qint32 dstX, qint32 dstY,
/* Trying to read outside a KisFixedPaintDevice is inherently wrong and shouldn't be done,
so crash if someone attempts to do this. Don't resize as it would obfuscate the mistake. */
Q_ASSERT(srcDev->bounds().contains(srcRect));
Q_UNUSED(srcRect); // only used in above assertion
// Convenient renaming
const KoColorSpace * srcCs = d->colorSpace;
......@@ -901,7 +903,9 @@ void KisPainter::bltFixedWithFixedSelection(qint32 dstX, qint32 dstY,
/* Trying to read outside a KisFixedPaintDevice is inherently wrong and shouldn't be done,
so crash if someone attempts to do this. Don't resize as it would obfuscate the mistake. */
Q_ASSERT(srcDev->bounds().contains(srcRect));
Q_UNUSED(srcRect); // only used in above assertion
Q_ASSERT(selection->bounds().contains(selRect));
Q_UNUSED(selRect); // only used in above assertion
/* Create an intermediate byte array to hold information before it is written
to the current paint device (aka: d->device) */
......@@ -1866,7 +1870,7 @@ void KisPainter::drawThickLine(const QPointF & start, const QPointF & end, int s
KoColor col1(c1);
KoColor col2(c1);
float grada, gradb, dxa, dxb, dya, dyb, adya, adyb, fraca, fracb,
float grada, gradb, dxa, dxb, dya, dyb, fraca, fracb,
xfa, yfa, xfb, yfb, b1a, b2a, b1b, b2b, dstX, dstY;
int x, y, ix1, ix2, iy1, iy2;
......@@ -1982,12 +1986,6 @@ void KisPainter::drawThickLine(const QPointF & start, const QPointF & end, int s
dxb = x1b - x0b; // run of b
dyb = y1b - y0b; // rise of b
if (dya < 0) adya = -dya;
else adya = dya;
if (dyb < 0) adyb = -dyb;
else adyb = dyb;
if (horizontal) { // horizontal-ish lines
if (x1 < x0) {
int xt, yt, wt;
......
......@@ -148,6 +148,7 @@ void KisTileCompressor2::decompressTileData(quint8 *buffer,
(quint8*)m_linearizationBuffer.data(), tileDataSize);
Q_ASSERT(bytesWritten == tileDataSize);
Q_UNUSED(bytesWritten); // unused-but-set-variable
KisAbstractCompression::delinearizeColors((quint8*)m_linearizationBuffer.data(),
tileData->data(),
......
......@@ -182,7 +182,7 @@ void KisDropshadow::gaussianblur(KoUpdater * progressUpdater, KisPaintDeviceSP s
double *val_p = NULL;
double *val_m = NULL;
double *vp, *vm;
qint32 x1, y1, x2, y2;
qint32 x1, y1;
qint32 i, j;
qint32 row, col, b;
qint32 terms;
......@@ -203,8 +203,6 @@ void KisDropshadow::gaussianblur(KoUpdater * progressUpdater, KisPaintDeviceSP s
y1 = (qint32)(rect.y() - vert);
width = (qint32)(rect.width() + 2 * horz);
height = (qint32)(rect.height() + 2 * vert);
x2 = x1 + width;
y2 = y1 + height;
if (width < 1 || height < 1) return;
......
......@@ -39,7 +39,7 @@ int div2(const unsigned int n)
double pyramid_lookup(int x, int y, int level)
/* PRE: */
{
int n, s;
int s;
/* Level 0 is a special case, the value is just the image */
if (level == 0) {
......@@ -51,7 +51,6 @@ double pyramid_lookup(int x, int y, int level)
/* Compute the size of the slice */
level--;
n = 1 << level;
s = PyramidWidth0 >> level;
//x = x >> level;
......
......@@ -225,20 +225,10 @@ void compress_base(double **base, int width, int height)
double maxval = -1e20;
double factor;
int minx, miny, maxx, maxy;
fprintf(stderr, "Compressing base layer\n");
for (y = 0; y < height; y++)
for (x = 0; x < width; x++) {
if (base[y][x] < minval) {
minx = x;
miny = y;
}
if (base[y][x] > maxval) {
maxx = x;
maxy = y;
}
minval = (minval < base[y][x]) ? minval : base[y][x];
maxval = (maxval > base[y][x]) ? maxval : base[y][x];
}
......
......@@ -65,7 +65,6 @@ void KisFilterColorToAlpha::process(KisPaintDeviceSP device,
KoUpdater* progressUpdater
) const
{
QPoint srcTopLeft = rect.topLeft();
Q_ASSERT(device != 0);
if (config == 0) config = new KisFilterConfiguration("colortoalpha", 1);
......
......@@ -125,7 +125,6 @@ void KisFilterMin::process(KisPaintDeviceSP device,
) const
{
Q_UNUSED(config);
QPoint srcTopLeft = rect.topLeft();
Q_ASSERT(device != 0);
int pixelsProcessed = 0;
......
......@@ -106,7 +106,6 @@ void KisAutoContrast::process(KisPaintDeviceSP device,
const KisFilterConfiguration* config,
KoUpdater* progressUpdater) const
{
QPoint srcTopLeft = applyRect.topLeft();
Q_ASSERT(device != 0);
Q_UNUSED(config);
// initialize
......
......@@ -67,7 +67,6 @@ void KisBrightnessContrastFilterConfiguration::fromLegacyXML(const QDomElement&
void KisBrightnessContrastFilterConfiguration::fromXML(const QDomElement& root)
{
KisCubicCurve curve;
quint16 numTransfers = 0;
int version;
version = root.attribute("version").toInt();
......@@ -75,9 +74,7 @@ void KisBrightnessContrastFilterConfiguration::fromXML(const QDomElement& root)
QString attributeName;
while (!e.isNull()) {
if ((attributeName = e.attribute("name")) == "nTransfers") {
numTransfers = e.text().toUShort();
} else {
if ((attributeName = e.attribute("name")) != "nTransfers") {
QRegExp rx("curve(\\d+)");
if (rx.indexIn(attributeName, 0) != -1) {
quint16 index = rx.cap(1).toUShort();
......
......@@ -89,7 +89,6 @@ void KisFilterFastColorTransfer::process(KisPaintDeviceSP device,
const KisFilterConfiguration* config,
KoUpdater* progressUpdater) const
{
QPoint srcTopLeft = applyRect.topLeft();
Q_ASSERT(device != 0);
dbgPlugins << "Start transferring color";
......
......@@ -67,7 +67,6 @@ void KisWaveletNoiseReduction::process(KisPaintDeviceSP device,
KoUpdater* progressUpdater
) const
{
QPoint srcTopLeft = applyRect.topLeft();
Q_ASSERT(device);
// TODO take selections into account
float threshold;
......
......@@ -99,7 +99,6 @@ void KisFilterNoise::process(KisPaintDeviceSP device,
KoUpdater* progressUpdater
) const
{
QPoint srcTopLeft = applyRect.topLeft();
Q_ASSERT(!device.isNull());
if (progressUpdater) {
......
......@@ -82,7 +82,6 @@ void KisFilterRandomPick::process(KisPaintDeviceSP device,
KoUpdater* progressUpdater
) const
{
QPoint srcTopLeft = applyRect.topLeft();
Q_UNUSED(config);
Q_ASSERT(!device.isNull());
......
......@@ -68,7 +68,6 @@ void KisSmallTilesFilter::process(KisPaintDeviceSP device,
KoUpdater* progressUpdater
) const
{
QPoint srcTopLeft = applyRect.topLeft();
Q_ASSERT(!device.isNull());
//read the filter configuration values from the KisFilterConfiguration object
......
......@@ -137,8 +137,6 @@ void KisFilterWave::process(KisPaintDeviceSP device,
KoUpdater* progressUpdater
) const
{
QPoint srcTopLeft = applyRect.topLeft();
Q_ASSERT(device.data() != 0);
int cost = (applyRect.width() * applyRect.height()) / 100;
......
......@@ -409,7 +409,6 @@ KisImageBuilder_Result jp2Converter::buildFile(const KUrl& uri, KisPaintLayerSP
// Decode the file
opj_cinfo_t *cinfo = 0;
bool hasColorSpaceInfo = false;
/* get a decoder handle */
switch (parameters.decod_format) {
case J2K_CFMT: {
......@@ -418,7 +417,6 @@ KisImageBuilder_Result jp2Converter::buildFile(const KUrl& uri, KisPaintLayerSP
}
case JP2_CFMT: {
cinfo = opj_create_compress(CODEC_JP2);
hasColorSpaceInfo = true;
break;
}
case JPT_CFMT: {
......
......@@ -53,12 +53,6 @@ KoFilter::ConversionStatus KisJPEGImport::convert(const QByteArray&, const QByte
if (!doc)
return KoFilter::CreationError;
KisView2 * view = 0;
if (!doc->views().isEmpty()) {
view = static_cast<KisView2*>(doc->views().first());
}
QString filename = m_chain -> inputFile();
doc->prepareForImport();
......
......@@ -65,12 +65,6 @@ KoFilter::ConversionStatus KisODGImport::convert(const QByteArray& from, const Q
if (!doc)
return KoFilter::CreationError;
KisView2 * view = 0;
if (!doc->views().isEmpty()) {
view = static_cast<KisView2*>(doc->views().first());
}
QString filename = m_chain->inputFile();
KoStore* store = KoStore::createStore(filename, KoStore::Read, from, KoStore::Zip);
......
......@@ -53,12 +53,6 @@ KoFilter::ConversionStatus KisPNGImport::convert(const QByteArray&, const QByteA
if (!doc)
return KoFilter::CreationError;
KisView2 * view = 0;
if (!doc->views().isEmpty()) {
view = static_cast<KisView2*>(doc->views().first());
}
QString filename = m_chain -> inputFile();
doc -> prepareForImport();
......
......@@ -53,12 +53,6 @@ KoFilter::ConversionStatus KisTIFFImport::convert(const QByteArray&, const QByte
if (!doc)
return KoFilter::CreationError;
KisView2 * view = 0;
if (!doc->views().isEmpty()) {
view = static_cast<KisView2*>(doc->views().first());
}
QString filename = m_chain -> inputFile();
doc -> prepareForImport();
......
......@@ -93,7 +93,6 @@ void KisColorGenerator::generate(KisProcessingInformation dstInfo,
KoUpdater* progressUpdater) const
{
KisPaintDeviceSP dst = dstInfo.paintDevice();
QPoint dstTopLeft = dstInfo.topLeft();
Q_ASSERT(!dst.isNull());
Q_ASSERT(config);
......
......@@ -435,7 +435,6 @@ double HairyBrush::computeMousePressure(double distance)
void HairyBrush::colorifyBristles(KisRandomConstAccessor& acc, KoColorSpace * cs, QPointF point)
{
QPoint p = point.toPoint();
KoColor color(cs);
int pixelSize = cs->pixelSize();
......
......@@ -304,7 +304,6 @@ quint32 KisAbrBrushCollection::abr_brush_load_v6 (QDataStream & abr, AbrInfo *ab
Q_UNUSED(image_ID);
qint32 brush_size;
qint32 brush_end;
qint32 complement_to_4;
qint32 next_brush;
qint32 top, left, bottom, right;
......@@ -325,7 +324,6 @@ quint32 KisAbrBrushCollection::abr_brush_load_v6 (QDataStream & abr, AbrInfo *ab
brush_end++;
}
complement_to_4 = brush_end - brush_size;
next_brush = abr.device()->pos() + brush_end;
// discard key
......
......@@ -408,9 +408,6 @@ void KisBrush::generateMaskAndApplyMaskOrCreateDab(KisFixedPaintDeviceSP dst,
qint32 maskHeight = outputMask->height();
if (coloringInformation || dst->data() == 0 || dst->bounds().isEmpty()) {
// old bounds
QRect bounds = dst->bounds();
// new bounds. we don't care if there is some extra memory occcupied.
dst->setRect(QRect(0, 0, maskWidth, maskHeight));
dst->initialize();
......
......@@ -102,7 +102,6 @@ bool KisToolFill::flood(int startX, int startY)
QVector<QRect> dirty;
if (m_fillOnlySelection && selection) {
QRect rc = selection->selectedRect();
KisPaintDeviceSP filled = new KisPaintDevice(device->colorSpace());
KisFillPainter fillPainter(filled);
fillPainter.setProgress(updater->startSubtask());
......
......@@ -96,8 +96,6 @@ void KisToolSelectSimilar::mousePressEvent(KoPointerEvent *event)
if(PRESS_CONDITION(event, KisTool::HOVER_MODE,
Qt::LeftButton, Qt::NoModifier)) {
quint8 opacity = OPACITY_OPAQUE_U8;
KisPaintDeviceSP dev = currentNode()->projection();
if (!dev || !currentNode()->visible())
......@@ -113,7 +111,6 @@ void KisToolSelectSimilar::mousePressEvent(KoPointerEvent *event)
KoColor c;
dev->pixel(pos.x(), pos.y(), &c);
opacity = dev->colorSpace()->opacityU8(c.data());
// XXX we should make this configurable: "allow to select transparent"
// if (opacity > OPACITY_TRANSPARENT)
......
......@@ -328,9 +328,7 @@ void KisToolTransform::recalcOutline()
s = m_canvas->viewConverter()->documentToView(s);
v = QVector3D(m_originalTopLeft - m_originalCenter);
QPointF tmp1 = m_originalTopLeft - m_originalCenter;
t = transformVector(v);
QVector3D temp = t;
m_topLeft = t + translate3D;
m_topLeftProj = perspective(t.x(), t.y(), t.z()) + m_currentArgs.translate();
t = QVector3D(perspective(t.x(), t.y(), t.z()));
......@@ -476,7 +474,6 @@ void KisToolTransform::paint(QPainter& gc, const KoViewConverter &converter)
QPointF middletop = converter.documentToView(QPointF(m_middleTopProj.x() / kisimage->xRes(), m_middleTopProj.y() / kisimage->yRes()));
QPointF middlebottom = converter.documentToView(QPointF(m_middleBottomProj.x() / kisimage->xRes(), m_middleBottomProj.y() / kisimage->yRes()));
QPointF origtopleft = converter.documentToView(QPointF(m_originalTopLeft.x() / kisimage->xRes(), m_originalTopLeft.y() / kisimage->yRes()));
QPointF origbottomright = converter.documentToView(QPointF(m_originalBottomRight.x() / kisimage->xRes(), m_originalBottomRight.y() / kisimage->yRes()));
QRectF handleRect(- m_handleRadius / 2., - m_handleRadius / 2., m_handleRadius, m_handleRadius);
......@@ -540,12 +537,7 @@ void KisToolTransform::paint(QPainter& gc, const KoViewConverter &converter)
pen[1].setWidth(3);
QSizeF newRefSize = converter.documentToView(QSizeF(1 / kisimage->xRes(), 1 / kisimage->yRes()));
QPointF topleft = converter.documentToView(QPointF(m_topLeftProj.x() / kisimage->xRes(), m_topLeftProj.y() / kisimage->yRes()));
QPointF topright = converter.documentToView(QPointF(m_topRightProj.x() / kisimage->xRes(), m_topRightProj.y() / kisimage->yRes()));
QPointF bottomleft = converter.documentToView(QPointF(m_bottomLeftProj.x() / kisimage->xRes(), m_bottomLeftProj.y() / kisimage->yRes()));
QPointF bottomright = converter.documentToView(QPointF(m_bottomRightProj.x() / kisimage->xRes(), m_bottomRightProj.y() / kisimage->yRes()));
QPointF origtopleft = converter.documentToView(QPointF(m_originalTopLeft.x() / kisimage->xRes(), m_originalTopLeft.y() / kisimage->yRes()));
QPointF origbottomright = converter.documentToView(QPointF(m_originalBottomRight.x() / kisimage->xRes(), m_originalBottomRight.y() / kisimage->yRes()));
QRectF handleRect(- m_handleRadius / 2., - m_handleRadius / 2., m_handleRadius, m_handleRadius);
QRectF smallHandleRect(- m_handleRadius / 4., - m_handleRadius / 4., m_handleRadius / 2., m_handleRadius / 2.);
......
......@@ -55,7 +55,6 @@ KisFilterDialog::KisFilterDialog(QWidget* parent, KisNodeSP node, KisImageWSP im
QDialog(parent),
d(new Private)
{
QRect rc = node->extent();
setModal(false);
d->uiFilterDialog.setupUi(this);
......
......@@ -168,13 +168,11 @@ void KisLayerManager::updateGUI()
KisLayerSP layer;
qint32 nlayers = 0;
qint32 nvisible = 0;
if (image) {
layer = m_activeLayer;
nlayers = image->nlayers();
nvisible = nlayers - image->nHiddenLayers();
}
bool enable = image && layer && layer->visible() && !layer->userLocked() && !layer->systemLocked();
......@@ -219,14 +217,6 @@ void KisLayerManager::layerProperties()
if (!layer) return;
const KoColorSpace * cs = 0;
KisPaintLayer * pl = dynamic_cast<KisPaintLayer*>(layer.data());
if (pl) {
cs = pl->paintDevice()->colorSpace();
} else {
cs = layer->image()->colorSpace();
}
if (KisAdjustmentLayerSP alayer = KisAdjustmentLayerSP(dynamic_cast<KisAdjustmentLayer*>(layer.data()))) {
KisPaintDeviceSP dev = alayer->projection();
......
......@@ -165,7 +165,6 @@ void KisZoomManager::slotZoomChanged(KoZoomMode::Mode mode, qreal zoom)
{
Q_UNUSED(mode);
Q_UNUSED(zoom);
KisImageWSP image = m_view->image();
m_view->canvasBase()->notifyZoomChanged();
m_canvasController->pan(m_view->canvasBase()->coordinatesConverter()->updateOffsetAfterTransform());
......
......@@ -84,6 +84,7 @@ void KoPAPageDeleteCommand::redo()
index = m_document->takePage(page);
Q_ASSERT(index != -1);
}
Q_UNUSED(index); // to build with unused-but-set-variable
m_deletePages = true;
}
......
......@@ -42,8 +42,6 @@ KRDetailSectionData::KRDetailSectionData(const QDomElement &elemSource, KoReport
return;
}
bool have_detail = false;
QDomNodeList sections = elemSource.childNodes();
for (int nodeCounter = 0; nodeCounter < sections.count(); nodeCounter++) {
......@@ -101,7 +99,6 @@ KRDetailSectionData::KRDetailSectionData(const QDomElement &elemSource, KoReport
KRSectionData * sd = new KRSectionData(elemThis, report);
if (sd->isValid()) {
m_detailSection = sd;
have_detail = true;
} else
delete sd;
} else {
......
......@@ -341,9 +341,7 @@ qreal KoReportPreRendererPrivate::renderSectionSize(const KRSectionData & sectio
return intHeight;
QList<KoReportItemBase*> objects = sectionData.objects();
KoReportItemBase * elemThis;
foreach(KoReportItemBase *ob, objects) {
elemThis = ob;
QPointF offset(m_leftMargin, m_yOffset);
QVariant itemData = m_kodata->value(ob->itemDataSource());
......@@ -385,7 +383,6 @@ qreal KoReportPreRendererPrivate::renderSection(const KRSectionData & sectionDat
QList<KoReportItemBase*> objects = sectionData.objects();
KoReportItemBase * elemThis;
foreach(KoReportItemBase *ob, objects) {
elemThis = ob;
QPointF offset(m_leftMargin, m_yOffset);
QVariant itemData = m_kodata->value(ob->itemDataSource());
......
......@@ -217,10 +217,6 @@ void KoReportDesignerItemLine::mouseMoveEvent(QGraphicsSceneMouseEvent * event)
int KoReportDesignerItemLine::grabHandle(QPointF pos)
{
QRectF r = boundingRect();
QPointF center = r.center();
if (QRectF(line().p1().x(), line().p1().y() - 2, 5, 5).contains(pos)) {
// we are over point 1
return 1;
......
......@@ -230,10 +230,6 @@ void KoTextAnchor::resize(const QTextDocument *document, QTextInlineObject objec
}
} else {
qreal boundTop = fm.ascent();
qreal boundBottom = 0;
if (d->verticalRel == VChar) {
boundBottom = fm.descent();
}
switch (d->verticalPos) {
case VFromTop:
object.setAscent(qMax((qreal) 0, -d->distance.y()));
......
......@@ -159,10 +159,6 @@ bool KoTextInlineRdf::saveOdf(KoShapeSavingContext &context, KoXmlWriter *writer
kDebug(30015) << " this:" << (void*)this << " xmlid:" << d->id;
QString oldID = d->id;
KoSharedSavingData *sharedData = context.sharedData(KOTEXT_SHARED_SAVING_ID);
KoTextSharedSavingData *textSharedData = 0;
if (sharedData) {
textSharedData = dynamic_cast<KoTextSharedSavingData *>(sharedData);
}
QString newID = createXmlId(writer);
if (KoTextSharedSavingData *sharedData =
dynamic_cast<KoTextSharedSavingData *>(context.sharedData(KOTEXT_SHARED_SAVING_ID))) {
......
......@@ -1196,8 +1196,6 @@ int KoTextWriter::Private::checkForListItemChange(const QTextBlock &block)
int KoTextWriter::Private::checkForListChange(const QTextBlock &listBlock)
{
QTextBlock block(listBlock);
QTextList *textList;
textList = block.textList();
KoTextDocument textDocument(block.document());
KoList *list = textDocument.list(block);
......@@ -1449,7 +1447,6 @@ void KoTextWriter::Private::saveTableOfContents(QTextDocument *document, QHash<Q
writeBlocks(tocDocument, 0, endTitle, listStyles);
writer->endElement(); // text:index-title
QTextBlock block = tocDocument->rootFrame()->lastCursorPosition().block();
writeBlocks(tocDocument, endTitle, -1, listStyles);
writer->endElement(); // table:index-body
......
......@@ -1194,17 +1194,13 @@ void KoParagraphStyle::loadOdfProperties(KoShapeLoadingContext &scontext)
}
// Indentation (margin)
bool hasMarginLeft = false;
bool hasMarginRight = false;
const QString marginLeft(styleStack.property(KoXmlNS::fo, "margin-left" ));
if (!marginLeft.isEmpty()) {
setLeftMargin(KoText::parseLength(marginLeft));
hasMarginLeft = true;
}
const QString marginRight(styleStack.property(KoXmlNS::fo, "margin-right" ));
if (!marginRight.isEmpty()) {
setRightMargin(KoText::parseLength(marginRight));
hasMarginRight = true;
}
const QString marginTop(styleStack.property(KoXmlNS::fo, "margin-top"));
if (!marginTop.isEmpty()) {
......@@ -1217,8 +1213,6 @@ void KoParagraphStyle::loadOdfProperties(KoShapeLoadingContext &scontext)
const QString margin(styleStack.property(KoXmlNS::fo, "margin"));
if (!margin.isEmpty()) {
setMargin(KoText::parseLength(margin));
hasMarginLeft = true;
hasMarginRight = true;
}
// Automatic Text indent
......
......@@ -132,8 +132,6 @@ QRectF KoTableCellStyle::boundingRect(const QRectF &contentRect) const
void KoTableCellStyle::paintBackground(QPainter &painter, const QRectF &bounds) const
{
QRectF innerBounds = bounds;
if (hasProperty(CellBackgroundBrush)) {
painter.fillRect(bounds, background());
}
......
......@@ -29,18 +29,6 @@
#include "KoColorSpaceRegistry.h"
namespace
{
enum enumPaletteType {
FORMAT_UNKNOWN,
FORMAT_GPL, // Gimp palette
FORMAT_PAL, // RIFF palette
FORMAT_ACT // Photoshop binary color palette
};
}
/*
KoColorSet::KoColorSet(const KisGradient * gradient, qint32 nColors, const QString & name)
: super(QString("")),
......@@ -138,7 +126,6 @@ qint32 KoColorSet::nColors()
bool KoColorSet::init()
{
enumPaletteType format = FORMAT_UNKNOWN;
QString s = QString::fromUtf8(m_data.data(), m_data.count());
......@@ -149,7 +136,6 @@ bool KoColorSet::init()
if (s.startsWith("RIFF") || s.startsWith("PAL data")) {
format = FORMAT_PAL;
} else if (s.startsWith("GIMP Palette")) {
// XXX: No checks for wrong input yet!
quint32 index = 0;
......@@ -166,8 +152,6 @@ bool KoColorSet::init()
QColor color;
KoColorSetEntry e;
format = FORMAT_GPL;