r24742 by craig - Clean up empty QString unnecessary assignment
scribus-commit
scribus-commit at lists.scribus.net
Wed Oct 13 22:01:55 UTC 2021
Author: craig
Date: Wed Oct 13 22:01:55 2021
New Revision: 24742
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24742
Log:
Clean up empty QString unnecessary assignment
Modified:
trunk/Scribus/scribus/ui/smcellstylewidget.cpp
trunk/Scribus/scribus/ui/smcstylewidget.cpp
trunk/Scribus/scribus/ui/smpstylewidget.cpp
trunk/Scribus/scribus/ui/smtablestylewidget.cpp
Modified: trunk/Scribus/scribus/ui/smcellstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24742&path=/trunk/Scribus/scribus/ui/smcellstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcellstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smcellstylewidget.cpp Wed Oct 13 22:01:55 2021
@@ -152,12 +152,11 @@
else
fillShade->setValue(qRound(d));
QString s;
- QString emptyString;
for (int i = 0; i < cellStyles.count(); ++i)
{
- if (!s.isNull() && s != cellStyles[i]->fillColor())
+ if (!s.isEmpty() && s != cellStyles[i]->fillColor())
{
- s = emptyString;
+ s.clear();
break;
}
s = cellStyles[i]->fillColor();
Modified: trunk/Scribus/scribus/ui/smcstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24742&path=/trunk/Scribus/scribus/ui/smcstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smcstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smcstylewidget.cpp Wed Oct 13 22:01:55 2021
@@ -572,12 +572,11 @@
backShade_->setValue(qRound(d));
QString s;
- QString emptyString;
- for (int i = 0; i < cstyles.count(); ++i)
- {
- if (!s.isNull() && s != cstyles[i]->fillColor())
- {
- s = emptyString;
+ for (int i = 0; i < cstyles.count(); ++i)
+ {
+ if (!s.isEmpty() && s != cstyles[i]->fillColor())
+ {
+ s.clear();
break;
}
s = cstyles[i]->fillColor();
@@ -591,12 +590,12 @@
else
fillColor_->setCurrentText(s);
- s = emptyString;
- for (int i = 0; i < cstyles.count(); ++i)
- {
- if (!s.isNull() && s != cstyles[i]->strokeColor())
- {
- s = emptyString;
+ s.clear();
+ for (int i = 0; i < cstyles.count(); ++i)
+ {
+ if (!s.isEmpty() && s != cstyles[i]->strokeColor())
+ {
+ s.clear();
break;
}
s = cstyles[i]->strokeColor();
@@ -610,12 +609,12 @@
else
strokeColor_->setCurrentText(s);
- s = emptyString;
- for (int i = 0; i < cstyles.count(); ++i)
- {
- if (!s.isNull() && s != cstyles[i]->backColor())
- {
- s = emptyString;
+ s.clear();
+ for (int i = 0; i < cstyles.count(); ++i)
+ {
+ if (!s.isEmpty() && s != cstyles[i]->backColor())
+ {
+ s.clear();
break;
}
s = cstyles[i]->backColor();
@@ -632,13 +631,12 @@
void SMCStyleWidget::showLanguage(const QList<CharStyle*> &cstyles, const QString &defLang)
{
- QString emptyString;
QString s(cstyles[0]->language());
for (int i = 0; i < cstyles.count(); ++i)
{
if (s != cstyles[i]->language())
{
- s = emptyString;
+ s.clear();
break;
}
s = cstyles[i]->language();
Modified: trunk/Scribus/scribus/ui/smpstylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24742&path=/trunk/Scribus/scribus/ui/smpstylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smpstylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smpstylewidget.cpp Wed Oct 13 22:01:55 2021
@@ -555,12 +555,11 @@
backShade_->setValue(qRound(d));
QString s;
- QString emptyString;
for (int i = 0; i < cstyles.count(); ++i)
{
if (!s.isNull() && s != cstyles[i]->backgroundColor())
{
- s = emptyString;
+ s.clear();
break;
}
s = cstyles[i]->backgroundColor();
Modified: trunk/Scribus/scribus/ui/smtablestylewidget.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24742&path=/trunk/Scribus/scribus/ui/smtablestylewidget.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/smtablestylewidget.cpp (original)
+++ trunk/Scribus/scribus/ui/smtablestylewidget.cpp Wed Oct 13 22:01:55 2021
@@ -139,12 +139,11 @@
else
fillShade->setValue(qRound(d));
QString s;
- QString emptyString;
for (int i = 0; i < tableStyles.count(); ++i)
{
- if (!s.isNull() && s != tableStyles[i]->fillColor())
+ if (!s.isEmpty() && s != tableStyles[i]->fillColor())
{
- s = emptyString;
+ s.clear();
break;
}
s = tableStyles[i]->fillColor();
More information about the scribus-commit
mailing list