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:
parent
cc942a894c
commit
57bbfe755c
@ -407,9 +407,7 @@ void AbstractRunnerPrivate::prepScripting(const QString &path, QString api)
|
||||
return;
|
||||
}
|
||||
|
||||
if (package) {
|
||||
delete package;
|
||||
}
|
||||
delete package;
|
||||
|
||||
PackageStructure::Ptr structure = Plasma::packageStructure(api, Plasma::RunnerComponent);
|
||||
structure->setPath(path);
|
||||
|
@ -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;
|
||||
}
|
||||
delete choices;
|
||||
job->kill();
|
||||
}
|
||||
|
||||
|
@ -528,10 +528,8 @@ void PackageStructure::setServicePrefix(const QString &servicePrefix)
|
||||
|
||||
void PackageStructurePrivate::createPackageMetadata(const QString &path)
|
||||
{
|
||||
if (metadata) {
|
||||
delete metadata;
|
||||
metadata = 0;
|
||||
}
|
||||
delete metadata;
|
||||
metadata = 0;
|
||||
|
||||
QString metadataPath(path + "/metadata.desktop");
|
||||
if (!QFile::exists(metadataPath)) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user