summaryrefslogtreecommitdiffstats
path: root/scribus/shadebutton.cpp
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-01-25 21:10:44 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-01-25 21:10:44 +0000
commit98a30cc8b97ed2f16cc15742327ae8ea732fc9a6 (patch)
tree470e34491c4d1978df2d9700d6ce75a53d908acb /scribus/shadebutton.cpp
parent4f4d36f57f4b613364dfb18e262fb6c5e4e690e3 (diff)
downloadscribus-98a30cc8b97ed2f16cc15742327ae8ea732fc9a6.tar.gz
scribus-98a30cc8b97ed2f16cc15742327ae8ea732fc9a6.tar.xz
scribus-98a30cc8b97ed2f16cc15742327ae8ea732fc9a6.zip
#10082: Backport new Query dialog code and adjust usage to new duplicate check method, and move to declared vars
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17234 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/shadebutton.cpp')
-rw-r--r--scribus/shadebutton.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/scribus/shadebutton.cpp b/scribus/shadebutton.cpp
index dd84efa..7d12172 100644
--- a/scribus/shadebutton.cpp
+++ b/scribus/shadebutton.cpp
@@ -46,21 +46,17 @@ void ShadeButton::setShade(QAction *act)
if (c == 0)
{
- Query* dia = new Query(this, "New", 1, 0, tr("&Shade:"), tr("Shade"));
- if (dia->exec())
- {
- c = dia->getEditText().toInt(&ok);
+ Query dia(this, "New", 1, 0, tr("&Shade:"), tr("Shade"));
+ if (dia.exec())
+ {
+ c = dia.getEditText().toInt(&ok);
if (ok)
b = qMax(qMin(c, 100),0);
else
b = 100;
- delete dia;
}
else
- {
- delete dia;
return;
- }
}
setText(QString::number(b)+" %");
emit clicked();