summaryrefslogtreecommitdiff
path: root/qt4
diff options
context:
space:
mode:
authorPino Toscano <pino@kde.org>2011-02-27 15:22:32 +0100
committerPino Toscano <pino@kde.org>2011-02-27 15:22:32 +0100
commite64f6cb23e9a564b3f80daea9abcfe8bb29189eb (patch)
treee20cf0db8288a56ce14710767a2c0e85a0a8fa5d /qt4
parentf9c978fc2ab8a1f901f2136ae95deb9d41076155 (diff)
make getOnStr() return the GooString* instead of its char*
... and modify its use accordingly this way it is easier to check for a numm onStr, without the risk of dereferencing a NULL pointer
Diffstat (limited to 'qt4')
-rw-r--r--qt4/src/poppler-form.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/qt4/src/poppler-form.cc b/qt4/src/poppler-form.cc
index 815a8df8..40376e55 100644
--- a/qt4/src/poppler-form.cc
+++ b/qt4/src/poppler-form.cc
@@ -200,11 +200,8 @@ FormFieldButton::ButtonType FormFieldButton::buttonType() const
QString FormFieldButton::caption() const
{
FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
- // HACK push buttons seems to have a null GooString for the caption
- if (fwb->getButtonType() == formButtonPush)
- return QString();
-
- return fwb->getOnStr() ? QString::fromUtf8(fwb->getOnStr()) : QString();
+ GooString *goo = fwb->getOnStr();
+ return goo ? QString::fromUtf8(goo->getCString()) : QString();
}
bool FormFieldButton::state() const