Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0f5d3f39 authored by Scott Wheeler's avatar Scott Wheeler

Syntax update: delete(something); -> delete something;

svn path=/trunk/kdemultimedia/juk/; revision=206649
parent 5902b9ff
......@@ -44,10 +44,10 @@ ArtsPlayer::ArtsPlayer() : Player()
ArtsPlayer::~ArtsPlayer()
{
delete(volumeControl);
delete(media);
delete(server);
delete(dispatcher);
delete volumeControl;
delete media;
delete server;
delete dispatcher;
}
void ArtsPlayer::play(const QString &fileName, float volume)
......@@ -74,7 +74,7 @@ void ArtsPlayer::play(float volume)
}
else {
kdDebug() << "Media did not initialize properly! (" << currentFile << ")" << endl;
delete(media);
delete media;
media = 0;
}
}
......@@ -92,11 +92,11 @@ void ArtsPlayer::stop()
if(serverRunning()) {
if(media) {
media->halt();
delete(media);
delete media;
media = 0;
}
if(volumeControl) {
delete(volumeControl);
delete volumeControl;
volumeControl = 0;
}
}
......@@ -222,7 +222,7 @@ void ArtsPlayer::setupVolumeControl()
Arts::connect(*volumeControl, "outright", uplink, "right");
}
else {
delete(volumeControl);
delete volumeControl;
volumeControl = 0;
kdDebug() << "Could not initialize volume control!" << endl;
}
......
......@@ -66,7 +66,7 @@ Cache::Cache() : QDict<Tag>()
Cache::~Cache()
{
delete(cache);
delete cache;
}
void Cache::load()
......@@ -92,7 +92,7 @@ void Cache::load()
// the cache is current.
if(!t->current())
delete(t);
delete t;
}
f.close();
......
......@@ -29,7 +29,7 @@ CachedTag::CachedTag(const QString &file) : Tag(file), externalTag(0), tagTrackN
CachedTag::~CachedTag()
{
delete(externalTag);
delete externalTag;
}
void CachedTag::save()
......
......@@ -63,7 +63,7 @@ void DirectoryList::removeDirectory()
QString dir = directoryListView->selectedItem()->text(0);
dirList.remove(dir);
emit(directoryRemoved(dir));
delete(directoryListView->selectedItem());
delete directoryListView->selectedItem();
}
#include "directorylist.moc"
......@@ -46,7 +46,7 @@ GStreamerPlayer::GStreamerPlayer() : QObject(0), Player()
GStreamerPlayer::~GStreamerPlayer()
{
delete(player);
delete player;
}
void GStreamerPlayer::play(const QString &fileName, float volume)
......
......@@ -298,10 +298,10 @@ void JuK::saveConfig()
bool JuK::queryClose()
{
stop();
delete(player);
delete player;
Cache::instance()->save();
saveConfig();
delete(splitter);
delete splitter;
return true;
}
......@@ -422,7 +422,7 @@ void JuK::toggleSystemTray(bool enabled)
if(enabled && !systemTray)
setupSystemTray();
else if(!enabled && systemTray) {
delete(systemTray);
delete systemTray;
systemTray = 0;
}
}
......@@ -430,7 +430,7 @@ void JuK::toggleSystemTray(bool enabled)
void JuK::setOutput(int output)
{
stop();
delete(player);
delete player;
player = Player::createPlayer(output);
}
......
......@@ -188,7 +188,7 @@ void Playlist::clearItems(const PlaylistItemList &items)
while(it.current()) {
emit(aboutToRemove(it.current()));
// members.remove(it.current()->absFilePath()); // TODO: fix this for the new sorted class
delete(it.current());
delete it.current();
++it;
}
emit(numberOfItemsChanged(this));
......@@ -241,7 +241,7 @@ void Playlist::remove(const PlaylistItemList &items)
for(QPtrListIterator<PlaylistItem> it(items); it.current(); ++it) {
if(QFile::remove(it.current()->filePath())) {
emit(aboutToRemove(it.current()));
delete(it.current());
delete it.current();
}
else
KMessageBox::sorry(this, i18n("Could not save delete ") + it.current()->fileName() + ".");
......
......@@ -60,7 +60,7 @@ PlaylistBox::PlaylistBox(PlaylistSplitter *parent, const char *name) : KListBox(
PlaylistBox::~PlaylistBox()
{
delete(playlistContextMenu);
delete playlistContextMenu;
}
void PlaylistBox::sort()
......@@ -190,8 +190,8 @@ void PlaylistBox::deleteItem(PlaylistBoxItem *item)
}
nameList.remove(item->text());
delete(item->playlist());
delete(item);
delete item->playlist();
delete item;
}
}
......
......@@ -249,18 +249,18 @@ PlaylistItem::Data *PlaylistItem::Data::newUser()
void PlaylistItem::Data::refresh()
{
delete(dataTag);
delete dataTag;
dataTag = Tag::createTag(filePath());
absFileName = absFilePath();
}
void PlaylistItem::Data::deleteUser()
{
// The delete(this) is safe because we control object creation through a
// The delete this is safe because we control object creation through a
// protected constructor and the newUser() methods.
if(--referenceCount == 0)
delete(this);
delete this;
}
Tag *PlaylistItem::Data::tag() const
......@@ -286,7 +286,7 @@ PlaylistItem::Data::Data(const QFileInfo &file, const QString &path) : QFileInfo
PlaylistItem::Data::~Data()
{
delete(dataTag);
delete dataTag;
}
#include "playlistitem.moc"
......@@ -44,7 +44,7 @@ SplashScreen *SplashScreen::instance()
void SplashScreen::finishedLoading()
{
done = true;
delete(splash);
delete splash;
splash = 0;
}
......
......@@ -123,6 +123,6 @@ void StringHash::deleteNode(Node *n)
{
if(n) {
deleteNode(n->next);
delete(n);
delete n;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment