From 7eac68815bd6cdf7de913656d6ec95bdb8b36529 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 11 Feb 2008 01:37:02 +0000 Subject: [PATCH] Use the id of the form fields as id, not the name! svn path=/trunk/KDE/kdegraphics/okular/; revision=773440 --- ui/pageview.cpp | 2 +- ui/pageviewutils.cpp | 8 ++++---- ui/pageviewutils.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ui/pageview.cpp b/ui/pageview.cpp index 88ec7de0a..0382fd75f 100644 --- a/ui/pageview.cpp +++ b/ui/pageview.cpp @@ -717,7 +717,7 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup w->setFormWidgetsController( d->formWidgetsController() ); w->setVisibility( false ); w->setCanBeFilled( d->document->isAllowed( Okular::AllowFillForms ) ); - item->formWidgets().insert( ff->name(), w ); + item->formWidgets().insert( ff->id(), w ); hasformwidgets = true; } } diff --git a/ui/pageviewutils.cpp b/ui/pageviewutils.cpp index 605abefe6..cd36f9225 100644 --- a/ui/pageviewutils.cpp +++ b/ui/pageviewutils.cpp @@ -47,7 +47,7 @@ PageViewItem::PageViewItem( const Okular::Page * page ) PageViewItem::~PageViewItem() { - QHash::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end(); + QHash::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end(); for ( ; it != itEnd; ++it ) delete *it; } @@ -87,7 +87,7 @@ bool PageViewItem::isVisible() const return m_visible; } -QHash& PageViewItem::formWidgets() +QHash& PageViewItem::formWidgets() { return m_formWidgets; } @@ -113,7 +113,7 @@ void PageViewItem::moveTo( int x, int y ) { m_geometry.moveLeft( x ); m_geometry.moveTop( y ); - QHash::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end(); + QHash::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end(); for ( ; it != itEnd; ++it ) { Okular::NormalizedRect r = (*it)->rect(); @@ -140,7 +140,7 @@ bool PageViewItem::setFormWidgetsVisible( bool visible ) return false; bool somehadfocus = false; - QHash::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end(); + QHash::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end(); for ( ; it != itEnd; ++it ) { bool hadfocus = (*it)->setVisibility( visible ); diff --git a/ui/pageviewutils.h b/ui/pageviewutils.h index dbd136791..310cbee8e 100644 --- a/ui/pageviewutils.h +++ b/ui/pageviewutils.h @@ -46,7 +46,7 @@ class PageViewItem int height() const; double zoomFactor() const; bool isVisible() const; - QHash& formWidgets(); + QHash& formWidgets(); void setGeometry( int x, int y, int width, int height ); void setWHZ( int w, int h, double zoom ); @@ -61,7 +61,7 @@ class PageViewItem QRect m_geometry; bool m_visible; bool m_formsVisible; - QHash m_formWidgets; + QHash m_formWidgets; };