delete some uneeded if (pointer not null)

http://reviewboard.kde.org/r/5021/

svn path=/trunk/KDE/kdelibs/; revision=1167869
This commit is contained in:
Jaime Torres Amate 2010-08-25 14:48:41 +00:00
parent cc942a894c
commit 57bbfe755c
4 changed files with 4 additions and 14 deletions

View File

@ -407,9 +407,7 @@ void AbstractRunnerPrivate::prepScripting(const QString &path, QString api)
return;
}
if (package) {
delete package;
}
PackageStructure::Ptr structure = Plasma::packageStructure(api, Plasma::RunnerComponent);
structure->setPath(path);

View File

@ -1458,9 +1458,7 @@ void ContainmentPrivate::clearDataForMimeJob(KIO::Job *job)
QObject::disconnect(job, 0, q, 0);
dropPoints.remove(job);
KMenu *choices = dropMenus.take(job);
if (choices) {
delete choices;
}
job->kill();
}

View File

@ -528,10 +528,8 @@ void PackageStructure::setServicePrefix(const QString &servicePrefix)
void PackageStructurePrivate::createPackageMetadata(const QString &path)
{
if (metadata) {
delete metadata;
metadata = 0;
}
QString metadataPath(path + "/metadata.desktop");
if (!QFile::exists(metadataPath)) {

View File

@ -130,15 +130,11 @@ void ServicePrivate::publish(AnnouncementMethods methods, const QString &name, P
void ServicePrivate::unpublish()
{
if (serviceProvider) {
delete serviceProvider;
serviceProvider = 0;
}
if (publicService) {
delete publicService;
publicService = 0;
}
}
bool ServicePrivate::isPublished() const