~ubuntu-branches/debian/stretch/kservice/stretch

« back to all changes in this revision

Viewing changes to src/kbuildsycoca/kbuildservicegroupfactory.cpp

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark
  • Date: 2014-08-05 17:29:09 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140805172909-i30obau6w3p8glfr
Tags: 5.1.0-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    KSycocaEntry::Ptr ptr = m_entryDict->value(menuName);
58
58
    KServiceGroup::Ptr entry;
59
59
    if (ptr && ptr->isType(KST_KServiceGroup)) {
60
 
        entry = KServiceGroup::Ptr(ptr);
 
60
        entry = KServiceGroup::Ptr(static_cast<KServiceGroup*>(ptr.data()));
61
61
    }
62
62
 
63
63
    if (!entry) {
73
73
    KSycocaEntry::Ptr ptr = m_entryDict->value(menuName);
74
74
    if (ptr) {
75
75
        qWarning() << "( " << menuName << ", " << file << " ): menu already exists!";
76
 
        return KServiceGroup::Ptr(ptr);
 
76
        return KServiceGroup::Ptr(static_cast<KServiceGroup*>(ptr.data()));
77
77
    }
78
78
 
79
79
    // Create new group entry
98
98
        KServiceGroup::Ptr parentEntry;
99
99
        ptr = m_entryDict->value(parent);
100
100
        if (ptr && ptr->isType(KST_KServiceGroup)) {
101
 
            parentEntry = KServiceGroup::Ptr(ptr);
 
101
            parentEntry = KServiceGroup::Ptr(static_cast<KServiceGroup*>(ptr.data()));
102
102
        }
103
103
        if (!parentEntry) {
104
104
            qWarning() << "( " << menuName << ", " << file << " ): parent menu does not exist!";
119
119
    KServiceGroup::Ptr entry;
120
120
    KSycocaEntry::Ptr ptr = m_entryDict->value(name);
121
121
    if (ptr && ptr->isType(KST_KServiceGroup)) {
122
 
        entry = KServiceGroup::Ptr(ptr);
 
122
        entry = KServiceGroup::Ptr(static_cast<KServiceGroup*>(ptr.data()));
123
123
    }
124
124
 
125
125
    if (!entry) {
136
136
{
137
137
    KSycocaFactory::addEntry(newEntry);
138
138
 
139
 
    KServiceGroup::Ptr serviceGroup = KServiceGroup::Ptr(newEntry);
 
139
    KServiceGroup::Ptr serviceGroup(static_cast<KServiceGroup*>(newEntry.data()));
140
140
    serviceGroup->d_func()->m_serviceList.clear();
141
141
 
142
142
    if (!serviceGroup->baseGroupName().isEmpty()) {
175
175
    Q_UNUSED(deep); // ?
176
176
    // We're building a database - the service type must be in memory
177
177
    KSycocaEntry::Ptr group = m_entryDict->value(_name);
178
 
    return KServiceGroup::Ptr(group);
 
178
    return KServiceGroup::Ptr(static_cast<KServiceGroup*>(group.data()));
179
179
}