Commit 7098b044 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port KSharedPtr

parent 21360d6b
......@@ -682,7 +682,7 @@ void dviRenderer::handleSRCLink(const QString &linkText, const QPoint& point, Do
Q_UNUSED( point );
Q_UNUSED( win );
#if 0
KSharedPtr<DVISourceEditor> editor(new DVISourceEditor(*this, parentWidget, linkText, point, win));
QExplicitlySharedDataPointer<DVISourceEditor> editor(new DVISourceEditor(*this, parentWidget, linkText, point, win));
if (editor->started())
editor_ = editor;
#endif
......@@ -724,7 +724,7 @@ QString dviRenderer::PDFencodingToQString(const QString& _pdfstring)
void dviRenderer::exportPDF()
{
/*
KSharedPtr<DVIExport> exporter(new DVIExportToPDF(*this, parentWidget));
QExplicitlySharedDataPointer<DVIExport> exporter(new DVIExportToPDF(*this, parentWidget));
if (exporter->started())
all_exports_[exporter.data()] = exporter;
*/
......@@ -733,7 +733,7 @@ void dviRenderer::exportPDF()
void dviRenderer::exportPS(const QString& fname, const QStringList& options, QPrinter* printer, QPrinter::Orientation orientation)
{
KSharedPtr<DVIExport> exporter(new DVIExportToPS(*this, fname, options, printer, font_pool.getUseFontHints(), orientation));
QExplicitlySharedDataPointer<DVIExport> exporter(new DVIExportToPS(*this, fname, options, printer, font_pool.getUseFontHints(), orientation));
if (exporter->started())
all_exports_[exporter.data()] = exporter;
}
......@@ -747,7 +747,7 @@ void dviRenderer::editor_finished(const DVISourceEditor*)
void dviRenderer::export_finished(const DVIExport* key)
{
typedef QMap<const DVIExport*, KSharedPtr<DVIExport> > ExportMap;
typedef QMap<const DVIExport*, QExplicitlySharedDataPointer<DVIExport> > ExportMap;
ExportMap::iterator it = all_exports_.find(key);
if (it != all_exports_.end())
all_exports_.remove(key);
......
......@@ -20,7 +20,7 @@
#include "anchor.h"
#include "prebookmark.h"
#include <ksharedptr.h>
#include <QExplicitlySharedDataPointer>
#include <kurl.h>
#include <kprogressdialog.h>
#include <QHash>
......@@ -300,8 +300,8 @@ private:
drawinf currinf;
RenderedDocumentPagePixmap* currentlyDrawnPage;
QMap<const DVIExport*, KSharedPtr<DVIExport> > all_exports_;
//KSharedPtr<DVISourceEditor> editor_;
QMap<const DVIExport*, QExplicitlySharedDataPointer<DVIExport> > all_exports_;
//QExplicitlySharedDataPointer<DVISourceEditor> editor_;
/** Flag if document is modified
......
......@@ -11,8 +11,8 @@
* Classes DVIExportToPDF and DVIExportToPS control the export
* of a DVI file to PDF or PostScript format, respectively.
* Common functionality is factored out into a common base class,
* DVIExport which itself derives from KShared allowing easy,
* polymorphic storage of multiple KSharedPtr<DVIExport> variables
* DVIExport which itself derives from QSharedData allowing easy,
* polymorphic storage of multiple QExplicitlySharedDataPointer<DVIExport> variables
* in a container of all exported processes.
*/
......
......@@ -11,15 +11,15 @@
* Classes DVIExportToPDF and DVIExportToPS control the export
* of a DVI file to PDF or PostScript format, respectively.
* Common functionality is factored out into a common base class,
* DVIExport which itself derives from KShared allowing easy,
* polymorphic storage of multiple KSharedPtr<DVIExport> variables
* DVIExport which itself derives from QSharedData allowing easy,
* polymorphic storage of multiple QExplicitlySharedDataPointer<DVIExport> variables
* in a container of all exported processes.
*/
#ifndef DVIEXPORT_H
#define DVIEXPORT_H
#include <ksharedptr.h>
#include <QExplicitlySharedDataPointer>
#include <QObject>
#include <QtPrintSupport/QPrinter>
......@@ -30,7 +30,7 @@ class KProcess;
class QStringList;
class DVIExport: public QObject, public KShared
class DVIExport: public QObject, public QSharedData
{
Q_OBJECT
public:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment