From 2d4fe257cad8b10f284de7a0b10a1a297026e86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Thu, 12 Oct 2017 16:32:07 +0200 Subject: [PATCH] Remove some unused, local variables Change-Id: I453162d2d396bb3427064d3b1593bb6c71376605 Reviewed-by: Friedemann Kleint --- src/dbus/qdbusmetatype.cpp | 1 - src/gui/painting/qstroker.cpp | 2 -- src/gui/text/qtextodfwriter.cpp | 1 - src/tools/uic/cpp/cppwritedeclaration.cpp | 2 +- src/widgets/effects/qpixmapfilter.cpp | 1 - src/widgets/styles/qstylehelper.cpp | 1 - 6 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp index fb2b407997b..6ed6c43e9d5 100644 --- a/src/dbus/qdbusmetatype.cpp +++ b/src/dbus/qdbusmetatype.cpp @@ -216,7 +216,6 @@ Q_GLOBAL_STATIC(QReadWriteLock, customTypesLock) void QDBusMetaType::registerMarshallOperators(int id, MarshallFunction mf, DemarshallFunction df) { - QByteArray var; QVector *ct = customTypes(); if (id < 0 || !mf || !df || !ct) return; // error! diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp index c52792c2d32..4776545be6c 100644 --- a/src/gui/painting/qstroker.cpp +++ b/src/gui/painting/qstroker.cpp @@ -1147,8 +1147,6 @@ void QDashStroker::processCurrentSubpath() QLineF cline; - QPainterPath dashPath; - QSubpathFlatIterator it(&m_elements, m_dashThreshold); qfixed2d prev = it.next(); diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp index e228b3c8400..3dd19a6eda0 100644 --- a/src/gui/text/qtextodfwriter.cpp +++ b/src/gui/text/qtextodfwriter.cpp @@ -381,7 +381,6 @@ void QTextOdfWriter::writeInlineCharacter(QXmlStreamWriter &writer, const QTextF } if (image.isNull()) { - QString context; if (image.isNull()) { // try direct loading name = imageFormat.name(); // remove qrc:/ prefix again image.load(name); diff --git a/src/tools/uic/cpp/cppwritedeclaration.cpp b/src/tools/uic/cpp/cppwritedeclaration.cpp index 3aadc878e36..6ebef1cc41d 100644 --- a/src/tools/uic/cpp/cppwritedeclaration.cpp +++ b/src/tools/uic/cpp/cppwritedeclaration.cpp @@ -105,7 +105,7 @@ void WriteDeclaration::acceptUI(DomUI *node) QString qualifiedClassName = node->elementClass() + m_option.postfix; QString className = qualifiedClassName; - QString varName = m_driver->findOrInsertWidget(node->elementWidget()); + m_driver->findOrInsertWidget(node->elementWidget()); QString widgetClassName = node->elementWidget()->attributeClass(); QString exportMacro = node->elementExportMacro(); diff --git a/src/widgets/effects/qpixmapfilter.cpp b/src/widgets/effects/qpixmapfilter.cpp index 9d70825b0ee..211c09ee710 100644 --- a/src/widgets/effects/qpixmapfilter.cpp +++ b/src/widgets/effects/qpixmapfilter.cpp @@ -925,7 +925,6 @@ void QPixmapBlurFilter::draw(QPainter *painter, const QPointF &p, const QPixmap scaledRadius /= scale; QImage srcImage; - QImage destImage; if (srcRect == src.rect()) { srcImage = src.toImage(); diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 24d90fc0bab..141b731b651 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -278,7 +278,6 @@ void drawDial(const QStyleOptionSlider *option, QPainter *painter) buttonColor.setHsv(buttonColor .hue(), qMin(140, buttonColor .saturation()), qMax(180, buttonColor.value())); - QColor shadowColor(0, 0, 0, 20); if (enabled) { // Drop shadow