summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <gladhorn@kde.org>2016-10-08 12:05:22 (GMT)
committerFrederik Gladhorn <gladhorn@kde.org>2016-10-08 12:05:22 (GMT)
commit2f13bfb68c8b6ff81a8370adbec98e0e27cccaa7 (patch)
treeaa0620aab78e0330229f5cf647bbb85f9e018d40
parent562cc26f382ae665be96087f8a1c6647e1433a25 (diff)
Remove DocumentInfoProviderPrivate
-rw-r--r--app/documentinfoprovider.cpp17
-rw-r--r--app/documentinfoprovider.h4
2 files changed, 4 insertions, 17 deletions
diff --git a/app/documentinfoprovider.cpp b/app/documentinfoprovider.cpp
index d537d9c..9a83bdc 100644
--- a/app/documentinfoprovider.cpp
+++ b/app/documentinfoprovider.cpp
@@ -33,16 +33,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
namespace Gwenview
{
-struct DocumentInfoProviderPrivate
-{
- SortedDirModel* mDirModel;
-};
-
DocumentInfoProvider::DocumentInfoProvider(SortedDirModel* model)
: AbstractDocumentInfoProvider(model)
-, d(new DocumentInfoProviderPrivate)
{
- d->mDirModel = model;
+ mDirModel = model;
connect(DocumentFactory::instance(), SIGNAL(documentBusyStateChanged(QUrl,bool)),
SLOT(emitBusyStateChanged(QUrl,bool)));
@@ -50,11 +44,6 @@ DocumentInfoProvider::DocumentInfoProvider(SortedDirModel* model)
SLOT(emitDocumentChanged(QUrl)));
}
-DocumentInfoProvider::~DocumentInfoProvider()
-{
- delete d;
-}
-
void DocumentInfoProvider::thumbnailForDocument(const QUrl &url, ThumbnailGroup::Enum group, QPixmap* outPix, QSize* outFullSize) const
{
Q_ASSERT(outPix);
@@ -102,7 +91,7 @@ bool DocumentInfoProvider::isBusy(const QUrl &url)
void DocumentInfoProvider::emitBusyStateChanged(const QUrl &url, bool busy)
{
- QModelIndex index = d->mDirModel->indexForUrl(url);
+ QModelIndex index = mDirModel->indexForUrl(url);
if (!index.isValid()) {
return;
}
@@ -111,7 +100,7 @@ void DocumentInfoProvider::emitBusyStateChanged(const QUrl &url, bool busy)
void DocumentInfoProvider::emitDocumentChanged(const QUrl &url)
{
- QModelIndex index = d->mDirModel->indexForUrl(url);
+ QModelIndex index = mDirModel->indexForUrl(url);
if (!index.isValid()) {
return;
}
diff --git a/app/documentinfoprovider.h b/app/documentinfoprovider.h
index 4bfc435..57b4ca2 100644
--- a/app/documentinfoprovider.h
+++ b/app/documentinfoprovider.h
@@ -33,13 +33,11 @@ namespace Gwenview
class SortedDirModel;
-struct DocumentInfoProviderPrivate;
class DocumentInfoProvider : public AbstractDocumentInfoProvider
{
Q_OBJECT
public:
DocumentInfoProvider(SortedDirModel* model);
- ~DocumentInfoProvider();
virtual bool isBusy(const QUrl &url) Q_DECL_OVERRIDE;
@@ -52,7 +50,7 @@ private Q_SLOTS:
void emitDocumentChanged(const QUrl&);
private:
- DocumentInfoProviderPrivate* const d;
+ SortedDirModel* mDirModel;
};
} // namespace