mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 19:50:27 +00:00
Minor tweaks
This commit is contained in:
parent
78faf1e68f
commit
d0fd156dc9
|
@ -752,7 +752,7 @@ void Annotation::store( QDomNode & annNode, QDomDocument & document ) const
|
|||
}
|
||||
}
|
||||
|
||||
QDomNode Annotation::getAnnotationPropertiesDomNode()
|
||||
QDomNode Annotation::getAnnotationPropertiesDomNode() const
|
||||
{
|
||||
QDomDocument doc( "documentInfo" );
|
||||
QDomElement node = doc.createElement( "annotation" );
|
||||
|
|
|
@ -660,11 +660,15 @@ class OKULAR_EXPORT Annotation
|
|||
|
||||
/**
|
||||
* Retrieve the QDomNode representing this annotation's properties
|
||||
|
||||
* @since 0.17 (KDE 4.11)
|
||||
*/
|
||||
QDomNode getAnnotationPropertiesDomNode();
|
||||
QDomNode getAnnotationPropertiesDomNode() const;
|
||||
|
||||
/**
|
||||
* Sets annotations internal properties according to the contents of @p node
|
||||
*
|
||||
* @since 0.17 (KDE 4.11)
|
||||
*/
|
||||
void setAnnotationProperties( const QDomNode & node );
|
||||
|
||||
|
|
|
@ -2045,7 +2045,8 @@ RemoveAnnotationCommand::RemoveAnnotationCommand(Okular::DocumentPrivate * doc,
|
|||
setText( i18nc( "Remove an annotation from the page", "remove annotation" ) );
|
||||
}
|
||||
|
||||
RemoveAnnotationCommand::~RemoveAnnotationCommand(){
|
||||
RemoveAnnotationCommand::~RemoveAnnotationCommand()
|
||||
{
|
||||
if ( m_done )
|
||||
{
|
||||
delete m_annotation;
|
||||
|
@ -3196,10 +3197,10 @@ bool Document::canModifyPageAnnotation( const Annotation * annotation ) const
|
|||
|
||||
void Document::prepareToModifyAnnotationProperties( Annotation * annotation )
|
||||
{
|
||||
Q_ASSERT(d->m_prevPropsOfAnnotBeingModified.isNull());
|
||||
if (!d->m_prevPropsOfAnnotBeingModified.isNull())
|
||||
{
|
||||
kError(OkularDebug) << "Error: Document::prepareToModifyAnnotationProperties has already been called since last call to Document::modifyPageAnnotationProperties";
|
||||
Q_ASSERT(d->m_prevPropsOfAnnotBeingModified.isNull());
|
||||
return;
|
||||
}
|
||||
d->m_prevPropsOfAnnotBeingModified = annotation->getAnnotationPropertiesDomNode();
|
||||
|
@ -3207,10 +3208,10 @@ void Document::prepareToModifyAnnotationProperties( Annotation * annotation )
|
|||
|
||||
void Document::modifyPageAnnotationProperties( int page, Annotation * annotation )
|
||||
{
|
||||
Q_ASSERT(!d->m_prevPropsOfAnnotBeingModified.isNull());
|
||||
if (d->m_prevPropsOfAnnotBeingModified.isNull())
|
||||
{
|
||||
kError(OkularDebug) << "Error: Document::prepareToModifyAnnotationProperties must be called before Annotation is modified";
|
||||
Q_ASSERT(!d->m_prevPropsOfAnnotBeingModified.isNull());
|
||||
return;
|
||||
}
|
||||
QDomNode prevProps = d->m_prevPropsOfAnnotBeingModified;
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QPrinter>
|
||||
#include <QUndoCommand>
|
||||
#include <QtXml/QDomDocument>
|
||||
|
||||
#include <kmimetype.h>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <QtCore/QMap>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtGui/QUndoCommand>
|
||||
|
||||
#include <kcomponentdata.h>
|
||||
#include <kservicetypetrader.h>
|
||||
|
|
Loading…
Reference in a new issue