* also install native applets ;)
* don't leak the installer svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=791609
This commit is contained in:
parent
a5ec59b775
commit
ca142dbc32
@ -146,18 +146,24 @@ void OpenWidgetAssistant::finished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//kDebug() << "selected uri is" << m_fileDialog->selectedFile() << "of type" << m_fileDialog->currentFilter();
|
//kDebug() << "selected uri is" << m_fileDialog->selectedFile() << "of type" << m_fileDialog->currentFilter();
|
||||||
|
PackageStructure *installer = 0;
|
||||||
|
if (m_packageStructureService) {
|
||||||
QString error;
|
QString error;
|
||||||
PackageStructure *installer = m_packageStructureService->createInstance<Plasma::PackageStructure>(0, QVariantList(), &error);
|
installer = m_packageStructureService->createInstance<Plasma::PackageStructure>(0, QVariantList(), &error);
|
||||||
if (!installer) {
|
if (!installer) {
|
||||||
kDebug() << "Could not load requested PackageStructure installer "
|
kDebug() << "Could not load requested PackageStructure installer "
|
||||||
<< m_packageStructureService << ". Error given: " << error;
|
<< m_packageStructureService << ". Error given: " << error;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
installer = new PackageStructure;
|
||||||
|
}
|
||||||
|
|
||||||
QString root = KStandardDirs::locateLocal("data", "plasma/plasmoids/");
|
QString root = KStandardDirs::locateLocal("data", "plasma/plasmoids/");
|
||||||
//kDebug() << "installing to root dir of" << root;
|
//kDebug() << "installing to root dir of" << root;
|
||||||
bool success = installer->installPackage(m_fileDialog->selectedFile(), root);
|
bool success = installer->installPackage(m_fileDialog->selectedFile(), root);
|
||||||
|
|
||||||
|
delete installer;
|
||||||
kDebug() << "install returned. were we successful?" << success;
|
kDebug() << "install returned. were we successful?" << success;
|
||||||
//TODO: user visible feedback
|
//TODO: user visible feedback
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user