summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-18 12:53:03 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-10-25 15:10:12 +0000
commit4935cbbdfb9dcefc36d1364c931270f98e8fb8bb (patch)
treef90a0b1df69a718d38d38eb54ed1a44a9c733871
parent112540645d78000ad8dfed1bca6662a10522aaf1 (diff)
downloadqttools-4935cbbdfb9dcefc36d1364c931270f98e8fb8bb.tar.gz
Qt Designer/Linguist/Assistant: Fix clazy-unused-non-trivial-variable
Change-Id: I45b89b7b0d33eb1e64daae1275661a79e27370df Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
-rw-r--r--src/assistant/help/qhelpsearchindexreader_default.cpp1
-rw-r--r--src/designer/src/components/propertyeditor/brushpropertymanager.cpp1
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.cpp2
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditorbutton.cpp1
-rw-r--r--src/designer/src/components/propertyeditor/propertyeditor.cpp1
-rw-r--r--src/designer/src/components/widgetbox/widgetboxtreewidget.cpp2
-rw-r--r--src/designer/src/lib/shared/qdesigner_membersheet.cpp1
-rw-r--r--src/designer/src/lib/shared/qdesigner_widgetbox.cpp1
-rw-r--r--src/linguist/linguist/errorsview.cpp1
-rw-r--r--src/linguist/linguist/mainwindow.cpp1
-rw-r--r--src/linguist/shared/qph.cpp1
-rw-r--r--src/linguist/shared/ts.cpp3
-rw-r--r--src/shared/qtpropertybrowser/qttreepropertybrowser.cpp1
13 files changed, 0 insertions, 17 deletions
diff --git a/src/assistant/help/qhelpsearchindexreader_default.cpp b/src/assistant/help/qhelpsearchindexreader_default.cpp
index 7f8c1bbf8..1154e49f0 100644
--- a/src/assistant/help/qhelpsearchindexreader_default.cpp
+++ b/src/assistant/help/qhelpsearchindexreader_default.cpp
@@ -94,7 +94,6 @@ static QString namespacePlaceholders(const QMultiMap<QString, QStringList> &name
static void bindNamespacesAndAttributes(QSqlQuery *query, const QMultiMap<QString, QStringList> &namespaces)
{
- QString placeholders;
const auto &namespaceList = namespaces.uniqueKeys();
for (const QString &ns : namespaceList) {
query->addBindValue(ns);
diff --git a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
index d40eb7404..c50e9d2bf 100644
--- a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
@@ -132,7 +132,6 @@ const BrushPropertyManager::EnumIndexIconMap &BrushPropertyManager::brushStyleIc
if (brushIcons()->empty()) {
const int brushStyleCount = sizeof(brushStyles)/sizeof(const char *);
QBrush brush(Qt::black);
- const QIcon solidIcon = QtPropertyBrowserUtils::brushValueIcon(brush);
for (int i = 0; i < brushStyleCount; i++) {
const Qt::BrushStyle style = brushStyleIndexToStyle(i);
brush.setStyle(style);
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 9730dff64..670dfcc1f 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -1576,8 +1576,6 @@ void DesignerPropertyManager::reloadResourceProperties()
defaultIcon = iconCache->icon(icon);
}
- QMap<QPair<QIcon::Mode, QIcon::State>, PropertySheetPixmapValue> iconPaths = icon.paths();
-
QMap<QPair<QIcon::Mode, QIcon::State>, QtProperty *> subProperties = m_propertyToIconSubProperties.value(property);
for (auto itSub = subProperties.cbegin(), end = subProperties.cend(); itSub != end; ++itSub) {
const QPair<QIcon::Mode, QIcon::State> pair = itSub.key();
diff --git a/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp b/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp
index c63b4a297..f8bff2a2a 100644
--- a/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp
+++ b/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp
@@ -64,7 +64,6 @@ void PaletteEditorButton::setSuperPalette(const QPalette &palette)
void PaletteEditorButton::showPaletteEditor()
{
int result;
- QPalette p = QPalette();
QPalette pal = PaletteEditor::getPalette(m_core, 0, m_palette, m_superPalette, &result);
if (result == QDialog::Accepted) {
m_palette = pal;
diff --git a/src/designer/src/components/propertyeditor/propertyeditor.cpp b/src/designer/src/components/propertyeditor/propertyeditor.cpp
index ee30614b5..2c0a60c4b 100644
--- a/src/designer/src/components/propertyeditor/propertyeditor.cpp
+++ b/src/designer/src/components/propertyeditor/propertyeditor.cpp
@@ -175,7 +175,6 @@ void PropertyEditor::setupStringProperty(QtVariantProperty *property, bool isMai
void PropertyEditor::setupPaletteProperty(QtVariantProperty *property)
{
- QPalette value = qvariant_cast<QPalette>(property->value());
QPalette superPalette = QPalette();
QWidget *currentWidget = qobject_cast<QWidget *>(m_object);
if (currentWidget) {
diff --git a/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp b/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp
index 0f75b6d45..85f4b5f43 100644
--- a/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp
+++ b/src/designer/src/components/widgetbox/widgetboxtreewidget.cpp
@@ -465,7 +465,6 @@ bool WidgetBoxTreeWidget::readWidget(Widget *w, const QString &xml, QXmlStreamRe
int nesting = 0;
bool endEncountered = false;
bool parsedWidgetTag = false;
- QString outmostElement;
while (!endEncountered) {
const qint64 currentPosition = r.characterOffset();
switch(r.readNext()) {
@@ -530,7 +529,6 @@ void WidgetBoxTreeWidget::writeCategories(QXmlStreamWriter &writer, const Catego
const QString category = QLatin1String(categoryElementC);
const QString categoryEntry = QLatin1String(categoryEntryElementC);
const QString iconPrefix = QLatin1String(iconPrefixC);
- const QString widgetTag = QLatin1String(widgetElementC);
//
// <widgetbox>
diff --git a/src/designer/src/lib/shared/qdesigner_membersheet.cpp b/src/designer/src/lib/shared/qdesigner_membersheet.cpp
index 10de9f3d4..2c1fc2ef0 100644
--- a/src/designer/src/lib/shared/qdesigner_membersheet.cpp
+++ b/src/designer/src/lib/shared/qdesigner_membersheet.cpp
@@ -184,7 +184,6 @@ bool QDesignerMemberSheet::isSlot(int index) const
bool QDesignerMemberSheet::inheritedFromWidget(int index) const
{
- const QString name = d->m_meta->method(index)->signature();
return declaredInClass(index) == QStringLiteral("QWidget") || declaredInClass(index) == QStringLiteral("QObject");
}
diff --git a/src/designer/src/lib/shared/qdesigner_widgetbox.cpp b/src/designer/src/lib/shared/qdesigner_widgetbox.cpp
index 50014a9ed..1e581ba02 100644
--- a/src/designer/src/lib/shared/qdesigner_widgetbox.cpp
+++ b/src/designer/src/lib/shared/qdesigner_widgetbox.cpp
@@ -190,7 +190,6 @@ DomUI *QDesignerWidgetBox::xmlToUi(const QString &name, const QString &xml, bool
// The xml description must either contain a root element "ui" with a child element "widget"
// or "widget" as the root element (4.3 legacy)
- const QString widgetTag = QStringLiteral("widget");
while (!reader.atEnd()) {
if (reader.readNext() == QXmlStreamReader::StartElement) {
diff --git a/src/linguist/linguist/errorsview.cpp b/src/linguist/linguist/errorsview.cpp
index 685bb0289..5d56fd5ac 100644
--- a/src/linguist/linguist/errorsview.cpp
+++ b/src/linguist/linguist/errorsview.cpp
@@ -57,7 +57,6 @@ void ErrorsView::clear()
void ErrorsView::addError(int model, const ErrorType type, const QString &arg)
{
- QString error;
switch (type) {
case SuperfluousAccelerator:
addError(model, tr("Accelerator possibly superfluous in translation."));
diff --git a/src/linguist/linguist/mainwindow.cpp b/src/linguist/linguist/mainwindow.cpp
index 27600d0f8..92aed394e 100644
--- a/src/linguist/linguist/mainwindow.cpp
+++ b/src/linguist/linguist/mainwindow.cpp
@@ -2590,7 +2590,6 @@ void MainWindow::readConfig()
{
QSettings config;
- QRect r(pos(), size());
restoreGeometry(config.value(settingPath("Geometry/WindowGeometry")).toByteArray());
restoreState(config.value(settingPath("MainWindowState")).toByteArray());
diff --git a/src/linguist/shared/qph.cpp b/src/linguist/shared/qph.cpp
index 9bfd8833d..f29b3789b 100644
--- a/src/linguist/shared/qph.cpp
+++ b/src/linguist/shared/qph.cpp
@@ -63,7 +63,6 @@ private:
bool QPHReader::read(Translator &translator)
{
m_currentField = NoField;
- QString result;
while (!atEnd()) {
readNext();
if (isStartElement()) {
diff --git a/src/linguist/shared/ts.cpp b/src/linguist/shared/ts.cpp
index ee75fc277..5c8bcc129 100644
--- a/src/linguist/shared/ts.cpp
+++ b/src/linguist/shared/ts.cpp
@@ -188,7 +188,6 @@ QString TSReader::readTransContents()
bool TSReader::read(Translator &translator)
{
- STRING(byte);
STRING(catalog);
STRING(comment);
STRING(context);
@@ -216,13 +215,11 @@ bool TSReader::read(Translator &translator)
STRING(type);
STRING(unfinished);
STRING(userdata);
- STRING(value);
STRING(vanished);
//STRING(version);
STRING(yes);
static const QString strextrans(QLatin1String("extra-"));
- static const QString strUtf8(QLatin1String("UTF-8"));
while (!atEnd()) {
readNext();
diff --git a/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp b/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp
index 6c1338c77..9bc5e4f21 100644
--- a/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp
+++ b/src/shared/qtpropertybrowser/qttreepropertybrowser.cpp
@@ -402,7 +402,6 @@ static QIcon drawIndicatorIcon(const QPalette &palette, QStyle *style)
QPixmap pix(14, 14);
pix.fill(Qt::transparent);
QStyleOption branchOption;
- QRect r(QPoint(0, 0), pix.size());
branchOption.rect = QRect(2, 2, 9, 9); // ### hardcoded in qcommonstyle.cpp
branchOption.palette = palette;
branchOption.state = QStyle::State_Children;