~smartboyhw/ubuntu/raring/calligra/2.6.0-0ubuntu1

« back to all changes in this revision

Viewing changes to libs/main/KoDocumentEntry.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-10-23 21:09:16 UTC
  • mfrom: (1.1.13)
  • Revision ID: package-import@ubuntu.com-20121023210916-m82w6zxnxhaxz7va
Tags: 1:2.5.90-0ubuntu1
* New upstream alpha release (LP: #1070436)
  - Add libkactivities-dev and libopenimageio-dev to build-depends
  - Add kubuntu_build_calligraactive.diff to build calligraactive by default
  - Add package for calligraauthor and move files that are shared between
    calligrawords and calligraauthor to calligrawords-common
* Document the patches
* Remove numbers from patches so they follow the same naming scheme as
  the rest of our patches.
* calligra-data breaks replaces krita-data (<< 1:2.5.3) (LP: #1071686)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
#include "KoDocumentEntry.h"
22
22
 
 
23
#include "KoPart.h"
23
24
#include "KoDocument.h"
24
25
#include "KoFilter.h"
25
26
 
32
33
 
33
34
#include <limits.h> // UINT_MAX
34
35
 
35
 
/**
36
 
 * Port from Calligra Trader to KTrader/KActivator (kded) by Simon Hausmann
37
 
 * (c) 1999 Simon Hausmann <hausmann@kde.org>
38
 
 * Port to KService and simplifications by David Faure <faure@kde.org>
39
 
 */
40
 
 
41
36
KoDocumentEntry::KoDocumentEntry()
42
37
        : m_service(0)
43
38
{
52
47
{
53
48
}
54
49
 
55
 
KoDocument* KoDocumentEntry::createDoc(QString* errorMsg, KoDocument* parent) const
 
50
KoPart *KoDocumentEntry::createKoPart(QString* errorMsg) const
56
51
{
57
52
    QString error;
58
 
    KoDocument* doc = m_service->createInstance<KoDocument>(parent, QVariantList(), &error);
 
53
    KoPart* part = m_service->createInstance<KoPart>(0, QVariantList(), &error);
59
54
 
60
 
    if (!doc) {
 
55
    if (!part) {
61
56
        kWarning(30003) << error;
62
57
        if (errorMsg)
63
58
            *errorMsg = error;
64
59
        return 0;
65
60
    }
66
61
 
67
 
    return doc;
 
62
    return part;
68
63
}
69
64
 
70
65
KoDocumentEntry KoDocumentEntry::queryByMimeType(const QString & mimetype)