diff --git a/filters/sheets/excel/sidewinder/excel.cpp b/filters/sheets/excel/sidewinder/excel.cpp --- a/filters/sheets/excel/sidewinder/excel.cpp +++ b/filters/sheets/excel/sidewinder/excel.cpp @@ -1754,7 +1754,7 @@ if (ToXRunsPositionIndex > 0) { d->richText = QSharedPointer(new QTextDocument()); // also add a textrangemanager, as KoTextWriter assumes one - KoTextDocument(d->richText).setTextRangeManager(new KoTextRangeManager); + KoTextDocument(d->richText.data()).setTextRangeManager(new KoTextRangeManager); d->richText->setPlainText(d->text); QTextCursor cursor(d->richText.data()); //cursor.setVisualNavigation(true); diff --git a/libs/main/KoFilterManager_p.h b/libs/main/KoFilterManager_p.h --- a/libs/main/KoFilterManager_p.h +++ b/libs/main/KoFilterManager_p.h @@ -29,16 +29,16 @@ #include #include -#include +#include class QListWidget; class Q_DECL_HIDDEN KoFilterManager::Private { public: bool batch; QByteArray importMimeType; - QWeakPointer progressUpdater; + QPointer progressUpdater; Private(KoProgressUpdater *progressUpdater_ = 0) : progressUpdater(progressUpdater_) diff --git a/libs/text/KoList.h b/libs/text/KoList.h --- a/libs/text/KoList.h +++ b/libs/text/KoList.h @@ -23,7 +23,7 @@ #include "styles/KoListStyle.h" #include -#include +#include #include #include @@ -75,7 +75,7 @@ bool contains(QTextList *textList) const; /// Returns the QTextLists that form this list - QVector > textLists() const; + QVector > textLists() const; QVector textListIds() const; diff --git a/libs/text/KoList.cpp b/libs/text/KoList.cpp --- a/libs/text/KoList.cpp +++ b/libs/text/KoList.cpp @@ -45,7 +45,7 @@ delete d; } -QVector > KoList::textLists() const +QVector > KoList::textLists() const { return d->textLists; } diff --git a/libs/text/KoList_p.h b/libs/text/KoList_p.h --- a/libs/text/KoList_p.h +++ b/libs/text/KoList_p.h @@ -30,6 +30,7 @@ #include #include #include +#include #include class KoListPrivate @@ -70,7 +71,7 @@ KoList *q; KoList::Type type; KoListStyle *style; - QVector > textLists; + QVector > textLists; QVector textListIds; const QTextDocument *document; QMap properties; diff --git a/libs/text/KoTextDocument.h b/libs/text/KoTextDocument.h --- a/libs/text/KoTextDocument.h +++ b/libs/text/KoTextDocument.h @@ -24,7 +24,7 @@ #define KOTEXTDOCUMENT_H #include -#include +#include #include #include @@ -58,7 +58,7 @@ /// Constructor KoTextDocument(const QTextDocument *document); // krazy:exclude=explicit /// Constructor - KoTextDocument(QWeakPointer document); // krazy:exclude=explicit + KoTextDocument(QPointer document); // krazy:exclude=explicit /// Destructor ~KoTextDocument(); diff --git a/libs/text/KoTextDocument.cpp b/libs/text/KoTextDocument.cpp --- a/libs/text/KoTextDocument.cpp +++ b/libs/text/KoTextDocument.cpp @@ -80,7 +80,7 @@ Q_ASSERT(m_document); } -KoTextDocument::KoTextDocument(QWeakPointer document) +KoTextDocument::KoTextDocument(QPointer document) : m_document(document.data()) { Q_ASSERT(m_document); diff --git a/libs/text/KoTextEditor_undo.cpp b/libs/text/KoTextEditor_undo.cpp --- a/libs/text/KoTextEditor_undo.cpp +++ b/libs/text/KoTextEditor_undo.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include "TextDebug.h" @@ -105,7 +105,7 @@ m_p->emitTextFormatChanged(); } - QWeakPointer m_document; + QPointer m_document; KoTextEditor::Private *m_p; }; diff --git a/libs/text/KoTextInlineRdf.cpp b/libs/text/KoTextInlineRdf.cpp --- a/libs/text/KoTextInlineRdf.cpp +++ b/libs/text/KoTextInlineRdf.cpp @@ -120,10 +120,10 @@ QTextBlock block; // or document and one of bookmark, annotation, kotextmeta, ... - QWeakPointer document; - QWeakPointer bookmark; - QWeakPointer annotation; - QWeakPointer kotextmeta; + QPointer document; + QPointer bookmark; + QPointer annotation; + QPointer kotextmeta; KoSection *section; QTextTableCell cell; diff --git a/libs/text/KoTextMeta.cpp b/libs/text/KoTextMeta.cpp --- a/libs/text/KoTextMeta.cpp +++ b/libs/text/KoTextMeta.cpp @@ -26,7 +26,7 @@ #include #include -#include +#include #include "TextDebug.h" @@ -41,7 +41,7 @@ posInDocument(0) { } const QTextDocument *document; int posInDocument; - QWeakPointer endBookmark; + QPointer endBookmark; BookmarkType type; }; diff --git a/libs/text/OdfTextTrackStyles.h b/libs/text/OdfTextTrackStyles.h --- a/libs/text/OdfTextTrackStyles.h +++ b/libs/text/OdfTextTrackStyles.h @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include @@ -73,7 +73,7 @@ private: QList m_documents; - QWeakPointer m_styleManager; + QPointer m_styleManager; ChangeStylesMacroCommand *m_changeCommand; }; diff --git a/libs/text/commands/ChangeTrackedDeleteCommand.h b/libs/text/commands/ChangeTrackedDeleteCommand.h --- a/libs/text/commands/ChangeTrackedDeleteCommand.h +++ b/libs/text/commands/ChangeTrackedDeleteCommand.h @@ -23,7 +23,7 @@ #include "KoTextCommandBase.h" #include #include -#include +#include class QTextDocument; class QTextCursor; @@ -52,7 +52,7 @@ virtual bool mergeWith ( const KUndo2Command *command); private: - QWeakPointer m_document; + QPointer m_document; KoDocumentRdfBase *m_rdf; KoShapeController *m_shapeController; bool m_first; diff --git a/libs/text/commands/ChangeTrackedDeleteCommand.cpp b/libs/text/commands/ChangeTrackedDeleteCommand.cpp --- a/libs/text/commands/ChangeTrackedDeleteCommand.cpp +++ b/libs/text/commands/ChangeTrackedDeleteCommand.cpp @@ -344,7 +344,7 @@ doc->redo(KoTextDocument(doc).textEditor()->cursor()); } - QWeakPointer m_document; + QPointer m_document; }; if (command->id() != id()) diff --git a/libs/text/commands/DeleteCommand.h b/libs/text/commands/DeleteCommand.h --- a/libs/text/commands/DeleteCommand.h +++ b/libs/text/commands/DeleteCommand.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include class QTextDocument; @@ -71,7 +71,7 @@ int childIdx; ///< Position of section in parent's children() list }; - QWeakPointer m_document; + QPointer m_document; KoShapeController *m_shapeController; QSet m_invalidInlineObjects; diff --git a/libs/text/commands/DeleteCommand.cpp b/libs/text/commands/DeleteCommand.cpp --- a/libs/text/commands/DeleteCommand.cpp +++ b/libs/text/commands/DeleteCommand.cpp @@ -515,7 +515,7 @@ public: UndoTextCommand(QTextDocument *document, KUndo2Command *parent = 0) : KUndo2Command(kundo2_i18n("Text"), parent), - m_document(document) + m_document(document) {} void undo() { @@ -530,7 +530,7 @@ doc->redo(KoTextDocument(doc).textEditor()->cursor()); } - QWeakPointer m_document; + QPointer m_document; }; KoTextEditor *textEditor = KoTextDocument(m_document).textEditor(); diff --git a/libs/text/commands/InsertDeleteChangesCommand.h b/libs/text/commands/InsertDeleteChangesCommand.h --- a/libs/text/commands/InsertDeleteChangesCommand.h +++ b/libs/text/commands/InsertDeleteChangesCommand.h @@ -21,7 +21,7 @@ #define INSERTDELETECHANGESCOMMAND_H #include -#include +#include class QTextDocument; @@ -32,7 +32,7 @@ void redo(); private: - QWeakPointer m_document; + QPointer m_document; void insertDeleteChanges(); }; diff --git a/libs/text/commands/InsertNoteCommand.h b/libs/text/commands/InsertNoteCommand.h --- a/libs/text/commands/InsertNoteCommand.h +++ b/libs/text/commands/InsertNoteCommand.h @@ -25,7 +25,7 @@ #include -#include +#include class QTextDocument; @@ -41,7 +41,7 @@ KoInlineNote *m_inlineNote; private: - QWeakPointer m_document; + QPointer m_document; bool m_first; int m_framePosition; // a cursor position inside the frame at the time of creation }; diff --git a/libs/text/commands/RemoveDeleteChangesCommand.h b/libs/text/commands/RemoveDeleteChangesCommand.h --- a/libs/text/commands/RemoveDeleteChangesCommand.h +++ b/libs/text/commands/RemoveDeleteChangesCommand.h @@ -21,7 +21,7 @@ #define REMOVEDELETECHANGESCOMMAND_H #include -#include +#include class QTextDocument; @@ -32,7 +32,7 @@ void redo(); private: - QWeakPointer m_document; + QPointer m_document; void removeDeleteChanges(); }; diff --git a/libs/text/commands/TextPasteCommand.h b/libs/text/commands/TextPasteCommand.h --- a/libs/text/commands/TextPasteCommand.h +++ b/libs/text/commands/TextPasteCommand.h @@ -21,7 +21,7 @@ #define TEXTPASTECOMMAND_H #include -#include +#include #include class QTextDocument; @@ -46,7 +46,7 @@ private: const QMimeData *m_mimeData; - QWeakPointer m_document; + QPointer m_document; KoDocumentRdfBase *m_rdf; KoShapeController *m_shapeController; KoCanvasBase *m_canvas; diff --git a/plugins/textshape/TextTool.h b/plugins/textshape/TextTool.h --- a/plugins/textshape/TextTool.h +++ b/plugins/textshape/TextTool.h @@ -32,13 +32,14 @@ #include #include #include +#include #include #include #include #include #include -#include +#include #include #include @@ -346,8 +347,8 @@ TextShape *m_textShape; // where caret of m_textEditor currently is KoTextShapeData *m_textShapeData; // where caret of m_textEditor currently is - QWeakPointer m_textEditor; - QWeakPointer m_oldTextEditor; + QPointer m_textEditor; + QPointer m_oldTextEditor; KoChangeTracker *m_changeTracker; KoUnit m_unit; bool m_allowActions; diff --git a/plugins/textshape/TextTool.cpp b/plugins/textshape/TextTool.cpp --- a/plugins/textshape/TextTool.cpp +++ b/plugins/textshape/TextTool.cpp @@ -113,7 +113,7 @@ { public: - TextToolSelection(QWeakPointer editor) + TextToolSelection(QPointer editor) : KoToolSelection(0) , m_editor(editor) { @@ -127,7 +127,7 @@ return false; } - QWeakPointer m_editor; + QPointer m_editor; }; static bool hit(const QKeySequence &input, KStandardShortcut::StandardShortcut shortcut)